Commit 74c8af94 authored by konovalovsergey's avatar konovalovsergey

move Correct_BadTable to the end of load/paste

parent d51719cc
...@@ -5236,7 +5236,8 @@ function BinaryFileReader(doc, openParams) ...@@ -5236,7 +5236,8 @@ function BinaryFileReader(doc, openParams)
headers: null, headers: null,
footers: null, footers: null,
trackRevisions: null, trackRevisions: null,
drawingToMath: null drawingToMath: null,
aTableCorrect: null
}; };
this.getbase64DecodedData = function(szSrc) this.getbase64DecodedData = function(szSrc)
...@@ -5416,6 +5417,7 @@ function BinaryFileReader(doc, openParams) ...@@ -5416,6 +5417,7 @@ function BinaryFileReader(doc, openParams)
this.oReadResult.headers = []; this.oReadResult.headers = [];
this.oReadResult.footers = []; this.oReadResult.footers = [];
this.oReadResult.drawingToMath = []; this.oReadResult.drawingToMath = [];
this.oReadResult.aTableCorrect = [];
var res = c_oSerConstants.ReadOk; var res = c_oSerConstants.ReadOk;
//mtLen //mtLen
...@@ -5869,6 +5871,11 @@ function BinaryFileReader(doc, openParams) ...@@ -5869,6 +5871,11 @@ function BinaryFileReader(doc, openParams)
for (var i = 0; i < this.oReadResult.drawingToMath.length; ++i) { for (var i = 0; i < this.oReadResult.drawingToMath.length; ++i) {
this.oReadResult.drawingToMath[i].Convert_ToMathObject(true); this.oReadResult.drawingToMath[i].Convert_ToMathObject(true);
} }
for (var i = 0, length = this.oReadResult.aTableCorrect.length; i < length; ++i) {
var table = this.oReadResult.aTableCorrect[i];
table.ReIndexing(0);
table.Correct_BadTable();
}
this.Document.On_EndLoad(); this.Document.On_EndLoad();
//чтобы удалялся stream с бинарником //чтобы удалялся stream с бинарником
pptx_content_loader.Clear(true); pptx_content_loader.Clear(true);
...@@ -6160,6 +6167,11 @@ function BinaryFileReader(doc, openParams) ...@@ -6160,6 +6167,11 @@ function BinaryFileReader(doc, openParams)
var oNewComment = oCommentsNewId[i]; var oNewComment = oCommentsNewId[i];
this.Document.DrawingDocument.m_oWordControl.m_oApi.sync_AddComment( oNewComment.Id, oNewComment.Data ); this.Document.DrawingDocument.m_oWordControl.m_oApi.sync_AddComment( oNewComment.Id, oNewComment.Data );
} }
for (var i = 0, length = this.oReadResult.aTableCorrect.length; i < length; ++i) {
var table = this.oReadResult.aTableCorrect[i];
table.ReIndexing(0);
table.Correct_BadTable();
}
//чтобы удалялся stream с бинарником //чтобы удалялся stream с бинарником
pptx_content_loader.Clear(true); pptx_content_loader.Clear(true);
return { content: aContent, fonts: aPrepeareFonts, images: aPrepeareImages, bAddNewStyles: addNewStyles, aPastedImages: aPastedImages, bInBlock: bInBlock }; return { content: aContent, fonts: aPrepeareFonts, images: aPrepeareImages, bAddNewStyles: addNewStyles, aPastedImages: aPastedImages, bInBlock: bInBlock };
...@@ -8272,8 +8284,7 @@ function Binary_DocumentTableReader(doc, oReadResult, openParams, stream, bAllow ...@@ -8272,8 +8284,7 @@ function Binary_DocumentTableReader(doc, oReadResult, openParams, stream, bAllow
return oThis.ReadDocTable(t, l, oNewTable); return oThis.ReadDocTable(t, l, oNewTable);
}); });
if (oNewTable.Content.length > 0) { if (oNewTable.Content.length > 0) {
oNewTable.ReIndexing(0); this.oReadResult.aTableCorrect.push(oNewTable);
oNewTable.Correct_BadTable();
if(2 == AscCommon.CurFileVersion && false == oNewTable.Inline) if(2 == AscCommon.CurFileVersion && false == oNewTable.Inline)
{ {
//делаем смещение левой границы //делаем смещение левой границы
......
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