Commit cb14f775 authored by SergeyLuzyanin's avatar SergeyLuzyanin

fix Bug 35464

parent fe0dc4ab
......@@ -4659,6 +4659,37 @@ CPresentation.prototype =
{
if(Content.Drawings.length > 0)
{
if(this.FocusOnNotes && Content.Drawings.length === 1 && Content.Drawings[0].Drawing instanceof AscFormat.CGraphicFrame
&& Content.Drawings[0].Drawing.graphicObject){
var oContent = AscFormat.ExecuteNoHistory(
function(){
var oTable = Content.Drawings[0].Drawing.graphicObject;
var oResult = new AscFormat.CDrawingDocContent(this, this.DrawingDocument, 0, 0, 3000, 2000);
for(var i = 0; i < oTable.Content.length; ++i){
var oRow = oTable.Content[i];
for(var j = 0; j < oRow.Content.length; ++j){
var oCurDocContent = oRow.Content[j].Content;
for(var k = 0; k < oCurDocContent.Content.length; ++k){
oResult.Content.push(oCurDocContent.Content[k]);
}
}
}
if(oResult.Content.length > 1){
oResult.Content.splice(0, 1);
}
return oResult;
}, this, []
);
var oSelectedContent = new CSelectedContent();
oContent.SelectAll();
oContent.GetSelectedContent(oSelectedContent);
var PresentSelContent = new PresentationSelectedContent();
PresentSelContent.DocContent = oSelectedContent;
this.Insert_Content(PresentSelContent);
return;
}
else{
this.FocusOnNotes = false;
this.Slides[this.CurPage].graphicObjects.resetSelection();
for(i = 0; i < Content.Drawings.length; ++i)
{
......@@ -4688,6 +4719,7 @@ CPresentation.prototype =
this.Slides[this.CurPage].graphicObjects.selectObject(shape, 0);
}
}
}
else if(Content.DocContent)
{
if(Content.DocContent.Elements.length > 0){
......@@ -4697,7 +4729,7 @@ CPresentation.prototype =
{
if(target_doc_content.Selection.Use)
{
this.Slides[this.CurPage].graphicObjects.removeCallback(1);
oController.removeCallback(1);
}
paragraph = target_doc_content.Content[target_doc_content.CurPos.ContentPos];
if (null != paragraph && type_Paragraph == paragraph.GetType())
......@@ -4743,9 +4775,11 @@ CPresentation.prototype =
}
else
{
this.FocusOnNotes = false;
var shape = this.CreateAndAddShapeFromSelectedContent(Content.DocContent);
this.Slides[this.CurPage].graphicObjects.resetSelection();
this.Slides[this.CurPage].graphicObjects.selectObject(shape, 0);
this.CheckEmptyPlaceholderNotes();
}
}
}
......
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