Commit b97f5b25 authored by Sergey.Konovalov's avatar Sergey.Konovalov Committed by Alexander.Trofimov

(2.0.0.147): AVSOfficeDocxFile2

Свойство Numbering::NumStyleLink и StyleLink на чтение/запись.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@51176 954022d7-b5bf-4e40-9824-e11837661b57
parent 50239ca3
...@@ -198,6 +198,7 @@ function CAbstractNum(Type) ...@@ -198,6 +198,7 @@ function CAbstractNum(Type)
} }
this.NumStyleLink = undefined; this.NumStyleLink = undefined;
this.StyleLink = undefined;
this.Lvl = new Array(); this.Lvl = new Array();
for ( var Index = 0; Index < 9; Index++ ) for ( var Index = 0; Index < 9; Index++ )
......
...@@ -54,7 +54,9 @@ var c_oSerNumTypes = { ...@@ -54,7 +54,9 @@ var c_oSerNumTypes = {
Num: 18, Num: 18,
Num_ANumId: 19, Num_ANumId: 19,
Num_NumId: 20, Num_NumId: 20,
lvl_PStyle: 21 lvl_PStyle: 21,
NumStyleLink: 22,
StyleLink: 23
}; };
var c_oSerOtherTableTypes = { var c_oSerOtherTableTypes = {
ImageMap:0, ImageMap:0,
...@@ -1841,23 +1843,26 @@ Binary_tblPrWriter.prototype = ...@@ -1841,23 +1843,26 @@ Binary_tblPrWriter.prototype =
}, },
WriteW: function(WAfter) WriteW: function(WAfter)
{ {
//Type if(tblwidth_Pct != WAfter.Type)
if(null != WAfter.Type) {
{ //Type
this.memory.WriteByte(c_oSerWidthType.Type); if(null != WAfter.Type)
this.memory.WriteByte(c_oSerPropLenType.Byte); {
this.memory.WriteByte(WAfter.Type); this.memory.WriteByte(c_oSerWidthType.Type);
} this.memory.WriteByte(c_oSerPropLenType.Byte);
//W this.memory.WriteByte(WAfter.Type);
if(null != WAfter.W) }
{ //W
var nVal = WAfter.W; if(null != WAfter.W)
if(tblwidth_Mm == WAfter.Type) {
nVal = Math.round(g_dKoef_mm_to_twips * WAfter.W); var nVal = WAfter.W;
this.memory.WriteByte(c_oSerWidthType.WDocx); if(tblwidth_Mm == WAfter.Type)
this.memory.WriteByte(c_oSerPropLenType.Long); nVal = Math.round(g_dKoef_mm_to_twips * WAfter.W);
this.memory.WriteLong(nVal); this.memory.WriteByte(c_oSerWidthType.WDocx);
} this.memory.WriteByte(c_oSerPropLenType.Long);
this.memory.WriteLong(nVal);
}
}
}, },
WriteCellPr: function(cellPr, vMerge) WriteCellPr: function(cellPr, vMerge)
{ {
...@@ -2061,6 +2066,16 @@ function BinaryNumberingTableWriter(memory, doc, oNumIdMap, oUsedNumIdMap) ...@@ -2061,6 +2066,16 @@ function BinaryNumberingTableWriter(memory, doc, oNumIdMap, oUsedNumIdMap)
//Id //Id
if(null != num.Id) if(null != num.Id)
this.bs.WriteItem(c_oSerNumTypes.AbstractNum_Id, function(){oThis.memory.WriteLong(index);}); this.bs.WriteItem(c_oSerNumTypes.AbstractNum_Id, function(){oThis.memory.WriteLong(index);});
if(null != num.NumStyleLink)
{
this.memory.WriteByte(c_oSerNumTypes.NumStyleLink);
this.memory.WriteString2(num.NumStyleLink);
}
if(null != num.StyleLink)
{
this.memory.WriteByte(c_oSerNumTypes.StyleLink);
this.memory.WriteString2(num.StyleLink);
}
//Lvl //Lvl
if(null != num.Lvl) if(null != num.Lvl)
this.bs.WriteItem(c_oSerNumTypes.AbstractNum_Lvls, function(){oThis.WriteLevels(num.Lvl);}); this.bs.WriteItem(c_oSerNumTypes.AbstractNum_Lvls, function(){oThis.WriteLevels(num.Lvl);});
...@@ -4981,6 +4996,10 @@ function Binary_NumberingTableReader(doc, oReadResult, stream) ...@@ -4981,6 +4996,10 @@ function Binary_NumberingTableReader(doc, oReadResult, stream)
return oThis.ReadLevels(t, l, nLevelNum++, oNewNum); return oThis.ReadLevels(t, l, nLevelNum++, oNewNum);
}); });
} }
else if ( c_oSerNumTypes.NumStyleLink === type )
oNewNum.NumStyleLink = this.stream.GetString2LE(length);
else if ( c_oSerNumTypes.StyleLink === type )
oNewNum.StyleLink = this.stream.GetString2LE(length);
else if ( c_oSerNumTypes.AbstractNum_Id === type ) else if ( c_oSerNumTypes.AbstractNum_Id === type )
{ {
this.m_oANumToNumClass[this.stream.GetULongLE()] = oNewNum; this.m_oANumToNumClass[this.stream.GetULongLE()] = oNewNum;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment