Commit ce568283 authored by konovalovsergey's avatar konovalovsergey Committed by Alexander.Trofimov

не открываем таблицу без содержимого.

parent e8612449
...@@ -7958,24 +7958,26 @@ function Binary_DocumentTableReader(doc, oReadResult, openParams, stream, bAllow ...@@ -7958,24 +7958,26 @@ function Binary_DocumentTableReader(doc, oReadResult, openParams, stream, bAllow
res = this.bcr.Read1(length, function(t, l){ res = this.bcr.Read1(length, function(t, l){
return oThis.ReadDocTable(t, l, oNewTable); return oThis.ReadDocTable(t, l, oNewTable);
}); });
oNewTable.ReIndexing(0); if (oNewTable.Content.length > 0) {
oNewTable.Correct_BadTable(); oNewTable.ReIndexing(0);
if(2 == g_nCurFileVersion && false == oNewTable.Inline) oNewTable.Correct_BadTable();
{ if(2 == g_nCurFileVersion && false == oNewTable.Inline)
//делаем смещение левой границы {
if(false == oNewTable.PositionH.Align) //делаем смещение левой границы
{ if(false == oNewTable.PositionH.Align)
var dx = Get_TableOffsetCorrection(oNewTable); {
oNewTable.PositionH.Value += dx; var dx = Get_TableOffsetCorrection(oNewTable);
} oNewTable.PositionH.Value += dx;
} }
if(null != this.lastPar) }
{ if(null != this.lastPar)
oNewTable.Set_DocumentPrev(this.lastPar); {
this.lastPar.Set_DocumentNext(oNewTable); oNewTable.Set_DocumentPrev(this.lastPar);
this.lastPar.Set_DocumentNext(oNewTable);
}
this.lastPar = oNewTable;
Content.push(oNewTable);
} }
this.lastPar = oNewTable;
Content.push(oNewTable);
} }
else if ( c_oSerParType.sectPr === type ) else if ( c_oSerParType.sectPr === type )
{ {
...@@ -8397,24 +8399,26 @@ function Binary_DocumentTableReader(doc, oReadResult, openParams, stream, bAllow ...@@ -8397,24 +8399,26 @@ function Binary_DocumentTableReader(doc, oReadResult, openParams, stream, bAllow
res = this.bcr.Read1(length, function(t, l){ res = this.bcr.Read1(length, function(t, l){
return oThis.ReadDocTable(t, l, oNewTable); return oThis.ReadDocTable(t, l, oNewTable);
}); });
oNewTable.ReIndexing(0); if (oNewTable.Content.length > 0) {
oNewTable.Correct_BadTable(); oNewTable.ReIndexing(0);
if(2 == g_nCurFileVersion && false == oNewTable.Inline) oNewTable.Correct_BadTable();
{ if(2 == g_nCurFileVersion && false == oNewTable.Inline)
//делаем смещение левой границы {
if(false == oNewTable.PositionH.Align) //делаем смещение левой границы
{ if(false == oNewTable.PositionH.Align)
var dx = Get_TableOffsetCorrection(oNewTable); {
oNewTable.PositionH.Value += dx; var dx = Get_TableOffsetCorrection(oNewTable);
} oNewTable.PositionH.Value += dx;
} }
if(null != this.lastPar) }
{ if(null != this.lastPar)
oNewTable.Set_DocumentPrev(this.lastPar); {
this.lastPar.Set_DocumentNext(oNewTable); oNewTable.Set_DocumentPrev(this.lastPar);
this.lastPar.Set_DocumentNext(oNewTable);
}
this.lastPar = oNewTable;
oParStruct.DocContent.push(oNewTable);
} }
this.lastPar = oNewTable;
oParStruct.DocContent.push(oNewTable);
} }
else if(c_oSerRunType.fldstart === type) else if(c_oSerRunType.fldstart === type)
{ {
......
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