Commit 6c078179 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@60456 954022d7-b5bf-4e40-9824-e11837661b57
parent 3842a830
...@@ -2144,7 +2144,6 @@ asc_docs_api.prototype.setStartPointHistory = function(){ ...@@ -2144,7 +2144,6 @@ asc_docs_api.prototype.setStartPointHistory = function(){
}; };
asc_docs_api.prototype.setEndPointHistory = function(){ asc_docs_api.prototype.setEndPointHistory = function(){
this.noCreatePoint = false; this.noCreatePoint = false;
//this.exucuteHistory = false;
this.exucuteHistoryEnd = true; this.exucuteHistoryEnd = true;
}; };
asc_docs_api.prototype.SetSlideProps = function(prop) asc_docs_api.prototype.SetSlideProps = function(prop)
......
...@@ -619,6 +619,8 @@ function asc_docs_api(name) ...@@ -619,6 +619,8 @@ function asc_docs_api(name)
this.SelectedObjectsStack = []; this.SelectedObjectsStack = [];
this.noCreatePoint = false; this.noCreatePoint = false;
this.exucuteHistory = false;
this.exucuteHistoryEnd = false;
this.isDocumentEditor = true; this.isDocumentEditor = true;
this.OpenDocumentProgress = new CDocOpenProgress(); this.OpenDocumentProgress = new CDocOpenProgress();
...@@ -2963,10 +2965,12 @@ asc_docs_api.prototype.sync_CanCopyCutCallback = function(bCanCopyCut) ...@@ -2963,10 +2965,12 @@ asc_docs_api.prototype.sync_CanCopyCutCallback = function(bCanCopyCut)
} }
asc_docs_api.prototype.setStartPointHistory = function(){ asc_docs_api.prototype.setStartPointHistory = function(){
this.noCreatePoint = true; History.Create_NewPoint(); this.noCreatePoint = true;
this.exucuteHistory = true;
}; };
asc_docs_api.prototype.setEndPointHistory = function(){ asc_docs_api.prototype.setEndPointHistory = function(){
this.noCreatePoint = false; this.noCreatePoint = false;
this.exucuteHistoryEnd = true;
}; };
function CDocInfoProp(obj) function CDocInfoProp(obj)
...@@ -5344,18 +5348,17 @@ asc_docs_api.prototype.ImgApply = function(obj) ...@@ -5344,18 +5348,17 @@ asc_docs_api.prototype.ImgApply = function(obj)
if ( false === this.WordControl.m_oLogicDocument.Document_Is_SelectionLocked(changestype_Image_Properties, AdditionalData) ) if ( false === this.WordControl.m_oLogicDocument.Document_Is_SelectionLocked(changestype_Image_Properties, AdditionalData) )
{ {
if(!this.noCreatePoint)
this.WordControl.m_oLogicDocument.Create_NewHistoryPoint();
if (ImagePr.ShapeProperties) if (ImagePr.ShapeProperties)
ImagePr.ImageUrl = ""; ImagePr.ImageUrl = "";
if(ImagePr.ImageUrl != undefined && ImagePr.ImageUrl != null && ImagePr.ImageUrl != "") if(ImagePr.ImageUrl != undefined && ImagePr.ImageUrl != null && ImagePr.ImageUrl != "")
{ {
var _img = this.ImageLoader.LoadImage(ImagePr.ImageUrl, 1) var _img = this.ImageLoader.LoadImage(ImagePr.ImageUrl, 1);
if (null != _img) if (null != _img)
{ {
ImagePr.ImageUrl = _img.src; ImagePr.ImageUrl = _img.src;
this.WordControl.m_oLogicDocument.Create_NewHistoryPoint();
this.WordControl.m_oLogicDocument.Set_ImageProps( ImagePr ); this.WordControl.m_oLogicDocument.Set_ImageProps( ImagePr );
} }
else else
...@@ -5363,6 +5366,7 @@ asc_docs_api.prototype.ImgApply = function(obj) ...@@ -5363,6 +5366,7 @@ asc_docs_api.prototype.ImgApply = function(obj)
this.asyncImageEndLoaded2 = function(_image) this.asyncImageEndLoaded2 = function(_image)
{ {
ImagePr.ImageUrl = _image.src; ImagePr.ImageUrl = _image.src;
this.WordControl.m_oLogicDocument.Create_NewHistoryPoint();
this.WordControl.m_oLogicDocument.Set_ImageProps( ImagePr ); this.WordControl.m_oLogicDocument.Set_ImageProps( ImagePr );
} }
} }
...@@ -5374,6 +5378,7 @@ asc_docs_api.prototype.ImgApply = function(obj) ...@@ -5374,6 +5378,7 @@ asc_docs_api.prototype.ImgApply = function(obj)
if (null != _img) if (null != _img)
{ {
ImagePr.ImageUrl = _img.src; ImagePr.ImageUrl = _img.src;
this.WordControl.m_oLogicDocument.Create_NewHistoryPoint();
this.WordControl.m_oLogicDocument.Set_ImageProps( ImagePr ); this.WordControl.m_oLogicDocument.Set_ImageProps( ImagePr );
} }
else else
...@@ -5381,6 +5386,7 @@ asc_docs_api.prototype.ImgApply = function(obj) ...@@ -5381,6 +5386,7 @@ asc_docs_api.prototype.ImgApply = function(obj)
this.asyncImageEndLoaded2 = function(_image) this.asyncImageEndLoaded2 = function(_image)
{ {
ImagePr.ImageUrl = _image.src; ImagePr.ImageUrl = _image.src;
this.WordControl.m_oLogicDocument.Create_NewHistoryPoint();
this.WordControl.m_oLogicDocument.Set_ImageProps( ImagePr ); this.WordControl.m_oLogicDocument.Set_ImageProps( ImagePr );
} }
} }
...@@ -5388,6 +5394,32 @@ asc_docs_api.prototype.ImgApply = function(obj) ...@@ -5388,6 +5394,32 @@ asc_docs_api.prototype.ImgApply = function(obj)
else else
{ {
ImagePr.ImageUrl = null; ImagePr.ImageUrl = null;
if(!this.noCreatePoint || this.exucuteHistory)
{
if( !this.noCreatePoint && !this.exucuteHistory && this.exucuteHistoryEnd)
{
this.WordControl.m_oLogicDocument.Set_ImageProps( ImagePr );
this.exucuteHistoryEnd = false;
}
else
{
this.WordControl.m_oLogicDocument.Create_NewHistoryPoint();
this.WordControl.m_oLogicDocument.Set_ImageProps( ImagePr );
}
if(this.exucuteHistory)
{
this.exucuteHistory = false;
}
}
else
{
ExecuteNoHistory(function(){
this.WordControl.m_oLogicDocument.Set_ImageProps( ImagePr );
}, this, []);
}
this.WordControl.m_oLogicDocument.Set_ImageProps( ImagePr ); this.WordControl.m_oLogicDocument.Set_ImageProps( ImagePr );
} }
} }
......
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