Commit 567154a7 authored by SergeyLuzyanin's avatar SergeyLuzyanin

copy notes

parent 6ee15613
......@@ -68,6 +68,23 @@
return AscDFH.historyitem_type_Notes;
};
CNotes.prototype.Get_Id = function () {
return this.Id;
};
CNotes.prototype.Clear_ContentChanges = function()
{
};
CNotes.prototype.Add_ContentChanges = function(Changes)
{
};
CNotes.prototype.Refresh_ContentChanges = function()
{
};
CNotes.prototype.Write_ToBinary2 = function(w){
w.WriteLong(this.getObjectType());
w.WriteString2(this.Id);
......@@ -187,6 +204,50 @@
return this.Master.Theme;
};
CNotes.prototype.Refresh_RecalcData = function(){
};
CNotes.prototype.Refresh_RecalcData2 = function(){
};
CNotes.prototype.createDuplicate = function(){
var copy = new CNotes();
if(this.clrMap){
copy.setClrMap(this.clrMap.createDuplicate());
}
if(typeof this.cSld.name === "string" && this.cSld.name.length > 0)
{
copy.setCSldName(this.cSld.name);
}
if(this.cSld.Bg)
{
copy.changeBackground(this.cSld.Bg.createFullCopy());
}
for(var i = 0; i < this.cSld.spTree.length; ++i)
{
var _copy;
_copy = this.cSld.spTree[i].copy();
copy.addToSpTreeToPos(copy.cSld.spTree.length, _copy);
copy.cSld.spTree[copy.cSld.spTree.length - 1].setParent2(copy);
}
if(AscFormat.isRealBool(this.showMasterPhAnim))
{
copy.setShowPhAnim(this.showMasterPhAnim);
}
if(AscFormat.isRealBool(this.showMasterSp))
{
copy.setShowMasterSp(this.showMasterSp);
}
copy.setNotesMaster(this.Master);
return copy;
};
function CreateNotes(){
var oN = new CNotes();
var oSp = new AscFormat.CShape();
......
......@@ -1776,6 +1776,7 @@ CPresentation.prototype =
if(this.Slides[this.CurPage])
{
editor.WordControl.Thumbnails.SetFocusElement(FOCUS_OBJECT_MAIN);
this.FocusOnNotes = false;
var oController = this.Slides[this.CurPage].graphicObjects;
History.Create_NewPoint(AscDFH.historydescription_Presentation_AddFlowImage);
var Image = oController.createImage(Img, (this.Slides[this.CurPage].Width - W)/2, (this.Slides[this.CurPage].Height - H)/2, W, H);
......@@ -1828,6 +1829,7 @@ CPresentation.prototype =
_this.Slides[_this.CurPage] && _this.Slides[_this.CurPage].graphicObjects.checkSelectedObjectsAndCallback(function()
{
editor.WordControl.Thumbnails.SetFocusElement(FOCUS_OBJECT_MAIN);
this.FocusOnNotes = false;
var Image = _this.Slides[_this.CurPage].graphicObjects.getChartSpace2(binary, null);
Image.setParent(_this.Slides[_this.CurPage]);
Image.addToDrawingObjects();
......@@ -1901,6 +1903,7 @@ CPresentation.prototype =
if(this.Document_Is_SelectionLocked(AscCommon.changestype_AddShape, graphic_frame) === false)
{
editor.WordControl.Thumbnails.SetFocusElement(FOCUS_OBJECT_MAIN);
this.FocusOnNotes = false;
//this.Slides[this.CurPage].graphicObjects.resetSelection();
//this.Slides[this.CurPage].graphicObjects.selectObject(graphic_frame, 0);
this.Check_GraphicFrameRowHeight(graphic_frame);
......
......@@ -293,6 +293,9 @@ Slide.prototype =
copy.applyTiming(this.timing.createDuplicate());
copy.setSlideSize(this.Width, this.Height);
if(this.notes){
copy.setNotes(this.notes.createDuplicate());
}
if(!this.recalcInfo.recalculateBackground && !this.recalcInfo.recalculateSpTree)
{
......
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