Commit 7a4f68cd 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@49737 954022d7-b5bf-4e40-9824-e11837661b57
parent ed5bd13b
...@@ -1107,8 +1107,8 @@ var changestype_Text_Props = 61; // Изменение свойств ...@@ -1107,8 +1107,8 @@ var changestype_Text_Props = 61; // Изменение свойств
var changestype_RemoveSlide = 62; // Изменение свойств фигуры var changestype_RemoveSlide = 62; // Изменение свойств фигуры
var changestype_PresentationProps = 63; // Изменение темы, цветовой схемы, размера слайда; var changestype_PresentationProps = 63; // Изменение темы, цветовой схемы, размера слайда;
var changestype_Theme = 64; // Изменение темы; var changestype_Theme = 64; // Изменение темы;
var changestype_ColorScheme = 65; // Изменение цветовой схемы; var changestype_SlideSize = 65; // Изменение цветовой схемы;
var changestype_SlideSize = 66; // Изменение цветовой схемы; var changestype_SlideBg = 66; // Изменение цветовой схемы;
......
...@@ -354,6 +354,9 @@ function CPresentation(DrawingDocument) ...@@ -354,6 +354,9 @@ function CPresentation(DrawingDocument)
this.forwardChangeThemeTimeOutId = null; this.forwardChangeThemeTimeOutId = null;
this.backChangeThemeTimeOutId = null; this.backChangeThemeTimeOutId = null;
this.startChangeThemeTimeOutId = null; this.startChangeThemeTimeOutId = null;
this.DefaultSlideTiming = new CAscSlideTiming();
this.DefaultSlideTiming.setDefaultParams();
// Добавляем данный класс в таблицу Id (обязательно в конце конструктора) // Добавляем данный класс в таблицу Id (обязательно в конце конструктора)
g_oTableId.Add( this, this.Id ); g_oTableId.Add( this, this.Id );
...@@ -5142,12 +5145,17 @@ CPresentation.prototype = ...@@ -5142,12 +5145,17 @@ CPresentation.prototype =
changeBackground: function(bg, arr_ind) changeBackground: function(bg, arr_ind)
{ {
for(var i = 0; i <arr_ind.length; ++i) if(this.Document_Is_SelectionLocked(changestype_SlideBg) === false)
{ {
this.Slides[arr_ind[i]].changeBackground(bg); History.Create_NewPoint();
this.DrawingDocument.OnRecalculatePage(arr_ind[i], this.Slides[arr_ind[i]]); for(var i = 0; i <arr_ind.length; ++i)
{
this.Slides[arr_ind[i]].changeBackground(bg);
this.DrawingDocument.OnRecalculatePage(arr_ind[i], this.Slides[arr_ind[i]]);
}
this.DrawingDocument.OnEndRecalculate(true, false);
this.Document_UpdateInterfaceState();
} }
this.DrawingDocument.OnEndRecalculate(true, false);
}, },
// Обновляем линейки // Обновляем линейки
...@@ -6290,6 +6298,21 @@ CPresentation.prototype = ...@@ -6290,6 +6298,21 @@ CPresentation.prototype =
} }
} }
if(CheckType === changestype_SlideBg)
{
var selected_slides = editor.WordControl.Thumbnails.GetSelectedArray();
for(var i = 0; i < selected_slides.length; ++i)
{
var check_obj =
{
"type": c_oAscLockTypeElemPresentation.Slide,
"val": this.Slides[selected_slides[i]].backgroundLock.Get_Id(),
"guid": this.Slides[selected_slides[i]].backgroundLock.Get_Id()
};
this.Slides[selected_slides[i]].backgroundLock.Lock.Check(check_obj);
}
}
if(CheckType === changestype_Text_Props) if(CheckType === changestype_Text_Props)
{ {
if(cur_slide.deleteLock.Lock.Type !== locktype_Mine && cur_slide.deleteLock.Lock.Type !== locktype_None) if(cur_slide.deleteLock.Lock.Type !== locktype_Mine && cur_slide.deleteLock.Lock.Type !== locktype_None)
......
...@@ -25,6 +25,10 @@ function Slide(presentation, slideLayout, slideNum) ...@@ -25,6 +25,10 @@ function Slide(presentation, slideLayout, slideNum)
this.backgroundFill = null; this.backgroundFill = null;
this.timing = new CAscSlideTiming();
this.timing.setDefaultParams();
this.recalcInfo = this.recalcInfo =
{ {
recalculateBackground: true, recalculateBackground: true,
...@@ -36,6 +40,7 @@ function Slide(presentation, slideLayout, slideNum) ...@@ -36,6 +40,7 @@ function Slide(presentation, slideLayout, slideNum)
this.searchingArray = new Array(); // массив объектов для селекта this.searchingArray = new Array(); // массив объектов для селекта
this.selectionArray = new Array(); // массив объектов для поиска this.selectionArray = new Array(); // массив объектов для поиска
this.changeProportions = function(kW, kH) this.changeProportions = function(kW, kH)
{ {
var _graphic_objects = this.cSld.spTree; var _graphic_objects = this.cSld.spTree;
...@@ -901,6 +906,7 @@ Slide.prototype = ...@@ -901,6 +906,7 @@ Slide.prototype =
changeBackground: function(bg) changeBackground: function(bg)
{ {
History.Add(this, {Type: historyitem_ChangeBg, oldBg: this.cSld.Bg ? this.cSld.Bg.createFullCopy() : null, newBg: bg});
this.cSld.Bg = bg.createFullCopy(); this.cSld.Bg = bg.createFullCopy();
this.recalculateBackground(); this.recalculateBackground();
}, },
...@@ -1382,6 +1388,14 @@ Slide.prototype = ...@@ -1382,6 +1388,14 @@ Slide.prototype =
this.layoutLock = null; this.layoutLock = null;
break; break;
} }
case historyitem_ChangeBg:
{
this.cSld.Bg = data.oldBg;
this.recalcInfo.recalculateBackground = true;
editor.WordControl.m_oLogicDocument.recalcMap[this.Id] = this;
break;
}
} }
}, },
...@@ -1408,6 +1422,14 @@ Slide.prototype = ...@@ -1408,6 +1422,14 @@ Slide.prototype =
this.layoutLock = g_oTableId.Get_ById(data.layoutLock); this.layoutLock = g_oTableId.Get_ById(data.layoutLock);
break; break;
} }
case historyitem_ChangeBg:
{
this.cSld.Bg = data.newBg;
this.recalcInfo.recalculateBackground = true;
editor.WordControl.m_oLogicDocument.recalcMap[this.Id] = this;
break;
}
} }
}, },
......
...@@ -210,6 +210,7 @@ var historyitem_SetAdjustmentValue = 1; ...@@ -210,6 +210,7 @@ var historyitem_SetAdjustmentValue = 1;
var historyitem_RemoveFromSpTree = 0; var historyitem_RemoveFromSpTree = 0;
var historyitem_AddToSlideSpTree = 1; var historyitem_AddToSlideSpTree = 1;
var historyitem_AddSlideLocks = 2; var historyitem_AddSlideLocks = 2;
var historyitem_ChangeBg = 3;
......
...@@ -1928,7 +1928,11 @@ asc_docs_api.prototype.SetSlideProps = function(prop) ...@@ -1928,7 +1928,11 @@ asc_docs_api.prototype.SetSlideProps = function(prop)
{ {
if (_back_fill.get_type() == c_oAscFill.FILL_TYPE_NOFILL) if (_back_fill.get_type() == c_oAscFill.FILL_TYPE_NOFILL)
{ {
this.WordControl.m_oLogicDocument.changeBackground(null, arr_ind); var bg = new CBg();
bg.bgPr = new CBgPr();
bg.bgPr.Fill = CorrectUniFill(_back_fill, null);
this.WordControl.m_oLogicDocument.changeBackground(bg, arr_ind);
return; return;
} }
......
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