Commit 0c0e1cf4 authored by Sergey Luzyanin's avatar Sergey Luzyanin

docPr

parent 819ec09e
...@@ -4577,6 +4577,8 @@ function CNvPr() ...@@ -4577,6 +4577,8 @@ function CNvPr()
this.id = 0; this.id = 0;
this.name = ""; this.name = "";
this.isHidden = false; this.isHidden = false;
this.descr = null;
this.title = null;
this.Id = g_oIdCounter.Get_NewId(); this.Id = g_oIdCounter.Get_NewId();
g_oTableId.Add(this, this.Id) g_oTableId.Add(this, this.Id)
...@@ -4625,6 +4627,18 @@ CNvPr.prototype = ...@@ -4625,6 +4627,18 @@ CNvPr.prototype =
this.isHidden = isHidden; this.isHidden = isHidden;
}, },
setDecr: function(descr)
{
History.Add(this, {Type: AscDFH.historyitem_CNvPr_SetDescr , oldPr: this.descr, newPr: descr});
this.descr = descr;
},
setTitle: function(title)
{
History.Add(this, {Type: AscDFH.historyitem_CNvPr_SetTitle, oldPr: this.title, newPr: title});
this.title = title;
},
Undo: function(data) Undo: function(data)
{ {
switch(data.Type) switch(data.Type)
...@@ -4644,6 +4658,18 @@ CNvPr.prototype = ...@@ -4644,6 +4658,18 @@ CNvPr.prototype =
this.isHidden = data.oldIsHidden; this.isHidden = data.oldIsHidden;
break; break;
} }
case AscDFH.historyitem_CNvPr_SetDescr:
{
this.descr = data.oldPr;
break;
}
case AscDFH.historyitem_CNvPr_SetTitle:
{
this.title = data.oldPr;
break;
}
} }
}, },
...@@ -4666,6 +4692,17 @@ CNvPr.prototype = ...@@ -4666,6 +4692,17 @@ CNvPr.prototype =
this.isHidden = data.newIsHidden; this.isHidden = data.newIsHidden;
break; break;
} }
case AscDFH.historyitem_CNvPr_SetDescr:
{
this.descr = data.newPr;
break;
}
case AscDFH.historyitem_CNvPr_SetTitle:
{
this.title = data.newPr;
break;
}
} }
}, },
...@@ -4694,6 +4731,17 @@ CNvPr.prototype = ...@@ -4694,6 +4731,17 @@ CNvPr.prototype =
writeBool(w, data.newIsHidden); writeBool(w, data.newIsHidden);
break; break;
} }
case AscDFH.historyitem_CNvPr_SetDescr:
{
writeString(w, data.newPr);
break;
}
case AscDFH.historyitem_CNvPr_SetTitle:
{
writeString(w, data.newPr);
break;
}
} }
}, },
...@@ -4727,6 +4775,18 @@ CNvPr.prototype = ...@@ -4727,6 +4775,18 @@ CNvPr.prototype =
this.isHidden = readBool(r); this.isHidden = readBool(r);
break; break;
} }
case AscDFH.historyitem_CNvPr_SetDescr:
{
this.descr = readString(r);
break;
}
case AscDFH.historyitem_CNvPr_SetTitle:
{
this.title = readString(r);
break;
}
} }
}, },
......
...@@ -1736,6 +1736,8 @@ ...@@ -1736,6 +1736,8 @@
window['AscDFH'].historyitem_CNvPr_SetId = window['AscDFH'].historyitem_type_CNvPr | 1; window['AscDFH'].historyitem_CNvPr_SetId = window['AscDFH'].historyitem_type_CNvPr | 1;
window['AscDFH'].historyitem_CNvPr_SetName = window['AscDFH'].historyitem_type_CNvPr | 2; window['AscDFH'].historyitem_CNvPr_SetName = window['AscDFH'].historyitem_type_CNvPr | 2;
window['AscDFH'].historyitem_CNvPr_SetIsHidden = window['AscDFH'].historyitem_type_CNvPr | 3; window['AscDFH'].historyitem_CNvPr_SetIsHidden = window['AscDFH'].historyitem_type_CNvPr | 3;
window['AscDFH'].historyitem_CNvPr_SetDescr = window['AscDFH'].historyitem_type_CNvPr | 4;
window['AscDFH'].historyitem_CNvPr_SetTitle = window['AscDFH'].historyitem_type_CNvPr | 5;
window['AscDFH'].historyitem_NvPr_SetIsPhoto = window['AscDFH'].historyitem_type_NvPr | 1; window['AscDFH'].historyitem_NvPr_SetIsPhoto = window['AscDFH'].historyitem_type_NvPr | 1;
window['AscDFH'].historyitem_NvPr_SetUserDrawn = window['AscDFH'].historyitem_type_NvPr | 2; window['AscDFH'].historyitem_NvPr_SetUserDrawn = window['AscDFH'].historyitem_type_NvPr | 2;
......
...@@ -111,6 +111,8 @@ function ParaDrawing(W, H, GraphicObj, DrawingDocument, DocumentContent, Parent) ...@@ -111,6 +111,8 @@ function ParaDrawing(W, H, GraphicObj, DrawingDocument, DocumentContent, Parent)
B : 0 B : 0
}; };
this.docPr = new AscFormat.CNvPr();
this.SizeRelH = undefined; this.SizeRelH = undefined;
this.SizeRelV = undefined; this.SizeRelV = undefined;
//{RelativeFrom : c_oAscRelativeFromH.Column, Percent: ST_PositivePercentage} //{RelativeFrom : c_oAscRelativeFromH.Column, Percent: ST_PositivePercentage}
...@@ -1673,6 +1675,7 @@ ParaDrawing.prototype.Write_ToBinary2 = function(Writer) ...@@ -1673,6 +1675,7 @@ ParaDrawing.prototype.Write_ToBinary2 = function(Writer)
AscFormat.writeObject(Writer, this.Parent); AscFormat.writeObject(Writer, this.Parent);
AscFormat.writeObject(Writer, this.wrappingPolygon); AscFormat.writeObject(Writer, this.wrappingPolygon);
AscFormat.writeLong(Writer, this.RelativeHeight); AscFormat.writeLong(Writer, this.RelativeHeight);
AscFormat.writeObject(Writer, this.docPr);
}; };
ParaDrawing.prototype.Read_FromBinary2 = function(Reader) ParaDrawing.prototype.Read_FromBinary2 = function(Reader)
{ {
...@@ -1687,6 +1690,7 @@ ParaDrawing.prototype.Read_FromBinary2 = function(Reader) ...@@ -1687,6 +1690,7 @@ ParaDrawing.prototype.Read_FromBinary2 = function(Reader)
this.Parent = AscFormat.readObject(Reader); this.Parent = AscFormat.readObject(Reader);
this.wrappingPolygon = AscFormat.readObject(Reader); this.wrappingPolygon = AscFormat.readObject(Reader);
this.RelativeHeight = AscFormat.readLong(Reader); this.RelativeHeight = AscFormat.readLong(Reader);
this.docPr = AscFormat.readObject(Reader);
if (this.wrappingPolygon) if (this.wrappingPolygon)
{ {
this.wrappingPolygon.wordGraphicObject = this; this.wrappingPolygon.wordGraphicObject = this;
......
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