Commit 86139e1b authored by Sergey Luzyanin's avatar Sergey Luzyanin

fix Bug 32913

parent ff6fd90a
......@@ -473,7 +473,7 @@ function ConvertTableToGraphicFrame(oTable, oPresentation){
}
var nIndex = oTable2.Content.length;
oTable2.Content[nIndex] = oNewRow;
History.Add( oTable2, { Type : AscDFH.historyitem_Table_AddRow, Pos : Index, Item : { Row : oTable2.Content[nIndex], TableRowsBottom : {}, RowsInfo : {} } } );
History.Add( oTable2, { Type : AscDFH.historyitem_Table_AddRow, Pos : nIndex, Item : { Row : oTable2.Content[nIndex], TableRowsBottom : {}, RowsInfo : {} } } );
}
if(!oGraphicFrame.spPr){
......@@ -491,6 +491,7 @@ function ConvertTableToGraphicFrame(oTable, oPresentation){
}
oGraphicFrame.setGraphicObject(oTable2);
oGraphicFrame.setBDeleted(false);
return oGraphicFrame;
}
function RecalculateDocContentByMaxLine(oDocContent, dMaxWidth, bNeedRecalcAllDrawings)
......
......@@ -3783,32 +3783,35 @@ PasteProcessor.prototype =
_convertTableToPPTX: function(table)
{
//TODO пересмотреть обработку для вложенных таблиц(можно сделать так, как при копировании из документов в таблицы)
var allRows = [];
this.maxTableCell = 0;
table = this._replaceInnerTables(table, allRows, true);
//ковертим внутренние параграфы
table.bPresentation = true;
for(var i = 0; i < table.Content.length; i++)
{
for(var j = 0; j < table.Content[i].Content.length; j++)
{
var cDocumentContent = table.Content[i].Content[j].Content;
cDocumentContent.bPresentation = true;
var nIndex = 0;
for(var n = 0; n < cDocumentContent.Content.length; n++)
{
if(cDocumentContent.Content[n] instanceof Paragraph)
var oTable = AscFormat.ExecuteNoHistory(function(){
var allRows = [];
this.maxTableCell = 0;
table = this._replaceInnerTables(table, allRows, true);
//ковертим внутренние параграфы
table.bPresentation = true;
for(var i = 0; i < table.Content.length; i++)
{
for(var j = 0; j < table.Content[i].Content.length; j++)
{
var cDocumentContent = table.Content[i].Content[j].Content;
cDocumentContent.bPresentation = true;
var nIndex = 0;
for(var n = 0; n < cDocumentContent.Content.length; n++)
{
cDocumentContent.Content[nIndex] = AscFormat.ConvertParagraphToPPTX(cDocumentContent.Content[nIndex]);
++nIndex;
}
if(cDocumentContent.Content[n] instanceof Paragraph)
{
cDocumentContent.Content[nIndex] = AscFormat.ConvertParagraphToPPTX(cDocumentContent.Content[nIndex]);
++nIndex;
}
}
}
}
return table;
}
}
}
table.Set_TableLayout(tbllayout_Fixed);
return table;
}, this, []);
return oTable;
},
_replaceInnerTables: function(table, allRows, isRoot)
......
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