Commit c860bf8c authored by Sergey.Luzyanin's avatar Sergey.Luzyanin Committed by Alexander.Trofimov

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@50107 954022d7-b5bf-4e40-9824-e11837661b57
parent 98b7ee1c
......@@ -3501,13 +3501,13 @@ function CTheme()
this.setFontScheme = function(fontScheme)
{
History.Add(this, {Type: historyitem_ChangeFontScheme, oldPr: this.themeElements.clrScheme, newPr: clrScheme});
History.Add(this, {Type: historyitem_ChangeFontScheme, oldPr: this.themeElements.fontScheme, newPr: fontScheme});
this.themeElements.fontScheme = fontScheme;
};
this.setFormatScheme = function(fmtScheme)
{
History.Add(this, {Type: historyitem_ChangeFmtScheme, oldPr: this.themeElements.clrScheme, newPr: clrScheme});
History.Add(this, {Type: historyitem_ChangeFmtScheme, oldPr: this.themeElements.fmtScheme, newPr: fmtScheme});
this.themeElements.fmtScheme = fmtScheme;
};
......@@ -3833,6 +3833,64 @@ function CTextStyles()
this.titleStyle = null;
this.bodyStyle = null;
this.otherStyle = null;
this.Write_ToBinary2 = function(w)
{
w.WriteBool(isRealObject(this.titleStyle));
if(isRealObject(this.titleStyle))
{
this.titleStyle.Write_ToBinary2(w);
}
w.WriteBool(isRealObject(this.bodyStyle));
if(isRealObject(this.bodyStyle))
{
this.bodyStyle.Write_ToBinary2(w);
}
w.WriteBool(isRealObject(this.otherStyle));
if(isRealObject(this.otherStyle))
{
this.otherStyle.Write_ToBinary2(w);
}
w.WriteString2("test");
};
this.Read_FromBinary2 = function(r)
{
if(r.GetBool())
{
this.titleStyle = new TextListStyle();
this.titleStyle.Read_FromBinary2(r);
}
else
{
this.titleStyle = null;
}
if(r.GetBool())
{
this.bodyStyle = new TextListStyle();
this.bodyStyle.Read_FromBinary2(r);
}
else
{
this.bodyStyle = null;
}
if(r.GetBool())
{
this.otherStyle = new TextListStyle();
this.otherStyle.Read_FromBinary2(r);
}
else
{
this.otherStyle = null;
}
var s = r.GetString2();
};
}
//---------------------------
......@@ -5297,6 +5355,13 @@ function CTextParagraphPr()
{
this.pPr.Write_ToBinary(w);
}
w.WriteBool(isRealObject(this.rPr));
if(isRealObject(this.rPr))
{
this.rPr.Write_ToBinary(w);
}
};
this.Read_FromBinary2 = function(r)
......@@ -5305,7 +5370,6 @@ function CTextParagraphPr()
{
this.bullet = new CBullet();
this.bullet.Read_FromBinary2(r);
}
else
{
......@@ -5325,6 +5389,12 @@ function CTextParagraphPr()
{
this.pPr.Read_FromBinary(r);
}
this.rPr = new CTextPr();
if(r.GetBool())
{
this.rPr.Read_FromBinary(r);
}
};
}
......@@ -5380,12 +5450,16 @@ function CBullet()
this.bulletSize.Write_ToBinary2(w);
}
w.WriteString2("dssdf");
w.WriteBool(isRealObject(this.bulletTypeface));
if(isRealObject(this.bulletTypeface))
{
this.bulletTypeface.Write_ToBinary2(w);
}
w.WriteBool(isRealObject(this.bulletType));
if(isRealObject(this.bulletType))
{
......@@ -5396,6 +5470,7 @@ function CBullet()
this.Read_FromBinary2 = function(r)
{
if(r.GetBool())
{
this.bulletColor = new CBulletColor();
......@@ -5408,6 +5483,7 @@ function CBullet()
this.bulletSize.Read_FromBinary2(r);
}
var s = r.GetString2();
if(r.GetBool())
{
this.bulletTypeface = new CBulletTypeface();
......@@ -5545,7 +5621,7 @@ function CBulletTypeface()
w.WriteBool(typeof this.typeface === "string");
if(typeof this.typeface === "string")
{
w.WriteString(this.typeface);
w.WriteString2(this.typeface);
}
};
......@@ -5596,7 +5672,7 @@ function CBulletType()
w.WriteBool(typeof this.Char === "string");
if(typeof this.Char === "string")
{
w.WriteString(this.Char);
w.WriteString2(this.Char);
}
w.WriteBool(isRealNumber(this.AutoNumType));
......@@ -5660,6 +5736,8 @@ function TextListStyle()
this.Write_ToBinary2 = function(w)
{
w.WriteBool(MASTER_STYLES);
for(var i = 0; i < 10; ++i)
{
w.WriteBool(isRealObject(this.levels[i]));
......@@ -5672,6 +5750,8 @@ function TextListStyle()
this.Read_FromBinary2 = function(r)
{
var b = r.GetBool();
for(var i = 0; i < 10; ++i)
{
if(r.GetBool())
......
......@@ -155,10 +155,9 @@ function CTableId()
case historyitem_type_Layout : Element = new SlideLayout(); break;
case historyitem_type_TextBody : Element = new CTextBody(); break;
case historyitem_type_GraphicFrame : Element = new CGraphicFrame(); break;
}
case historyitem_type_SlideMaster : Element = new MasterSlide(); break;
case historyitem_type_Theme : Element = new CTheme(); break;
}
Element.Read_FromBinary2(Reader);
......
This diff is collapsed.
......@@ -228,6 +228,8 @@ CStatistics.prototype =
}
};
var MASTER_STYLES = false;
function CPresentation(DrawingDocument)
{
this.History = new CHistory(this);
......@@ -399,6 +401,8 @@ function CSelectedElementsInfo()
return ( this.m_nDrawing === selected_DrawingObject ? true : false );
};
this.Set_MixedSelection = function()
{
this.m_bMixedSelection = true;
......@@ -423,6 +427,12 @@ CPresentation.prototype =
},
addSlideMaster: function(pos, master)
{
History.Add(this, {Type:historyitem_Presenattion_AddSlideMaster, pos: pos, master: master});
this.slideMasters.splice(pos, 0, master);
},
Get_Id : function()
{
return this.Id;
......@@ -5397,6 +5407,11 @@ CPresentation.prototype =
}
break;
}
case historyitem_Presenattion_AddSlideMaster:
{
this.slideMasters.splice(Data.pos, 1);
break;
}
}
},
......@@ -5454,6 +5469,11 @@ CPresentation.prototype =
}
break;
}
case historyitem_Presenattion_AddSlideMaster:
{
this.slideMasters.splice(Data.pos, 0, Data.master);
break;
}
}
},
......@@ -5876,9 +5896,6 @@ CPresentation.prototype =
this.DrawingDocument.OnRecalculatePage(_array[i], this.Slides[_array[i]]);
}
this.DrawingDocument.OnEndRecalculate();
}
},
......@@ -5891,8 +5908,8 @@ CPresentation.prototype =
return;
}
if(!(this.Document_Is_SelectionLocked(changestype_Theme) === false))
return;
//if(!(this.Document_Is_SelectionLocked(changestype_Theme) === false))
// return;
if(this.startChangeThemeTimeOutId != null)
{
clearTimeout(this.startChangeThemeTimeOutId);
......@@ -5905,9 +5922,9 @@ CPresentation.prototype =
{
clearTimeout(this.forwardChangeThemeTimeOutId);
}
this.themes.push(themeInfo.Theme);
this.slideMasters.push(themeInfo.Master);
this.slideLayouts = this.slideLayouts.concat(themeInfo.Layouts);
//this.themes.push(themeInfo.Theme);
this.addSlideMaster(this.slideMasters.length, themeInfo.Master);
//this.slideLayouts = this.slideLayouts.concat(themeInfo.Layouts);
var _new_master = themeInfo.Master;
_new_master.presentation = this;
......@@ -5938,12 +5955,10 @@ CPresentation.prototype =
_arr_old_layouts[_slide_index] = _arr_slides[_slide_index].Layout;
}
History.Create_NewPoint();
// History.Create_NewPoint();
var _arr_new_layouts = [];
var _new_layout;
var _history_data;
var _shape;
for(_slide_index = 0; _slide_index < this.Slides.length; ++_slide_index)
{
if(_arr_slides[_slide_index].Layout.calculatedType == null)
......@@ -6504,6 +6519,12 @@ CPresentation.prototype =
Writer.WriteDouble(Data.newH);
break;
}
case historyitem_Presenattion_AddSlideMaster:
{
Writer.WriteLong(Data.pos);
Writer.WriteString2(Data.master.Get_Id());
break;
}
}
return Writer;
......@@ -6615,6 +6636,14 @@ CPresentation.prototype =
{
History.TurnOn();
}
break;
}
case historyitem_Presenattion_AddSlideMaster:
{
var pos = Reader.GetLong();
var id = Reader.GetString2();
this.slideMasters.splice(pos, 0, g_oTableId.Get_ById(id));
break;
}
}
return true;
......
This diff is collapsed.
......@@ -1609,7 +1609,7 @@ CGraphicObjects.prototype = {
image.spPr.xfrm.offY = (this.slide.presentation.Height - H)/2;
image.spPr.xfrm.extX = W;
image.spPr.xfrm.extY = H;
this.slide.addSp(image);
this.slide.addToSpTreeToPos(this.slide.cSld.spTree.length, image);
editor.WordControl.m_oLogicDocument.recalcMap[image.Id] = image;
},
......
......@@ -230,6 +230,17 @@ var historyitem_SetShowMasterSp = 12;
var historyitem_AddComment = 13;
var historyitem_RemoveComment = 14;
var historyitem_MoveComment = 15;
var historyitem_SetTxStyles = 16;
var historyitem_AddLayout = 17;
var historyitem_SetLayoutMatchingName = 18;
var historyitem_SetLayoutMaster = 19;
var historyitem_SetLayoutType = 20;
var historyitem_SetMasterTheme = 21;
......@@ -248,6 +259,8 @@ var historyitem_PropLockerSetId = 0;
var historyitem_Presenattion_AddSlide = 1; // Добавляем слайд
var historyitem_Presenattion_RemoveSlide = 2; // Удаляем слайд
var historyitem_Presenattion_SlideSize = 3; // Меняем размер слайда
var historyitem_Presenattion_AddSlideMaster = 4; // Меняем размер слайда
......@@ -414,6 +427,8 @@ var historyitem_type_Layout = 31;
var historyitem_type_TextBody = 32;
var historyitem_type_GraphicFrame = 33;
var historyitem_type_Theme = 34;
var historyitem_type_SlideMaster = 35;
......
......@@ -6761,7 +6761,7 @@ CParaPr.prototype =
if ( Flags & 256 )
{
this.Brd.Between = new CDocumentBorder();
this.Brd.Bottom.Read_FromBinary( Reader );
this.Brd.Between.Read_FromBinary( Reader );
}
if ( Flags & 512 )
......
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