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

Bug 30930 - Apply to all slides применяет эффект только к текущему слайду

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@66573 954022d7-b5bf-4e40-9824-e11837661b57
parent da0f8729
......@@ -1585,6 +1585,7 @@ var historydescription_Document_RejectRevisionChange = 0x012a;
var historydescription_Document_AcceptRevisionChangesBySelection = 0x012b;
var historydescription_Document_RejectRevisionChangesBySelection = 0x012c;
var historydescription_Document_AddLetterUnion = 0x012d;
var historydescription_Presentation_ApplyTimingToAll = 0x012e;
......
......@@ -650,17 +650,29 @@ if(typeof CPresentation !== "undefined")
if(CheckType === changestype_SlideTiming)
{
var selected_slides = editor.WordControl.Thumbnails.GetSelectedArray();
for(var i = 0; i < selected_slides.length; ++i)
if(!AdditionalData || !AdditionalData.All)
{
var check_obj =
var check_obj =
{
"type": c_oAscLockTypeElemPresentation.Slide,
"val": this.Slides[this.CurPage].timingLock.Get_Id(),
"guid": this.Slides[this.CurPage].timingLock.Get_Id()
};
this.Slides[this.CurPage].timingLock.Lock.Check(check_obj);
}
else{
for(var i = 0; i < this.Slides.length; ++i)
{
"type": c_oAscLockTypeElemPresentation.Slide,
"val": this.Slides[selected_slides[i]].timingLock.Get_Id(),
"guid": this.Slides[selected_slides[i]].timingLock.Get_Id()
};
this.Slides[selected_slides[i]].timingLock.Lock.Check(check_obj);
var check_obj =
{
"type": c_oAscLockTypeElemPresentation.Slide,
"val": this.Slides[i].timingLock.Get_Id(),
"guid": this.Slides[i].timingLock.Get_Id()
};
this.Slides[i].timingLock.Lock.Check(check_obj);
}
}
}
if(CheckType === changestype_Text_Props)
......
......@@ -4576,22 +4576,27 @@ asc_docs_api.prototype.ApplySlideTiming = function(oTiming)
};
asc_docs_api.prototype.SlideTimingApplyToAll = function()
{
var _count = this.WordControl.m_oDrawingDocument.SlidesCount;
var _cur = this.WordControl.m_oDrawingDocument.SlideCurrent;
var _slides = this.WordControl.m_oLogicDocument.Slides;
if (_cur < 0 || _cur >= _count)
return;
var _curSlide = _slides[_cur];
_curSlide.timing.makeDuplicate(this.WordControl.m_oLogicDocument.DefaultSlideTiming);
var _default = this.WordControl.m_oLogicDocument.DefaultSlideTiming;
for (var i = 0; i < _count; i++)
if(this.WordControl.m_oLogicDocument.Document_Is_SelectionLocked(changestype_SlideTiming, {All: true}) === false)
{
if (i == _cur)
continue;
History.Create_NewPoint(historydescription_Presentation_ApplyTimingToAll);
var _count = this.WordControl.m_oDrawingDocument.SlidesCount;
var _cur = this.WordControl.m_oDrawingDocument.SlideCurrent;
var _slides = this.WordControl.m_oLogicDocument.Slides;
if (_cur < 0 || _cur >= _count)
return;
var _curSlide = _slides[_cur];
_slides[i].applyTiming(_default);
_curSlide.timing.makeDuplicate(this.WordControl.m_oLogicDocument.DefaultSlideTiming);
var _default = this.WordControl.m_oLogicDocument.DefaultSlideTiming;
for (var i = 0; i < _count; i++)
{
if (i == _cur)
continue;
_slides[i].applyTiming(_default);
}
}
};
asc_docs_api.prototype.SlideTransitionPlay = function()
......
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