Commit 6b61c31d authored by SergeyLuzyanin's avatar SergeyLuzyanin

fix Bug 35424

parent 15445d6c
...@@ -4149,7 +4149,7 @@ CShape.prototype.draw = function (graphics, transform, transformText, pageIndex) ...@@ -4149,7 +4149,7 @@ CShape.prototype.draw = function (graphics, transform, transformText, pageIndex)
shape_drawer.fromShape2(this, graphics, this.spPr.geometry); shape_drawer.fromShape2(this, graphics, this.spPr.geometry);
shape_drawer.draw(this.spPr.geometry); shape_drawer.draw(this.spPr.geometry);
} }
if (this.isEmptyPlaceholder() && graphics.IsNoDrawingEmptyPlaceholder !== true) if (this.isEmptyPlaceholder() && !(this.pen && this.pen.Fill && this.pen.Fill.fill) && graphics.IsNoDrawingEmptyPlaceholder !== true)
{ {
var drawingObjects = this.getDrawingObjectsController(); var drawingObjects = this.getDrawingObjectsController();
if (graphics.m_oContext !== undefined && graphics.IsTrack === undefined && (!drawingObjects || AscFormat.getTargetTextObject(drawingObjects) !== this )) if (graphics.m_oContext !== undefined && graphics.IsTrack === undefined && (!drawingObjects || AscFormat.getTargetTextObject(drawingObjects) !== this ))
......
...@@ -5687,8 +5687,8 @@ function CNotesDrawer(page) ...@@ -5687,8 +5687,8 @@ function CNotesDrawer(page)
g.m_oCoordTransform.ty = -this.Scroll; g.m_oCoordTransform.ty = -this.Scroll;
g.transform(1, 0, 0, 1, 0, 0); g.transform(1, 0, 0, 1, 0, 0);
g.IsNoDrawingEmptyPlaceholder = true; //g.IsNoDrawingEmptyPlaceholder = true;
g.IsNoDrawingEmptyPlaceholderText = true; // g.IsNoDrawingEmptyPlaceholderText = true;
this.HtmlPage.m_oDrawingDocument.isDrawingNotes = true; this.HtmlPage.m_oDrawingDocument.isDrawingNotes = true;
this.HtmlPage.m_oLogicDocument.Notes_Draw(this.Slide, g); this.HtmlPage.m_oLogicDocument.Notes_Draw(this.Slide, g);
......
...@@ -1856,6 +1856,7 @@ CPresentation.prototype = ...@@ -1856,6 +1856,7 @@ CPresentation.prototype =
oController.selectObject(Image, 0); oController.selectObject(Image, 0);
this.Recalculate(); this.Recalculate();
this.Document_UpdateInterfaceState(); this.Document_UpdateInterfaceState();
this.CheckEmptyPlaceholderNotes();
} }
}, },
...@@ -1908,6 +1909,7 @@ CPresentation.prototype = ...@@ -1908,6 +1909,7 @@ CPresentation.prototype =
_this.Slides[_this.CurPage].graphicObjects.resetSelection(); _this.Slides[_this.CurPage].graphicObjects.resetSelection();
_this.Slides[_this.CurPage].graphicObjects.selectObject(Image, 0); _this.Slides[_this.CurPage].graphicObjects.selectObject(Image, 0);
_this.Document_UpdateInterfaceState(); _this.Document_UpdateInterfaceState();
this.CheckEmptyPlaceholderNotes();
}, [], false, AscDFH.historydescription_Presentation_AddChart); }, [], false, AscDFH.historydescription_Presentation_AddChart);
}, },
...@@ -1983,6 +1985,7 @@ CPresentation.prototype = ...@@ -1983,6 +1985,7 @@ CPresentation.prototype =
this.Recalculate(); this.Recalculate();
this.Document_UpdateInterfaceState(); this.Document_UpdateInterfaceState();
this.Document_UpdateSelectionState(); this.Document_UpdateSelectionState();
this.CheckEmptyPlaceholderNotes();
} }
else else
{ {
...@@ -3427,6 +3430,19 @@ CPresentation.prototype = ...@@ -3427,6 +3430,19 @@ CPresentation.prototype =
return bRetValue; return bRetValue;
}, },
CheckEmptyPlaceholderNotes: function(){
var oCurSlide = this.Slides[this.CurPage];
if(oCurSlide && oCurSlide.notesShape){
var oContent = oCurSlide.notesShape.getDocContent();
if(oContent && oContent.Is_Empty()){
this.DrawingDocument.Notes_OnRecalculate(this.CurPage, this.Slides[this.CurPage].NotesWidth, this.Slides[this.CurPage].getNotesHeight());
return true;
}
}
return false;
},
OnMouseDown : function(e, X, Y, PageIndex) OnMouseDown : function(e, X, Y, PageIndex)
{ {
this.CurPage = PageIndex; this.CurPage = PageIndex;
...@@ -3446,6 +3462,7 @@ CPresentation.prototype = ...@@ -3446,6 +3462,7 @@ CPresentation.prototype =
this.Document_UpdateSelectionState(); this.Document_UpdateSelectionState();
} }
this.Document_UpdateInterfaceState(); this.Document_UpdateInterfaceState();
this.CheckEmptyPlaceholderNotes();
}, },
OnMouseUp : function(e, X, Y, PageIndex) OnMouseUp : function(e, X, Y, PageIndex)
...@@ -3516,6 +3533,7 @@ CPresentation.prototype = ...@@ -3516,6 +3533,7 @@ CPresentation.prototype =
e.ctrlKey = e.CtrlKey; e.ctrlKey = e.CtrlKey;
e.shiftKey = e.ShiftKey; e.shiftKey = e.ShiftKey;
var ret = oCurSlide.notes.graphicObjects.onMouseDown(e, X, Y); var ret = oCurSlide.notes.graphicObjects.onMouseDown(e, X, Y);
this.CheckEmptyPlaceholderNotes();
if(!ret) if(!ret)
{ {
this.Document_UpdateSelectionState(); this.Document_UpdateSelectionState();
...@@ -4629,6 +4647,7 @@ CPresentation.prototype = ...@@ -4629,6 +4647,7 @@ CPresentation.prototype =
this.bGoToPage = true; this.bGoToPage = true;
this.bNeedUpdateTh = true; this.bNeedUpdateTh = true;
this.FocusOnNotes = false; this.FocusOnNotes = false;
this.CheckEmptyPlaceholderNotes();
} }
else if(this.Slides[this.CurPage]) else if(this.Slides[this.CurPage])
......
...@@ -583,7 +583,14 @@ CShape.prototype.recalculateContent2 = function() ...@@ -583,7 +583,14 @@ CShape.prototype.recalculateContent2 = function()
{ {
return; return;
} }
var text = typeof pHText[0][this.nvSpPr.nvPr.ph.type] === "string" && pHText[0][this.nvSpPr.nvPr.ph.type].length > 0 ? pHText[0][this.nvSpPr.nvPr.ph.type] : pHText[0][AscFormat.phType_body]; var text;
if(this.parent instanceof AscCommonSlide.CNotes && this.nvSpPr.nvPr.ph.type === AscFormat.phType_body){
text = "Click to add notes";
}
else{
text = typeof pHText[0][this.nvSpPr.nvPr.ph.type] === "string" && pHText[0][this.nvSpPr.nvPr.ph.type].length > 0 ? pHText[0][this.nvSpPr.nvPr.ph.type] : pHText[0][AscFormat.phType_body];
}
if (!this.txBody.content2){ if (!this.txBody.content2){
this.txBody.content2 = AscFormat.CreateDocContentFromString(AscCommon.translateManager.getValue(text), this.getDrawingDocument(), this.txBody); this.txBody.content2 = AscFormat.CreateDocContentFromString(AscCommon.translateManager.getValue(text), this.getDrawingDocument(), this.txBody);
} }
......
...@@ -1072,6 +1072,15 @@ Slide.prototype = ...@@ -1072,6 +1072,15 @@ Slide.prototype =
this.notesShape.contentWidth = Width; this.notesShape.contentWidth = Width;
this.notesShape.contentHeight = 2000; this.notesShape.contentHeight = 2000;
} }
this.notesShape.transformText2 = this.notesShape.transformText;
this.notesShape.invertTransformText2 = this.notesShape.invertTransformText;
var oOldGeometry = this.notesShape.spPr.geometry;
this.notesShape.spPr.geometry = null;
this.notesShape.extX = Width;
this.notesShape.extX = 2000;
this.notesShape.recalculateContent2();
this.notesShape.spPr.geometry = oOldGeometry;
this.notesShape.pen = AscFormat.CreateNoFillLine();
} }
}, this, []); }, this, []);
}, },
...@@ -1533,10 +1542,10 @@ AscFormat.CTextBody.prototype.Get_AbsoluteColumn = function(CurPage) ...@@ -1533,10 +1542,10 @@ AscFormat.CTextBody.prototype.Get_AbsoluteColumn = function(CurPage)
AscFormat.CTextBody.prototype.checkCurrentPlaceholder = function() AscFormat.CTextBody.prototype.checkCurrentPlaceholder = function()
{ {
var presentation = editor.WordControl.m_oLogicDocument; var presentation = editor.WordControl.m_oLogicDocument;
var oCurController = presentation.GetCurrentController();
if(presentation.Slides[presentation.CurPage]) if(oCurController)
{ {
return presentation.Slides[presentation.CurPage].graphicObjects.getTargetDocContent() === this.content; return oCurController.getTargetDocContent() === this.content;
} }
return false; return false;
}; };
......
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