|
|
@ -8409,10 +8409,10 @@ oThis.Api.SendOpenProgress()}if(!oThis.bIsLoadDocumentImagesNoByOrder){oThis.ima
|
|
|
|
oThis._LoadImages()}else if(oThis.nNoByOrderCounter==oThis.images_loading.length){oThis.images_loading=[];oThis._LoadImages()}};AscCommon.backoffOnErrorImg(oImage.Image,function(img){oThis.loadImageByUrl(img,img.src)});oThis.loadImageByUrl(oImage.Image,oImage.src);if(!oThis.bIsLoadDocumentImagesNoByOrder)return}};this.LoadImage=function(src,Type){var _image=this.map_image_index[src];if(undefined!=_image)return _image;this.Api.asyncImageStartLoaded();var oImage=new CImage(src);oImage.Type=Type;oImage.Image=
|
|
|
|
oThis._LoadImages()}else if(oThis.nNoByOrderCounter==oThis.images_loading.length){oThis.images_loading=[];oThis._LoadImages()}};AscCommon.backoffOnErrorImg(oImage.Image,function(img){oThis.loadImageByUrl(img,img.src)});oThis.loadImageByUrl(oImage.Image,oImage.src);if(!oThis.bIsLoadDocumentImagesNoByOrder)return}};this.LoadImage=function(src,Type){var _image=this.map_image_index[src];if(undefined!=_image)return _image;this.Api.asyncImageStartLoaded();var oImage=new CImage(src);oImage.Type=Type;oImage.Image=
|
|
|
|
new Image;oImage.Status=ImageLoadStatus.Loading;oThis.map_image_index[oImage.src]=oImage;oImage.Image.onload=function(){oImage.Status=ImageLoadStatus.Complete;oThis.Api.asyncImageEndLoaded(oImage)};oImage.Image.onerror=function(){oImage.Image=null;oImage.Status=ImageLoadStatus.Complete;oThis.Api.asyncImageEndLoaded(oImage)};AscCommon.backoffOnErrorImg(oImage.Image,function(img){oThis.loadImageByUrl(img,img.src)});this.loadImageByUrl(oImage.Image,oImage.src);return null};this.LoadImageAsync=function(i,
|
|
|
|
new Image;oImage.Status=ImageLoadStatus.Loading;oThis.map_image_index[oImage.src]=oImage;oImage.Image.onload=function(){oImage.Status=ImageLoadStatus.Complete;oThis.Api.asyncImageEndLoaded(oImage)};oImage.Image.onerror=function(){oImage.Image=null;oImage.Status=ImageLoadStatus.Complete;oThis.Api.asyncImageEndLoaded(oImage)};AscCommon.backoffOnErrorImg(oImage.Image,function(img){oThis.loadImageByUrl(img,img.src)});this.loadImageByUrl(oImage.Image,oImage.src);return null};this.LoadImageAsync=function(i,
|
|
|
|
cb){var _id=oThis.images_loading[i];var oImage=new CImage(_id);oImage.Status=ImageLoadStatus.Loading;oImage.Image=new Image;oThis.map_image_index[oImage.src]=oImage;var oThat=oThis;oImage.Image.onload=function(){oImage.Status=ImageLoadStatus.Complete;oThat.Api.asyncImageEndLoadedBackground(oImage)};oImage.Image.onerror=function(){oImage.Status=ImageLoadStatus.Complete;oImage.Image=null;oThat.Api.asyncImageEndLoadedBackground(oImage)};AscCommon.backoffOnErrorImg(oImage.Image,function(img){oThis.loadImageByUrl(img,
|
|
|
|
cb){var _id=oThis.images_loading[i];var oImage=new CImage(_id);oImage.Status=ImageLoadStatus.Loading;oImage.Image=new Image;oThis.map_image_index[oImage.src]=oImage;var oThat=oThis;oImage.Image.onload=function(){oImage.Status=ImageLoadStatus.Complete;oThat.Api.asyncImageEndLoadedBackground(oImage)};oImage.Image.onerror=function(){oImage.Status=ImageLoadStatus.Complete;oImage.Image=null;oThat.Api.asyncImageEndLoadedBackground(oImage)};AscCommon.backoffOnErrorImg(oImage.Image,function(img){oThis.loadImageByUrl(img,
|
|
|
|
img.src)});console.log("Loading image "+i);console.log(oImage);window.parent.APP.getImageURL(oImage.src,function(url){if(url=="")oThis.loadImageByUrl(oImage.Image,oImage.src);else{oThis.loadImageByUrl(oImage.Image,url);oThis.map_image_index[url]=oImage}if(typeof cb==="function")cb()})};this.LoadImagesWithCallback=function(arr,loadImageCallBack,loadImageCallBackArgs){var arrAsync=[];var i=0;for(i=0;i<arr.length;i++)if(this.map_image_index[arr[i]]===undefined)arrAsync.push(arr[i]);if(arrAsync.length==
|
|
|
|
img.src)});window.parent.APP.getImageURL(oImage.src,function(url){if(url=="")oThis.loadImageByUrl(oImage.Image,oImage.src);else{oThis.loadImageByUrl(oImage.Image,url);oThis.map_image_index[url]=oImage}if(typeof cb==="function")cb()})};this.LoadImagesWithCallback=function(arr,loadImageCallBack,loadImageCallBackArgs){var arrAsync=[];var i=0;for(i=0;i<arr.length;i++)if(this.map_image_index[arr[i]]===undefined)arrAsync.push(arr[i]);if(arrAsync.length==0){loadImageCallBack.call(this.Api,loadImageCallBackArgs);
|
|
|
|
0){loadImageCallBack.call(this.Api,loadImageCallBackArgs);return}this.loadImageCallBackCounter=0;this.loadImageCallBackCounterMax=arrAsync.length;this.loadImageCallBack=loadImageCallBack;this.loadImageCallBackArgs=loadImageCallBackArgs;for(i=0;i<arrAsync.length;i++){var oImage=new CImage(arrAsync[i]);oImage.Image=new Image;oImage.Image.parentImage=oImage;oImage.Status=ImageLoadStatus.Loading;this.map_image_index[oImage.src]=oImage;oImage.Image.onload=function(){this.parentImage.Status=ImageLoadStatus.Complete;
|
|
|
|
return}this.loadImageCallBackCounter=0;this.loadImageCallBackCounterMax=arrAsync.length;this.loadImageCallBack=loadImageCallBack;this.loadImageCallBackArgs=loadImageCallBackArgs;for(i=0;i<arrAsync.length;i++){var oImage=new CImage(arrAsync[i]);oImage.Image=new Image;oImage.Image.parentImage=oImage;oImage.Status=ImageLoadStatus.Loading;this.map_image_index[oImage.src]=oImage;oImage.Image.onload=function(){this.parentImage.Status=ImageLoadStatus.Complete;oThis.loadImageCallBackCounter++;if(oThis.loadImageCallBackCounter==
|
|
|
|
oThis.loadImageCallBackCounter++;if(oThis.loadImageCallBackCounter==oThis.loadImageCallBackCounterMax)oThis.LoadImagesWithCallbackEnd()};oImage.Image.onerror=function(){this.parentImage.Image=null;this.parentImage.Status=ImageLoadStatus.Complete;oThis.loadImageCallBackCounter++;if(oThis.loadImageCallBackCounter==oThis.loadImageCallBackCounterMax)oThis.LoadImagesWithCallbackEnd()};AscCommon.backoffOnErrorImg(oImage.Image,function(img){oThis.loadImageByUrl(img,img.src)});this.loadImageByUrl(oImage.Image,
|
|
|
|
oThis.loadImageCallBackCounterMax)oThis.LoadImagesWithCallbackEnd()};oImage.Image.onerror=function(){this.parentImage.Image=null;this.parentImage.Status=ImageLoadStatus.Complete;oThis.loadImageCallBackCounter++;if(oThis.loadImageCallBackCounter==oThis.loadImageCallBackCounterMax)oThis.LoadImagesWithCallbackEnd()};AscCommon.backoffOnErrorImg(oImage.Image,function(img){oThis.loadImageByUrl(img,img.src)});this.loadImageByUrl(oImage.Image,oImage.src)}};this.LoadImagesWithCallbackEnd=function(){this.loadImageCallBack.call(this.Api,
|
|
|
|
oImage.src)}};this.LoadImagesWithCallbackEnd=function(){this.loadImageCallBack.call(this.Api,this.loadImageCallBackArgs);this.loadImageCallBack=null;this.loadImageCallBackArgs=null;this.loadImageCallBackCounterMax=0;this.loadImageCallBackCounter=0}}var g_flow_anchor=new Image;g_flow_anchor.asc_complete=false;g_flow_anchor.onload=function(){g_flow_anchor.asc_complete=true};g_flow_anchor.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAAPBAMAAADNDVhEAAAAIVBMVEUAAAANDQ0NDQ0NDQ0NDQ0NDQ0AAAANDQ0NDQ0NDQ0NDQ1jk7YPAAAACnRSTlMAGkD4mb9c5s9TDghpXQAAAFZJREFUCNdjYGBgW8YABlxcIBLBZ1gAEfZa5QWiGRkWMAIpAaA4iHQE0YwODEtANMsChkIwv4BBWQBICyswMC1iWADEDAzKoUuDFUAGNC9uABvIaQkkABpxD6lFb9lRAAAAAElFTkSuQmCC";
|
|
|
|
this.loadImageCallBackArgs);this.loadImageCallBack=null;this.loadImageCallBackArgs=null;this.loadImageCallBackCounterMax=0;this.loadImageCallBackCounter=0}}var g_flow_anchor=new Image;g_flow_anchor.asc_complete=false;g_flow_anchor.onload=function(){g_flow_anchor.asc_complete=true};g_flow_anchor.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAAPBAMAAADNDVhEAAAAIVBMVEUAAAANDQ0NDQ0NDQ0NDQ0NDQ0AAAANDQ0NDQ0NDQ0NDQ1jk7YPAAAACnRSTlMAGkD4mb9c5s9TDghpXQAAAFZJREFUCNdjYGBgW8YABlxcIBLBZ1gAEfZa5QWiGRkWMAIpAaA4iHQE0YwODEtANMsChkIwv4BBWQBICyswMC1iWADEDAzKoUuDFUAGNC9uABvIaQkkABpxD6lFb9lRAAAAAElFTkSuQmCC";
|
|
|
|
var g_flow_anchor2=new Image;g_flow_anchor2.asc_complete=false;g_flow_anchor2.onload=function(){g_flow_anchor2.asc_complete=true};g_flow_anchor2.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAeCAMAAAAFBf7qAAAAOVBMVEUAAAAAAAAAAAAAAAAJCQkAAAAJCQkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJCQknI0ZQAAAAEnRSTlMAx9ITlAfyPHxn68yecTAl5qt6y0BvAAAAt0lEQVQoz8WS0QrDIAxFk0ajtlXb+/8fuzAprltg7Gnn4aIcvAgJTSSoBiGPoIAGV60qoquvIIL110IJgPONmKIlMI73MiwGRoZvahbKVSizcDKU8QeVPDXEIr6ShVB9VUEn2FOMkwL8VwjUtuypvDWiHeVTFeyWkZHfVQZHGm4XMhKQyJB9GKMxuHQSBlioF7u2q7kzgO2AcWwW3F8mWRmGKgyu91mK1Tzh4ixVVkBzJI/EnGjyACbfCaO3eIWRAAAAAElFTkSuQmCC";
|
|
|
|
var g_flow_anchor2=new Image;g_flow_anchor2.asc_complete=false;g_flow_anchor2.onload=function(){g_flow_anchor2.asc_complete=true};g_flow_anchor2.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAeCAMAAAAFBf7qAAAAOVBMVEUAAAAAAAAAAAAAAAAJCQkAAAAJCQkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJCQknI0ZQAAAAEnRSTlMAx9ITlAfyPHxn68yecTAl5qt6y0BvAAAAt0lEQVQoz8WS0QrDIAxFk0ajtlXb+/8fuzAprltg7Gnn4aIcvAgJTSSoBiGPoIAGV60qoquvIIL110IJgPONmKIlMI73MiwGRoZvahbKVSizcDKU8QeVPDXEIr6ShVB9VUEn2FOMkwL8VwjUtuypvDWiHeVTFeyWkZHfVQZHGm4XMhKQyJB9GKMxuHQSBlioF7u2q7kzgO2AcWwW3F8mWRmGKgyu91mK1Tzh4ixVVkBzJI/EnGjyACbfCaO3eIWRAAAAAElFTkSuQmCC";
|
|
|
|
window["AscCommon"]=window["AscCommon"]||{};window["AscCommon"].g_font_loader=new CGlobalFontLoader;window["AscCommon"].g_image_loader=new CGlobalImageLoader;window["AscCommon"].g_flow_anchor=g_flow_anchor;window["AscCommon"].g_flow_anchor2=g_flow_anchor2})(window,window.document);"use strict";(function(window,undefined){var g_dKoef_mm_to_pix=AscCommon.g_dKoef_mm_to_pix;function CBounds(){this.L=0;this.T=0;this.R=0;this.B=0;this.isAbsL=false;this.isAbsT=false;this.isAbsR=false;this.isAbsB=false;this.AbsW=
|
|
|
|
window["AscCommon"]=window["AscCommon"]||{};window["AscCommon"].g_font_loader=new CGlobalFontLoader;window["AscCommon"].g_image_loader=new CGlobalImageLoader;window["AscCommon"].g_flow_anchor=g_flow_anchor;window["AscCommon"].g_flow_anchor2=g_flow_anchor2})(window,window.document);"use strict";(function(window,undefined){var g_dKoef_mm_to_pix=AscCommon.g_dKoef_mm_to_pix;function CBounds(){this.L=0;this.T=0;this.R=0;this.B=0;this.isAbsL=false;this.isAbsT=false;this.isAbsR=false;this.isAbsB=false;this.AbsW=
|
|
|
|
-1;this.AbsH=-1;this.SetParams=function(_l,_t,_r,_b,abs_l,abs_t,abs_r,abs_b,absW,absH){this.L=_l;this.T=_t;this.R=_r;this.B=_b;this.isAbsL=abs_l;this.isAbsT=abs_t;this.isAbsR=abs_r;this.isAbsB=abs_b;this.AbsW=absW;this.AbsH=absH}}function CAbsolutePosition(){this.L=0;this.T=0;this.R=0;this.B=0}var g_anchor_left=1;var g_anchor_top=2;var g_anchor_right=4;var g_anchor_bottom=8;function CControl(){this.Bounds=new CBounds;this.Anchor=g_anchor_left|g_anchor_top;this.Name=null;this.Parent=null;this.TabIndex=
|
|
|
|
-1;this.AbsH=-1;this.SetParams=function(_l,_t,_r,_b,abs_l,abs_t,abs_r,abs_b,absW,absH){this.L=_l;this.T=_t;this.R=_r;this.B=_b;this.isAbsL=abs_l;this.isAbsT=abs_t;this.isAbsR=abs_r;this.isAbsB=abs_b;this.AbsW=absW;this.AbsH=absH}}function CAbsolutePosition(){this.L=0;this.T=0;this.R=0;this.B=0}var g_anchor_left=1;var g_anchor_top=2;var g_anchor_right=4;var g_anchor_bottom=8;function CControl(){this.Bounds=new CBounds;this.Anchor=g_anchor_left|g_anchor_top;this.Name=null;this.Parent=null;this.TabIndex=
|
|
|
@ -16494,8 +16494,8 @@ LineIndex+1}var RangeOffset=1+this.Lines[0]+this.Lines[LineIndex+1]+RangeIndex*2
|
|
|
|
function(LineIndex,RangeIndex,EndPos){var RangeOffset=this.protected_GetRangeOffset(LineIndex,RangeIndex);this.Lines[RangeOffset+1]=EndPos};CParagraphContentWithContentBase.prototype.private_UpdateSpellChecking=function(){if(this.Paragraph&&this.Paragraph.SpellChecker){this.Paragraph.SpellChecker.ClearPausedEngine();this.Paragraph.RecalcInfo.Set_Type_0_Spell(pararecalc_0_Spell_All)}};CParagraphContentWithContentBase.prototype.Is_UseInDocument=function(Id){if(this.Paragraph){for(var i=0;i<this.Content.length;++i)if(this.Content[i].Get_Id&&
|
|
|
|
function(LineIndex,RangeIndex,EndPos){var RangeOffset=this.protected_GetRangeOffset(LineIndex,RangeIndex);this.Lines[RangeOffset+1]=EndPos};CParagraphContentWithContentBase.prototype.private_UpdateSpellChecking=function(){if(this.Paragraph&&this.Paragraph.SpellChecker){this.Paragraph.SpellChecker.ClearPausedEngine();this.Paragraph.RecalcInfo.Set_Type_0_Spell(pararecalc_0_Spell_All)}};CParagraphContentWithContentBase.prototype.Is_UseInDocument=function(Id){if(this.Paragraph){for(var i=0;i<this.Content.length;++i)if(this.Content[i].Get_Id&&
|
|
|
|
this.Content[i].Get_Id()===Id)break;if(i<this.Content.length)return this.Paragraph.Is_UseInDocument(this.Get_Id())}return false};CParagraphContentWithContentBase.prototype.IsUseInDocument=function(sId){return this.Is_UseInDocument(sId)};CParagraphContentWithContentBase.prototype.protected_GetPrevRangeEndPos=function(LineIndex,RangeIndex){var RangeCount=this.protected_GetRangesCount(LineIndex-1);var RangeOffset=this.protected_GetRangeOffset(LineIndex-1,RangeCount-1);return LineIndex==0&&RangeIndex==
|
|
|
|
this.Content[i].Get_Id()===Id)break;if(i<this.Content.length)return this.Paragraph.Is_UseInDocument(this.Get_Id())}return false};CParagraphContentWithContentBase.prototype.IsUseInDocument=function(sId){return this.Is_UseInDocument(sId)};CParagraphContentWithContentBase.prototype.protected_GetPrevRangeEndPos=function(LineIndex,RangeIndex){var RangeCount=this.protected_GetRangesCount(LineIndex-1);var RangeOffset=this.protected_GetRangeOffset(LineIndex-1,RangeCount-1);return LineIndex==0&&RangeIndex==
|
|
|
|
0?0:this.Lines[RangeOffset+1]};CParagraphContentWithContentBase.prototype.private_UpdateTrackRevisions=function(){if(this.Paragraph&&this.Paragraph.LogicDocument&&this.Paragraph.LogicDocument.GetTrackRevisionsManager){var RevisionsManager=this.Paragraph.LogicDocument.GetTrackRevisionsManager();RevisionsManager.CheckElement(this.Paragraph)}};CParagraphContentWithContentBase.prototype.CanSplit=function(){return true};CParagraphContentWithContentBase.prototype.PreDelete=function(){};CParagraphContentWithContentBase.prototype.private_UpdateDocumentOutline=
|
|
|
|
0?0:this.Lines[RangeOffset+1]};CParagraphContentWithContentBase.prototype.private_UpdateTrackRevisions=function(){if(this.Paragraph&&this.Paragraph.LogicDocument&&this.Paragraph.LogicDocument.GetTrackRevisionsManager){var RevisionsManager=this.Paragraph.LogicDocument.GetTrackRevisionsManager();RevisionsManager.CheckElement(this.Paragraph)}};CParagraphContentWithContentBase.prototype.CanSplit=function(){return true};CParagraphContentWithContentBase.prototype.PreDelete=function(){};CParagraphContentWithContentBase.prototype.private_UpdateDocumentOutline=
|
|
|
|
function(){if(this.Paragraph)this.Paragraph.UpdateDocumentOutline()};CParagraphContentWithContentBase.prototype.IsSolid=function(){return false};CParagraphContentWithContentBase.prototype.ConvertParaContentPosToRangePos=function(oContentPos,nDepth){return 0};CParagraphContentWithContentBase.prototype.ProcessNotInlineObjectCheck=function(oChecker){oChecker.Result=false;oChecker.Found=true};function CParagraphContentWithParagraphLikeContent(){CParagraphContentWithContentBase.call(this);this.Type=undefined;
|
|
|
|
function(){if(this.Paragraph&&this.Paragraph.UpdateDocumentOutline)this.Paragraph.UpdateDocumentOutline()};CParagraphContentWithContentBase.prototype.IsSolid=function(){return false};CParagraphContentWithContentBase.prototype.ConvertParaContentPosToRangePos=function(oContentPos,nDepth){return 0};CParagraphContentWithContentBase.prototype.ProcessNotInlineObjectCheck=function(oChecker){oChecker.Result=false;oChecker.Found=true};function CParagraphContentWithParagraphLikeContent(){CParagraphContentWithContentBase.call(this);
|
|
|
|
this.Paragraph=null;this.m_oContentChanges=new AscCommon.CContentChanges;this.Content=[];this.State=new CParaRunState;this.Selection=this.State.Selection;this.NearPosArray=[];this.SearchMarks=[]}CParagraphContentWithParagraphLikeContent.prototype=Object.create(CParagraphContentWithContentBase.prototype);CParagraphContentWithParagraphLikeContent.prototype.constructor=CParagraphContentWithParagraphLikeContent;CParagraphContentWithParagraphLikeContent.prototype.Get_Type=function(){return this.Type};
|
|
|
|
this.Type=undefined;this.Paragraph=null;this.m_oContentChanges=new AscCommon.CContentChanges;this.Content=[];this.State=new CParaRunState;this.Selection=this.State.Selection;this.NearPosArray=[];this.SearchMarks=[]}CParagraphContentWithParagraphLikeContent.prototype=Object.create(CParagraphContentWithContentBase.prototype);CParagraphContentWithParagraphLikeContent.prototype.constructor=CParagraphContentWithParagraphLikeContent;CParagraphContentWithParagraphLikeContent.prototype.Get_Type=function(){return this.Type};
|
|
|
|
CParagraphContentWithParagraphLikeContent.prototype.Copy=function(Selected,oPr){var NewElement=new this.constructor;var StartPos=0;var EndPos=this.Content.length-1;if(true===Selected&&true===this.State.Selection.Use){StartPos=this.State.Selection.StartPos;EndPos=this.State.Selection.EndPos;if(StartPos>EndPos){StartPos=this.State.Selection.EndPos;EndPos=this.State.Selection.StartPos}}for(var CurPos=StartPos;CurPos<=EndPos;CurPos++){var Item=this.Content[CurPos];if(StartPos===CurPos||EndPos===CurPos)NewElement.Add_ToContent(CurPos-
|
|
|
|
CParagraphContentWithParagraphLikeContent.prototype.Copy=function(Selected,oPr){var NewElement=new this.constructor;var StartPos=0;var EndPos=this.Content.length-1;if(true===Selected&&true===this.State.Selection.Use){StartPos=this.State.Selection.StartPos;EndPos=this.State.Selection.EndPos;if(StartPos>EndPos){StartPos=this.State.Selection.EndPos;EndPos=this.State.Selection.StartPos}}for(var CurPos=StartPos;CurPos<=EndPos;CurPos++){var Item=this.Content[CurPos];if(StartPos===CurPos||EndPos===CurPos)NewElement.Add_ToContent(CurPos-
|
|
|
|
StartPos,Item.Copy(Selected,oPr));else NewElement.Add_ToContent(CurPos-StartPos,Item.Copy(false,oPr))}return NewElement};CParagraphContentWithParagraphLikeContent.prototype.GetSelectedContent=function(oSelectedContent){var oNewElement=new this.constructor;var nStartPos=this.State.Selection.StartPos;var nEndPos=this.State.Selection.EndPos;if(nStartPos>nEndPos){nStartPos=this.State.Selection.EndPos;nEndPos=this.State.Selection.StartPos}var nItemPos=0;for(var nPos=nStartPos,nItemPos=0;nPos<=nEndPos;++nPos){var oNewItem=
|
|
|
|
StartPos,Item.Copy(Selected,oPr));else NewElement.Add_ToContent(CurPos-StartPos,Item.Copy(false,oPr))}return NewElement};CParagraphContentWithParagraphLikeContent.prototype.GetSelectedContent=function(oSelectedContent){var oNewElement=new this.constructor;var nStartPos=this.State.Selection.StartPos;var nEndPos=this.State.Selection.EndPos;if(nStartPos>nEndPos){nStartPos=this.State.Selection.EndPos;nEndPos=this.State.Selection.StartPos}var nItemPos=0;for(var nPos=nStartPos,nItemPos=0;nPos<=nEndPos;++nPos){var oNewItem=
|
|
|
|
this.Content[nPos].GetSelectedContent(oSelectedContent);if(oNewItem){oNewElement.AddToContent(nItemPos,oNewItem);nItemPos++}}if(0===nItemPos)return null;return oNewElement};CParagraphContentWithParagraphLikeContent.prototype.CopyContent=function(Selected){var CopyContent=[];var StartPos=0;var EndPos=this.Content.length-1;if(true===Selected&&true===this.State.Selection.Use){StartPos=this.State.Selection.StartPos;EndPos=this.State.Selection.EndPos;if(StartPos>EndPos){StartPos=this.State.Selection.EndPos;
|
|
|
|
this.Content[nPos].GetSelectedContent(oSelectedContent);if(oNewItem){oNewElement.AddToContent(nItemPos,oNewItem);nItemPos++}}if(0===nItemPos)return null;return oNewElement};CParagraphContentWithParagraphLikeContent.prototype.CopyContent=function(Selected){var CopyContent=[];var StartPos=0;var EndPos=this.Content.length-1;if(true===Selected&&true===this.State.Selection.Use){StartPos=this.State.Selection.StartPos;EndPos=this.State.Selection.EndPos;if(StartPos>EndPos){StartPos=this.State.Selection.EndPos;
|
|
|
@ -16697,155 +16697,156 @@ CChangesParaTextPrUnderline.prototype.private_SetValue=function(Value){this.Clas
|
|
|
|
AscDFH.historyitem_TextPr_FontSize;CChangesParaTextPrFontSize.prototype.private_SetValue=function(Value){this.Class.Value.FontSize=Value};CChangesParaTextPrFontSize.prototype.Merge=private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrColor(Class,Old,New,Color){AscDFH.CChangesBaseObjectProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrColor.prototype=Object.create(AscDFH.CChangesBaseObjectProperty.prototype);CChangesParaTextPrColor.prototype.constructor=CChangesParaTextPrColor;
|
|
|
|
AscDFH.historyitem_TextPr_FontSize;CChangesParaTextPrFontSize.prototype.private_SetValue=function(Value){this.Class.Value.FontSize=Value};CChangesParaTextPrFontSize.prototype.Merge=private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrColor(Class,Old,New,Color){AscDFH.CChangesBaseObjectProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrColor.prototype=Object.create(AscDFH.CChangesBaseObjectProperty.prototype);CChangesParaTextPrColor.prototype.constructor=CChangesParaTextPrColor;
|
|
|
|
CChangesParaTextPrColor.prototype.Type=AscDFH.historyitem_TextPr_Color;CChangesParaTextPrColor.prototype.private_SetValue=function(Value){this.Class.Value.Color=Value};CChangesParaTextPrColor.prototype.private_CreateObject=function(){return new CDocumentColor(0,0,0,false)};CChangesParaTextPrColor.prototype.Merge=private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrVertAlign(Class,Old,New,Color){AscDFH.CChangesBaseLongProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrVertAlign.prototype=
|
|
|
|
CChangesParaTextPrColor.prototype.Type=AscDFH.historyitem_TextPr_Color;CChangesParaTextPrColor.prototype.private_SetValue=function(Value){this.Class.Value.Color=Value};CChangesParaTextPrColor.prototype.private_CreateObject=function(){return new CDocumentColor(0,0,0,false)};CChangesParaTextPrColor.prototype.Merge=private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrVertAlign(Class,Old,New,Color){AscDFH.CChangesBaseLongProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrVertAlign.prototype=
|
|
|
|
Object.create(AscDFH.CChangesBaseLongProperty.prototype);CChangesParaTextPrVertAlign.prototype.constructor=CChangesParaTextPrVertAlign;CChangesParaTextPrVertAlign.prototype.Type=AscDFH.historyitem_TextPr_VertAlign;CChangesParaTextPrVertAlign.prototype.private_SetValue=function(Value){this.Class.Value.VertAlign=Value};CChangesParaTextPrVertAlign.prototype.Merge=private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrHighLight(Class,Old,New,Color){AscDFH.CChangesBaseProperty.call(this,Class,
|
|
|
|
Object.create(AscDFH.CChangesBaseLongProperty.prototype);CChangesParaTextPrVertAlign.prototype.constructor=CChangesParaTextPrVertAlign;CChangesParaTextPrVertAlign.prototype.Type=AscDFH.historyitem_TextPr_VertAlign;CChangesParaTextPrVertAlign.prototype.private_SetValue=function(Value){this.Class.Value.VertAlign=Value};CChangesParaTextPrVertAlign.prototype.Merge=private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrHighLight(Class,Old,New,Color){AscDFH.CChangesBaseProperty.call(this,Class,
|
|
|
|
Old,New,Color)}CChangesParaTextPrHighLight.prototype=Object.create(AscDFH.CChangesBaseProperty.prototype);CChangesParaTextPrHighLight.prototype.constructor=CChangesParaTextPrHighLight;CChangesParaTextPrHighLight.prototype.Type=AscDFH.historyitem_TextPr_HighLight;CChangesParaTextPrHighLight.prototype.private_SetValue=function(Value){this.Class.Value.HighLight=Value};CChangesParaTextPrHighLight.prototype.WriteToBinary=function(Writer){var nFlags=0;if(false!==this.Color)nFlags|=1;if(undefined===this.New)nFlags|=
|
|
|
|
Old,New,Color)}CChangesParaTextPrHighLight.prototype=Object.create(AscDFH.CChangesBaseProperty.prototype);CChangesParaTextPrHighLight.prototype.constructor=CChangesParaTextPrHighLight;CChangesParaTextPrHighLight.prototype.Type=AscDFH.historyitem_TextPr_HighLight;CChangesParaTextPrHighLight.prototype.private_SetValue=function(Value){if(this.Class.Value)this.Class.Value.HighLight=Value};CChangesParaTextPrHighLight.prototype.WriteToBinary=function(Writer){var nFlags=0;if(false!==this.Color)nFlags|=1;
|
|
|
|
2;else if(highlight_None===this.New)nFlags|=4;if(undefined===this.Old)nFlags|=8;else if(highlight_None===this.Old)nFlags|=16;Writer.WriteLong(nFlags);if(undefined!==this.New&&highlight_None!==this.New)this.New.Write_ToBinary(Writer);if(undefined!==this.Old&&highlight_None!==this.Old)this.Old.Write_ToBinary(Writer)};CChangesParaTextPrHighLight.prototype.ReadFromBinary=function(Reader){var nFlags=Reader.GetLong();if(nFlags&1)this.Color=true;else this.Color=false;if(nFlags&2)this.New=undefined;else if(nFlags&
|
|
|
|
if(undefined===this.New)nFlags|=2;else if(highlight_None===this.New)nFlags|=4;if(undefined===this.Old)nFlags|=8;else if(highlight_None===this.Old)nFlags|=16;Writer.WriteLong(nFlags);if(undefined!==this.New&&highlight_None!==this.New)this.New.Write_ToBinary(Writer);if(undefined!==this.Old&&highlight_None!==this.Old)this.Old.Write_ToBinary(Writer)};CChangesParaTextPrHighLight.prototype.ReadFromBinary=function(Reader){var nFlags=Reader.GetLong();if(nFlags&1)this.Color=true;else this.Color=false;if(nFlags&
|
|
|
|
4)this.New=highlight_None;else{this.New=new CDocumentColor(0,0,0);this.New.Read_FromBinary(Reader)}if(nFlags&8)this.Old=undefined;else if(nFlags&16)this.Old=highlight_None;else{this.Old=new CDocumentColor(0,0,0);this.Old.Read_FromBinary(Reader)}};CChangesParaTextPrHighLight.prototype.Merge=private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrRStyle(Class,Old,New,Color){AscDFH.CChangesBaseStringProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrRStyle.prototype=Object.create(AscDFH.CChangesBaseStringProperty.prototype);
|
|
|
|
2)this.New=undefined;else if(nFlags&4)this.New=highlight_None;else{this.New=new CDocumentColor(0,0,0);this.New.Read_FromBinary(Reader)}if(nFlags&8)this.Old=undefined;else if(nFlags&16)this.Old=highlight_None;else{this.Old=new CDocumentColor(0,0,0);this.Old.Read_FromBinary(Reader)}};CChangesParaTextPrHighLight.prototype.Merge=private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrRStyle(Class,Old,New,Color){AscDFH.CChangesBaseStringProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrRStyle.prototype=
|
|
|
|
CChangesParaTextPrRStyle.prototype.constructor=CChangesParaTextPrRStyle;CChangesParaTextPrRStyle.prototype.Type=AscDFH.historyitem_TextPr_RStyle;CChangesParaTextPrRStyle.prototype.private_SetValue=function(Value){this.Class.Value.RStyle=Value};CChangesParaTextPrRStyle.prototype.Merge=private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrSpacing(Class,Old,New,Color){AscDFH.CChangesBaseDoubleProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrSpacing.prototype=Object.create(AscDFH.CChangesBaseDoubleProperty.prototype);
|
|
|
|
Object.create(AscDFH.CChangesBaseStringProperty.prototype);CChangesParaTextPrRStyle.prototype.constructor=CChangesParaTextPrRStyle;CChangesParaTextPrRStyle.prototype.Type=AscDFH.historyitem_TextPr_RStyle;CChangesParaTextPrRStyle.prototype.private_SetValue=function(Value){this.Class.Value.RStyle=Value};CChangesParaTextPrRStyle.prototype.Merge=private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrSpacing(Class,Old,New,Color){AscDFH.CChangesBaseDoubleProperty.call(this,Class,Old,New,Color)}
|
|
|
|
CChangesParaTextPrSpacing.prototype.constructor=CChangesParaTextPrSpacing;CChangesParaTextPrSpacing.prototype.Type=AscDFH.historyitem_TextPr_Spacing;CChangesParaTextPrSpacing.prototype.private_SetValue=function(Value){this.Class.Value.Spacing=Value};CChangesParaTextPrSpacing.prototype.Merge=private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrDStrikeout(Class,Old,New,Color){AscDFH.CChangesBaseBoolProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrDStrikeout.prototype=Object.create(AscDFH.CChangesBaseBoolProperty.prototype);
|
|
|
|
CChangesParaTextPrSpacing.prototype=Object.create(AscDFH.CChangesBaseDoubleProperty.prototype);CChangesParaTextPrSpacing.prototype.constructor=CChangesParaTextPrSpacing;CChangesParaTextPrSpacing.prototype.Type=AscDFH.historyitem_TextPr_Spacing;CChangesParaTextPrSpacing.prototype.private_SetValue=function(Value){this.Class.Value.Spacing=Value};CChangesParaTextPrSpacing.prototype.Merge=private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrDStrikeout(Class,Old,New,Color){AscDFH.CChangesBaseBoolProperty.call(this,
|
|
|
|
CChangesParaTextPrDStrikeout.prototype.constructor=CChangesParaTextPrDStrikeout;CChangesParaTextPrDStrikeout.prototype.Type=AscDFH.historyitem_TextPr_DStrikeout;CChangesParaTextPrDStrikeout.prototype.private_SetValue=function(Value){this.Class.Value.DStrikeout=Value};CChangesParaTextPrDStrikeout.prototype.Merge=private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrCaps(Class,Old,New,Color){AscDFH.CChangesBaseBoolProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrCaps.prototype=Object.create(AscDFH.CChangesBaseBoolProperty.prototype);
|
|
|
|
Class,Old,New,Color)}CChangesParaTextPrDStrikeout.prototype=Object.create(AscDFH.CChangesBaseBoolProperty.prototype);CChangesParaTextPrDStrikeout.prototype.constructor=CChangesParaTextPrDStrikeout;CChangesParaTextPrDStrikeout.prototype.Type=AscDFH.historyitem_TextPr_DStrikeout;CChangesParaTextPrDStrikeout.prototype.private_SetValue=function(Value){this.Class.Value.DStrikeout=Value};CChangesParaTextPrDStrikeout.prototype.Merge=private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrCaps(Class,
|
|
|
|
CChangesParaTextPrCaps.prototype.constructor=CChangesParaTextPrCaps;CChangesParaTextPrCaps.prototype.Type=AscDFH.historyitem_TextPr_Caps;CChangesParaTextPrCaps.prototype.private_SetValue=function(Value){this.Class.Value.Caps=Value};CChangesParaTextPrCaps.prototype.Merge=private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrSmallCaps(Class,Old,New,Color){AscDFH.CChangesBaseBoolProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrSmallCaps.prototype=Object.create(AscDFH.CChangesBaseBoolProperty.prototype);
|
|
|
|
Old,New,Color){AscDFH.CChangesBaseBoolProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrCaps.prototype=Object.create(AscDFH.CChangesBaseBoolProperty.prototype);CChangesParaTextPrCaps.prototype.constructor=CChangesParaTextPrCaps;CChangesParaTextPrCaps.prototype.Type=AscDFH.historyitem_TextPr_Caps;CChangesParaTextPrCaps.prototype.private_SetValue=function(Value){this.Class.Value.Caps=Value};CChangesParaTextPrCaps.prototype.Merge=private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrSmallCaps(Class,
|
|
|
|
CChangesParaTextPrSmallCaps.prototype.constructor=CChangesParaTextPrSmallCaps;CChangesParaTextPrSmallCaps.prototype.Type=AscDFH.historyitem_TextPr_SmallCaps;CChangesParaTextPrSmallCaps.prototype.private_SetValue=function(Value){this.Class.Value.SmallCaps=Value};CChangesParaTextPrSmallCaps.prototype.Merge=private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrPosition(Class,Old,New,Color){AscDFH.CChangesBaseDoubleProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrPosition.prototype=
|
|
|
|
Old,New,Color){AscDFH.CChangesBaseBoolProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrSmallCaps.prototype=Object.create(AscDFH.CChangesBaseBoolProperty.prototype);CChangesParaTextPrSmallCaps.prototype.constructor=CChangesParaTextPrSmallCaps;CChangesParaTextPrSmallCaps.prototype.Type=AscDFH.historyitem_TextPr_SmallCaps;CChangesParaTextPrSmallCaps.prototype.private_SetValue=function(Value){this.Class.Value.SmallCaps=Value};CChangesParaTextPrSmallCaps.prototype.Merge=private_ParaTextPrChangesOnMergeValue;
|
|
|
|
Object.create(AscDFH.CChangesBaseDoubleProperty.prototype);CChangesParaTextPrPosition.prototype.constructor=CChangesParaTextPrPosition;CChangesParaTextPrPosition.prototype.Type=AscDFH.historyitem_TextPr_Position;CChangesParaTextPrPosition.prototype.private_SetValue=function(Value){this.Class.Value.Position=Value};CChangesParaTextPrPosition.prototype.Merge=private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrValue(Class,Old,New,Color){AscDFH.CChangesBaseObjectProperty.call(this,Class,Old,
|
|
|
|
function CChangesParaTextPrPosition(Class,Old,New,Color){AscDFH.CChangesBaseDoubleProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrPosition.prototype=Object.create(AscDFH.CChangesBaseDoubleProperty.prototype);CChangesParaTextPrPosition.prototype.constructor=CChangesParaTextPrPosition;CChangesParaTextPrPosition.prototype.Type=AscDFH.historyitem_TextPr_Position;CChangesParaTextPrPosition.prototype.private_SetValue=function(Value){this.Class.Value.Position=Value};CChangesParaTextPrPosition.prototype.Merge=
|
|
|
|
New,Color)}CChangesParaTextPrValue.prototype=Object.create(AscDFH.CChangesBaseObjectProperty.prototype);CChangesParaTextPrValue.prototype.constructor=CChangesParaTextPrValue;CChangesParaTextPrValue.prototype.Type=AscDFH.historyitem_TextPr_Value;CChangesParaTextPrValue.prototype.private_SetValue=function(Value){this.Class.Value=Value};CChangesParaTextPrValue.prototype.private_CreateObject=function(){return new CTextPr};CChangesParaTextPrValue.prototype.private_IsCreateEmptyObject=function(){return true};
|
|
|
|
private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrValue(Class,Old,New,Color){AscDFH.CChangesBaseObjectProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrValue.prototype=Object.create(AscDFH.CChangesBaseObjectProperty.prototype);CChangesParaTextPrValue.prototype.constructor=CChangesParaTextPrValue;CChangesParaTextPrValue.prototype.Type=AscDFH.historyitem_TextPr_Value;CChangesParaTextPrValue.prototype.private_SetValue=function(Value){this.Class.Value=Value};CChangesParaTextPrValue.prototype.private_CreateObject=
|
|
|
|
CChangesParaTextPrValue.prototype.Merge=function(oChange){if(oChange.Class!==this.Class)return true;if(oChange.Type===this.Type)return false;if(!this.New)this.New=new CTextPr;switch(oChange.Type){case AscDFH.historyitem_TextPr_Bold:{this.New.Bold=oChange.New;break}case AscDFH.historyitem_TextPr_Italic:{this.New.Italic=oChange.New;break}case AscDFH.historyitem_TextPr_Strikeout:{this.New.Strikeout=oChange.New;break}case AscDFH.historyitem_TextPr_Underline:{this.New.Underline=oChange.New;break}case AscDFH.historyitem_TextPr_FontSize:{this.New.FontSize=
|
|
|
|
function(){return new CTextPr};CChangesParaTextPrValue.prototype.private_IsCreateEmptyObject=function(){return true};CChangesParaTextPrValue.prototype.Merge=function(oChange){if(oChange.Class!==this.Class)return true;if(oChange.Type===this.Type)return false;if(!this.New)this.New=new CTextPr;switch(oChange.Type){case AscDFH.historyitem_TextPr_Bold:{this.New.Bold=oChange.New;break}case AscDFH.historyitem_TextPr_Italic:{this.New.Italic=oChange.New;break}case AscDFH.historyitem_TextPr_Strikeout:{this.New.Strikeout=
|
|
|
|
oChange.New;break}case AscDFH.historyitem_TextPr_Color:{this.New.Color=oChange.New;break}case AscDFH.historyitem_TextPr_VertAlign:{this.New.VertAlign=oChange.New;break}case AscDFH.historyitem_TextPr_HighLight:{this.New.HighLight=oChange.New;break}case AscDFH.historyitem_TextPr_RStyle:{this.New.RStyle=oChange.New;break}case AscDFH.historyitem_TextPr_Spacing:{this.New.Spacing=oChange.New;break}case AscDFH.historyitem_TextPr_DStrikeout:{this.New.DStrikeout=oChange.New;break}case AscDFH.historyitem_TextPr_Caps:{this.New.Caps=
|
|
|
|
oChange.New;break}case AscDFH.historyitem_TextPr_Underline:{this.New.Underline=oChange.New;break}case AscDFH.historyitem_TextPr_FontSize:{this.New.FontSize=oChange.New;break}case AscDFH.historyitem_TextPr_Color:{this.New.Color=oChange.New;break}case AscDFH.historyitem_TextPr_VertAlign:{this.New.VertAlign=oChange.New;break}case AscDFH.historyitem_TextPr_HighLight:{this.New.HighLight=oChange.New;break}case AscDFH.historyitem_TextPr_RStyle:{this.New.RStyle=oChange.New;break}case AscDFH.historyitem_TextPr_Spacing:{this.New.Spacing=
|
|
|
|
oChange.New;break}case AscDFH.historyitem_TextPr_SmallCaps:{this.New.SmallCaps=oChange.New;break}case AscDFH.historyitem_TextPr_Position:{this.New.Position=oChange.New;break}case AscDFH.historyitem_TextPr_RFonts:{this.New.RFonts=oChange.New;break}case AscDFH.historyitem_TextPr_RFonts_Ascii:{if(!this.New.RFonts)this.New.RFonts=new CRFonts;this.New.RFonts.Ascii=oChange.New;break}case AscDFH.historyitem_TextPr_RFonts_HAnsi:{if(!this.New.RFonts)this.New.RFonts=new CRFonts;this.New.RFonts.HAnsi=oChange.New;
|
|
|
|
oChange.New;break}case AscDFH.historyitem_TextPr_DStrikeout:{this.New.DStrikeout=oChange.New;break}case AscDFH.historyitem_TextPr_Caps:{this.New.Caps=oChange.New;break}case AscDFH.historyitem_TextPr_SmallCaps:{this.New.SmallCaps=oChange.New;break}case AscDFH.historyitem_TextPr_Position:{this.New.Position=oChange.New;break}case AscDFH.historyitem_TextPr_RFonts:{this.New.RFonts=oChange.New;break}case AscDFH.historyitem_TextPr_RFonts_Ascii:{if(!this.New.RFonts)this.New.RFonts=new CRFonts;this.New.RFonts.Ascii=
|
|
|
|
break}case AscDFH.historyitem_TextPr_RFonts_CS:{if(!this.New.RFonts)this.New.RFonts=new CRFonts;this.New.RFonts.CS=oChange.New;break}case AscDFH.historyitem_TextPr_RFonts_EastAsia:{if(!this.New.RFonts)this.New.RFonts=new CRFonts;this.New.RFonts.EastAsia=oChange.New;break}case AscDFH.historyitem_TextPr_RFonts_Hint:{if(!this.New.RFonts)this.New.RFonts=new CRFonts;this.New.RFonts.Hint=oChange.New;break}case AscDFH.historyitem_TextPr_Lang:{this.New.Lang=oChange.New;break}case AscDFH.historyitem_TextPr_Lang_Bidi:{if(!this.New.Lang)this.New.Lang=
|
|
|
|
oChange.New;break}case AscDFH.historyitem_TextPr_RFonts_HAnsi:{if(!this.New.RFonts)this.New.RFonts=new CRFonts;this.New.RFonts.HAnsi=oChange.New;break}case AscDFH.historyitem_TextPr_RFonts_CS:{if(!this.New.RFonts)this.New.RFonts=new CRFonts;this.New.RFonts.CS=oChange.New;break}case AscDFH.historyitem_TextPr_RFonts_EastAsia:{if(!this.New.RFonts)this.New.RFonts=new CRFonts;this.New.RFonts.EastAsia=oChange.New;break}case AscDFH.historyitem_TextPr_RFonts_Hint:{if(!this.New.RFonts)this.New.RFonts=new CRFonts;
|
|
|
|
new CLang;this.New.Lang.Bidi=oChange.New;break}case AscDFH.historyitem_TextPr_Lang_EastAsia:{if(!this.New.Lang)this.New.Lang=new CLang;this.New.Lang.EastAsia=oChange.New;break}case AscDFH.historyitem_TextPr_Lang_Val:{if(!this.New.Lang)this.New.Lang=new CLang;this.New.Lang.Val=oChange.New;break}case AscDFH.historyitem_TextPr_Unifill:{this.New.Unifill=oChange.New;break}case AscDFH.historyitem_TextPr_FontSizeCS:{this.New.FontSizeCS=oChange.New;break}case AscDFH.historyitem_TextPr_Outline:{this.New.TextOutline=
|
|
|
|
this.New.RFonts.Hint=oChange.New;break}case AscDFH.historyitem_TextPr_Lang:{this.New.Lang=oChange.New;break}case AscDFH.historyitem_TextPr_Lang_Bidi:{if(!this.New.Lang)this.New.Lang=new CLang;this.New.Lang.Bidi=oChange.New;break}case AscDFH.historyitem_TextPr_Lang_EastAsia:{if(!this.New.Lang)this.New.Lang=new CLang;this.New.Lang.EastAsia=oChange.New;break}case AscDFH.historyitem_TextPr_Lang_Val:{if(!this.New.Lang)this.New.Lang=new CLang;this.New.Lang.Val=oChange.New;break}case AscDFH.historyitem_TextPr_Unifill:{this.New.Unifill=
|
|
|
|
oChange.New;break}case AscDFH.historyitem_TextPr_Fill:{this.New.TextFill=oChange.New;break}}return true};function CChangesParaTextPrRFonts(Class,Old,New,Color){AscDFH.CChangesBaseObjectProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrRFonts.prototype=Object.create(AscDFH.CChangesBaseObjectProperty.prototype);CChangesParaTextPrRFonts.prototype.constructor=CChangesParaTextPrRFonts;CChangesParaTextPrRFonts.prototype.Type=AscDFH.historyitem_TextPr_RFonts;CChangesParaTextPrRFonts.prototype.private_SetValue=
|
|
|
|
oChange.New;break}case AscDFH.historyitem_TextPr_FontSizeCS:{this.New.FontSizeCS=oChange.New;break}case AscDFH.historyitem_TextPr_Outline:{this.New.TextOutline=oChange.New;break}case AscDFH.historyitem_TextPr_Fill:{this.New.TextFill=oChange.New;break}}return true};function CChangesParaTextPrRFonts(Class,Old,New,Color){AscDFH.CChangesBaseObjectProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrRFonts.prototype=Object.create(AscDFH.CChangesBaseObjectProperty.prototype);CChangesParaTextPrRFonts.prototype.constructor=
|
|
|
|
function(Value){this.Class.Value.RFonts=Value};CChangesParaTextPrRFonts.prototype.private_CreateObject=function(){return new CRFonts};CChangesParaTextPrRFonts.prototype.private_IsCreateEmptyObject=function(){return true};CChangesParaTextPrRFonts.prototype.Merge=function(oChange){if(this.Class!==oChange.Class)return true;if(this.Type===oChange.Type||oChange.Type===AscDFH.historyitem_TextPr_Value)return false;if(!this.New)this.New=new CRFonts;switch(oChange.Type){case AscDFH.historyitem_TextPr_RFonts_Ascii:{this.New.Ascii=
|
|
|
|
CChangesParaTextPrRFonts;CChangesParaTextPrRFonts.prototype.Type=AscDFH.historyitem_TextPr_RFonts;CChangesParaTextPrRFonts.prototype.private_SetValue=function(Value){this.Class.Value.RFonts=Value};CChangesParaTextPrRFonts.prototype.private_CreateObject=function(){return new CRFonts};CChangesParaTextPrRFonts.prototype.private_IsCreateEmptyObject=function(){return true};CChangesParaTextPrRFonts.prototype.Merge=function(oChange){if(this.Class!==oChange.Class)return true;if(this.Type===oChange.Type||
|
|
|
|
oChange.New;break}case AscDFH.historyitem_TextPr_RFonts_HAnsi:{this.New.HAnsi=oChange.New;break}case AscDFH.historyitem_TextPr_RFonts_CS:{this.New.CS=oChange.New;break}case AscDFH.historyitem_TextPr_RFonts_EastAsia:{this.New.EastAsia=oChange.New;break}case AscDFH.historyitem_TextPr_RFonts_Hint:{this.New.Hint=oChange.New;break}}return true};function CChangesParaTextPrRFontsAscii(Class,Old,New,Color){AscDFH.CChangesBaseProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrRFontsAscii.prototype=
|
|
|
|
oChange.Type===AscDFH.historyitem_TextPr_Value)return false;if(!this.New)this.New=new CRFonts;switch(oChange.Type){case AscDFH.historyitem_TextPr_RFonts_Ascii:{this.New.Ascii=oChange.New;break}case AscDFH.historyitem_TextPr_RFonts_HAnsi:{this.New.HAnsi=oChange.New;break}case AscDFH.historyitem_TextPr_RFonts_CS:{this.New.CS=oChange.New;break}case AscDFH.historyitem_TextPr_RFonts_EastAsia:{this.New.EastAsia=oChange.New;break}case AscDFH.historyitem_TextPr_RFonts_Hint:{this.New.Hint=oChange.New;break}}return true};
|
|
|
|
Object.create(AscDFH.CChangesBaseProperty.prototype);CChangesParaTextPrRFontsAscii.prototype.constructor=CChangesParaTextPrRFontsAscii;CChangesParaTextPrRFontsAscii.prototype.Type=AscDFH.historyitem_TextPr_RFonts_Ascii;CChangesParaTextPrRFontsAscii.prototype.WriteToBinary=function(Writer){var nFlags=0;if(false!==this.Color)nFlags|=1;if(undefined===this.New)nFlags|=2;if(undefined===this.Old)nFlags|=4;Writer.WriteLong(nFlags);if(undefined!==this.New)Writer.WriteString2(this.New.Name);if(undefined!==
|
|
|
|
function CChangesParaTextPrRFontsAscii(Class,Old,New,Color){AscDFH.CChangesBaseProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrRFontsAscii.prototype=Object.create(AscDFH.CChangesBaseProperty.prototype);CChangesParaTextPrRFontsAscii.prototype.constructor=CChangesParaTextPrRFontsAscii;CChangesParaTextPrRFontsAscii.prototype.Type=AscDFH.historyitem_TextPr_RFonts_Ascii;CChangesParaTextPrRFontsAscii.prototype.WriteToBinary=function(Writer){var nFlags=0;if(false!==this.Color)nFlags|=1;if(undefined===
|
|
|
|
this.Old)Writer.WriteString2(this.Old.Name)};CChangesParaTextPrRFontsAscii.prototype.ReadFromBinary=function(Reader){var nFlags=Reader.GetLong();if(nFlags&1)this.Color=true;else this.Color=false;if(nFlags&2)this.New=undefined;else this.New={Name:Reader.GetString2(),Index:-1};if(nFlags&4)this.Old=undefined;else this.Old={Name:Reader.GetString2(),Index:-1}};CChangesParaTextPrRFontsAscii.prototype.private_SetValue=function(Value){this.Class.Value.RFonts.Ascii=Value};CChangesParaTextPrRFontsAscii.prototype.Merge=
|
|
|
|
this.New)nFlags|=2;if(undefined===this.Old)nFlags|=4;Writer.WriteLong(nFlags);if(undefined!==this.New)Writer.WriteString2(this.New.Name);if(undefined!==this.Old)Writer.WriteString2(this.Old.Name)};CChangesParaTextPrRFontsAscii.prototype.ReadFromBinary=function(Reader){var nFlags=Reader.GetLong();if(nFlags&1)this.Color=true;else this.Color=false;if(nFlags&2)this.New=undefined;else this.New={Name:Reader.GetString2(),Index:-1};if(nFlags&4)this.Old=undefined;else this.Old={Name:Reader.GetString2(),Index:-1}};
|
|
|
|
private_ParaTextPrChangesOnMergeRFontsValue;function CChangesParaTextPrRFontsHAnsi(Class,Old,New,Color){AscDFH.CChangesBaseProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrRFontsHAnsi.prototype=Object.create(AscDFH.CChangesBaseProperty.prototype);CChangesParaTextPrRFontsHAnsi.prototype.constructor=CChangesParaTextPrRFontsHAnsi;CChangesParaTextPrRFontsHAnsi.prototype.Type=AscDFH.historyitem_TextPr_RFonts_HAnsi;CChangesParaTextPrRFontsHAnsi.prototype.WriteToBinary=function(Writer){var nFlags=
|
|
|
|
CChangesParaTextPrRFontsAscii.prototype.private_SetValue=function(Value){this.Class.Value.RFonts.Ascii=Value};CChangesParaTextPrRFontsAscii.prototype.Merge=private_ParaTextPrChangesOnMergeRFontsValue;function CChangesParaTextPrRFontsHAnsi(Class,Old,New,Color){AscDFH.CChangesBaseProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrRFontsHAnsi.prototype=Object.create(AscDFH.CChangesBaseProperty.prototype);CChangesParaTextPrRFontsHAnsi.prototype.constructor=CChangesParaTextPrRFontsHAnsi;CChangesParaTextPrRFontsHAnsi.prototype.Type=
|
|
|
|
0;if(false!==this.Color)nFlags|=1;if(undefined===this.New)nFlags|=2;if(undefined===this.Old)nFlags|=4;Writer.WriteLong(nFlags);if(undefined!==this.New)Writer.WriteString2(this.New.Name);if(undefined!==this.Old)Writer.WriteString2(this.Old.Name)};CChangesParaTextPrRFontsHAnsi.prototype.ReadFromBinary=function(Reader){var nFlags=Reader.GetLong();if(nFlags&1)this.Color=true;else this.Color=false;if(nFlags&2)this.New=undefined;else this.New={Name:Reader.GetString2(),Index:-1};if(nFlags&4)this.Old=undefined;
|
|
|
|
AscDFH.historyitem_TextPr_RFonts_HAnsi;CChangesParaTextPrRFontsHAnsi.prototype.WriteToBinary=function(Writer){var nFlags=0;if(false!==this.Color)nFlags|=1;if(undefined===this.New)nFlags|=2;if(undefined===this.Old)nFlags|=4;Writer.WriteLong(nFlags);if(undefined!==this.New)Writer.WriteString2(this.New.Name);if(undefined!==this.Old)Writer.WriteString2(this.Old.Name)};CChangesParaTextPrRFontsHAnsi.prototype.ReadFromBinary=function(Reader){var nFlags=Reader.GetLong();if(nFlags&1)this.Color=true;else this.Color=
|
|
|
|
else this.Old={Name:Reader.GetString2(),Index:-1}};CChangesParaTextPrRFontsHAnsi.prototype.private_SetValue=function(Value){this.Class.Value.RFonts.HAnsi=Value};CChangesParaTextPrRFontsHAnsi.prototype.Merge=private_ParaTextPrChangesOnMergeRFontsValue;function CChangesParaTextPrRFontsCS(Class,Old,New,Color){AscDFH.CChangesBaseProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrRFontsCS.prototype=Object.create(AscDFH.CChangesBaseProperty.prototype);CChangesParaTextPrRFontsCS.prototype.constructor=
|
|
|
|
false;if(nFlags&2)this.New=undefined;else this.New={Name:Reader.GetString2(),Index:-1};if(nFlags&4)this.Old=undefined;else this.Old={Name:Reader.GetString2(),Index:-1}};CChangesParaTextPrRFontsHAnsi.prototype.private_SetValue=function(Value){this.Class.Value.RFonts.HAnsi=Value};CChangesParaTextPrRFontsHAnsi.prototype.Merge=private_ParaTextPrChangesOnMergeRFontsValue;function CChangesParaTextPrRFontsCS(Class,Old,New,Color){AscDFH.CChangesBaseProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrRFontsCS.prototype=
|
|
|
|
CChangesParaTextPrRFontsCS;CChangesParaTextPrRFontsCS.prototype.Type=AscDFH.historyitem_TextPr_RFonts_CS;CChangesParaTextPrRFontsCS.prototype.WriteToBinary=function(Writer){var nFlags=0;if(false!==this.Color)nFlags|=1;if(undefined===this.New)nFlags|=2;if(undefined===this.Old)nFlags|=4;Writer.WriteLong(nFlags);if(undefined!==this.New)Writer.WriteString2(this.New.Name);if(undefined!==this.Old)Writer.WriteString2(this.Old.Name)};CChangesParaTextPrRFontsCS.prototype.ReadFromBinary=function(Reader){var nFlags=
|
|
|
|
Object.create(AscDFH.CChangesBaseProperty.prototype);CChangesParaTextPrRFontsCS.prototype.constructor=CChangesParaTextPrRFontsCS;CChangesParaTextPrRFontsCS.prototype.Type=AscDFH.historyitem_TextPr_RFonts_CS;CChangesParaTextPrRFontsCS.prototype.WriteToBinary=function(Writer){var nFlags=0;if(false!==this.Color)nFlags|=1;if(undefined===this.New)nFlags|=2;if(undefined===this.Old)nFlags|=4;Writer.WriteLong(nFlags);if(undefined!==this.New)Writer.WriteString2(this.New.Name);if(undefined!==this.Old)Writer.WriteString2(this.Old.Name)};
|
|
|
|
Reader.GetLong();if(nFlags&1)this.Color=true;else this.Color=false;if(nFlags&2)this.New=undefined;else this.New={Name:Reader.GetString2(),Index:-1};if(nFlags&4)this.Old=undefined;else this.Old={Name:Reader.GetString2(),Index:-1}};CChangesParaTextPrRFontsCS.prototype.private_SetValue=function(Value){this.Class.Value.RFonts.CS=Value};CChangesParaTextPrRFontsCS.prototype.Merge=private_ParaTextPrChangesOnMergeRFontsValue;function CChangesParaTextPrRFontsEastAsia(Class,Old,New,Color){AscDFH.CChangesBaseProperty.call(this,
|
|
|
|
CChangesParaTextPrRFontsCS.prototype.ReadFromBinary=function(Reader){var nFlags=Reader.GetLong();if(nFlags&1)this.Color=true;else this.Color=false;if(nFlags&2)this.New=undefined;else this.New={Name:Reader.GetString2(),Index:-1};if(nFlags&4)this.Old=undefined;else this.Old={Name:Reader.GetString2(),Index:-1}};CChangesParaTextPrRFontsCS.prototype.private_SetValue=function(Value){this.Class.Value.RFonts.CS=Value};CChangesParaTextPrRFontsCS.prototype.Merge=private_ParaTextPrChangesOnMergeRFontsValue;
|
|
|
|
Class,Old,New,Color)}CChangesParaTextPrRFontsEastAsia.prototype=Object.create(AscDFH.CChangesBaseProperty.prototype);CChangesParaTextPrRFontsEastAsia.prototype.constructor=CChangesParaTextPrRFontsEastAsia;CChangesParaTextPrRFontsEastAsia.prototype.Type=AscDFH.historyitem_TextPr_RFonts_EastAsia;CChangesParaTextPrRFontsEastAsia.prototype.WriteToBinary=function(Writer){var nFlags=0;if(false!==this.Color)nFlags|=1;if(undefined===this.New)nFlags|=2;if(undefined===this.Old)nFlags|=4;Writer.WriteLong(nFlags);
|
|
|
|
function CChangesParaTextPrRFontsEastAsia(Class,Old,New,Color){AscDFH.CChangesBaseProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrRFontsEastAsia.prototype=Object.create(AscDFH.CChangesBaseProperty.prototype);CChangesParaTextPrRFontsEastAsia.prototype.constructor=CChangesParaTextPrRFontsEastAsia;CChangesParaTextPrRFontsEastAsia.prototype.Type=AscDFH.historyitem_TextPr_RFonts_EastAsia;CChangesParaTextPrRFontsEastAsia.prototype.WriteToBinary=function(Writer){var nFlags=0;if(false!==this.Color)nFlags|=
|
|
|
|
if(undefined!==this.New)Writer.WriteString2(this.New.Name);if(undefined!==this.Old)Writer.WriteString2(this.Old.Name)};CChangesParaTextPrRFontsEastAsia.prototype.ReadFromBinary=function(Reader){var nFlags=Reader.GetLong();if(nFlags&1)this.Color=true;else this.Color=false;if(nFlags&2)this.New=undefined;else this.New={Name:Reader.GetString2(),Index:-1};if(nFlags&4)this.Old=undefined;else this.Old={Name:Reader.GetString2(),Index:-1}};CChangesParaTextPrRFontsEastAsia.prototype.private_SetValue=function(Value){this.Class.Value.RFonts.EastAsia=
|
|
|
|
1;if(undefined===this.New)nFlags|=2;if(undefined===this.Old)nFlags|=4;Writer.WriteLong(nFlags);if(undefined!==this.New)Writer.WriteString2(this.New.Name);if(undefined!==this.Old)Writer.WriteString2(this.Old.Name)};CChangesParaTextPrRFontsEastAsia.prototype.ReadFromBinary=function(Reader){var nFlags=Reader.GetLong();if(nFlags&1)this.Color=true;else this.Color=false;if(nFlags&2)this.New=undefined;else this.New={Name:Reader.GetString2(),Index:-1};if(nFlags&4)this.Old=undefined;else this.Old={Name:Reader.GetString2(),
|
|
|
|
Value};CChangesParaTextPrRFontsEastAsia.prototype.Merge=private_ParaTextPrChangesOnMergeRFontsValue;function CChangesParaTextPrRFontsHint(Class,Old,New,Color){AscDFH.CChangesBaseLongProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrRFontsHint.prototype=Object.create(AscDFH.CChangesBaseLongProperty.prototype);CChangesParaTextPrRFontsHint.prototype.constructor=CChangesParaTextPrRFontsHint;CChangesParaTextPrRFontsHint.prototype.Type=AscDFH.historyitem_TextPr_RFonts_Hint;CChangesParaTextPrRFontsHint.prototype.private_SetValue=
|
|
|
|
Index:-1}};CChangesParaTextPrRFontsEastAsia.prototype.private_SetValue=function(Value){this.Class.Value.RFonts.EastAsia=Value};CChangesParaTextPrRFontsEastAsia.prototype.Merge=private_ParaTextPrChangesOnMergeRFontsValue;function CChangesParaTextPrRFontsHint(Class,Old,New,Color){AscDFH.CChangesBaseLongProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrRFontsHint.prototype=Object.create(AscDFH.CChangesBaseLongProperty.prototype);CChangesParaTextPrRFontsHint.prototype.constructor=CChangesParaTextPrRFontsHint;
|
|
|
|
function(Value){this.Class.Value.RFonts.Hint=Value};CChangesParaTextPrRFontsHint.prototype.Merge=private_ParaTextPrChangesOnMergeRFontsValue;function CChangesParaTextPrLang(Class,Old,New,Color){AscDFH.CChangesBaseObjectProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrLang.prototype=Object.create(AscDFH.CChangesBaseObjectProperty.prototype);CChangesParaTextPrLang.prototype.constructor=CChangesParaTextPrLang;CChangesParaTextPrLang.prototype.Type=AscDFH.historyitem_TextPr_Lang;CChangesParaTextPrLang.prototype.private_SetValue=
|
|
|
|
CChangesParaTextPrRFontsHint.prototype.Type=AscDFH.historyitem_TextPr_RFonts_Hint;CChangesParaTextPrRFontsHint.prototype.private_SetValue=function(Value){this.Class.Value.RFonts.Hint=Value};CChangesParaTextPrRFontsHint.prototype.Merge=private_ParaTextPrChangesOnMergeRFontsValue;function CChangesParaTextPrLang(Class,Old,New,Color){AscDFH.CChangesBaseObjectProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrLang.prototype=Object.create(AscDFH.CChangesBaseObjectProperty.prototype);CChangesParaTextPrLang.prototype.constructor=
|
|
|
|
function(Value){this.Class.Value.Lang=Value};CChangesParaTextPrLang.prototype.private_CreateObject=function(){return new CLang};CChangesParaTextPrLang.prototype.private_IsCreateEmptyObject=function(){return true};CChangesParaTextPrLang.prototype.Merge=function(oChange){if(this.Class!==oChange.Class)return true;if(AscDFH.historyitem_TextPr_Lang===oChange.Type||AscDFH.historyitem_TextPr_Value===oChange.Type)return false;if(!this.New)this.New=new CLang;switch(oChange.Type){case AscDFH.historyitem_TextPr_Lang_Bidi:{this.New.Bidi=
|
|
|
|
CChangesParaTextPrLang;CChangesParaTextPrLang.prototype.Type=AscDFH.historyitem_TextPr_Lang;CChangesParaTextPrLang.prototype.private_SetValue=function(Value){this.Class.Value.Lang=Value};CChangesParaTextPrLang.prototype.private_CreateObject=function(){return new CLang};CChangesParaTextPrLang.prototype.private_IsCreateEmptyObject=function(){return true};CChangesParaTextPrLang.prototype.Merge=function(oChange){if(this.Class!==oChange.Class)return true;if(AscDFH.historyitem_TextPr_Lang===oChange.Type||
|
|
|
|
oChange.New;break}case AscDFH.historyitem_TextPr_Lang_EastAsia:{this.New.EastAsia=oChange.New;break}case AscDFH.historyitem_TextPr_Lang_Val:{this.New.Val=oChange.New;break}}return true};function CChangesParaTextPrLangBidi(Class,Old,New,Color){AscDFH.CChangesBaseLongProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrLangBidi.prototype=Object.create(AscDFH.CChangesBaseLongProperty.prototype);CChangesParaTextPrLangBidi.prototype.constructor=CChangesParaTextPrLangBidi;CChangesParaTextPrLangBidi.prototype.Type=
|
|
|
|
AscDFH.historyitem_TextPr_Value===oChange.Type)return false;if(!this.New)this.New=new CLang;switch(oChange.Type){case AscDFH.historyitem_TextPr_Lang_Bidi:{this.New.Bidi=oChange.New;break}case AscDFH.historyitem_TextPr_Lang_EastAsia:{this.New.EastAsia=oChange.New;break}case AscDFH.historyitem_TextPr_Lang_Val:{this.New.Val=oChange.New;break}}return true};function CChangesParaTextPrLangBidi(Class,Old,New,Color){AscDFH.CChangesBaseLongProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrLangBidi.prototype=
|
|
|
|
AscDFH.historyitem_TextPr_Lang_Bidi;CChangesParaTextPrLangBidi.prototype.private_SetValue=function(Value){this.Class.Value.Lang.Bidi=Value};CChangesParaTextPrLangBidi.prototype.Merge=private_ParaTextPrChangesOnMergeLangValue;function CChangesParaTextPrLangEastAsia(Class,Old,New,Color){AscDFH.CChangesBaseLongProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrLangEastAsia.prototype=Object.create(AscDFH.CChangesBaseLongProperty.prototype);CChangesParaTextPrLangEastAsia.prototype.constructor=CChangesParaTextPrLangEastAsia;
|
|
|
|
Object.create(AscDFH.CChangesBaseLongProperty.prototype);CChangesParaTextPrLangBidi.prototype.constructor=CChangesParaTextPrLangBidi;CChangesParaTextPrLangBidi.prototype.Type=AscDFH.historyitem_TextPr_Lang_Bidi;CChangesParaTextPrLangBidi.prototype.private_SetValue=function(Value){this.Class.Value.Lang.Bidi=Value};CChangesParaTextPrLangBidi.prototype.Merge=private_ParaTextPrChangesOnMergeLangValue;function CChangesParaTextPrLangEastAsia(Class,Old,New,Color){AscDFH.CChangesBaseLongProperty.call(this,
|
|
|
|
CChangesParaTextPrLangEastAsia.prototype.Type=AscDFH.historyitem_TextPr_Lang_EastAsia;CChangesParaTextPrLangEastAsia.prototype.private_SetValue=function(Value){this.Class.Value.Lang.EastAsia=Value};CChangesParaTextPrLangEastAsia.prototype.Merge=private_ParaTextPrChangesOnMergeLangValue;function CChangesParaTextPrLangVal(Class,Old,New,Color){AscDFH.CChangesBaseLongProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrLangVal.prototype=Object.create(AscDFH.CChangesBaseLongProperty.prototype);CChangesParaTextPrLangVal.prototype.constructor=
|
|
|
|
Class,Old,New,Color)}CChangesParaTextPrLangEastAsia.prototype=Object.create(AscDFH.CChangesBaseLongProperty.prototype);CChangesParaTextPrLangEastAsia.prototype.constructor=CChangesParaTextPrLangEastAsia;CChangesParaTextPrLangEastAsia.prototype.Type=AscDFH.historyitem_TextPr_Lang_EastAsia;CChangesParaTextPrLangEastAsia.prototype.private_SetValue=function(Value){this.Class.Value.Lang.EastAsia=Value};CChangesParaTextPrLangEastAsia.prototype.Merge=private_ParaTextPrChangesOnMergeLangValue;function CChangesParaTextPrLangVal(Class,
|
|
|
|
CChangesParaTextPrLangVal;CChangesParaTextPrLangVal.prototype.Type=AscDFH.historyitem_TextPr_Lang_Val;CChangesParaTextPrLangVal.prototype.private_SetValue=function(Value){this.Class.Value.Lang.Val=Value};CChangesParaTextPrLangVal.prototype.Merge=private_ParaTextPrChangesOnMergeLangValue;function CChangesParaTextPrUnifill(Class,Old,New,Color){AscDFH.CChangesBaseObjectProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrUnifill.prototype=Object.create(AscDFH.CChangesBaseObjectProperty.prototype);
|
|
|
|
Old,New,Color){AscDFH.CChangesBaseLongProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrLangVal.prototype=Object.create(AscDFH.CChangesBaseLongProperty.prototype);CChangesParaTextPrLangVal.prototype.constructor=CChangesParaTextPrLangVal;CChangesParaTextPrLangVal.prototype.Type=AscDFH.historyitem_TextPr_Lang_Val;CChangesParaTextPrLangVal.prototype.private_SetValue=function(Value){this.Class.Value.Lang.Val=Value};CChangesParaTextPrLangVal.prototype.Merge=private_ParaTextPrChangesOnMergeLangValue;
|
|
|
|
CChangesParaTextPrUnifill.prototype.constructor=CChangesParaTextPrUnifill;CChangesParaTextPrUnifill.prototype.Type=AscDFH.historyitem_TextPr_Unifill;CChangesParaTextPrUnifill.prototype.private_SetValue=function(Value){this.Class.Value.Unifill=Value};CChangesParaTextPrUnifill.prototype.private_CreateObject=function(){return new AscFormat.CUniFill};CChangesParaTextPrUnifill.prototype.Load=function(Color){this.Redo();var Unifill=this.Class.Value.Unifill;if(AscCommon.CollaborativeEditing&&Unifill&&Unifill.fill&&
|
|
|
|
function CChangesParaTextPrUnifill(Class,Old,New,Color){AscDFH.CChangesBaseObjectProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrUnifill.prototype=Object.create(AscDFH.CChangesBaseObjectProperty.prototype);CChangesParaTextPrUnifill.prototype.constructor=CChangesParaTextPrUnifill;CChangesParaTextPrUnifill.prototype.Type=AscDFH.historyitem_TextPr_Unifill;CChangesParaTextPrUnifill.prototype.private_SetValue=function(Value){this.Class.Value.Unifill=Value};CChangesParaTextPrUnifill.prototype.private_CreateObject=
|
|
|
|
Unifill.fill.type===Asc.c_oAscFill.FILL_TYPE_BLIP&&typeof Unifill.fill.RasterImageId==="string"&&Unifill.fill.RasterImageId.length>0)AscCommon.CollaborativeEditing.Add_NewImage(Unifill.fill.RasterImageId)};CChangesParaTextPrUnifill.prototype.Merge=private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrFontSizeCS(Class,Old,New,Color){AscDFH.CChangesBaseDoubleProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrFontSizeCS.prototype=Object.create(AscDFH.CChangesBaseDoubleProperty.prototype);
|
|
|
|
function(){return new AscFormat.CUniFill};CChangesParaTextPrUnifill.prototype.Load=function(Color){this.Redo();var Unifill=this.Class.Value.Unifill;if(AscCommon.CollaborativeEditing&&Unifill&&Unifill.fill&&Unifill.fill.type===Asc.c_oAscFill.FILL_TYPE_BLIP&&typeof Unifill.fill.RasterImageId==="string"&&Unifill.fill.RasterImageId.length>0)AscCommon.CollaborativeEditing.Add_NewImage(Unifill.fill.RasterImageId)};CChangesParaTextPrUnifill.prototype.Merge=private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrFontSizeCS(Class,
|
|
|
|
CChangesParaTextPrFontSizeCS.prototype.constructor=CChangesParaTextPrFontSizeCS;CChangesParaTextPrFontSizeCS.prototype.Type=AscDFH.historyitem_TextPr_FontSizeCS;CChangesParaTextPrFontSizeCS.prototype.private_SetValue=function(Value){this.Class.Value.FontSizeCS=Value};CChangesParaTextPrFontSizeCS.prototype.Merge=private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrTextOutline(Class,Old,New,Color){AscDFH.CChangesBaseObjectProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrTextOutline.prototype=
|
|
|
|
Old,New,Color){AscDFH.CChangesBaseDoubleProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrFontSizeCS.prototype=Object.create(AscDFH.CChangesBaseDoubleProperty.prototype);CChangesParaTextPrFontSizeCS.prototype.constructor=CChangesParaTextPrFontSizeCS;CChangesParaTextPrFontSizeCS.prototype.Type=AscDFH.historyitem_TextPr_FontSizeCS;CChangesParaTextPrFontSizeCS.prototype.private_SetValue=function(Value){this.Class.Value.FontSizeCS=Value};CChangesParaTextPrFontSizeCS.prototype.Merge=private_ParaTextPrChangesOnMergeValue;
|
|
|
|
Object.create(AscDFH.CChangesBaseObjectProperty.prototype);CChangesParaTextPrTextOutline.prototype.constructor=CChangesParaTextPrTextOutline;CChangesParaTextPrTextOutline.prototype.Type=AscDFH.historyitem_TextPr_Outline;CChangesParaTextPrTextOutline.prototype.private_SetValue=function(Value){this.Class.Value.TextOutline=Value};CChangesParaTextPrTextOutline.prototype.private_CreateObject=function(){return new AscFormat.CLn};CChangesParaTextPrTextOutline.prototype.Merge=private_ParaTextPrChangesOnMergeValue;
|
|
|
|
function CChangesParaTextPrTextOutline(Class,Old,New,Color){AscDFH.CChangesBaseObjectProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrTextOutline.prototype=Object.create(AscDFH.CChangesBaseObjectProperty.prototype);CChangesParaTextPrTextOutline.prototype.constructor=CChangesParaTextPrTextOutline;CChangesParaTextPrTextOutline.prototype.Type=AscDFH.historyitem_TextPr_Outline;CChangesParaTextPrTextOutline.prototype.private_SetValue=function(Value){this.Class.Value.TextOutline=Value};CChangesParaTextPrTextOutline.prototype.private_CreateObject=
|
|
|
|
function CChangesParaTextPrTextFill(Class,Old,New,Color){AscDFH.CChangesBaseObjectProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrTextFill.prototype=Object.create(AscDFH.CChangesBaseObjectProperty.prototype);CChangesParaTextPrTextFill.prototype.constructor=CChangesParaTextPrTextFill;CChangesParaTextPrTextFill.prototype.Type=AscDFH.historyitem_TextPr_Fill;CChangesParaTextPrTextFill.prototype.private_SetValue=function(Value){this.Class.Value.TextFill=Value};CChangesParaTextPrTextFill.prototype.private_CreateObject=
|
|
|
|
function(){return new AscFormat.CLn};CChangesParaTextPrTextOutline.prototype.Merge=private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrTextFill(Class,Old,New,Color){AscDFH.CChangesBaseObjectProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrTextFill.prototype=Object.create(AscDFH.CChangesBaseObjectProperty.prototype);CChangesParaTextPrTextFill.prototype.constructor=CChangesParaTextPrTextFill;CChangesParaTextPrTextFill.prototype.Type=AscDFH.historyitem_TextPr_Fill;CChangesParaTextPrTextFill.prototype.private_SetValue=
|
|
|
|
function(){return new AscFormat.CUniFill};CChangesParaTextPrTextFill.prototype.Merge=private_ParaTextPrChangesOnMergeValue;"use strict";var drawing_Inline=1;var drawing_Anchor=2;var WRAPPING_TYPE_NONE=0;var WRAPPING_TYPE_SQUARE=1;var WRAPPING_TYPE_THROUGH=2;var WRAPPING_TYPE_TIGHT=3;var WRAPPING_TYPE_TOP_AND_BOTTOM=4;var WRAP_HIT_TYPE_POINT=0;var WRAP_HIT_TYPE_SECTION=1;var c_oAscAlignH=Asc.c_oAscAlignH;var c_oAscAlignV=Asc.c_oAscAlignV;function ParaDrawing(W,H,GraphicObj,DrawingDocument,DocumentContent,
|
|
|
|
function(Value){this.Class.Value.TextFill=Value};CChangesParaTextPrTextFill.prototype.private_CreateObject=function(){return new AscFormat.CUniFill};CChangesParaTextPrTextFill.prototype.Merge=private_ParaTextPrChangesOnMergeValue;"use strict";var drawing_Inline=1;var drawing_Anchor=2;var WRAPPING_TYPE_NONE=0;var WRAPPING_TYPE_SQUARE=1;var WRAPPING_TYPE_THROUGH=2;var WRAPPING_TYPE_TIGHT=3;var WRAPPING_TYPE_TOP_AND_BOTTOM=4;var WRAP_HIT_TYPE_POINT=0;var WRAP_HIT_TYPE_SECTION=1;var c_oAscAlignH=Asc.c_oAscAlignH;
|
|
|
|
Parent){CRunElementBase.call(this);this.Id=AscCommon.g_oIdCounter.Get_NewId();this.DrawingType=drawing_Inline;this.GraphicObj=GraphicObj;this.X=0;this.Y=0;this.Width=0;this.Height=0;this.OrigX=0;this.OrigY=0;this.ShiftX=0;this.ShiftY=0;this.PageNum=0;this.LineNum=0;this.YOffset=0;this.DocumentContent=DocumentContent;this.DrawingDocument=DrawingDocument;this.Parent=Parent;this.LogicDocument=DrawingDocument?DrawingDocument.m_oLogicDocument:null;this.Distance={T:0,B:0,L:0,R:0};this.LayoutInCell=true;
|
|
|
|
var c_oAscAlignV=Asc.c_oAscAlignV;function ParaDrawing(W,H,GraphicObj,DrawingDocument,DocumentContent,Parent){CRunElementBase.call(this);this.Id=AscCommon.g_oIdCounter.Get_NewId();this.DrawingType=drawing_Inline;this.GraphicObj=GraphicObj;this.X=0;this.Y=0;this.Width=0;this.Height=0;this.OrigX=0;this.OrigY=0;this.ShiftX=0;this.ShiftY=0;this.PageNum=0;this.LineNum=0;this.YOffset=0;this.DocumentContent=DocumentContent;this.DrawingDocument=DrawingDocument;this.Parent=Parent;this.LogicDocument=DrawingDocument?
|
|
|
|
this.RelativeHeight=undefined;this.SimplePos={Use:false,X:0,Y:0};this.Extent={W:W,H:H};this.EffectExtent={L:0,T:0,R:0,B:0};this.docPr=new AscFormat.CNvPr;this.SizeRelH=undefined;this.SizeRelV=undefined;this.AllowOverlap=true;this.Locked=null;this.Hidden=null;this.PositionH={RelativeFrom:c_oAscRelativeFromH.Column,Align:false,Value:0,Percent:false};this.PositionV={RelativeFrom:c_oAscRelativeFromV.Paragraph,Align:false,Value:0,Percent:false};this.PositionH_Old=undefined;this.PositionV_Old=undefined;
|
|
|
|
DrawingDocument.m_oLogicDocument:null;this.Distance={T:0,B:0,L:0,R:0};this.LayoutInCell=true;this.RelativeHeight=undefined;this.SimplePos={Use:false,X:0,Y:0};this.Extent={W:W,H:H};this.EffectExtent={L:0,T:0,R:0,B:0};this.docPr=new AscFormat.CNvPr;this.SizeRelH=undefined;this.SizeRelV=undefined;this.AllowOverlap=true;this.Locked=null;this.Hidden=null;this.PositionH={RelativeFrom:c_oAscRelativeFromH.Column,Align:false,Value:0,Percent:false};this.PositionV={RelativeFrom:c_oAscRelativeFromV.Paragraph,
|
|
|
|
this.Internal_Position=new CAnchorPosition;this.wrappingType=WRAPPING_TYPE_THROUGH;this.useWrap=true;if(typeof CWrapPolygon!=="undefined")this.wrappingPolygon=new CWrapPolygon(this);this.document=editor.WordControl.m_oLogicDocument;this.drawingDocument=DrawingDocument;this.graphicObjects=editor.WordControl.m_oLogicDocument.DrawingObjects;this.selected=false;this.behindDoc=false;this.bNoNeedToAdd=false;this.pageIndex=-1;this.Lock=new AscCommon.CLock;this.ParaMath=null;this.SkipOnRecalculate=false;
|
|
|
|
Align:false,Value:0,Percent:false};this.PositionH_Old=undefined;this.PositionV_Old=undefined;this.Internal_Position=new CAnchorPosition;this.wrappingType=WRAPPING_TYPE_THROUGH;this.useWrap=true;if(typeof CWrapPolygon!=="undefined")this.wrappingPolygon=new CWrapPolygon(this);this.document=editor.WordControl.m_oLogicDocument;this.drawingDocument=DrawingDocument;this.graphicObjects=editor.WordControl.m_oLogicDocument.DrawingObjects;this.selected=false;this.behindDoc=false;this.bNoNeedToAdd=false;this.pageIndex=
|
|
|
|
this.LineTop=null;this.LineBottom=null;g_oTableId.Add(this,this.Id);if(this.graphicObjects){this.Set_RelativeHeight(this.graphicObjects.getZIndex());if(History.Is_On()&&!g_oTableId.m_bTurnOff)this.graphicObjects.addGraphicObject(this)}}ParaDrawing.prototype=Object.create(CRunElementBase.prototype);ParaDrawing.prototype.constructor=ParaDrawing;ParaDrawing.prototype.Type=para_Drawing;ParaDrawing.prototype.Get_Type=function(){return this.Type};ParaDrawing.prototype.Get_Width=function(){return this.Width};
|
|
|
|
-1;this.Lock=new AscCommon.CLock;this.ParaMath=null;this.SkipOnRecalculate=false;this.LineTop=null;this.LineBottom=null;g_oTableId.Add(this,this.Id);if(this.graphicObjects){this.Set_RelativeHeight(this.graphicObjects.getZIndex());if(History.Is_On()&&!g_oTableId.m_bTurnOff)this.graphicObjects.addGraphicObject(this)}}ParaDrawing.prototype=Object.create(CRunElementBase.prototype);ParaDrawing.prototype.constructor=ParaDrawing;ParaDrawing.prototype.Type=para_Drawing;ParaDrawing.prototype.Get_Type=function(){return this.Type};
|
|
|
|
ParaDrawing.prototype.Get_WidthVisible=function(){return this.WidthVisible};ParaDrawing.prototype.Set_WidthVisible=function(WidthVisible){this.WidthVisible=WidthVisible};ParaDrawing.prototype.GetSelectedContent=function(SelectedContent){if(this.GraphicObj&&this.GraphicObj.GetSelectedContent)this.GraphicObj.GetSelectedContent(SelectedContent)};ParaDrawing.prototype.GetSearchElementId=function(bNext,bCurrent){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.GetSearchElementId==="function")return this.GraphicObj.GetSearchElementId(bNext,
|
|
|
|
ParaDrawing.prototype.Get_Width=function(){return this.Width};ParaDrawing.prototype.Get_WidthVisible=function(){return this.WidthVisible};ParaDrawing.prototype.Set_WidthVisible=function(WidthVisible){this.WidthVisible=WidthVisible};ParaDrawing.prototype.GetSelectedContent=function(SelectedContent){if(this.GraphicObj&&this.GraphicObj.GetSelectedContent)this.GraphicObj.GetSelectedContent(SelectedContent)};ParaDrawing.prototype.GetSearchElementId=function(bNext,bCurrent){if(AscCommon.isRealObject(this.GraphicObj)&&
|
|
|
|
bCurrent);return null};ParaDrawing.prototype.CheckCorrect=function(){if(!this.GraphicObj)return false;if(this.GraphicObj&&this.GraphicObj.checkCorrect)return this.GraphicObj.checkCorrect();return true};ParaDrawing.prototype.GetAllDrawingObjects=function(DrawingObjects){if(null==DrawingObjects)DrawingObjects=[];if(this.GraphicObj.GetAllDrawingObjects)this.GraphicObj.GetAllDrawingObjects(DrawingObjects)};ParaDrawing.prototype.canRotate=function(){return AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.canRotate==
|
|
|
|
typeof this.GraphicObj.GetSearchElementId==="function")return this.GraphicObj.GetSearchElementId(bNext,bCurrent);return null};ParaDrawing.prototype.CheckCorrect=function(){if(!this.GraphicObj)return false;if(this.GraphicObj&&this.GraphicObj.checkCorrect)return this.GraphicObj.checkCorrect();return true};ParaDrawing.prototype.GetAllDrawingObjects=function(DrawingObjects){if(null==DrawingObjects)DrawingObjects=[];if(this.GraphicObj.GetAllDrawingObjects)this.GraphicObj.GetAllDrawingObjects(DrawingObjects)};
|
|
|
|
"function"&&this.GraphicObj.canRotate()};ParaDrawing.prototype.GetParagraph=function(){return this.Get_ParentParagraph()};ParaDrawing.prototype.GetRun=function(){return this.Get_Run()};ParaDrawing.prototype.Get_Run=function(){var oParagraph=this.Get_ParentParagraph();if(oParagraph)return oParagraph.Get_DrawingObjectRun(this.Id);return null};ParaDrawing.prototype.Get_Props=function(OtherProps){var Props={};Props.Width=this.GraphicObj.extX;Props.Height=this.GraphicObj.extY;if(drawing_Inline===this.DrawingType)Props.WrappingStyle=
|
|
|
|
ParaDrawing.prototype.canRotate=function(){return AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.canRotate=="function"&&this.GraphicObj.canRotate()};ParaDrawing.prototype.GetParagraph=function(){return this.Get_ParentParagraph()};ParaDrawing.prototype.GetRun=function(){return this.Get_Run()};ParaDrawing.prototype.Get_Run=function(){var oParagraph=this.Get_ParentParagraph();if(oParagraph)return oParagraph.Get_DrawingObjectRun(this.Id);return null};ParaDrawing.prototype.Get_Props=function(OtherProps){var Props=
|
|
|
|
c_oAscWrapStyle2.Inline;else if(WRAPPING_TYPE_NONE===this.wrappingType)Props.WrappingStyle=this.behindDoc===true?c_oAscWrapStyle2.Behind:c_oAscWrapStyle2.InFront;else switch(this.wrappingType){case WRAPPING_TYPE_SQUARE:Props.WrappingStyle=c_oAscWrapStyle2.Square;break;case WRAPPING_TYPE_TIGHT:Props.WrappingStyle=c_oAscWrapStyle2.Tight;break;case WRAPPING_TYPE_THROUGH:Props.WrappingStyle=c_oAscWrapStyle2.Through;break;case WRAPPING_TYPE_TOP_AND_BOTTOM:Props.WrappingStyle=c_oAscWrapStyle2.TopAndBottom;
|
|
|
|
{};Props.Width=this.GraphicObj.extX;Props.Height=this.GraphicObj.extY;if(drawing_Inline===this.DrawingType)Props.WrappingStyle=c_oAscWrapStyle2.Inline;else if(WRAPPING_TYPE_NONE===this.wrappingType)Props.WrappingStyle=this.behindDoc===true?c_oAscWrapStyle2.Behind:c_oAscWrapStyle2.InFront;else switch(this.wrappingType){case WRAPPING_TYPE_SQUARE:Props.WrappingStyle=c_oAscWrapStyle2.Square;break;case WRAPPING_TYPE_TIGHT:Props.WrappingStyle=c_oAscWrapStyle2.Tight;break;case WRAPPING_TYPE_THROUGH:Props.WrappingStyle=
|
|
|
|
break;default:Props.WrappingStyle=c_oAscWrapStyle2.Inline;break}if(drawing_Inline===this.DrawingType)Props.Paddings={Left:AscFormat.DISTANCE_TO_TEXT_LEFTRIGHT,Right:AscFormat.DISTANCE_TO_TEXT_LEFTRIGHT,Top:0,Bottom:0};else{var oDistance=this.Get_Distance();Props.Paddings={Left:oDistance.L,Right:oDistance.R,Top:oDistance.T,Bottom:oDistance.B}}Props.AllowOverlap=this.AllowOverlap;Props.Position={X:this.X,Y:this.Y};Props.PositionH={RelativeFrom:this.PositionH.RelativeFrom,UseAlign:this.PositionH.Align,
|
|
|
|
c_oAscWrapStyle2.Through;break;case WRAPPING_TYPE_TOP_AND_BOTTOM:Props.WrappingStyle=c_oAscWrapStyle2.TopAndBottom;break;default:Props.WrappingStyle=c_oAscWrapStyle2.Inline;break}if(drawing_Inline===this.DrawingType)Props.Paddings={Left:AscFormat.DISTANCE_TO_TEXT_LEFTRIGHT,Right:AscFormat.DISTANCE_TO_TEXT_LEFTRIGHT,Top:0,Bottom:0};else{var oDistance=this.Get_Distance();Props.Paddings={Left:oDistance.L,Right:oDistance.R,Top:oDistance.T,Bottom:oDistance.B}}Props.AllowOverlap=this.AllowOverlap;Props.Position=
|
|
|
|
Align:true===this.PositionH.Align?this.PositionH.Value:undefined,Value:true===this.PositionH.Align?0:this.PositionH.Value,Percent:this.PositionH.Percent};Props.PositionV={RelativeFrom:this.PositionV.RelativeFrom,UseAlign:this.PositionV.Align,Align:true===this.PositionV.Align?this.PositionV.Value:undefined,Value:true===this.PositionV.Align?0:this.PositionV.Value,Percent:this.PositionV.Percent};if(this.SizeRelH&&this.SizeRelH.Percent>0)Props.SizeRelH={RelativeFrom:AscFormat.ConvertRelSizeHToRelPosition(this.SizeRelH.RelativeFrom),
|
|
|
|
{X:this.X,Y:this.Y};Props.PositionH={RelativeFrom:this.PositionH.RelativeFrom,UseAlign:this.PositionH.Align,Align:true===this.PositionH.Align?this.PositionH.Value:undefined,Value:true===this.PositionH.Align?0:this.PositionH.Value,Percent:this.PositionH.Percent};Props.PositionV={RelativeFrom:this.PositionV.RelativeFrom,UseAlign:this.PositionV.Align,Align:true===this.PositionV.Align?this.PositionV.Value:undefined,Value:true===this.PositionV.Align?0:this.PositionV.Value,Percent:this.PositionV.Percent};
|
|
|
|
Value:this.SizeRelH.Percent*100>>0};if(this.SizeRelV&&this.SizeRelV.Percent>0)Props.SizeRelV={RelativeFrom:AscFormat.ConvertRelSizeVToRelPosition(this.SizeRelV.RelativeFrom),Value:this.SizeRelV.Percent*100>>0};Props.Internal_Position=this.Internal_Position;Props.Locked=this.Lock.Is_Locked();var ParentParagraph=this.Get_ParentParagraph();if(ParentParagraph&&undefined!==ParentParagraph.Parent){var DocContent=ParentParagraph.Parent;if(true===DocContent.Is_DrawingShape()||DocContent.GetTopDocumentContent()instanceof
|
|
|
|
if(this.SizeRelH&&this.SizeRelH.Percent>0)Props.SizeRelH={RelativeFrom:AscFormat.ConvertRelSizeHToRelPosition(this.SizeRelH.RelativeFrom),Value:this.SizeRelH.Percent*100>>0};if(this.SizeRelV&&this.SizeRelV.Percent>0)Props.SizeRelV={RelativeFrom:AscFormat.ConvertRelSizeVToRelPosition(this.SizeRelV.RelativeFrom),Value:this.SizeRelV.Percent*100>>0};Props.Internal_Position=this.Internal_Position;Props.Locked=this.Lock.Is_Locked();var ParentParagraph=this.Get_ParentParagraph();if(ParentParagraph&&undefined!==
|
|
|
|
CFootEndnote)Props.CanBeFlow=false}Props.title=this.docPr.title!==null?this.docPr.title:undefined;Props.description=this.docPr.descr!==null?this.docPr.descr:undefined;if(null!=OtherProps&&undefined!=OtherProps){if(undefined===OtherProps.Width||.001>Math.abs(Props.Width-OtherProps.Width))Props.Width=undefined;if(undefined===OtherProps.Height||.001>Math.abs(Props.Height-OtherProps.Height))Props.Height=undefined;if(undefined===OtherProps.WrappingStyle||Props.WrappingStyle!=OtherProps.WrappingStyle)Props.WrappingStyle=
|
|
|
|
ParentParagraph.Parent){var DocContent=ParentParagraph.Parent;if(true===DocContent.Is_DrawingShape()||DocContent.GetTopDocumentContent()instanceof CFootEndnote)Props.CanBeFlow=false}Props.title=this.docPr.title!==null?this.docPr.title:undefined;Props.description=this.docPr.descr!==null?this.docPr.descr:undefined;if(null!=OtherProps&&undefined!=OtherProps){if(undefined===OtherProps.Width||.001>Math.abs(Props.Width-OtherProps.Width))Props.Width=undefined;if(undefined===OtherProps.Height||.001>Math.abs(Props.Height-
|
|
|
|
undefined;if(undefined===OtherProps.ImageUrl||Props.ImageUrl!=OtherProps.ImageUrl)Props.ImageUrl=undefined;if(undefined===OtherProps.Paddings.Left||.001>Math.abs(Props.Paddings.Left-OtherProps.Paddings.Left))Props.Paddings.Left=undefined;if(undefined===OtherProps.Paddings.Right||.001>Math.abs(Props.Paddings.Right-OtherProps.Paddings.Right))Props.Paddings.Right=undefined;if(undefined===OtherProps.Paddings.Top||.001>Math.abs(Props.Paddings.Top-OtherProps.Paddings.Top))Props.Paddings.Top=undefined;if(undefined===
|
|
|
|
OtherProps.Height))Props.Height=undefined;if(undefined===OtherProps.WrappingStyle||Props.WrappingStyle!=OtherProps.WrappingStyle)Props.WrappingStyle=undefined;if(undefined===OtherProps.ImageUrl||Props.ImageUrl!=OtherProps.ImageUrl)Props.ImageUrl=undefined;if(undefined===OtherProps.Paddings.Left||.001>Math.abs(Props.Paddings.Left-OtherProps.Paddings.Left))Props.Paddings.Left=undefined;if(undefined===OtherProps.Paddings.Right||.001>Math.abs(Props.Paddings.Right-OtherProps.Paddings.Right))Props.Paddings.Right=
|
|
|
|
OtherProps.Paddings.Bottom||.001>Math.abs(Props.Paddings.Bottom-OtherProps.Paddings.Bottom))Props.Paddings.Bottom=undefined;if(undefined===OtherProps.AllowOverlap||Props.AllowOverlap!=OtherProps.AllowOverlap)Props.AllowOverlap=undefined;if(undefined===OtherProps.Position.X||.001>Math.abs(Props.Position.X-OtherProps.Position.X))Props.Position.X=undefined;if(undefined===OtherProps.Position.Y||.001>Math.abs(Props.Position.Y-OtherProps.Position.Y))Props.Position.Y=undefined;if(undefined===OtherProps.PositionH.RelativeFrom||
|
|
|
|
undefined;if(undefined===OtherProps.Paddings.Top||.001>Math.abs(Props.Paddings.Top-OtherProps.Paddings.Top))Props.Paddings.Top=undefined;if(undefined===OtherProps.Paddings.Bottom||.001>Math.abs(Props.Paddings.Bottom-OtherProps.Paddings.Bottom))Props.Paddings.Bottom=undefined;if(undefined===OtherProps.AllowOverlap||Props.AllowOverlap!=OtherProps.AllowOverlap)Props.AllowOverlap=undefined;if(undefined===OtherProps.Position.X||.001>Math.abs(Props.Position.X-OtherProps.Position.X))Props.Position.X=undefined;
|
|
|
|
Props.PositionH.RelativeFrom!=OtherProps.PositionH.RelativeFrom)Props.PositionH.RelativeFrom=undefined;if(undefined===OtherProps.PositionH.UseAlign||Props.PositionH.UseAlign!=OtherProps.PositionH.UseAlign)Props.PositionH.UseAlign=undefined;if(Props.PositionH.RelativeFrom===OtherProps.PositionH.RelativeFrom&&Props.PositionH.UseAlign===OtherProps.PositionH.UseAlign){if(true!=Props.PositionH.UseAlign&&.001>Math.abs(Props.PositionH.Value-OtherProps.PositionH.Value))Props.PositionH.Value=undefined;if(true===
|
|
|
|
if(undefined===OtherProps.Position.Y||.001>Math.abs(Props.Position.Y-OtherProps.Position.Y))Props.Position.Y=undefined;if(undefined===OtherProps.PositionH.RelativeFrom||Props.PositionH.RelativeFrom!=OtherProps.PositionH.RelativeFrom)Props.PositionH.RelativeFrom=undefined;if(undefined===OtherProps.PositionH.UseAlign||Props.PositionH.UseAlign!=OtherProps.PositionH.UseAlign)Props.PositionH.UseAlign=undefined;if(Props.PositionH.RelativeFrom===OtherProps.PositionH.RelativeFrom&&Props.PositionH.UseAlign===
|
|
|
|
Props.PositionH.UseAlign&&Props.PositionH.Align!=OtherProps.PositionH.Align)Props.PositionH.Align=undefined}if(undefined===OtherProps.PositionV.RelativeFrom||Props.PositionV.RelativeFrom!=OtherProps.PositionV.RelativeFrom)Props.PositionV.RelativeFrom=undefined;if(undefined===OtherProps.PositionV.UseAlign||Props.PositionV.UseAlign!=OtherProps.PositionV.UseAlign)Props.PositionV.UseAlign=undefined;if(Props.PositionV.RelativeFrom===OtherProps.PositionV.RelativeFrom&&Props.PositionV.UseAlign===OtherProps.PositionV.UseAlign){if(true!=
|
|
|
|
OtherProps.PositionH.UseAlign){if(true!=Props.PositionH.UseAlign&&.001>Math.abs(Props.PositionH.Value-OtherProps.PositionH.Value))Props.PositionH.Value=undefined;if(true===Props.PositionH.UseAlign&&Props.PositionH.Align!=OtherProps.PositionH.Align)Props.PositionH.Align=undefined}if(undefined===OtherProps.PositionV.RelativeFrom||Props.PositionV.RelativeFrom!=OtherProps.PositionV.RelativeFrom)Props.PositionV.RelativeFrom=undefined;if(undefined===OtherProps.PositionV.UseAlign||Props.PositionV.UseAlign!=
|
|
|
|
Props.PositionV.UseAlign&&.001>Math.abs(Props.PositionV.Value-OtherProps.PositionV.Value))Props.PositionV.Value=undefined;if(true===Props.PositionV.UseAlign&&Props.PositionV.Align!=OtherProps.PositionV.Align)Props.PositionV.Align=undefined}if(false===OtherProps.Locked)Props.Locked=false;if(false===OtherProps.CanBeFlow||false===Props.CanBeFlow)Props.CanBeFlow=false;else Props.CanBeFlow=true;if(undefined===OtherProps.title||Props.title!==OtherProps.title)Props.title=undefined;if(undefined===OtherProps.description||
|
|
|
|
OtherProps.PositionV.UseAlign)Props.PositionV.UseAlign=undefined;if(Props.PositionV.RelativeFrom===OtherProps.PositionV.RelativeFrom&&Props.PositionV.UseAlign===OtherProps.PositionV.UseAlign){if(true!=Props.PositionV.UseAlign&&.001>Math.abs(Props.PositionV.Value-OtherProps.PositionV.Value))Props.PositionV.Value=undefined;if(true===Props.PositionV.UseAlign&&Props.PositionV.Align!=OtherProps.PositionV.Align)Props.PositionV.Align=undefined}if(false===OtherProps.Locked)Props.Locked=false;if(false===OtherProps.CanBeFlow||
|
|
|
|
Props.description!==OtherProps.description)Props.description=undefined}return Props};ParaDrawing.prototype.Is_UseInDocument=function(){if(this.Parent){var Run=this.Parent.Get_DrawingObjectRun(this.Id);if(Run)return Run.Is_UseInDocument(this.Get_Id())}return false};ParaDrawing.prototype.IsUseInDocument=function(){return this.Is_UseInDocument()};ParaDrawing.prototype.CheckGroupSizes=function(){if(this.GraphicObj&&this.GraphicObj.CheckGroupSizes)this.GraphicObj.CheckGroupSizes()};ParaDrawing.prototype.Set_DrawingType=
|
|
|
|
false===Props.CanBeFlow)Props.CanBeFlow=false;else Props.CanBeFlow=true;if(undefined===OtherProps.title||Props.title!==OtherProps.title)Props.title=undefined;if(undefined===OtherProps.description||Props.description!==OtherProps.description)Props.description=undefined}return Props};ParaDrawing.prototype.Is_UseInDocument=function(){if(this.Parent){var Run=this.Parent.Get_DrawingObjectRun(this.Id);if(Run)return Run.Is_UseInDocument(this.Get_Id())}return false};ParaDrawing.prototype.IsUseInDocument=function(){return this.Is_UseInDocument()};
|
|
|
|
function(DrawingType){History.Add(new CChangesParaDrawingDrawingType(this,this.DrawingType,DrawingType));this.DrawingType=DrawingType};ParaDrawing.prototype.Set_WrappingType=function(WrapType){History.Add(new CChangesParaDrawingWrappingType(this,this.wrappingType,WrapType));this.wrappingType=WrapType};ParaDrawing.prototype.Set_Distance=function(L,T,R,B){var oDistance=this.Get_Distance();if(!AscFormat.isRealNumber(L))L=oDistance.L;if(!AscFormat.isRealNumber(T))T=oDistance.T;if(!AscFormat.isRealNumber(R))R=
|
|
|
|
ParaDrawing.prototype.CheckGroupSizes=function(){if(this.GraphicObj&&this.GraphicObj.CheckGroupSizes)this.GraphicObj.CheckGroupSizes()};ParaDrawing.prototype.Set_DrawingType=function(DrawingType){History.Add(new CChangesParaDrawingDrawingType(this,this.DrawingType,DrawingType));this.DrawingType=DrawingType};ParaDrawing.prototype.Set_WrappingType=function(WrapType){History.Add(new CChangesParaDrawingWrappingType(this,this.wrappingType,WrapType));this.wrappingType=WrapType};ParaDrawing.prototype.Set_Distance=
|
|
|
|
oDistance.R;if(!AscFormat.isRealNumber(B))B=oDistance.B;History.Add(new CChangesParaDrawingDistance(this,{Left:this.Distance.L,Top:this.Distance.T,Right:this.Distance.R,Bottom:this.Distance.B},{Left:L,Top:T,Right:R,Bottom:B}));this.Distance.L=L;this.Distance.R=R;this.Distance.T=T;this.Distance.B=B};ParaDrawing.prototype.Set_AllowOverlap=function(AllowOverlap){History.Add(new CChangesParaDrawingAllowOverlap(this,this.AllowOverlap,AllowOverlap));this.AllowOverlap=AllowOverlap};ParaDrawing.prototype.Set_PositionH=
|
|
|
|
function(L,T,R,B){var oDistance=this.Get_Distance();if(!AscFormat.isRealNumber(L))L=oDistance.L;if(!AscFormat.isRealNumber(T))T=oDistance.T;if(!AscFormat.isRealNumber(R))R=oDistance.R;if(!AscFormat.isRealNumber(B))B=oDistance.B;History.Add(new CChangesParaDrawingDistance(this,{Left:this.Distance.L,Top:this.Distance.T,Right:this.Distance.R,Bottom:this.Distance.B},{Left:L,Top:T,Right:R,Bottom:B}));this.Distance.L=L;this.Distance.R=R;this.Distance.T=T;this.Distance.B=B};ParaDrawing.prototype.Set_AllowOverlap=
|
|
|
|
function(RelativeFrom,Align,Value,Percent){var _Value,_Percent;if(AscFormat.isRealNumber(Value)&&AscFormat.fApproxEqual(Value,0)&&true===Percent){_Value=0;_Percent=false}else{_Value=Value;_Percent=Percent}History.Add(new CChangesParaDrawingPositionH(this,{RelativeFrom:this.PositionH.RelativeFrom,Align:this.PositionH.Align,Value:this.PositionH.Value,Percent:this.PositionH.Percent},{RelativeFrom:RelativeFrom,Align:Align,Value:_Value,Percent:_Percent}));this.PositionH.RelativeFrom=RelativeFrom;this.PositionH.Align=
|
|
|
|
function(AllowOverlap){History.Add(new CChangesParaDrawingAllowOverlap(this,this.AllowOverlap,AllowOverlap));this.AllowOverlap=AllowOverlap};ParaDrawing.prototype.Set_PositionH=function(RelativeFrom,Align,Value,Percent){var _Value,_Percent;if(AscFormat.isRealNumber(Value)&&AscFormat.fApproxEqual(Value,0)&&true===Percent){_Value=0;_Percent=false}else{_Value=Value;_Percent=Percent}History.Add(new CChangesParaDrawingPositionH(this,{RelativeFrom:this.PositionH.RelativeFrom,Align:this.PositionH.Align,
|
|
|
|
Align;this.PositionH.Value=_Value;this.PositionH.Percent=_Percent};ParaDrawing.prototype.Set_PositionV=function(RelativeFrom,Align,Value,Percent){var _Value,_Percent;if(AscFormat.isRealNumber(Value)&&AscFormat.fApproxEqual(Value,0)&&true===Percent){_Value=0;_Percent=false}else{_Value=Value;_Percent=Percent}History.Add(new CChangesParaDrawingPositionV(this,{RelativeFrom:this.PositionV.RelativeFrom,Align:this.PositionV.Align,Value:this.PositionV.Value,Percent:this.PositionV.Percent},{RelativeFrom:RelativeFrom,
|
|
|
|
Value:this.PositionH.Value,Percent:this.PositionH.Percent},{RelativeFrom:RelativeFrom,Align:Align,Value:_Value,Percent:_Percent}));this.PositionH.RelativeFrom=RelativeFrom;this.PositionH.Align=Align;this.PositionH.Value=_Value;this.PositionH.Percent=_Percent};ParaDrawing.prototype.Set_PositionV=function(RelativeFrom,Align,Value,Percent){var _Value,_Percent;if(AscFormat.isRealNumber(Value)&&AscFormat.fApproxEqual(Value,0)&&true===Percent){_Value=0;_Percent=false}else{_Value=Value;_Percent=Percent}History.Add(new CChangesParaDrawingPositionV(this,
|
|
|
|
Align:Align,Value:_Value,Percent:_Percent}));this.PositionV.RelativeFrom=RelativeFrom;this.PositionV.Align=Align;this.PositionV.Value=_Value;this.PositionV.Percent=_Percent};ParaDrawing.prototype.GetPositionH=function(){return{RelativeFrom:this.PositionH.RelativeFrom,Align:this.PositionH.Align,Value:this.PositionH.Value,Percent:this.PositionH.Percent}};ParaDrawing.prototype.GetPositionV=function(){return{RelativeFrom:this.PositionV.RelativeFrom,Align:this.PositionV.Align,Value:this.PositionV.Value,
|
|
|
|
{RelativeFrom:this.PositionV.RelativeFrom,Align:this.PositionV.Align,Value:this.PositionV.Value,Percent:this.PositionV.Percent},{RelativeFrom:RelativeFrom,Align:Align,Value:_Value,Percent:_Percent}));this.PositionV.RelativeFrom=RelativeFrom;this.PositionV.Align=Align;this.PositionV.Value=_Value;this.PositionV.Percent=_Percent};ParaDrawing.prototype.GetPositionH=function(){return{RelativeFrom:this.PositionH.RelativeFrom,Align:this.PositionH.Align,Value:this.PositionH.Value,Percent:this.PositionH.Percent}};
|
|
|
|
Percent:this.PositionV.Percent}};ParaDrawing.prototype.Set_BehindDoc=function(BehindDoc){History.Add(new CChangesParaDrawingBehindDoc(this,this.behindDoc,BehindDoc));this.behindDoc=BehindDoc};ParaDrawing.prototype.Set_GraphicObject=function(graphicObject){var oldId=AscCommon.isRealObject(this.GraphicObj)?this.GraphicObj.Get_Id():null;var newId=AscCommon.isRealObject(graphicObject)?graphicObject.Get_Id():null;History.Add(new CChangesParaDrawingGraphicObject(this,oldId,newId));if(graphicObject)graphicObject.handleUpdateExtents();
|
|
|
|
ParaDrawing.prototype.GetPositionV=function(){return{RelativeFrom:this.PositionV.RelativeFrom,Align:this.PositionV.Align,Value:this.PositionV.Value,Percent:this.PositionV.Percent}};ParaDrawing.prototype.Set_BehindDoc=function(BehindDoc){History.Add(new CChangesParaDrawingBehindDoc(this,this.behindDoc,BehindDoc));this.behindDoc=BehindDoc};ParaDrawing.prototype.Set_GraphicObject=function(graphicObject){var oldId=AscCommon.isRealObject(this.GraphicObj)?this.GraphicObj.Get_Id():null;var newId=AscCommon.isRealObject(graphicObject)?
|
|
|
|
this.GraphicObj=graphicObject};ParaDrawing.prototype.setSimplePos=function(use,x,y){History.Add(new CChangesParaDrawingSimplePos(this,{Use:this.SimplePos.Use,X:this.SimplePos.X,Y:this.SimplePos.Y},{Use:use,X:x,Y:y}));this.SimplePos.Use=use;this.SimplePos.X=x;this.SimplePos.Y=y};ParaDrawing.prototype.setExtent=function(extX,extY){History.Add(new CChangesParaDrawingExtent(this,{W:this.Extent.W,H:this.Extent.H},{W:extX,H:extY}));this.Extent.W=extX;this.Extent.H=extY};ParaDrawing.prototype.addWrapPolygon=
|
|
|
|
graphicObject.Get_Id():null;History.Add(new CChangesParaDrawingGraphicObject(this,oldId,newId));if(graphicObject)graphicObject.handleUpdateExtents();this.GraphicObj=graphicObject};ParaDrawing.prototype.setSimplePos=function(use,x,y){History.Add(new CChangesParaDrawingSimplePos(this,{Use:this.SimplePos.Use,X:this.SimplePos.X,Y:this.SimplePos.Y},{Use:use,X:x,Y:y}));this.SimplePos.Use=use;this.SimplePos.X=x;this.SimplePos.Y=y};ParaDrawing.prototype.setExtent=function(extX,extY){History.Add(new CChangesParaDrawingExtent(this,
|
|
|
|
function(wrapPolygon){History.Add(new CChangesParaDrawingWrapPolygon(this,this.wrappingPolygon,wrapPolygon));this.wrappingPolygon=wrapPolygon};ParaDrawing.prototype.Set_Locked=function(bLocked){History.Add(new CChangesParaDrawingLocked(this,this.Locked,bLocked));this.Locked=bLocked};ParaDrawing.prototype.Set_RelativeHeight=function(nRelativeHeight){History.Add(new CChangesParaDrawingRelativeHeight(this,this.RelativeHeight,nRelativeHeight));this.Set_RelativeHeight2(nRelativeHeight)};ParaDrawing.prototype.Set_RelativeHeight2=
|
|
|
|
{W:this.Extent.W,H:this.Extent.H},{W:extX,H:extY}));this.Extent.W=extX;this.Extent.H=extY};ParaDrawing.prototype.addWrapPolygon=function(wrapPolygon){History.Add(new CChangesParaDrawingWrapPolygon(this,this.wrappingPolygon,wrapPolygon));this.wrappingPolygon=wrapPolygon};ParaDrawing.prototype.Set_Locked=function(bLocked){History.Add(new CChangesParaDrawingLocked(this,this.Locked,bLocked));this.Locked=bLocked};ParaDrawing.prototype.Set_RelativeHeight=function(nRelativeHeight){History.Add(new CChangesParaDrawingRelativeHeight(this,
|
|
|
|
function(nRelativeHeight){this.RelativeHeight=nRelativeHeight;if(this.graphicObjects&&AscFormat.isRealNumber(nRelativeHeight)&&nRelativeHeight>this.graphicObjects.maximalGraphicObjectZIndex)this.graphicObjects.maximalGraphicObjectZIndex=nRelativeHeight};ParaDrawing.prototype.setEffectExtent=function(L,T,R,B){var oEE=this.EffectExtent;History.Add(new CChangesParaDrawingEffectExtent(this,{L:oEE.L,T:oEE.T,R:oEE.R,B:oEE.B},{L:L,T:T,R:R,B:B}));this.EffectExtent.L=L;this.EffectExtent.T=T;this.EffectExtent.R=
|
|
|
|
this.RelativeHeight,nRelativeHeight));this.Set_RelativeHeight2(nRelativeHeight)};ParaDrawing.prototype.Set_RelativeHeight2=function(nRelativeHeight){this.RelativeHeight=nRelativeHeight;if(this.graphicObjects&&AscFormat.isRealNumber(nRelativeHeight)&&nRelativeHeight>this.graphicObjects.maximalGraphicObjectZIndex)this.graphicObjects.maximalGraphicObjectZIndex=nRelativeHeight};ParaDrawing.prototype.setEffectExtent=function(L,T,R,B){var oEE=this.EffectExtent;History.Add(new CChangesParaDrawingEffectExtent(this,
|
|
|
|
R;this.EffectExtent.B=B};ParaDrawing.prototype.Set_Parent=function(oParent){History.Add(new CChangesParaDrawingParent(this,this.Parent,oParent));this.Parent=oParent};ParaDrawing.prototype.IsWatermark=function(){if(!this.GraphicObj)return false;if(this.GraphicObj.getObjectType()!==AscDFH.historyitem_type_Shape&&this.GraphicObj.getObjectType()!==AscDFH.historyitem_type_ImageShape)return false;if(this.Is_Inline())return false;var oParagraph=this.GetParagraph();if(!(oParagraph instanceof Paragraph))return false;
|
|
|
|
{L:oEE.L,T:oEE.T,R:oEE.R,B:oEE.B},{L:L,T:T,R:R,B:B}));this.EffectExtent.L=L;this.EffectExtent.T=T;this.EffectExtent.R=R;this.EffectExtent.B=B};ParaDrawing.prototype.Set_Parent=function(oParent){History.Add(new CChangesParaDrawingParent(this,this.Parent,oParent));this.Parent=oParent};ParaDrawing.prototype.IsWatermark=function(){if(!this.GraphicObj)return false;if(this.GraphicObj.getObjectType()!==AscDFH.historyitem_type_Shape&&this.GraphicObj.getObjectType()!==AscDFH.historyitem_type_ImageShape)return false;
|
|
|
|
var oContent=oParagraph.Parent;if(!oContent||oContent.Is_DrawingShape(false))return false;var oHdrFtr=oContent.IsHdrFtr(true);if(!oHdrFtr)return false;var oRun=this.Get_Run();if(!oRun)return false;var arrDocPos=oRun.GetDocumentPositionFromObject();for(var nIndex=0,nCount=arrDocPos.length;nIndex<nCount;++nIndex){var oClass=arrDocPos[nIndex].Class;var oSdt=null;if(oClass instanceof CDocumentContent&&oClass.Parent instanceof CBlockLevelSdt)oSdt=oClass.Parent;else if(oClass instanceof CInlineLevelSdt)oSdt=
|
|
|
|
if(this.Is_Inline())return false;var oParagraph=this.GetParagraph();if(!(oParagraph instanceof Paragraph))return false;var oContent=oParagraph.Parent;if(!oContent||oContent.Is_DrawingShape(false))return false;var oHdrFtr=oContent.IsHdrFtr(true);if(!oHdrFtr)return false;var oRun=this.Get_Run();if(!oRun)return false;var arrDocPos=oRun.GetDocumentPositionFromObject();for(var nIndex=0,nCount=arrDocPos.length;nIndex<nCount;++nIndex){var oClass=arrDocPos[nIndex].Class;var oSdt=null;if(oClass instanceof
|
|
|
|
oClass;if(oSdt){var oPr=oSdt.Pr;if(AscCommon.isRealObject(oPr)&&AscCommon.isRealObject(oPr.DocPartObj)&&oPr.DocPartObj.Gallery==="Watermarks")return true}}return false};ParaDrawing.prototype.Set_ParaMath=function(ParaMath){History.Add(new CChangesParaDrawingParaMath(this,this.ParaMath,ParaMath));this.ParaMath=ParaMath};ParaDrawing.prototype.Set_LayoutInCell=function(LayoutInCell){if(this.LayoutInCell===LayoutInCell)return;History.Add(new CChangesParaDrawingLayoutInCell(this,this.LayoutInCell,LayoutInCell));
|
|
|
|
CDocumentContent&&oClass.Parent instanceof CBlockLevelSdt)oSdt=oClass.Parent;else if(oClass instanceof CInlineLevelSdt)oSdt=oClass;if(oSdt){var oPr=oSdt.Pr;if(AscCommon.isRealObject(oPr)&&AscCommon.isRealObject(oPr.DocPartObj)&&oPr.DocPartObj.Gallery==="Watermarks")return true}}return false};ParaDrawing.prototype.Set_ParaMath=function(ParaMath){History.Add(new CChangesParaDrawingParaMath(this,this.ParaMath,ParaMath));this.ParaMath=ParaMath};ParaDrawing.prototype.Set_LayoutInCell=function(LayoutInCell){if(this.LayoutInCell===
|
|
|
|
this.LayoutInCell=LayoutInCell};ParaDrawing.prototype.SetSizeRelH=function(oSize){History.Add(new CChangesParaDrawingSizeRelH(this,this.SizeRelH,oSize));this.SizeRelH=oSize};ParaDrawing.prototype.SetSizeRelV=function(oSize){History.Add(new CChangesParaDrawingSizeRelV(this,this.SizeRelV,oSize));this.SizeRelV=oSize};ParaDrawing.prototype.getXfrmExtX=function(){if(AscCommon.isRealObject(this.GraphicObj)&&AscCommon.isRealObject(this.GraphicObj.spPr)&&AscCommon.isRealObject(this.GraphicObj.spPr.xfrm)&&
|
|
|
|
LayoutInCell)return;History.Add(new CChangesParaDrawingLayoutInCell(this,this.LayoutInCell,LayoutInCell));this.LayoutInCell=LayoutInCell};ParaDrawing.prototype.SetSizeRelH=function(oSize){History.Add(new CChangesParaDrawingSizeRelH(this,this.SizeRelH,oSize));this.SizeRelH=oSize};ParaDrawing.prototype.SetSizeRelV=function(oSize){History.Add(new CChangesParaDrawingSizeRelV(this,this.SizeRelV,oSize));this.SizeRelV=oSize};ParaDrawing.prototype.getXfrmExtX=function(){if(AscCommon.isRealObject(this.GraphicObj)&&
|
|
|
|
AscFormat.isRealNumber(this.GraphicObj.spPr.xfrm.extX))return this.GraphicObj.spPr.xfrm.extX;if(AscFormat.isRealNumber(this.Extent.W))return this.Extent.W;return 0};ParaDrawing.prototype.getXfrmExtY=function(){if(AscCommon.isRealObject(this.GraphicObj)&&AscCommon.isRealObject(this.GraphicObj.spPr)&&AscCommon.isRealObject(this.GraphicObj.spPr.xfrm)&&AscFormat.isRealNumber(this.GraphicObj.spPr.xfrm.extY))return this.GraphicObj.spPr.xfrm.extY;if(AscFormat.isRealNumber(this.Extent.H))return this.Extent.H;
|
|
|
|
AscCommon.isRealObject(this.GraphicObj.spPr)&&AscCommon.isRealObject(this.GraphicObj.spPr.xfrm)&&AscFormat.isRealNumber(this.GraphicObj.spPr.xfrm.extX))return this.GraphicObj.spPr.xfrm.extX;if(AscFormat.isRealNumber(this.Extent.W))return this.Extent.W;return 0};ParaDrawing.prototype.getXfrmExtY=function(){if(AscCommon.isRealObject(this.GraphicObj)&&AscCommon.isRealObject(this.GraphicObj.spPr)&&AscCommon.isRealObject(this.GraphicObj.spPr.xfrm)&&AscFormat.isRealNumber(this.GraphicObj.spPr.xfrm.extY))return this.GraphicObj.spPr.xfrm.extY;
|
|
|
|
return 0};ParaDrawing.prototype.getXfrmRot=function(){if(AscCommon.isRealObject(this.GraphicObj)&&AscCommon.isRealObject(this.GraphicObj.spPr)&&AscCommon.isRealObject(this.GraphicObj.spPr.xfrm)&&AscFormat.isRealNumber(this.GraphicObj.spPr.xfrm.rot))return this.GraphicObj.spPr.xfrm.rot;return 0};ParaDrawing.prototype.Get_Bounds=function(){var InsL,InsT,InsR,InsB;InsL=0;InsT=0;InsR=0;InsB=0;if(!this.Is_Inline()){var oDistance=this.Get_Distance();if(oDistance){InsL=oDistance.L;InsT=oDistance.T;InsR=
|
|
|
|
if(AscFormat.isRealNumber(this.Extent.H))return this.Extent.H;return 0};ParaDrawing.prototype.getXfrmRot=function(){if(AscCommon.isRealObject(this.GraphicObj)&&AscCommon.isRealObject(this.GraphicObj.spPr)&&AscCommon.isRealObject(this.GraphicObj.spPr.xfrm)&&AscFormat.isRealNumber(this.GraphicObj.spPr.xfrm.rot))return this.GraphicObj.spPr.xfrm.rot;return 0};ParaDrawing.prototype.Get_Bounds=function(){var InsL,InsT,InsR,InsB;InsL=0;InsT=0;InsR=0;InsB=0;if(!this.Is_Inline()){var oDistance=this.Get_Distance();
|
|
|
|
oDistance.R;InsB=oDistance.B}}var ExtX=this.getXfrmExtX();var ExtY=this.getXfrmExtY();var Rot=this.getXfrmRot();var X,Y,W,H;if(AscFormat.checkNormalRotate(Rot)){X=this.X;Y=this.Y;W=ExtX;H=ExtY}else{X=this.X+ExtX/2-ExtY/2;Y=this.Y+ExtY/2-ExtX/2;W=ExtY;H=ExtX}return{Left:X-this.EffectExtent.L-InsL,Top:Y-this.EffectExtent.T-InsT,Bottom:Y+H+this.EffectExtent.B+InsB,Right:X+W+this.EffectExtent.R+InsR}};ParaDrawing.prototype.Search=function(Str,Props,SearchEngine,Type){if(AscCommon.isRealObject(this.GraphicObj)&&
|
|
|
|
if(oDistance){InsL=oDistance.L;InsT=oDistance.T;InsR=oDistance.R;InsB=oDistance.B}}var ExtX=this.getXfrmExtX();var ExtY=this.getXfrmExtY();var Rot=this.getXfrmRot();var X,Y,W,H;if(AscFormat.checkNormalRotate(Rot)){X=this.X;Y=this.Y;W=ExtX;H=ExtY}else{X=this.X+ExtX/2-ExtY/2;Y=this.Y+ExtY/2-ExtX/2;W=ExtY;H=ExtX}return{Left:X-this.EffectExtent.L-InsL,Top:Y-this.EffectExtent.T-InsT,Bottom:Y+H+this.EffectExtent.B+InsB,Right:X+W+this.EffectExtent.R+InsR}};ParaDrawing.prototype.Search=function(Str,Props,
|
|
|
|
typeof this.GraphicObj.Search==="function")this.GraphicObj.Search(Str,Props,SearchEngine,Type)};ParaDrawing.prototype.Set_Props=function(Props){var bCheckWrapPolygon=false;var isPictureCC=false;var oRun=this.GetRun();if(oRun){var arrContentControls=oRun.GetParentContentControls();for(var nIndex=0,nCount=arrContentControls.length;nIndex<nCount;++nIndex)if(arrContentControls[nIndex].IsPicture()){isPictureCC=true;break}}if(undefined!=Props.WrappingStyle&&!isPictureCC){if(drawing_Inline===this.DrawingType&&
|
|
|
|
SearchEngine,Type){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.Search==="function")this.GraphicObj.Search(Str,Props,SearchEngine,Type)};ParaDrawing.prototype.Set_Props=function(Props){var bCheckWrapPolygon=false;var isPictureCC=false;var oRun=this.GetRun();if(oRun){var arrContentControls=oRun.GetParentContentControls();for(var nIndex=0,nCount=arrContentControls.length;nIndex<nCount;++nIndex)if(arrContentControls[nIndex].IsPicture()){isPictureCC=true;break}}if(undefined!=Props.WrappingStyle&&
|
|
|
|
c_oAscWrapStyle2.Inline!=Props.WrappingStyle&&undefined===Props.Paddings)this.Set_Distance(3.2,0,3.2,0);this.Set_DrawingType(c_oAscWrapStyle2.Inline===Props.WrappingStyle?drawing_Inline:drawing_Anchor);if(c_oAscWrapStyle2.Inline===Props.WrappingStyle)if(AscCommon.isRealObject(this.GraphicObj.bounds)&&AscFormat.isRealNumber(this.GraphicObj.bounds.w)&&AscFormat.isRealNumber(this.GraphicObj.bounds.h))this.CheckWH();if(c_oAscWrapStyle2.Behind===Props.WrappingStyle||c_oAscWrapStyle2.InFront===Props.WrappingStyle){this.Set_WrappingType(WRAPPING_TYPE_NONE);
|
|
|
|
!isPictureCC){if(drawing_Inline===this.DrawingType&&c_oAscWrapStyle2.Inline!=Props.WrappingStyle&&undefined===Props.Paddings)this.Set_Distance(3.2,0,3.2,0);this.Set_DrawingType(c_oAscWrapStyle2.Inline===Props.WrappingStyle?drawing_Inline:drawing_Anchor);if(c_oAscWrapStyle2.Inline===Props.WrappingStyle)if(AscCommon.isRealObject(this.GraphicObj.bounds)&&AscFormat.isRealNumber(this.GraphicObj.bounds.w)&&AscFormat.isRealNumber(this.GraphicObj.bounds.h))this.CheckWH();if(c_oAscWrapStyle2.Behind===Props.WrappingStyle||
|
|
|
|
this.Set_BehindDoc(c_oAscWrapStyle2.Behind===Props.WrappingStyle?true:false)}else{switch(Props.WrappingStyle){case c_oAscWrapStyle2.Square:this.Set_WrappingType(WRAPPING_TYPE_SQUARE);break;case c_oAscWrapStyle2.Tight:{bCheckWrapPolygon=true;this.Set_WrappingType(WRAPPING_TYPE_TIGHT);break}case c_oAscWrapStyle2.Through:{this.Set_WrappingType(WRAPPING_TYPE_THROUGH);bCheckWrapPolygon=true;break}case c_oAscWrapStyle2.TopAndBottom:this.Set_WrappingType(WRAPPING_TYPE_TOP_AND_BOTTOM);break;default:this.Set_WrappingType(WRAPPING_TYPE_SQUARE);
|
|
|
|
c_oAscWrapStyle2.InFront===Props.WrappingStyle){this.Set_WrappingType(WRAPPING_TYPE_NONE);this.Set_BehindDoc(c_oAscWrapStyle2.Behind===Props.WrappingStyle?true:false)}else{switch(Props.WrappingStyle){case c_oAscWrapStyle2.Square:this.Set_WrappingType(WRAPPING_TYPE_SQUARE);break;case c_oAscWrapStyle2.Tight:{bCheckWrapPolygon=true;this.Set_WrappingType(WRAPPING_TYPE_TIGHT);break}case c_oAscWrapStyle2.Through:{this.Set_WrappingType(WRAPPING_TYPE_THROUGH);bCheckWrapPolygon=true;break}case c_oAscWrapStyle2.TopAndBottom:this.Set_WrappingType(WRAPPING_TYPE_TOP_AND_BOTTOM);
|
|
|
|
break}this.Set_BehindDoc(false)}}if(undefined!=Props.Paddings)this.Set_Distance(Props.Paddings.Left,Props.Paddings.Top,Props.Paddings.Right,Props.Paddings.Bottom);if(undefined!=Props.AllowOverlap)this.Set_AllowOverlap(Props.AllowOverlap);if(undefined!=Props.PositionH)this.Set_PositionH(Props.PositionH.RelativeFrom,Props.PositionH.UseAlign,true===Props.PositionH.UseAlign?Props.PositionH.Align:Props.PositionH.Value,Props.PositionH.Percent);if(undefined!=Props.PositionV)this.Set_PositionV(Props.PositionV.RelativeFrom,
|
|
|
|
break;default:this.Set_WrappingType(WRAPPING_TYPE_SQUARE);break}this.Set_BehindDoc(false)}}if(undefined!=Props.Paddings)this.Set_Distance(Props.Paddings.Left,Props.Paddings.Top,Props.Paddings.Right,Props.Paddings.Bottom);if(undefined!=Props.AllowOverlap)this.Set_AllowOverlap(Props.AllowOverlap);if(undefined!=Props.PositionH)this.Set_PositionH(Props.PositionH.RelativeFrom,Props.PositionH.UseAlign,true===Props.PositionH.UseAlign?Props.PositionH.Align:Props.PositionH.Value,Props.PositionH.Percent);if(undefined!=
|
|
|
|
Props.PositionV.UseAlign,true===Props.PositionV.UseAlign?Props.PositionV.Align:Props.PositionV.Value,Props.PositionV.Percent);if(undefined!=Props.SizeRelH)this.SetSizeRelH({RelativeFrom:AscFormat.ConvertRelPositionHToRelSize(Props.SizeRelH.RelativeFrom),Percent:Props.SizeRelH.Value/100});if(undefined!=Props.SizeRelV)this.SetSizeRelV({RelativeFrom:AscFormat.ConvertRelPositionVToRelSize(Props.SizeRelV.RelativeFrom),Percent:Props.SizeRelV.Value/100});if(this.SizeRelH&&!this.SizeRelV)this.SetSizeRelV({RelativeFrom:AscCommon.c_oAscSizeRelFromV.sizerelfromvPage,
|
|
|
|
Props.PositionV)this.Set_PositionV(Props.PositionV.RelativeFrom,Props.PositionV.UseAlign,true===Props.PositionV.UseAlign?Props.PositionV.Align:Props.PositionV.Value,Props.PositionV.Percent);if(undefined!=Props.SizeRelH)this.SetSizeRelH({RelativeFrom:AscFormat.ConvertRelPositionHToRelSize(Props.SizeRelH.RelativeFrom),Percent:Props.SizeRelH.Value/100});if(undefined!=Props.SizeRelV)this.SetSizeRelV({RelativeFrom:AscFormat.ConvertRelPositionVToRelSize(Props.SizeRelV.RelativeFrom),Percent:Props.SizeRelV.Value/
|
|
|
|
Percent:0});if(this.SizeRelV&&!this.SizeRelH)this.SetSizeRelH({RelativeFrom:AscCommon.c_oAscSizeRelFromH.sizerelfromhPage,Percent:0});if(bCheckWrapPolygon)this.Check_WrapPolygon();if(undefined!=Props.description)this.docPr.setDescr(Props.description);if(undefined!=Props.title)this.docPr.setTitle(Props.title)};ParaDrawing.prototype.CheckWH=function(){if(!this.GraphicObj)return;var oldExtW=this.Extent.W;var oldExtH=this.Extent.H;if(this.GraphicObj.spPr&&this.GraphicObj.spPr.xfrm&&AscFormat.isRealNumber(this.GraphicObj.spPr.xfrm.extX)&&
|
|
|
|
100});if(this.SizeRelH&&!this.SizeRelV)this.SetSizeRelV({RelativeFrom:AscCommon.c_oAscSizeRelFromV.sizerelfromvPage,Percent:0});if(this.SizeRelV&&!this.SizeRelH)this.SetSizeRelH({RelativeFrom:AscCommon.c_oAscSizeRelFromH.sizerelfromhPage,Percent:0});if(bCheckWrapPolygon)this.Check_WrapPolygon();if(undefined!=Props.description)this.docPr.setDescr(Props.description);if(undefined!=Props.title)this.docPr.setTitle(Props.title)};ParaDrawing.prototype.CheckWH=function(){if(!this.GraphicObj)return;var oldExtW=
|
|
|
|
AscFormat.isRealNumber(this.GraphicObj.spPr.xfrm.extY)){this.Extent.W=this.GraphicObj.spPr.xfrm.extX;this.Extent.H=this.GraphicObj.spPr.xfrm.extY}this.GraphicObj.recalculate();this.Extent.W=oldExtW;this.Extent.H=oldExtH;var extX,extY,rot;if(this.GraphicObj.spPr&&this.GraphicObj.spPr.xfrm){if(AscFormat.isRealNumber(this.GraphicObj.spPr.xfrm.extX)&&AscFormat.isRealNumber(this.GraphicObj.spPr.xfrm.extY)){extX=this.GraphicObj.spPr.xfrm.extX;extY=this.GraphicObj.spPr.xfrm.extY}else{extX=5;extY=5}if(AscFormat.isRealNumber(this.GraphicObj.spPr.xfrm.rot))rot=
|
|
|
|
this.Extent.W;var oldExtH=this.Extent.H;if(this.GraphicObj.spPr&&this.GraphicObj.spPr.xfrm&&AscFormat.isRealNumber(this.GraphicObj.spPr.xfrm.extX)&&AscFormat.isRealNumber(this.GraphicObj.spPr.xfrm.extY)){this.Extent.W=this.GraphicObj.spPr.xfrm.extX;this.Extent.H=this.GraphicObj.spPr.xfrm.extY}this.GraphicObj.recalculate();this.Extent.W=oldExtW;this.Extent.H=oldExtH;var extX,extY,rot;if(this.GraphicObj.spPr&&this.GraphicObj.spPr.xfrm){if(AscFormat.isRealNumber(this.GraphicObj.spPr.xfrm.extX)&&AscFormat.isRealNumber(this.GraphicObj.spPr.xfrm.extY)){extX=
|
|
|
|
this.GraphicObj.spPr.xfrm.rot;else rot=0}else{extX=5;extY=5;rot=0}this.setExtent(extX,extY);var EEL=0,EET=0,EER=0,EEB=0;{var xc=this.GraphicObj.localTransform.TransformPointX(this.GraphicObj.extX/2,this.GraphicObj.extY/2);var yc=this.GraphicObj.localTransform.TransformPointY(this.GraphicObj.extX/2,this.GraphicObj.extY/2);var oBounds=this.GraphicObj.bounds;var LineCorrect=0;if(this.GraphicObj.pen&&this.GraphicObj.pen.Fill&&this.GraphicObj.pen.Fill.fill){LineCorrect=this.GraphicObj.pen.w==null?12700:
|
|
|
|
this.GraphicObj.spPr.xfrm.extX;extY=this.GraphicObj.spPr.xfrm.extY}else{extX=5;extY=5}if(AscFormat.isRealNumber(this.GraphicObj.spPr.xfrm.rot))rot=this.GraphicObj.spPr.xfrm.rot;else rot=0}else{extX=5;extY=5;rot=0}this.setExtent(extX,extY);var EEL=0,EET=0,EER=0,EEB=0;{var xc=this.GraphicObj.localTransform.TransformPointX(this.GraphicObj.extX/2,this.GraphicObj.extY/2);var yc=this.GraphicObj.localTransform.TransformPointY(this.GraphicObj.extX/2,this.GraphicObj.extY/2);var oBounds=this.GraphicObj.bounds;
|
|
|
|
parseInt(this.GraphicObj.pen.w);LineCorrect/=72E3}var l=oBounds.x;var r=l+oBounds.w;var t=oBounds.y;var b=t+oBounds.h;var startX,startY;if(!AscFormat.checkNormalRotate(rot)){var temp=extX;extX=extY;extY=temp}startX=xc-extX/2;startY=yc-extY/2;if(l>startX)l=startX;if(r<startX+extX)r=startX+extX;if(t>startY)t=startY;if(b<startY+extY)b=startY+extY;EEL=xc-extX/2-l+LineCorrect;EET=yc-extY/2-t+LineCorrect;EER=r+LineCorrect-(xc+extX/2);EEB=b+LineCorrect-(yc+extY/2)}this.setEffectExtent(EEL,EET,EER,EEB);this.Check_WrapPolygon()};
|
|
|
|
var LineCorrect=0;if(this.GraphicObj.pen&&this.GraphicObj.pen.Fill&&this.GraphicObj.pen.Fill.fill){LineCorrect=this.GraphicObj.pen.w==null?12700:parseInt(this.GraphicObj.pen.w);LineCorrect/=72E3}var l=oBounds.x;var r=l+oBounds.w;var t=oBounds.y;var b=t+oBounds.h;var startX,startY;if(!AscFormat.checkNormalRotate(rot)){var temp=extX;extX=extY;extY=temp}startX=xc-extX/2;startY=yc-extY/2;if(l>startX)l=startX;if(r<startX+extX)r=startX+extX;if(t>startY)t=startY;if(b<startY+extY)b=startY+extY;EEL=xc-extX/
|
|
|
|
ParaDrawing.prototype.Check_WrapPolygon=function(){if((this.wrappingType===WRAPPING_TYPE_TIGHT||this.wrappingType===WRAPPING_TYPE_THROUGH)&&this.wrappingPolygon&&!this.wrappingPolygon.edited){this.GraphicObj.recalculate();this.wrappingPolygon.setArrRelPoints(this.wrappingPolygon.calculate(this.GraphicObj))}};ParaDrawing.prototype.Draw=function(X,Y,pGraphics,PDSE){var nPageIndex=null;if(AscCommon.isRealObject(PDSE))nPageIndex=PDSE.Page;if(pGraphics.Start_Command){pGraphics.m_aDrawings.push(new AscFormat.ParaDrawingStruct(undefined,
|
|
|
|
2-l+LineCorrect;EET=yc-extY/2-t+LineCorrect;EER=r+LineCorrect-(xc+extX/2);EEB=b+LineCorrect-(yc+extY/2)}this.setEffectExtent(EEL,EET,EER,EEB);this.Check_WrapPolygon()};ParaDrawing.prototype.Check_WrapPolygon=function(){if((this.wrappingType===WRAPPING_TYPE_TIGHT||this.wrappingType===WRAPPING_TYPE_THROUGH)&&this.wrappingPolygon&&!this.wrappingPolygon.edited){this.GraphicObj.recalculate();this.wrappingPolygon.setArrRelPoints(this.wrappingPolygon.calculate(this.GraphicObj))}};ParaDrawing.prototype.Draw=
|
|
|
|
this));return}if(this.Is_Inline()){pGraphics.shapePageIndex=nPageIndex;this.draw(pGraphics,PDSE);pGraphics.shapePageIndex=null}if(pGraphics.End_Command)pGraphics.End_Command()};ParaDrawing.prototype.Measure=function(){if(!this.GraphicObj){this.Width=0;this.Height=0;return}if(AscFormat.isRealNumber(this.Extent.W)&&AscFormat.isRealNumber(this.Extent.H)&&(!this.GraphicObj.checkAutofit||!this.GraphicObj.checkAutofit())&&!this.SizeRelH&&!this.SizeRelV){var oEffectExtent=this.EffectExtent;var W,H;if(AscFormat.isRealNumber(this.GraphicObj.rot))if(AscFormat.checkNormalRotate(this.GraphicObj.rot)){W=
|
|
|
|
function(X,Y,pGraphics,PDSE){var nPageIndex=null;if(AscCommon.isRealObject(PDSE))nPageIndex=PDSE.Page;if(pGraphics.Start_Command){pGraphics.m_aDrawings.push(new AscFormat.ParaDrawingStruct(undefined,this));return}if(this.Is_Inline()){pGraphics.shapePageIndex=nPageIndex;this.draw(pGraphics,PDSE);pGraphics.shapePageIndex=null}if(pGraphics.End_Command)pGraphics.End_Command()};ParaDrawing.prototype.Measure=function(){if(!this.GraphicObj){this.Width=0;this.Height=0;return}if(AscFormat.isRealNumber(this.Extent.W)&&
|
|
|
|
this.Extent.W;H=this.Extent.H}else{W=this.Extent.H;H=this.Extent.W}else{W=this.Extent.W;H=this.Extent.H}this.Width=W+AscFormat.getValOrDefault(oEffectExtent.L,0)+AscFormat.getValOrDefault(oEffectExtent.R,0);this.Height=H+AscFormat.getValOrDefault(oEffectExtent.T,0)+AscFormat.getValOrDefault(oEffectExtent.B,0);this.WidthVisible=this.Width}else{this.GraphicObj.recalculate();if(this.GraphicObj.recalculateText)this.GraphicObj.recalculateText();if(this.PositionH.UseAlign||this.Is_Inline())this.Width=this.GraphicObj.bounds.w;
|
|
|
|
AscFormat.isRealNumber(this.Extent.H)&&(!this.GraphicObj.checkAutofit||!this.GraphicObj.checkAutofit())&&!this.SizeRelH&&!this.SizeRelV){var oEffectExtent=this.EffectExtent;var W,H;if(AscFormat.isRealNumber(this.GraphicObj.rot))if(AscFormat.checkNormalRotate(this.GraphicObj.rot)){W=this.Extent.W;H=this.Extent.H}else{W=this.Extent.H;H=this.Extent.W}else{W=this.Extent.W;H=this.Extent.H}this.Width=W+AscFormat.getValOrDefault(oEffectExtent.L,0)+AscFormat.getValOrDefault(oEffectExtent.R,0);this.Height=
|
|
|
|
else this.Width=this.GraphicObj.extX;this.WidthVisible=this.Width;if(this.PositionV.UseAlign||this.Is_Inline())this.Height=this.GraphicObj.bounds.h;else this.Height=this.GraphicObj.extY}};ParaDrawing.prototype.SaveRecalculateObject=function(Copy){var DrawingObj={};DrawingObj.Type=this.Type;DrawingObj.DrawingType=this.DrawingType;DrawingObj.WrappingType=this.wrappingType;if(drawing_Anchor===this.Get_DrawingType()&&true===this.Use_TextWrap()){var oDistance=this.Get_Distance();DrawingObj.FlowPos={X:this.X-
|
|
|
|
H+AscFormat.getValOrDefault(oEffectExtent.T,0)+AscFormat.getValOrDefault(oEffectExtent.B,0);this.WidthVisible=this.Width}else{this.GraphicObj.recalculate();if(this.GraphicObj.recalculateText)this.GraphicObj.recalculateText();if(this.PositionH.UseAlign||this.Is_Inline())this.Width=this.GraphicObj.bounds.w;else this.Width=this.GraphicObj.extX;this.WidthVisible=this.Width;if(this.PositionV.UseAlign||this.Is_Inline())this.Height=this.GraphicObj.bounds.h;else this.Height=this.GraphicObj.extY}};ParaDrawing.prototype.SaveRecalculateObject=
|
|
|
|
oDistance.L,Y:this.Y-oDistance.T,W:this.Width+oDistance.R,H:this.Height+oDistance.B}}DrawingObj.PageNum=this.PageNum;DrawingObj.X=this.X;DrawingObj.Y=this.Y;DrawingObj.spRecaclcObject=this.GraphicObj.getRecalcObject();return DrawingObj};ParaDrawing.prototype.LoadRecalculateObject=function(RecalcObj){this.updatePosition3(RecalcObj.PageNum,RecalcObj.X,RecalcObj.Y);this.GraphicObj.setRecalcObject(RecalcObj.spRecaclcObject)};ParaDrawing.prototype.Reassign_ImageUrls=function(mapUrls){if(this.GraphicObj)this.GraphicObj.Reassign_ImageUrls(mapUrls)};
|
|
|
|
function(Copy){var DrawingObj={};DrawingObj.Type=this.Type;DrawingObj.DrawingType=this.DrawingType;DrawingObj.WrappingType=this.wrappingType;if(drawing_Anchor===this.Get_DrawingType()&&true===this.Use_TextWrap()){var oDistance=this.Get_Distance();DrawingObj.FlowPos={X:this.X-oDistance.L,Y:this.Y-oDistance.T,W:this.Width+oDistance.R,H:this.Height+oDistance.B}}DrawingObj.PageNum=this.PageNum;DrawingObj.X=this.X;DrawingObj.Y=this.Y;DrawingObj.spRecaclcObject=this.GraphicObj.getRecalcObject();return DrawingObj};
|
|
|
|
ParaDrawing.prototype.PrepareRecalculateObject=function(){};ParaDrawing.prototype.Is_RealContent=function(){return true};ParaDrawing.prototype.Can_AddNumbering=function(){if(drawing_Inline===this.DrawingType)return true;return false};ParaDrawing.prototype.Copy=function(oPr){var c=new ParaDrawing(this.Extent.W,this.Extent.H,null,editor.WordControl.m_oLogicDocument.DrawingDocument,null,null);c.Set_DrawingType(this.DrawingType);if(AscCommon.isRealObject(this.GraphicObj)){var oCopyPr=new AscFormat.CCopyObjectProperties;
|
|
|
|
ParaDrawing.prototype.LoadRecalculateObject=function(RecalcObj){this.updatePosition3(RecalcObj.PageNum,RecalcObj.X,RecalcObj.Y);this.GraphicObj.setRecalcObject(RecalcObj.spRecaclcObject)};ParaDrawing.prototype.Reassign_ImageUrls=function(mapUrls){if(this.GraphicObj)this.GraphicObj.Reassign_ImageUrls(mapUrls)};ParaDrawing.prototype.PrepareRecalculateObject=function(){};ParaDrawing.prototype.Is_RealContent=function(){return true};ParaDrawing.prototype.Can_AddNumbering=function(){if(drawing_Inline===
|
|
|
|
oCopyPr.contentCopyPr=oPr;c.Set_GraphicObject(this.GraphicObj.copy(oCopyPr));c.GraphicObj.setParent(c)}var d=this.Distance;c.Set_PositionH(this.PositionH.RelativeFrom,this.PositionH.Align,this.PositionH.Value,this.PositionH.Percent);c.Set_PositionV(this.PositionV.RelativeFrom,this.PositionV.Align,this.PositionV.Value,this.PositionV.Percent);c.Set_Distance(d.L,d.T,d.R,d.B);c.Set_AllowOverlap(this.AllowOverlap);c.Set_WrappingType(this.wrappingType);if(this.wrappingPolygon)c.wrappingPolygon.fromOther(this.wrappingPolygon);
|
|
|
|
this.DrawingType)return true;return false};ParaDrawing.prototype.Copy=function(oPr){var c=new ParaDrawing(this.Extent.W,this.Extent.H,null,editor.WordControl.m_oLogicDocument.DrawingDocument,null,null);c.Set_DrawingType(this.DrawingType);if(AscCommon.isRealObject(this.GraphicObj)){var oCopyPr=new AscFormat.CCopyObjectProperties;oCopyPr.contentCopyPr=oPr;c.Set_GraphicObject(this.GraphicObj.copy(oCopyPr));c.GraphicObj.setParent(c)}var d=this.Distance;c.Set_PositionH(this.PositionH.RelativeFrom,this.PositionH.Align,
|
|
|
|
c.Set_BehindDoc(this.behindDoc);c.Set_RelativeHeight(this.RelativeHeight);if(this.SizeRelH)c.SetSizeRelH({RelativeFrom:this.SizeRelH.RelativeFrom,Percent:this.SizeRelH.Percent});if(this.SizeRelV)c.SetSizeRelV({RelativeFrom:this.SizeRelV.RelativeFrom,Percent:this.SizeRelV.Percent});if(AscFormat.isRealNumber(this.Extent.W)&&AscFormat.isRealNumber(this.Extent.H))c.setExtent(this.Extent.W,this.Extent.H);var EE=this.EffectExtent;if(EE.L>0||EE.T>0||EE.R>0||EE.B>0)c.setEffectExtent(EE.L,EE.T,EE.R,EE.B);
|
|
|
|
this.PositionH.Value,this.PositionH.Percent);c.Set_PositionV(this.PositionV.RelativeFrom,this.PositionV.Align,this.PositionV.Value,this.PositionV.Percent);c.Set_Distance(d.L,d.T,d.R,d.B);c.Set_AllowOverlap(this.AllowOverlap);c.Set_WrappingType(this.wrappingType);if(this.wrappingPolygon)c.wrappingPolygon.fromOther(this.wrappingPolygon);c.Set_BehindDoc(this.behindDoc);c.Set_RelativeHeight(this.RelativeHeight);if(this.SizeRelH)c.SetSizeRelH({RelativeFrom:this.SizeRelH.RelativeFrom,Percent:this.SizeRelH.Percent});
|
|
|
|
c.docPr.setFromOther(this.docPr);if(this.ParaMath)c.Set_ParaMath(this.ParaMath.Copy());return c};ParaDrawing.prototype.IsEqual=function(oElement){return false};ParaDrawing.prototype.Get_Id=function(){return this.Id};ParaDrawing.prototype.GetId=function(){return this.Id};ParaDrawing.prototype.setParagraphTabs=function(tabs){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.setParagraphTabs==="function")this.GraphicObj.setParagraphTabs(tabs)};ParaDrawing.prototype.IsMovingTableBorder=
|
|
|
|
if(this.SizeRelV)c.SetSizeRelV({RelativeFrom:this.SizeRelV.RelativeFrom,Percent:this.SizeRelV.Percent});if(AscFormat.isRealNumber(this.Extent.W)&&AscFormat.isRealNumber(this.Extent.H))c.setExtent(this.Extent.W,this.Extent.H);var EE=this.EffectExtent;if(EE.L>0||EE.T>0||EE.R>0||EE.B>0)c.setEffectExtent(EE.L,EE.T,EE.R,EE.B);c.docPr.setFromOther(this.docPr);if(this.ParaMath)c.Set_ParaMath(this.ParaMath.Copy());return c};ParaDrawing.prototype.IsEqual=function(oElement){return false};ParaDrawing.prototype.Get_Id=
|
|
|
|
function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.IsMovingTableBorder==="function")return this.GraphicObj.IsMovingTableBorder();return false};ParaDrawing.prototype.SetVerticalClip=function(Top,Bottom){this.LineTop=Top;this.LineBottom=Bottom};ParaDrawing.prototype.Update_Position=function(Paragraph,ParaLayout,PageLimits,PageLimitsOrigin,LineNum){if(undefined!=this.PositionH_Old){this.PositionH.RelativeFrom=this.PositionH_Old.RelativeFrom2;this.PositionH.Align=this.PositionH_Old.Align2;
|
|
|
|
function(){return this.Id};ParaDrawing.prototype.GetId=function(){return this.Id};ParaDrawing.prototype.setParagraphTabs=function(tabs){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.setParagraphTabs==="function")this.GraphicObj.setParagraphTabs(tabs)};ParaDrawing.prototype.IsMovingTableBorder=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.IsMovingTableBorder==="function")return this.GraphicObj.IsMovingTableBorder();return false};ParaDrawing.prototype.SetVerticalClip=
|
|
|
|
this.PositionH.Value=this.PositionH_Old.Value2;this.PositionH.Percent=this.PositionH_Old.Percent2}if(undefined!=this.PositionV_Old){this.PositionV.RelativeFrom=this.PositionV_Old.RelativeFrom2;this.PositionV.Align=this.PositionV_Old.Align2;this.PositionV.Value=this.PositionV_Old.Value2;this.PositionV.Percent=this.PositionV_Old.Percent2}var oDocumentContent=this.Parent&&this.Parent.Parent;if(oDocumentContent&&oDocumentContent.IsBlockLevelSdtContent())oDocumentContent=oDocumentContent.Parent.Parent;
|
|
|
|
function(Top,Bottom){this.LineTop=Top;this.LineBottom=Bottom};ParaDrawing.prototype.Update_Position=function(Paragraph,ParaLayout,PageLimits,PageLimitsOrigin,LineNum){if(undefined!=this.PositionH_Old){this.PositionH.RelativeFrom=this.PositionH_Old.RelativeFrom2;this.PositionH.Align=this.PositionH_Old.Align2;this.PositionH.Value=this.PositionH_Old.Value2;this.PositionH.Percent=this.PositionH_Old.Percent2}if(undefined!=this.PositionV_Old){this.PositionV.RelativeFrom=this.PositionV_Old.RelativeFrom2;
|
|
|
|
this.Parent=Paragraph;this.DocumentContent=oDocumentContent;var PageNum=ParaLayout.PageNum;var OtherFlowObjects=editor.WordControl.m_oLogicDocument.DrawingObjects.getAllFloatObjectsOnPage(PageNum,this.Parent.Parent);var bInline=this.Is_Inline();this.Internal_Position.Set(this.GraphicObj.extX,this.GraphicObj.extY,this.getXfrmRot(),this.EffectExtent,this.YOffset,ParaLayout,PageLimits);this.Internal_Position.Calculate_X(bInline,this.PositionH.RelativeFrom,this.PositionH.Align,this.PositionH.Value,this.PositionH.Percent);
|
|
|
|
this.PositionV.Align=this.PositionV_Old.Align2;this.PositionV.Value=this.PositionV_Old.Value2;this.PositionV.Percent=this.PositionV_Old.Percent2}var oDocumentContent=this.Parent&&this.Parent.Parent;if(oDocumentContent&&oDocumentContent.IsBlockLevelSdtContent())oDocumentContent=oDocumentContent.Parent.Parent;this.Parent=Paragraph;this.DocumentContent=oDocumentContent;var PageNum=ParaLayout.PageNum;var OtherFlowObjects=editor.WordControl.m_oLogicDocument.DrawingObjects.getAllFloatObjectsOnPage(PageNum,
|
|
|
|
this.Internal_Position.Calculate_Y(bInline,this.PositionV.RelativeFrom,this.PositionV.Align,this.PositionV.Value,this.PositionV.Percent);var bCorrect=false;if(oDocumentContent&&oDocumentContent.IsTableCellContent&&oDocumentContent.IsTableCellContent(false))bCorrect=true;if(this.PositionH.RelativeFrom!==c_oAscRelativeFromH.Page||this.PositionV.RelativeFrom!==c_oAscRelativeFromV.Page)bCorrect=true;this.Internal_Position.Correct_Values(bInline,PageLimits,this.AllowOverlap,this.Use_TextWrap(),OtherFlowObjects,
|
|
|
|
this.Parent.Parent);var bInline=this.Is_Inline();this.Internal_Position.Set(this.GraphicObj.extX,this.GraphicObj.extY,this.getXfrmRot(),this.EffectExtent,this.YOffset,ParaLayout,PageLimits);this.Internal_Position.Calculate_X(bInline,this.PositionH.RelativeFrom,this.PositionH.Align,this.PositionH.Value,this.PositionH.Percent);this.Internal_Position.Calculate_Y(bInline,this.PositionV.RelativeFrom,this.PositionV.Align,this.PositionV.Value,this.PositionV.Percent);var bCorrect=false;if(oDocumentContent&&
|
|
|
|
bCorrect);this.GraphicObj.bounds.l=this.GraphicObj.bounds.x+this.Internal_Position.CalcX;this.GraphicObj.bounds.r=this.GraphicObj.bounds.x+this.GraphicObj.bounds.w+this.Internal_Position.CalcX;this.GraphicObj.bounds.t=this.GraphicObj.bounds.y+this.Internal_Position.CalcY;this.GraphicObj.bounds.b=this.GraphicObj.bounds.y+this.GraphicObj.bounds.h+this.Internal_Position.CalcY;var OldPageNum=this.PageNum;this.PageNum=PageNum;this.LineNum=LineNum;this.X=this.Internal_Position.CalcX;this.Y=this.Internal_Position.CalcY;
|
|
|
|
oDocumentContent.IsTableCellContent&&oDocumentContent.IsTableCellContent(false))bCorrect=true;if(this.PositionH.RelativeFrom!==c_oAscRelativeFromH.Page||this.PositionV.RelativeFrom!==c_oAscRelativeFromV.Page)bCorrect=true;this.Internal_Position.Correct_Values(bInline,PageLimits,this.AllowOverlap,this.Use_TextWrap(),OtherFlowObjects,bCorrect);this.GraphicObj.bounds.l=this.GraphicObj.bounds.x+this.Internal_Position.CalcX;this.GraphicObj.bounds.r=this.GraphicObj.bounds.x+this.GraphicObj.bounds.w+this.Internal_Position.CalcX;
|
|
|
|
if(undefined!=this.PositionH_Old){this.PositionH.RelativeFrom=this.PositionH_Old.RelativeFrom;this.PositionH.Align=this.PositionH_Old.Align;this.PositionH.Value=this.PositionH_Old.Value;this.PositionH.Percent=this.PositionH_Old.Percent;var Value=this.Internal_Position.Calculate_X_Value(this.PositionH_Old.RelativeFrom);this.Set_PositionH(this.PositionH_Old.RelativeFrom,false,Value,false);this.X=this.Internal_Position.Calculate_X(bInline,this.PositionH.RelativeFrom,this.PositionH.Align,this.PositionH.Value,
|
|
|
|
this.GraphicObj.bounds.t=this.GraphicObj.bounds.y+this.Internal_Position.CalcY;this.GraphicObj.bounds.b=this.GraphicObj.bounds.y+this.GraphicObj.bounds.h+this.Internal_Position.CalcY;var OldPageNum=this.PageNum;this.PageNum=PageNum;this.LineNum=LineNum;this.X=this.Internal_Position.CalcX;this.Y=this.Internal_Position.CalcY;if(undefined!=this.PositionH_Old){this.PositionH.RelativeFrom=this.PositionH_Old.RelativeFrom;this.PositionH.Align=this.PositionH_Old.Align;this.PositionH.Value=this.PositionH_Old.Value;
|
|
|
|
this.PositionH.Percent)}if(undefined!=this.PositionV_Old){this.PositionV.RelativeFrom=this.PositionV_Old.RelativeFrom;this.PositionV.Align=this.PositionV_Old.Align;this.PositionV.Value=this.PositionV_Old.Value;this.PositionV.Percent=this.PositionV_Old.Percent;var Value=this.Internal_Position.Calculate_Y_Value(this.PositionV_Old.RelativeFrom);this.Set_PositionV(this.PositionV_Old.RelativeFrom,false,Value,false);this.Y=this.Internal_Position.Calculate_Y(bInline,this.PositionV.RelativeFrom,this.PositionV.Align,
|
|
|
|
this.PositionH.Percent=this.PositionH_Old.Percent;var Value=this.Internal_Position.Calculate_X_Value(this.PositionH_Old.RelativeFrom);this.Set_PositionH(this.PositionH_Old.RelativeFrom,false,Value,false);this.X=this.Internal_Position.Calculate_X(bInline,this.PositionH.RelativeFrom,this.PositionH.Align,this.PositionH.Value,this.PositionH.Percent)}if(undefined!=this.PositionV_Old){this.PositionV.RelativeFrom=this.PositionV_Old.RelativeFrom;this.PositionV.Align=this.PositionV_Old.Align;this.PositionV.Value=
|
|
|
|
this.PositionV.Value,this.PositionV.Percent)}this.OrigX=this.X;this.OrigY=this.Y;this.ShiftX=0;this.ShiftY=0;this.updatePosition3(this.PageNum,this.X,this.Y,OldPageNum);this.useWrap=this.Use_TextWrap()};ParaDrawing.prototype.GetClipRect=function(){if(this.Is_Inline()||this.Use_TextWrap()){var oCell;if(this.DocumentContent&&(oCell=this.DocumentContent.IsTableCellContent(true))){var arrPages=oCell.GetCurPageByAbsolutePage(this.PageNum);for(var nIndex=0,nCount=arrPages.length;nIndex<nCount;++nIndex){var oPageBounds=
|
|
|
|
this.PositionV_Old.Value;this.PositionV.Percent=this.PositionV_Old.Percent;var Value=this.Internal_Position.Calculate_Y_Value(this.PositionV_Old.RelativeFrom);this.Set_PositionV(this.PositionV_Old.RelativeFrom,false,Value,false);this.Y=this.Internal_Position.Calculate_Y(bInline,this.PositionV.RelativeFrom,this.PositionV.Align,this.PositionV.Value,this.PositionV.Percent)}this.OrigX=this.X;this.OrigY=this.Y;this.ShiftX=0;this.ShiftY=0;this.updatePosition3(this.PageNum,this.X,this.Y,OldPageNum);this.useWrap=
|
|
|
|
oCell.GetPageBounds(arrPages[nIndex]);if(this.GraphicObj.bounds.isIntersect(oPageBounds.Left,oPageBounds.Top,oPageBounds.Right,oPageBounds.Bottom))return new AscFormat.CGraphicBounds(oPageBounds.Left,oPageBounds.Top,oPageBounds.Right,oPageBounds.Bottom)}}}return null};ParaDrawing.prototype.Update_PositionYHeaderFooter=function(TopMarginY,BottomMarginY){this.Internal_Position.Update_PositionYHeaderFooter(TopMarginY,BottomMarginY);this.Internal_Position.Calculate_Y(this.Is_Inline(),this.PositionV.RelativeFrom,
|
|
|
|
this.Use_TextWrap()};ParaDrawing.prototype.GetClipRect=function(){if(this.Is_Inline()||this.Use_TextWrap()){var oCell;if(this.DocumentContent&&(oCell=this.DocumentContent.IsTableCellContent(true))){var arrPages=oCell.GetCurPageByAbsolutePage(this.PageNum);for(var nIndex=0,nCount=arrPages.length;nIndex<nCount;++nIndex){var oPageBounds=oCell.GetPageBounds(arrPages[nIndex]);if(this.GraphicObj.bounds.isIntersect(oPageBounds.Left,oPageBounds.Top,oPageBounds.Right,oPageBounds.Bottom))return new AscFormat.CGraphicBounds(oPageBounds.Left,
|
|
|
|
this.PositionV.Align,this.PositionV.Value,this.PositionV.Percent);this.OrigY=this.Internal_Position.CalcY;this.Y=this.OrigY+this.ShiftY;this.updatePosition3(this.PageNum,this.X,this.Y,this.PageNum)};ParaDrawing.prototype.Reset_SavedPosition=function(){this.PositionV_Old=undefined;this.PositionH_Old=undefined};ParaDrawing.prototype.setParagraphBorders=function(val){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.setParagraphBorders==="function")this.GraphicObj.setParagraphBorders(val)};
|
|
|
|
oPageBounds.Top,oPageBounds.Right,oPageBounds.Bottom)}}}return null};ParaDrawing.prototype.Update_PositionYHeaderFooter=function(TopMarginY,BottomMarginY){this.Internal_Position.Update_PositionYHeaderFooter(TopMarginY,BottomMarginY);this.Internal_Position.Calculate_Y(this.Is_Inline(),this.PositionV.RelativeFrom,this.PositionV.Align,this.PositionV.Value,this.PositionV.Percent);this.OrigY=this.Internal_Position.CalcY;this.Y=this.OrigY+this.ShiftY;this.updatePosition3(this.PageNum,this.X,this.Y,this.PageNum)};
|
|
|
|
ParaDrawing.prototype.deselect=function(){this.selected=false;if(this.GraphicObj&&this.GraphicObj.deselect)this.GraphicObj.deselect()};ParaDrawing.prototype.updatePosition3=function(pageIndex,x,y,oldPageNum){var _x=x,_y=y;this.graphicObjects.removeById(pageIndex,this.Get_Id());if(AscFormat.isRealNumber(oldPageNum))this.graphicObjects.removeById(oldPageNum,this.Get_Id());var bChangePageIndex=this.pageIndex!==pageIndex;this.setPageIndex(pageIndex);if(typeof this.GraphicObj.setStartPage==="function"){var bIsHfdFtr=
|
|
|
|
ParaDrawing.prototype.Reset_SavedPosition=function(){this.PositionV_Old=undefined;this.PositionH_Old=undefined};ParaDrawing.prototype.setParagraphBorders=function(val){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.setParagraphBorders==="function")this.GraphicObj.setParagraphBorders(val)};ParaDrawing.prototype.deselect=function(){this.selected=false;if(this.GraphicObj&&this.GraphicObj.deselect)this.GraphicObj.deselect()};ParaDrawing.prototype.updatePosition3=function(pageIndex,
|
|
|
|
this.DocumentContent&&this.DocumentContent.IsHdrFtr();this.GraphicObj.setStartPage(pageIndex,bIsHfdFtr,bIsHfdFtr||bChangePageIndex)}if(!(this.DocumentContent&&this.DocumentContent.IsHdrFtr()&&this.DocumentContent.Get_StartPage_Absolute()!==pageIndex)){this.graphicObjects.addObjectOnPage(pageIndex,this.GraphicObj);this.bNoNeedToAdd=false}else this.bNoNeedToAdd=true;if(this.GraphicObj.bNeedUpdatePosition||!(AscFormat.isRealNumber(this.GraphicObj.posX)&&AscFormat.isRealNumber(this.GraphicObj.posY))||
|
|
|
|
x,y,oldPageNum){var _x=x,_y=y;this.graphicObjects.removeById(pageIndex,this.Get_Id());if(AscFormat.isRealNumber(oldPageNum))this.graphicObjects.removeById(oldPageNum,this.Get_Id());var bChangePageIndex=this.pageIndex!==pageIndex;this.setPageIndex(pageIndex);if(typeof this.GraphicObj.setStartPage==="function"){var bIsHfdFtr=this.DocumentContent&&this.DocumentContent.IsHdrFtr();this.GraphicObj.setStartPage(pageIndex,bIsHfdFtr,bIsHfdFtr||bChangePageIndex)}if(!(this.DocumentContent&&this.DocumentContent.IsHdrFtr()&&
|
|
|
|
!(Math.abs(this.GraphicObj.posX-_x)<MOVE_DELTA&&Math.abs(this.GraphicObj.posY-_y)<MOVE_DELTA))this.GraphicObj.updatePosition(_x,_y);if(this.GraphicObj.bNeedUpdatePosition||!(AscFormat.isRealNumber(this.wrappingPolygon.posX)&&AscFormat.isRealNumber(this.wrappingPolygon.posY))||!(Math.abs(this.wrappingPolygon.posX-_x)<MOVE_DELTA&&Math.abs(this.wrappingPolygon.posY-_y)<MOVE_DELTA))this.wrappingPolygon.updatePosition(_x,_y);this.calculateSnapArrays()};ParaDrawing.prototype.calculateAfterChangeTheme=function(){if(AscCommon.isRealObject(this.GraphicObj)&&
|
|
|
|
this.DocumentContent.Get_StartPage_Absolute()!==pageIndex)){this.graphicObjects.addObjectOnPage(pageIndex,this.GraphicObj);this.bNoNeedToAdd=false}else this.bNoNeedToAdd=true;if(this.GraphicObj.bNeedUpdatePosition||!(AscFormat.isRealNumber(this.GraphicObj.posX)&&AscFormat.isRealNumber(this.GraphicObj.posY))||!(Math.abs(this.GraphicObj.posX-_x)<MOVE_DELTA&&Math.abs(this.GraphicObj.posY-_y)<MOVE_DELTA))this.GraphicObj.updatePosition(_x,_y);if(this.GraphicObj.bNeedUpdatePosition||!(AscFormat.isRealNumber(this.wrappingPolygon.posX)&&
|
|
|
|
typeof this.GraphicObj.calculateAfterChangeTheme==="function")this.GraphicObj.calculateAfterChangeTheme()};ParaDrawing.prototype.selectionIsEmpty=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.selectionIsEmpty==="function")return this.GraphicObj.selectionIsEmpty();return false};ParaDrawing.prototype.recalculateDocContent=function(){};ParaDrawing.prototype.Shift=function(Dx,Dy){this.ShiftX=Dx;this.ShiftY=Dy;this.X=this.OrigX+Dx;this.Y=this.OrigY+Dy;this.updatePosition3(this.PageNum,
|
|
|
|
AscFormat.isRealNumber(this.wrappingPolygon.posY))||!(Math.abs(this.wrappingPolygon.posX-_x)<MOVE_DELTA&&Math.abs(this.wrappingPolygon.posY-_y)<MOVE_DELTA))this.wrappingPolygon.updatePosition(_x,_y);this.calculateSnapArrays()};ParaDrawing.prototype.calculateAfterChangeTheme=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.calculateAfterChangeTheme==="function")this.GraphicObj.calculateAfterChangeTheme()};ParaDrawing.prototype.selectionIsEmpty=function(){if(AscCommon.isRealObject(this.GraphicObj)&&
|
|
|
|
this.X,this.Y)};ParaDrawing.prototype.IsLayoutInCell=function(){if(this.LogicDocument&&this.LogicDocument.GetCompatibilityMode()>=AscCommon.document_compatibility_mode_Word15)return true;return this.LayoutInCell};ParaDrawing.prototype.Get_Distance=function(){var oDist=this.Distance;return new AscFormat.CDistance(AscFormat.getValOrDefault(oDist.L,AscFormat.DISTANCE_TO_TEXT_LEFTRIGHT),AscFormat.getValOrDefault(oDist.T,0),AscFormat.getValOrDefault(oDist.R,AscFormat.DISTANCE_TO_TEXT_LEFTRIGHT),AscFormat.getValOrDefault(oDist.B,
|
|
|
|
typeof this.GraphicObj.selectionIsEmpty==="function")return this.GraphicObj.selectionIsEmpty();return false};ParaDrawing.prototype.recalculateDocContent=function(){};ParaDrawing.prototype.Shift=function(Dx,Dy){this.ShiftX=Dx;this.ShiftY=Dy;this.X=this.OrigX+Dx;this.Y=this.OrigY+Dy;this.updatePosition3(this.PageNum,this.X,this.Y)};ParaDrawing.prototype.IsLayoutInCell=function(){if(this.LogicDocument&&this.LogicDocument.GetCompatibilityMode()>=AscCommon.document_compatibility_mode_Word15)return true;
|
|
|
|
0))};ParaDrawing.prototype.Set_XYForAdd=function(X,Y,NearPos,PageNum){if(null!==NearPos){var Layout=NearPos.Paragraph.Get_Layout(NearPos.ContentPos,this);this.private_SetXYByLayout(X,Y,PageNum,Layout,true,true);var nRecalcIndex=null;var oLogicDocument=this.document;if(oLogicDocument){nRecalcIndex=oLogicDocument.Get_History().GetRecalculateIndex();this.SetSkipOnRecalculate(true);oLogicDocument.TurnOff_InterfaceEvents();oLogicDocument.Recalculate();oLogicDocument.TurnOn_InterfaceEvents(false);this.SetSkipOnRecalculate(false)}if(null!==
|
|
|
|
return this.LayoutInCell};ParaDrawing.prototype.Get_Distance=function(){var oDist=this.Distance;return new AscFormat.CDistance(AscFormat.getValOrDefault(oDist.L,AscFormat.DISTANCE_TO_TEXT_LEFTRIGHT),AscFormat.getValOrDefault(oDist.T,0),AscFormat.getValOrDefault(oDist.R,AscFormat.DISTANCE_TO_TEXT_LEFTRIGHT),AscFormat.getValOrDefault(oDist.B,0))};ParaDrawing.prototype.Set_XYForAdd=function(X,Y,NearPos,PageNum){if(null!==NearPos){var Layout=NearPos.Paragraph.Get_Layout(NearPos.ContentPos,this);this.private_SetXYByLayout(X,
|
|
|
|
nRecalcIndex)oLogicDocument.Get_History().SetRecalculateIndex(nRecalcIndex);Layout=NearPos.Paragraph.Get_Layout(NearPos.ContentPos,this);this.private_SetXYByLayout(X,Y,PageNum,Layout,true,true)}};ParaDrawing.prototype.SetSkipOnRecalculate=function(isSkip){this.SkipOnRecalculate=isSkip};ParaDrawing.prototype.IsSkipOnRecalculate=function(){return this.SkipOnRecalculate};ParaDrawing.prototype.Set_XY=function(X,Y,Paragraph,PageNum,bResetAlign){if(Paragraph){var PageNumOld=this.PageNum;var ContentPos=
|
|
|
|
Y,PageNum,Layout,true,true);var nRecalcIndex=null;var oLogicDocument=this.document;if(oLogicDocument){nRecalcIndex=oLogicDocument.Get_History().GetRecalculateIndex();this.SetSkipOnRecalculate(true);oLogicDocument.TurnOff_InterfaceEvents();oLogicDocument.Recalculate();oLogicDocument.TurnOn_InterfaceEvents(false);this.SetSkipOnRecalculate(false)}if(null!==nRecalcIndex)oLogicDocument.Get_History().SetRecalculateIndex(nRecalcIndex);Layout=NearPos.Paragraph.Get_Layout(NearPos.ContentPos,this);this.private_SetXYByLayout(X,
|
|
|
|
Paragraph.Get_DrawingObjectContentPos(this.Get_Id());if(null===ContentPos)return;var Layout=Paragraph.Get_Layout(ContentPos,this);this.private_SetXYByLayout(X,Y,PageNum,Layout,bResetAlign||true!==this.PositionH.Align?true:false,bResetAlign||true!==this.PositionV.Align?true:false);var nRecalcIndex=null;var oLogicDocument=this.document;if(oLogicDocument){nRecalcIndex=oLogicDocument.Get_History().GetRecalculateIndex();this.SetSkipOnRecalculate(true);oLogicDocument.Recalculate();this.SetSkipOnRecalculate(false)}if(null!==
|
|
|
|
Y,PageNum,Layout,true,true)}};ParaDrawing.prototype.SetSkipOnRecalculate=function(isSkip){this.SkipOnRecalculate=isSkip};ParaDrawing.prototype.IsSkipOnRecalculate=function(){return this.SkipOnRecalculate};ParaDrawing.prototype.Set_XY=function(X,Y,Paragraph,PageNum,bResetAlign){if(Paragraph){var PageNumOld=this.PageNum;var ContentPos=Paragraph.Get_DrawingObjectContentPos(this.Get_Id());if(null===ContentPos)return;var Layout=Paragraph.Get_Layout(ContentPos,this);this.private_SetXYByLayout(X,Y,PageNum,
|
|
|
|
nRecalcIndex)oLogicDocument.Get_History().SetRecalculateIndex(nRecalcIndex);if(!this.LogicDocument||null===this.LogicDocument.FullRecalc.Id||PageNum<this.LogicDocument.FullRecalc.PageIndex&&PageNumOld<this.LogicDocument.FullRecalc.PageIndex)Layout=Paragraph.Get_Layout(ContentPos,this);this.private_SetXYByLayout(X,Y,PageNum,Layout,bResetAlign||true!==this.PositionH.Align?true:false,bResetAlign||true!==this.PositionV.Align?true:false)}};ParaDrawing.prototype.private_SetXYByLayout=function(X,Y,PageNum,
|
|
|
|
Layout,bResetAlign||true!==this.PositionH.Align?true:false,bResetAlign||true!==this.PositionV.Align?true:false);var nRecalcIndex=null;var oLogicDocument=this.document;if(oLogicDocument){nRecalcIndex=oLogicDocument.Get_History().GetRecalculateIndex();this.SetSkipOnRecalculate(true);oLogicDocument.Recalculate();this.SetSkipOnRecalculate(false)}if(null!==nRecalcIndex)oLogicDocument.Get_History().SetRecalculateIndex(nRecalcIndex);if(!this.LogicDocument||null===this.LogicDocument.FullRecalc.Id||PageNum<
|
|
|
|
Layout,bChangeX,bChangeY){if(!Layout)return;this.PageNum=PageNum;this.Internal_Position.Set(this.GraphicObj.extX,this.GraphicObj.extY,this.getXfrmRot(),this.EffectExtent,this.YOffset,Layout.ParagraphLayout,Layout.PageLimitsOrigin);this.Internal_Position.Calculate_X(false,c_oAscRelativeFromH.Page,false,X-Layout.PageLimitsOrigin.X,false);this.Internal_Position.Calculate_Y(false,c_oAscRelativeFromV.Page,false,Y-Layout.PageLimitsOrigin.Y,false);var bCorrect=false;if(this.DocumentContent&&this.DocumentContent.IsTableCellContent&&
|
|
|
|
this.LogicDocument.FullRecalc.PageIndex&&PageNumOld<this.LogicDocument.FullRecalc.PageIndex)Layout=Paragraph.Get_Layout(ContentPos,this);this.private_SetXYByLayout(X,Y,PageNum,Layout,bResetAlign||true!==this.PositionH.Align?true:false,bResetAlign||true!==this.PositionV.Align?true:false)}};ParaDrawing.prototype.private_SetXYByLayout=function(X,Y,PageNum,Layout,bChangeX,bChangeY){if(!Layout)return;this.PageNum=PageNum;this.Internal_Position.Set(this.GraphicObj.extX,this.GraphicObj.extY,this.getXfrmRot(),
|
|
|
|
this.DocumentContent.IsTableCellContent(false))bCorrect=true;if(this.PositionH.RelativeFrom!==c_oAscRelativeFromH.Page||this.PositionV.RelativeFrom!==c_oAscRelativeFromV.Page)bCorrect=true;this.Internal_Position.Correct_Values(false,Layout.PageLimits,this.AllowOverlap,this.Use_TextWrap(),[],bCorrect);if(true===bChangeX){this.X=this.Internal_Position.CalcX;var ValueX=this.Internal_Position.Calculate_X_Value(this.PositionH.RelativeFrom);this.Set_PositionH(this.PositionH.RelativeFrom,false,ValueX,false);
|
|
|
|
this.EffectExtent,this.YOffset,Layout.ParagraphLayout,Layout.PageLimitsOrigin);this.Internal_Position.Calculate_X(false,c_oAscRelativeFromH.Page,false,X-Layout.PageLimitsOrigin.X,false);this.Internal_Position.Calculate_Y(false,c_oAscRelativeFromV.Page,false,Y-Layout.PageLimitsOrigin.Y,false);var bCorrect=false;if(this.DocumentContent&&this.DocumentContent.IsTableCellContent&&this.DocumentContent.IsTableCellContent(false))bCorrect=true;if(this.PositionH.RelativeFrom!==c_oAscRelativeFromH.Page||this.PositionV.RelativeFrom!==
|
|
|
|
this.X=this.Internal_Position.Calculate_X(false,this.PositionH.RelativeFrom,this.PositionH.Align,this.PositionH.Value,this.PositionH.Percent)}if(true===bChangeY){this.Y=this.Internal_Position.CalcY;var ValueY=this.Internal_Position.Calculate_Y_Value(this.PositionV.RelativeFrom);this.Set_PositionV(this.PositionV.RelativeFrom,false,ValueY,false);this.Y=this.Internal_Position.Calculate_Y(false,this.PositionV.RelativeFrom,this.PositionV.Align,this.PositionV.Value,this.PositionV.Percent)}};ParaDrawing.prototype.Get_DrawingType=
|
|
|
|
c_oAscRelativeFromV.Page)bCorrect=true;this.Internal_Position.Correct_Values(false,Layout.PageLimits,this.AllowOverlap,this.Use_TextWrap(),[],bCorrect);if(true===bChangeX){this.X=this.Internal_Position.CalcX;var ValueX=this.Internal_Position.Calculate_X_Value(this.PositionH.RelativeFrom);this.Set_PositionH(this.PositionH.RelativeFrom,false,ValueX,false);this.X=this.Internal_Position.Calculate_X(false,this.PositionH.RelativeFrom,this.PositionH.Align,this.PositionH.Value,this.PositionH.Percent)}if(true===
|
|
|
|
function(){return this.DrawingType};ParaDrawing.prototype.Is_Inline=function(){if(this.Parent&&this.Parent.Get_ParentTextTransform&&this.Parent.Get_ParentTextTransform())return true;return drawing_Inline===this.DrawingType?true:false};ParaDrawing.prototype.IsInline=function(){return this.Is_Inline()};ParaDrawing.prototype.Use_TextWrap=function(){if(!this.Parent||!this.Parent.Get_FramePr||null!==this.Parent.Get_FramePr()&&undefined!==this.Parent.Get_FramePr())return false;return drawing_Anchor===this.DrawingType&&
|
|
|
|
bChangeY){this.Y=this.Internal_Position.CalcY;var ValueY=this.Internal_Position.Calculate_Y_Value(this.PositionV.RelativeFrom);this.Set_PositionV(this.PositionV.RelativeFrom,false,ValueY,false);this.Y=this.Internal_Position.Calculate_Y(false,this.PositionV.RelativeFrom,this.PositionV.Align,this.PositionV.Value,this.PositionV.Percent)}};ParaDrawing.prototype.Get_DrawingType=function(){return this.DrawingType};ParaDrawing.prototype.Is_Inline=function(){if(this.Parent&&this.Parent.Get_ParentTextTransform&&
|
|
|
|
!(this.wrappingType===WRAPPING_TYPE_NONE)};ParaDrawing.prototype.IsUseTextWrap=function(){return this.Use_TextWrap()};ParaDrawing.prototype.Draw_Selection=function(){var Padding=this.DrawingDocument.GetMMPerDot(6);var extX,extY;if(this.GraphicObj){extX=this.GraphicObj.extX;extY=this.GraphicObj.extY}else{extX=this.getXfrmExtX();extY=this.getXfrmExtY()}var rot=this.getXfrmRot();if(AscFormat.checkNormalRotate(rot))this.DrawingDocument.AddPageSelection(this.PageNum,this.X-this.EffectExtent.L-Padding,
|
|
|
|
this.Parent.Get_ParentTextTransform())return true;return drawing_Inline===this.DrawingType?true:false};ParaDrawing.prototype.IsInline=function(){return this.Is_Inline()};ParaDrawing.prototype.Use_TextWrap=function(){if(!this.Parent||!this.Parent.Get_FramePr||null!==this.Parent.Get_FramePr()&&undefined!==this.Parent.Get_FramePr())return false;return drawing_Anchor===this.DrawingType&&!(this.wrappingType===WRAPPING_TYPE_NONE)};ParaDrawing.prototype.IsUseTextWrap=function(){return this.Use_TextWrap()};
|
|
|
|
this.Y-this.EffectExtent.T-Padding,this.EffectExtent.L+extX+this.EffectExtent.R+2*Padding,this.EffectExtent.T+extY+this.EffectExtent.B+2*Padding);else this.DrawingDocument.AddPageSelection(this.PageNum,this.X+extX/2-extY/2-this.EffectExtent.L-Padding,this.Y+extY/2-extX/2-this.EffectExtent.T-Padding,this.EffectExtent.L+extY+this.EffectExtent.R+2*Padding,this.EffectExtent.T+extX+this.EffectExtent.B+2*Padding)};ParaDrawing.prototype.CanInsertToPos=function(oAnchorPos){if(!oAnchorPos||!oAnchorPos.Paragraph||
|
|
|
|
ParaDrawing.prototype.Draw_Selection=function(){var Padding=this.DrawingDocument.GetMMPerDot(6);var extX,extY;if(this.GraphicObj){extX=this.GraphicObj.extX;extY=this.GraphicObj.extY}else{extX=this.getXfrmExtX();extY=this.getXfrmExtY()}var rot=this.getXfrmRot();if(AscFormat.checkNormalRotate(rot))this.DrawingDocument.AddPageSelection(this.PageNum,this.X-this.EffectExtent.L-Padding,this.Y-this.EffectExtent.T-Padding,this.EffectExtent.L+extX+this.EffectExtent.R+2*Padding,this.EffectExtent.T+extY+this.EffectExtent.B+
|
|
|
|
!oAnchorPos.Paragraph.Parent)return false;return!((this.IsShape()||this.IsGroup())&&(true===oAnchorPos.Paragraph.Parent.Is_DrawingShape()||true===oAnchorPos.Paragraph.Parent.IsFootnote()))};ParaDrawing.prototype.OnEnd_MoveInline=function(NearPos){if(!this.Parent)return;NearPos.Paragraph.Check_NearestPos(NearPos);var oRun=this.GetRun();var oPictureCC=false;if(oRun){var arrContentControls=oRun.GetParentContentControls();for(var nIndex=arrContentControls.length-1;nIndex>=0;--nIndex)if(arrContentControls[nIndex].IsPicture()){oPictureCC=
|
|
|
|
2*Padding);else this.DrawingDocument.AddPageSelection(this.PageNum,this.X+extX/2-extY/2-this.EffectExtent.L-Padding,this.Y+extY/2-extX/2-this.EffectExtent.T-Padding,this.EffectExtent.L+extY+this.EffectExtent.R+2*Padding,this.EffectExtent.T+extX+this.EffectExtent.B+2*Padding)};ParaDrawing.prototype.CanInsertToPos=function(oAnchorPos){if(!oAnchorPos||!oAnchorPos.Paragraph||!oAnchorPos.Paragraph.Parent)return false;return!((this.IsShape()||this.IsGroup())&&(true===oAnchorPos.Paragraph.Parent.Is_DrawingShape()||
|
|
|
|
arrContentControls[nIndex];break}}var oDstRun=null;var arrClasses=NearPos.Paragraph.GetClassesByPos(NearPos.ContentPos);for(var nIndex=arrClasses.length-1;nIndex>=0;--nIndex)if(arrClasses[nIndex]instanceof ParaRun){oDstRun=arrClasses[nIndex];break}if(!oDstRun||oPictureCC&&oDstRun===oRun||oDstRun.GetParentForm()){NearPos.Paragraph.Clear_NearestPosArray();return}var NewParaDrawing=this.Copy();var RunPr=this.Remove_FromDocument(false);this.DocumentContent.Select_DrawingObject(NewParaDrawing.GetId());
|
|
|
|
true===oAnchorPos.Paragraph.Parent.IsFootnote()))};ParaDrawing.prototype.OnEnd_MoveInline=function(NearPos){if(!this.Parent)return;NearPos.Paragraph.Check_NearestPos(NearPos);var oRun=this.GetRun();var oPictureCC=false;if(oRun){var arrContentControls=oRun.GetParentContentControls();for(var nIndex=arrContentControls.length-1;nIndex>=0;--nIndex)if(arrContentControls[nIndex].IsPicture()){oPictureCC=arrContentControls[nIndex];break}}var oDstRun=null;var arrClasses=NearPos.Paragraph.GetClassesByPos(NearPos.ContentPos);
|
|
|
|
NewParaDrawing.Add_ToDocument(NearPos,true,RunPr,undefined,oPictureCC)};ParaDrawing.prototype.Get_ParentTextTransform=function(){if(this.Parent)return this.Parent.Get_ParentTextTransform();return null};ParaDrawing.prototype.GoTo_Text=function(bBefore,bUpdateStates){var Paragraph=this.Get_ParentParagraph();if(Paragraph){Paragraph.MoveCursorToDrawing(this.Id,bBefore);Paragraph.Document_SetThisElementCurrent(undefined===bUpdateStates?true:bUpdateStates)}};ParaDrawing.prototype.Remove_FromDocument=function(bRecalculate){var oResult=
|
|
|
|
for(var nIndex=arrClasses.length-1;nIndex>=0;--nIndex)if(arrClasses[nIndex]instanceof ParaRun){oDstRun=arrClasses[nIndex];break}if(!oDstRun||oPictureCC&&oDstRun===oRun||oDstRun.GetParentForm()){NearPos.Paragraph.Clear_NearestPosArray();return}var NewParaDrawing=this.Copy();var RunPr=this.Remove_FromDocument(false);this.DocumentContent.Select_DrawingObject(NewParaDrawing.GetId());NewParaDrawing.Add_ToDocument(NearPos,true,RunPr,undefined,oPictureCC)};ParaDrawing.prototype.Get_ParentTextTransform=function(){if(this.Parent)return this.Parent.Get_ParentTextTransform();
|
|
|
|
null;if(!this.Parent)return oResult;var oRun=this.Parent.Get_DrawingObjectRun(this.Id);if(oRun){var oGrObject=this.GraphicObj;if(oGrObject&&oGrObject.getObjectType()===AscDFH.historyitem_type_Shape)if(oGrObject.signatureLine)oGrObject.setSignature(oGrObject.signatureLine);var oPictureCC=null;var arrContentControls=oRun.GetParentContentControls();for(var nIndex=arrContentControls.length-1;nIndex>=0;--nIndex)if(arrContentControls[nIndex].IsPicture()){oPictureCC=arrContentControls[nIndex];break}if(oPictureCC)oPictureCC.RemoveContentControlWrapper();
|
|
|
|
return null};ParaDrawing.prototype.GoTo_Text=function(bBefore,bUpdateStates){var Paragraph=this.Get_ParentParagraph();if(Paragraph){Paragraph.MoveCursorToDrawing(this.Id,bBefore);Paragraph.Document_SetThisElementCurrent(undefined===bUpdateStates?true:bUpdateStates)}};ParaDrawing.prototype.Remove_FromDocument=function(bRecalculate){var oResult=null;if(!this.Parent)return oResult;var oRun=this.Parent.Get_DrawingObjectRun(this.Id);if(oRun){var oGrObject=this.GraphicObj;if(oGrObject&&oGrObject.getObjectType()===
|
|
|
|
oRun.Remove_DrawingObject(this.Id);if(oRun.IsInHyperlink())oResult=new CTextPr;else oResult=oRun.GetTextPr();if(oGrObject&&oGrObject.getObjectType()===AscDFH.historyitem_type_Shape)if(oGrObject.signatureLine){editor.sendEvent("asc_onRemoveSignature",oGrObject.signatureLine.id);oGrObject.setSignature(oGrObject.signatureLine)}}if(false!=bRecalculate)editor.WordControl.m_oLogicDocument.Recalculate();return oResult};ParaDrawing.prototype.Get_ParentParagraph=function(){if(this.Parent instanceof Paragraph)return this.Parent;
|
|
|
|
AscDFH.historyitem_type_Shape)if(oGrObject.signatureLine)oGrObject.setSignature(oGrObject.signatureLine);var oPictureCC=null;var arrContentControls=oRun.GetParentContentControls();for(var nIndex=arrContentControls.length-1;nIndex>=0;--nIndex)if(arrContentControls[nIndex].IsPicture()){oPictureCC=arrContentControls[nIndex];break}if(oPictureCC)oPictureCC.RemoveContentControlWrapper();oRun.Remove_DrawingObject(this.Id);if(oRun.IsInHyperlink())oResult=new CTextPr;else oResult=oRun.GetTextPr();if(oGrObject&&
|
|
|
|
if(this.Parent instanceof ParaRun)return this.Parent.Paragraph;if(this.Parent&&this.Parent.GetParagraph())return this.Parent.GetParagraph();return null};ParaDrawing.prototype.SelectAsText=function(){var oParagraph=this.GetParagraph();var oRun=this.GetRun();if(!oParagraph||!oRun)return;var oDocument=oParagraph.GetLogicDocument();if(!oDocument)return;oDocument.RemoveSelection();oRun.Make_ThisElementCurrent(false);oRun.SetCursorPosition(oRun.GetElementPosition(this));var oStartPos=oDocument.GetContentPosition(false);
|
|
|
|
oGrObject.getObjectType()===AscDFH.historyitem_type_Shape)if(oGrObject.signatureLine){editor.sendEvent("asc_onRemoveSignature",oGrObject.signatureLine.id);oGrObject.setSignature(oGrObject.signatureLine)}}if(false!=bRecalculate)editor.WordControl.m_oLogicDocument.Recalculate();return oResult};ParaDrawing.prototype.Get_ParentParagraph=function(){if(this.Parent instanceof Paragraph)return this.Parent;if(this.Parent instanceof ParaRun)return this.Parent.Paragraph;if(this.Parent&&this.Parent.GetParagraph())return this.Parent.GetParagraph();
|
|
|
|
oRun.SetCursorPosition(oRun.GetElementPosition(this)+1);var oEndPos=oDocument.GetContentPosition(false);oDocument.RemoveSelection();oDocument.SetSelectionByContentPositions(oStartPos,oEndPos)};ParaDrawing.prototype.Add_ToDocument=function(NearPos,bRecalculate,RunPr,Run,oPictureCC){NearPos.Paragraph.Check_NearestPos(NearPos);var LogicDocument=this.DrawingDocument.m_oLogicDocument;var Para=new Paragraph(this.DrawingDocument,LogicDocument);var DrawingRun=new ParaRun(Para);DrawingRun.Add_ToContent(0,
|
|
|
|
return null};ParaDrawing.prototype.SelectAsText=function(){var oParagraph=this.GetParagraph();var oRun=this.GetRun();if(!oParagraph||!oRun)return;var oDocument=oParagraph.GetLogicDocument();if(!oDocument)return;oDocument.RemoveSelection();oRun.Make_ThisElementCurrent(false);oRun.SetCursorPosition(oRun.GetElementPosition(this));var oStartPos=oDocument.GetContentPosition(false);oRun.SetCursorPosition(oRun.GetElementPosition(this)+1);var oEndPos=oDocument.GetContentPosition(false);oDocument.RemoveSelection();
|
|
|
|
this);if(RunPr)DrawingRun.Set_Pr(RunPr.Copy());if(Run)DrawingRun.SetReviewTypeWithInfo(Run.GetReviewType(),Run.GetReviewInfo());if(oPictureCC){var oSdt=new CInlineLevelSdt;oSdt.SetPicturePr(true);oSdt.ReplacePlaceHolderWithContent();oSdt.AddToContent(0,DrawingRun);Para.Add_ToContent(0,oSdt);var oFormPr=oPictureCC.GetFormPr();if(oFormPr)oSdt.SetFormPr(oFormPr.Copy())}else Para.Add_ToContent(0,DrawingRun);var SelectedElement=new CSelectedElement(Para,false);var SelectedContent=new CSelectedContent;
|
|
|
|
oDocument.SetSelectionByContentPositions(oStartPos,oEndPos)};ParaDrawing.prototype.Add_ToDocument=function(NearPos,bRecalculate,RunPr,Run,oPictureCC){NearPos.Paragraph.Check_NearestPos(NearPos);var LogicDocument=this.DrawingDocument.m_oLogicDocument;var Para=new Paragraph(this.DrawingDocument,LogicDocument);var DrawingRun=new ParaRun(Para);DrawingRun.Add_ToContent(0,this);if(RunPr)DrawingRun.Set_Pr(RunPr.Copy());if(Run)DrawingRun.SetReviewTypeWithInfo(Run.GetReviewType(),Run.GetReviewInfo());if(oPictureCC){var oSdt=
|
|
|
|
SelectedContent.Add(SelectedElement);SelectedContent.SetMoveDrawing(true);SelectedContent.DrawingObjects.push(this);NearPos.Paragraph.Parent.InsertContent(SelectedContent,NearPos);NearPos.Paragraph.Clear_NearestPosArray();NearPos.Paragraph.Correct_Content();this.Set_Parent(NearPos.Paragraph);if(false!=bRecalculate)LogicDocument.Recalculate()};ParaDrawing.prototype.Add_ToDocument2=function(Paragraph){var DrawingRun=new ParaRun(Paragraph);DrawingRun.Add_ToContent(0,this);Paragraph.Add_ToContent(0,DrawingRun);
|
|
|
|
new CInlineLevelSdt;oSdt.SetPicturePr(true);oSdt.ReplacePlaceHolderWithContent();oSdt.AddToContent(0,DrawingRun);Para.Add_ToContent(0,oSdt);var oFormPr=oPictureCC.GetFormPr();if(oFormPr)oSdt.SetFormPr(oFormPr.Copy())}else Para.Add_ToContent(0,DrawingRun);var SelectedElement=new CSelectedElement(Para,false);var SelectedContent=new CSelectedContent;SelectedContent.Add(SelectedElement);SelectedContent.SetMoveDrawing(true);SelectedContent.DrawingObjects.push(this);NearPos.Paragraph.Parent.InsertContent(SelectedContent,
|
|
|
|
this.Set_Parent(Paragraph)};ParaDrawing.prototype.UpdateCursorType=function(X,Y,PageIndex){this.DrawingDocument.SetCursorType("move",new AscCommon.CMouseMoveData);if(null!=this.Parent){var Lock=this.Parent.Lock;if(true===Lock.Is_Locked()){var PNum=Math.max(0,Math.min(PageIndex-this.Parent.PageNum,this.Parent.Pages.length-1));var _X=this.Parent.Pages[PNum].X;var _Y=this.Parent.Pages[PNum].Y;var MMData=new AscCommon.CMouseMoveData;var Coords=this.DrawingDocument.ConvertCoordsToCursorWR(_X,_Y,this.Parent.Get_StartPage_Absolute()+
|
|
|
|
NearPos);NearPos.Paragraph.Clear_NearestPosArray();NearPos.Paragraph.Correct_Content();this.Set_Parent(NearPos.Paragraph);if(false!=bRecalculate)LogicDocument.Recalculate()};ParaDrawing.prototype.Add_ToDocument2=function(Paragraph){var DrawingRun=new ParaRun(Paragraph);DrawingRun.Add_ToContent(0,this);Paragraph.Add_ToContent(0,DrawingRun);this.Set_Parent(Paragraph)};ParaDrawing.prototype.UpdateCursorType=function(X,Y,PageIndex){this.DrawingDocument.SetCursorType("move",new AscCommon.CMouseMoveData);
|
|
|
|
(PageIndex-this.Parent.PageNum));MMData.X_abs=Coords.X-5;MMData.Y_abs=Coords.Y;MMData.Type=Asc.c_oAscMouseMoveDataTypes.LockedObject;MMData.UserId=Lock.Get_UserId();MMData.HaveChanges=Lock.Have_Changes();MMData.LockedObjectType=c_oAscMouseMoveLockedObjectType.Common;editor.sync_MouseMoveCallback(MMData)}}};ParaDrawing.prototype.Get_AnchorPos=function(){if(!this.Parent)return null;return this.Parent.Get_AnchorPos(this)};ParaDrawing.prototype.CheckRecalcAutoFit=function(oSectPr){if(this.GraphicObj&&
|
|
|
|
if(null!=this.Parent){var Lock=this.Parent.Lock;if(true===Lock.Is_Locked()){var PNum=Math.max(0,Math.min(PageIndex-this.Parent.PageNum,this.Parent.Pages.length-1));var _X=this.Parent.Pages[PNum].X;var _Y=this.Parent.Pages[PNum].Y;var MMData=new AscCommon.CMouseMoveData;var Coords=this.DrawingDocument.ConvertCoordsToCursorWR(_X,_Y,this.Parent.Get_StartPage_Absolute()+(PageIndex-this.Parent.PageNum));MMData.X_abs=Coords.X-5;MMData.Y_abs=Coords.Y;MMData.Type=Asc.c_oAscMouseMoveDataTypes.LockedObject;
|
|
|
|
this.GraphicObj.CheckNeedRecalcAutoFit)if(this.GraphicObj.CheckNeedRecalcAutoFit(oSectPr)){if(this.GraphicObj)this.GraphicObj.recalcWrapPolygon&&this.GraphicObj.recalcWrapPolygon();this.Measure()}};ParaDrawing.prototype.Get_ParentObject_or_DocumentPos=function(){if(this.Parent!=null)return this.Parent.Get_ParentObject_or_DocumentPos()};ParaDrawing.prototype.Refresh_RecalcData=function(Data){var oRun=this.GetRun();if(oRun){if(AscCommon.isRealObject(Data))switch(Data.Type){case AscDFH.historyitem_Drawing_Distance:{if(this.GraphicObj){this.GraphicObj.recalcWrapPolygon&&
|
|
|
|
MMData.UserId=Lock.Get_UserId();MMData.HaveChanges=Lock.Have_Changes();MMData.LockedObjectType=c_oAscMouseMoveLockedObjectType.Common;editor.sync_MouseMoveCallback(MMData)}}};ParaDrawing.prototype.Get_AnchorPos=function(){if(!this.Parent)return null;return this.Parent.Get_AnchorPos(this)};ParaDrawing.prototype.CheckRecalcAutoFit=function(oSectPr){if(this.GraphicObj&&this.GraphicObj.CheckNeedRecalcAutoFit)if(this.GraphicObj.CheckNeedRecalcAutoFit(oSectPr)){if(this.GraphicObj)this.GraphicObj.recalcWrapPolygon&&
|
|
|
|
this.GraphicObj.recalcWrapPolygon();this.GraphicObj.addToRecalculate()}break}case AscDFH.historyitem_Drawing_SetExtent:{oRun.RecalcInfo.Measure=true;break}case AscDFH.historyitem_Drawing_SetSizeRelH:case AscDFH.historyitem_Drawing_SetSizeRelV:case AscDFH.historyitem_Drawing_SetGraphicObject:{if(this.GraphicObj){this.GraphicObj.handleUpdateExtents&&this.GraphicObj.handleUpdateExtents();this.GraphicObj.addToRecalculate()}oRun.RecalcInfo.Measure=true;break}case AscDFH.historyitem_Drawing_WrappingType:{if(this.GraphicObj){this.GraphicObj.recalcWrapPolygon&&
|
|
|
|
this.GraphicObj.recalcWrapPolygon();this.Measure()}};ParaDrawing.prototype.Get_ParentObject_or_DocumentPos=function(){if(this.Parent!=null)return this.Parent.Get_ParentObject_or_DocumentPos()};ParaDrawing.prototype.Refresh_RecalcData=function(Data){var oRun=this.GetRun();if(oRun){if(AscCommon.isRealObject(Data))switch(Data.Type){case AscDFH.historyitem_Drawing_Distance:{if(this.GraphicObj){this.GraphicObj.recalcWrapPolygon&&this.GraphicObj.recalcWrapPolygon();this.GraphicObj.addToRecalculate()}break}case AscDFH.historyitem_Drawing_SetExtent:{oRun.RecalcInfo.Measure=
|
|
|
|
this.GraphicObj.recalcWrapPolygon();this.GraphicObj.addToRecalculate()}break}}return oRun.Refresh_RecalcData2()}};ParaDrawing.prototype.Refresh_RecalcData2=function(Data){var oRun=this.GetRun();if(oRun)return oRun.Refresh_RecalcData2()};ParaDrawing.prototype.hyperlinkCheck=function(bCheck){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.hyperlinkCheck==="function")return this.GraphicObj.hyperlinkCheck(bCheck);return null};ParaDrawing.prototype.hyperlinkCanAdd=function(bCheckInHyperlink){if(AscCommon.isRealObject(this.GraphicObj)&&
|
|
|
|
true;break}case AscDFH.historyitem_Drawing_SetSizeRelH:case AscDFH.historyitem_Drawing_SetSizeRelV:case AscDFH.historyitem_Drawing_SetGraphicObject:{if(this.GraphicObj){this.GraphicObj.handleUpdateExtents&&this.GraphicObj.handleUpdateExtents();this.GraphicObj.addToRecalculate()}oRun.RecalcInfo.Measure=true;break}case AscDFH.historyitem_Drawing_WrappingType:{if(this.GraphicObj){this.GraphicObj.recalcWrapPolygon&&this.GraphicObj.recalcWrapPolygon();this.GraphicObj.addToRecalculate()}break}}return oRun.Refresh_RecalcData2()}};
|
|
|
|
typeof this.GraphicObj.hyperlinkCanAdd==="function")return this.GraphicObj.hyperlinkCanAdd(bCheckInHyperlink);return false};ParaDrawing.prototype.hyperlinkRemove=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.hyperlinkCanAdd==="function")return this.GraphicObj.hyperlinkRemove();return false};ParaDrawing.prototype.hyperlinkModify=function(HyperProps){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.hyperlinkModify==="function")return this.GraphicObj.hyperlinkModify(HyperProps)};
|
|
|
|
ParaDrawing.prototype.Refresh_RecalcData2=function(Data){var oRun=this.GetRun();if(oRun)return oRun.Refresh_RecalcData2()};ParaDrawing.prototype.hyperlinkCheck=function(bCheck){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.hyperlinkCheck==="function")return this.GraphicObj.hyperlinkCheck(bCheck);return null};ParaDrawing.prototype.hyperlinkCanAdd=function(bCheckInHyperlink){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.hyperlinkCanAdd==="function")return this.GraphicObj.hyperlinkCanAdd(bCheckInHyperlink);
|
|
|
|
ParaDrawing.prototype.hyperlinkAdd=function(HyperProps){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.hyperlinkAdd==="function")return this.GraphicObj.hyperlinkAdd(HyperProps)};ParaDrawing.prototype.documentStatistics=function(stat){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.documentStatistics==="function")this.GraphicObj.documentStatistics(stat)};ParaDrawing.prototype.documentCreateFontCharMap=function(fontMap){if(AscCommon.isRealObject(this.GraphicObj)&&
|
|
|
|
return false};ParaDrawing.prototype.hyperlinkRemove=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.hyperlinkCanAdd==="function")return this.GraphicObj.hyperlinkRemove();return false};ParaDrawing.prototype.hyperlinkModify=function(HyperProps){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.hyperlinkModify==="function")return this.GraphicObj.hyperlinkModify(HyperProps)};ParaDrawing.prototype.hyperlinkAdd=function(HyperProps){if(AscCommon.isRealObject(this.GraphicObj)&&
|
|
|
|
typeof this.GraphicObj.documentCreateFontCharMap==="function")this.GraphicObj.documentCreateFontCharMap(fontMap)};ParaDrawing.prototype.documentCreateFontMap=function(fontMap){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.documentCreateFontMap==="function")this.GraphicObj.documentCreateFontMap(fontMap)};ParaDrawing.prototype.tableCheckSplit=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.tableCheckSplit==="function")return this.GraphicObj.tableCheckSplit();
|
|
|
|
typeof this.GraphicObj.hyperlinkAdd==="function")return this.GraphicObj.hyperlinkAdd(HyperProps)};ParaDrawing.prototype.documentStatistics=function(stat){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.documentStatistics==="function")this.GraphicObj.documentStatistics(stat)};ParaDrawing.prototype.documentCreateFontCharMap=function(fontMap){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.documentCreateFontCharMap==="function")this.GraphicObj.documentCreateFontCharMap(fontMap)};
|
|
|
|
return false};ParaDrawing.prototype.tableCheckMerge=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.tableCheckMerge==="function")return this.GraphicObj.tableCheckMerge();return false};ParaDrawing.prototype.tableSelect=function(Type){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.tableSelect==="function")return this.GraphicObj.tableSelect(Type)};ParaDrawing.prototype.tableRemoveTable=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.tableRemoveTable===
|
|
|
|
ParaDrawing.prototype.documentCreateFontMap=function(fontMap){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.documentCreateFontMap==="function")this.GraphicObj.documentCreateFontMap(fontMap)};ParaDrawing.prototype.tableCheckSplit=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.tableCheckSplit==="function")return this.GraphicObj.tableCheckSplit();return false};ParaDrawing.prototype.tableCheckMerge=function(){if(AscCommon.isRealObject(this.GraphicObj)&&
|
|
|
|
"function")return this.GraphicObj.tableRemoveTable()};ParaDrawing.prototype.tableSplitCell=function(Cols,Rows){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.tableSplitCell==="function")return this.GraphicObj.tableSplitCell(Cols,Rows)};ParaDrawing.prototype.tableMergeCells=function(Cols,Rows){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.tableMergeCells==="function")return this.GraphicObj.tableMergeCells(Cols,Rows)};ParaDrawing.prototype.tableRemoveCol=function(){if(AscCommon.isRealObject(this.GraphicObj)&&
|
|
|
|
typeof this.GraphicObj.tableCheckMerge==="function")return this.GraphicObj.tableCheckMerge();return false};ParaDrawing.prototype.tableSelect=function(Type){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.tableSelect==="function")return this.GraphicObj.tableSelect(Type)};ParaDrawing.prototype.tableRemoveTable=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.tableRemoveTable==="function")return this.GraphicObj.tableRemoveTable()};ParaDrawing.prototype.tableSplitCell=
|
|
|
|
typeof this.GraphicObj.tableRemoveCol==="function")return this.GraphicObj.tableRemoveCol()};ParaDrawing.prototype.tableAddCol=function(bBefore,nCount){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.tableAddCol==="function")return this.GraphicObj.tableAddCol(bBefore,nCount)};ParaDrawing.prototype.tableRemoveRow=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.tableRemoveRow==="function")return this.GraphicObj.tableRemoveRow()};ParaDrawing.prototype.tableAddRow=
|
|
|
|
function(Cols,Rows){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.tableSplitCell==="function")return this.GraphicObj.tableSplitCell(Cols,Rows)};ParaDrawing.prototype.tableMergeCells=function(Cols,Rows){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.tableMergeCells==="function")return this.GraphicObj.tableMergeCells(Cols,Rows)};ParaDrawing.prototype.tableRemoveCol=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.tableRemoveCol===
|
|
|
|
function(bBefore,nCount){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.tableAddRow==="function")return this.GraphicObj.tableAddRow(bBefore,nCount)};ParaDrawing.prototype.getCurrentParagraph=function(bIgnoreSelection,arrSelectedParagraphs){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.getCurrentParagraph==="function")return this.GraphicObj.getCurrentParagraph(bIgnoreSelection,arrSelectedParagraphs);if(this.Parent instanceof Paragraph)return this.Parent};ParaDrawing.prototype.GetSelectedText=
|
|
|
|
"function")return this.GraphicObj.tableRemoveCol()};ParaDrawing.prototype.tableAddCol=function(bBefore,nCount){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.tableAddCol==="function")return this.GraphicObj.tableAddCol(bBefore,nCount)};ParaDrawing.prototype.tableRemoveRow=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.tableRemoveRow==="function")return this.GraphicObj.tableRemoveRow()};ParaDrawing.prototype.tableAddRow=function(bBefore,nCount){if(AscCommon.isRealObject(this.GraphicObj)&&
|
|
|
|
function(bClearText,oPr){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.GetSelectedText==="function")return this.GraphicObj.GetSelectedText(bClearText,oPr);return""};ParaDrawing.prototype.getCurPosXY=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.getCurPosXY==="function")return this.GraphicObj.getCurPosXY();return{X:0,Y:0}};ParaDrawing.prototype.setParagraphKeepLines=function(Value){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.setParagraphKeepLines===
|
|
|
|
typeof this.GraphicObj.tableAddRow==="function")return this.GraphicObj.tableAddRow(bBefore,nCount)};ParaDrawing.prototype.getCurrentParagraph=function(bIgnoreSelection,arrSelectedParagraphs){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.getCurrentParagraph==="function")return this.GraphicObj.getCurrentParagraph(bIgnoreSelection,arrSelectedParagraphs);if(this.Parent instanceof Paragraph)return this.Parent};ParaDrawing.prototype.GetSelectedText=function(bClearText,oPr){if(AscCommon.isRealObject(this.GraphicObj)&&
|
|
|
|
"function")return this.GraphicObj.setParagraphKeepLines(Value)};ParaDrawing.prototype.setParagraphKeepNext=function(Value){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.setParagraphKeepNext==="function")return this.GraphicObj.setParagraphKeepNext(Value)};ParaDrawing.prototype.setParagraphWidowControl=function(Value){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.setParagraphWidowControl==="function")return this.GraphicObj.setParagraphWidowControl(Value)};ParaDrawing.prototype.setParagraphPageBreakBefore=
|
|
|
|
typeof this.GraphicObj.GetSelectedText==="function")return this.GraphicObj.GetSelectedText(bClearText,oPr);return""};ParaDrawing.prototype.getCurPosXY=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.getCurPosXY==="function")return this.GraphicObj.getCurPosXY();return{X:0,Y:0}};ParaDrawing.prototype.setParagraphKeepLines=function(Value){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.setParagraphKeepLines==="function")return this.GraphicObj.setParagraphKeepLines(Value)};
|
|
|
|
function(Value){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.setParagraphPageBreakBefore==="function")return this.GraphicObj.setParagraphPageBreakBefore(Value)};ParaDrawing.prototype.isTextSelectionUse=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.isTextSelectionUse==="function")return this.GraphicObj.isTextSelectionUse();return false};ParaDrawing.prototype.paragraphFormatPaste=function(CopyTextPr,CopyParaPr,Bool){if(AscCommon.isRealObject(this.GraphicObj)&&
|
|
|
|
ParaDrawing.prototype.setParagraphKeepNext=function(Value){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.setParagraphKeepNext==="function")return this.GraphicObj.setParagraphKeepNext(Value)};ParaDrawing.prototype.setParagraphWidowControl=function(Value){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.setParagraphWidowControl==="function")return this.GraphicObj.setParagraphWidowControl(Value)};ParaDrawing.prototype.setParagraphPageBreakBefore=function(Value){if(AscCommon.isRealObject(this.GraphicObj)&&
|
|
|
|
typeof this.GraphicObj.isTextSelectionUse==="function")return this.GraphicObj.paragraphFormatPaste(CopyTextPr,CopyParaPr,Bool)};ParaDrawing.prototype.getNearestPos=function(x,y,pageIndex){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.getNearestPos==="function")return this.GraphicObj.getNearestPos(x,y,pageIndex);return null};ParaDrawing.prototype.Write_ToBinary=function(Writer){Writer.WriteLong(this.Type);Writer.WriteString2(this.Id)};ParaDrawing.prototype.Write_ToBinary2=function(Writer){Writer.WriteLong(AscDFH.historyitem_type_Drawing);
|
|
|
|
typeof this.GraphicObj.setParagraphPageBreakBefore==="function")return this.GraphicObj.setParagraphPageBreakBefore(Value)};ParaDrawing.prototype.isTextSelectionUse=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.isTextSelectionUse==="function")return this.GraphicObj.isTextSelectionUse();return false};ParaDrawing.prototype.paragraphFormatPaste=function(CopyTextPr,CopyParaPr,Bool){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.isTextSelectionUse==="function")return this.GraphicObj.paragraphFormatPaste(CopyTextPr,
|
|
|
|
Writer.WriteString2(this.Id);AscFormat.writeDouble(Writer,this.Extent.W);AscFormat.writeDouble(Writer,this.Extent.H);AscFormat.writeObject(Writer,this.GraphicObj);AscFormat.writeObject(Writer,this.DocumentContent);AscFormat.writeObject(Writer,this.Parent);AscFormat.writeObject(Writer,this.wrappingPolygon);AscFormat.writeLong(Writer,this.RelativeHeight);AscFormat.writeObject(Writer,this.docPr)};ParaDrawing.prototype.Read_FromBinary2=function(Reader){this.Id=Reader.GetString2();this.DrawingDocument=
|
|
|
|
CopyParaPr,Bool)};ParaDrawing.prototype.getNearestPos=function(x,y,pageIndex){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.getNearestPos==="function")return this.GraphicObj.getNearestPos(x,y,pageIndex);return null};ParaDrawing.prototype.Write_ToBinary=function(Writer){Writer.WriteLong(this.Type);Writer.WriteString2(this.Id)};ParaDrawing.prototype.Write_ToBinary2=function(Writer){Writer.WriteLong(AscDFH.historyitem_type_Drawing);Writer.WriteString2(this.Id);AscFormat.writeDouble(Writer,
|
|
|
|
editor.WordControl.m_oLogicDocument.DrawingDocument;this.LogicDocument=this.DrawingDocument?this.DrawingDocument.m_oLogicDocument:null;this.Extent.W=AscFormat.readDouble(Reader);this.Extent.H=AscFormat.readDouble(Reader);this.GraphicObj=AscFormat.readObject(Reader);this.DocumentContent=AscFormat.readObject(Reader);this.Parent=AscFormat.readObject(Reader);this.wrappingPolygon=AscFormat.readObject(Reader);this.RelativeHeight=AscFormat.readLong(Reader);this.docPr=AscFormat.readObject(Reader);if(this.wrappingPolygon)this.wrappingPolygon.wordGraphicObject=
|
|
|
|
this.Extent.W);AscFormat.writeDouble(Writer,this.Extent.H);AscFormat.writeObject(Writer,this.GraphicObj);AscFormat.writeObject(Writer,this.DocumentContent);AscFormat.writeObject(Writer,this.Parent);AscFormat.writeObject(Writer,this.wrappingPolygon);AscFormat.writeLong(Writer,this.RelativeHeight);AscFormat.writeObject(Writer,this.docPr)};ParaDrawing.prototype.Read_FromBinary2=function(Reader){this.Id=Reader.GetString2();this.DrawingDocument=editor.WordControl.m_oLogicDocument.DrawingDocument;this.LogicDocument=
|
|
|
|
this;this.drawingDocument=editor.WordControl.m_oLogicDocument.DrawingDocument;this.document=editor.WordControl.m_oLogicDocument;this.graphicObjects=editor.WordControl.m_oLogicDocument.DrawingObjects;this.graphicObjects.addGraphicObject(this);g_oTableId.Add(this,this.Id)};ParaDrawing.prototype.Load_LinkData=function(){};ParaDrawing.prototype.draw=function(graphics,PDSE){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.draw==="function"){graphics.SaveGrState();var bInline=this.Is_Inline();
|
|
|
|
this.DrawingDocument?this.DrawingDocument.m_oLogicDocument:null;this.Extent.W=AscFormat.readDouble(Reader);this.Extent.H=AscFormat.readDouble(Reader);this.GraphicObj=AscFormat.readObject(Reader);this.DocumentContent=AscFormat.readObject(Reader);this.Parent=AscFormat.readObject(Reader);this.wrappingPolygon=AscFormat.readObject(Reader);this.RelativeHeight=AscFormat.readLong(Reader);this.docPr=AscFormat.readObject(Reader);if(this.wrappingPolygon)this.wrappingPolygon.wordGraphicObject=this;this.drawingDocument=
|
|
|
|
if(bInline&&AscCommon.isRealObject(PDSE)&&AscFormat.isRealNumber(this.LineTop)&&AscFormat.isRealNumber(this.LineBottom)&&AscCommon.isRealObject(this.GraphicObj.bounds)){var x,y,w,h;var oEffectExtent=this.EffectExtent;x=PDSE.X;y=this.LineTop;w=this.GraphicObj.bounds.r-this.GraphicObj.bounds.l+AscFormat.getValOrDefault(oEffectExtent.R,0)+AscFormat.getValOrDefault(oEffectExtent.L,0);h=this.LineBottom-this.LineTop;graphics.AddClipRect(x,y,w,h)}this.GraphicObj.draw(graphics);graphics.RestoreGrState()}};
|
|
|
|
editor.WordControl.m_oLogicDocument.DrawingDocument;this.document=editor.WordControl.m_oLogicDocument;this.graphicObjects=editor.WordControl.m_oLogicDocument.DrawingObjects;this.graphicObjects.addGraphicObject(this);g_oTableId.Add(this,this.Id)};ParaDrawing.prototype.Load_LinkData=function(){};ParaDrawing.prototype.draw=function(graphics,PDSE){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.draw==="function"){graphics.SaveGrState();var bInline=this.Is_Inline();if(bInline&&AscCommon.isRealObject(PDSE)&&
|
|
|
|
ParaDrawing.prototype.drawAdjustments=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.drawAdjustments==="function")this.GraphicObj.drawAdjustments()};ParaDrawing.prototype.getTransformMatrix=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.getTransformMatrix==="function")return this.GraphicObj.getTransformMatrix();return null};ParaDrawing.prototype.getExtensions=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.getExtensions===
|
|
|
|
AscFormat.isRealNumber(this.LineTop)&&AscFormat.isRealNumber(this.LineBottom)&&AscCommon.isRealObject(this.GraphicObj.bounds)){var x,y,w,h;var oEffectExtent=this.EffectExtent;x=PDSE.X;y=this.LineTop;w=this.GraphicObj.bounds.r-this.GraphicObj.bounds.l+AscFormat.getValOrDefault(oEffectExtent.R,0)+AscFormat.getValOrDefault(oEffectExtent.L,0);h=this.LineBottom-this.LineTop;graphics.AddClipRect(x,y,w,h)}this.GraphicObj.draw(graphics);graphics.RestoreGrState()}};ParaDrawing.prototype.drawAdjustments=function(){if(AscCommon.isRealObject(this.GraphicObj)&&
|
|
|
|
"function")return this.GraphicObj.getExtensions();return null};ParaDrawing.prototype.isGroup=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.isGroup==="function")return this.GraphicObj.isGroup();return false};ParaDrawing.prototype.isShapeChild=function(bRetShape){if(!this.Is_Inline()||!this.DocumentContent)return bRetShape?null:false;var cur_doc_content=this.DocumentContent;var oCell;while(oCell=cur_doc_content.IsTableCellContent(true))cur_doc_content=oCell.Row.Table.Parent;
|
|
|
|
typeof this.GraphicObj.drawAdjustments==="function")this.GraphicObj.drawAdjustments()};ParaDrawing.prototype.getTransformMatrix=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.getTransformMatrix==="function")return this.GraphicObj.getTransformMatrix();return null};ParaDrawing.prototype.getExtensions=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.getExtensions==="function")return this.GraphicObj.getExtensions();return null};ParaDrawing.prototype.isGroup=
|
|
|
|
if(AscCommon.isRealObject(cur_doc_content.Parent)&&typeof cur_doc_content.Parent.getObjectType==="function"&&cur_doc_content.Parent.getObjectType()===AscDFH.historyitem_type_Shape)return bRetShape?cur_doc_content.Parent:true;return bRetShape?null:false};ParaDrawing.prototype.checkShapeChildAndGetTopParagraph=function(paragraph){var parent_paragraph=!paragraph?this.Get_ParentParagraph():paragraph;var parent_doc_content=parent_paragraph.Parent;if(parent_doc_content.Parent instanceof AscFormat.CShape)if(!parent_doc_content.Parent.group)return parent_doc_content.Parent.parent.Get_ParentParagraph();
|
|
|
|
function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.isGroup==="function")return this.GraphicObj.isGroup();return false};ParaDrawing.prototype.isShapeChild=function(bRetShape){if(!this.Is_Inline()||!this.DocumentContent)return bRetShape?null:false;var cur_doc_content=this.DocumentContent;var oCell;while(oCell=cur_doc_content.IsTableCellContent(true))cur_doc_content=oCell.Row.Table.Parent;if(AscCommon.isRealObject(cur_doc_content.Parent)&&typeof cur_doc_content.Parent.getObjectType===
|
|
|
|
|
|
|
|
"function"&&cur_doc_content.Parent.getObjectType()===AscDFH.historyitem_type_Shape)return bRetShape?cur_doc_content.Parent:true;return bRetShape?null:false};ParaDrawing.prototype.checkShapeChildAndGetTopParagraph=function(paragraph){var parent_paragraph=!paragraph?this.Get_ParentParagraph():paragraph;var parent_doc_content=parent_paragraph.Parent;if(parent_doc_content.Parent instanceof AscFormat.CShape)if(!parent_doc_content.Parent.group)return parent_doc_content.Parent.parent.Get_ParentParagraph();
|
|
|
|
else{var top_group=parent_doc_content.Parent.group;while(top_group.group)top_group=top_group.group;return top_group.parent.Get_ParentParagraph()}else if(parent_doc_content.IsTableCellContent()){var top_doc_content=parent_doc_content;var oCell;while(oCell=top_doc_content.IsTableCellContent(true))top_doc_content=oCell.Row.Table.Parent;if(top_doc_content.Parent instanceof AscFormat.CShape)if(!top_doc_content.Parent.group)return top_doc_content.Parent.parent.Get_ParentParagraph();else{var top_group=top_doc_content.Parent.group;
|
|
|
|
else{var top_group=parent_doc_content.Parent.group;while(top_group.group)top_group=top_group.group;return top_group.parent.Get_ParentParagraph()}else if(parent_doc_content.IsTableCellContent()){var top_doc_content=parent_doc_content;var oCell;while(oCell=top_doc_content.IsTableCellContent(true))top_doc_content=oCell.Row.Table.Parent;if(top_doc_content.Parent instanceof AscFormat.CShape)if(!top_doc_content.Parent.group)return top_doc_content.Parent.parent.Get_ParentParagraph();else{var top_group=top_doc_content.Parent.group;
|
|
|
|
while(top_group.group)top_group=top_group.group;return top_group.parent.Get_ParentParagraph()}else return parent_paragraph}return parent_paragraph};ParaDrawing.prototype.hit=function(x,y){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.hit==="function")return this.GraphicObj.hit(x,y);return false};ParaDrawing.prototype.hitToTextRect=function(x,y){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.hitToTextRect==="function")return this.GraphicObj.hitToTextRect(x,
|
|
|
|
while(top_group.group)top_group=top_group.group;return top_group.parent.Get_ParentParagraph()}else return parent_paragraph}return parent_paragraph};ParaDrawing.prototype.hit=function(x,y){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.hit==="function")return this.GraphicObj.hit(x,y);return false};ParaDrawing.prototype.hitToTextRect=function(x,y){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.hitToTextRect==="function")return this.GraphicObj.hitToTextRect(x,
|
|
|
|
y);return false};ParaDrawing.prototype.cursorGetPos=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.cursorGetPos==="function")return this.GraphicObj.cursorGetPos();return{X:0,Y:0}};ParaDrawing.prototype.getResizeCoefficients=function(handleNum,x,y){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.getResizeCoefficients==="function")return this.GraphicObj.getResizeCoefficients(handleNum,x,y);return{kd1:1,kd2:1}};ParaDrawing.prototype.getParagraphParaPr=
|
|
|
|
y);return false};ParaDrawing.prototype.cursorGetPos=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.cursorGetPos==="function")return this.GraphicObj.cursorGetPos();return{X:0,Y:0}};ParaDrawing.prototype.getResizeCoefficients=function(handleNum,x,y){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.getResizeCoefficients==="function")return this.GraphicObj.getResizeCoefficients(handleNum,x,y);return{kd1:1,kd2:1}};ParaDrawing.prototype.getParagraphParaPr=
|
|
|
|