Fix lock issues in ooslide and oodoc

pull/1/head
yflory 4 years ago
parent 9b7b67c490
commit ecb674c42a

@ -1028,7 +1028,7 @@ define([
var myId = getId();
content.locks[myId] = content.locks[myId] || {};
var b = obj.block && obj.block[0];
if (type === "sheet") {
if (type === "sheet" || typeof(b) !== "string") {
var uid = Util.uid();
content.locks[myId][uid] = msg;
} else {
@ -1342,21 +1342,7 @@ define([
'#fm-btn-info { display: none !important; }' + // Author name, doc title, etc. in "File" (menu entry)
'#panel-info { display: none !important; }' + // Same but content
'#image-button-from-url { display: none !important; }' + // Inline image settings: replace with url
'#asc-gen257 { display: none !important; }' + // Insert image from url
'#asc-gen1839 { display: none !important; }' + // Image context menu: replace with url
'#asc-gen5883 { display: none !important; }' + // Rightside image menu: replace with url
'#asc-gen1211 { display: none !important; }' + // Slide Image context menu: replace with url
'#asc-gen3880 { display: none !important; }' + // Rightside slide image menu: replace with url
'#asc-gen2218 { display: none !important; }' + // Rightside slide menu: fill slide with image url
'#asc-gen849 { display: none !important; }' + // Toolbar slide: insert image from url
'#asc-gen857 { display: none !important; }' + // Toolbar slide: insert image from url (insert tab)
'#asc-gen180 { display: none !important; }' + // Doc Insert image from url
'#asc-gen1760 { display: none !important; }' + // Doc Image context menu: replace with url
'#asc-gen3319 { display: none !important; }' + // Doc Rightside image menu: replace with url
'.cp-from-url, #textart-button-from-url { display: none !important; }' + // Spellcheck language
'.statusbar .cnt-lang { display: none !important; }' + // Spellcheck language
'.statusbar #btn-doc-spell { display: none !important; }' + // Spellcheck button
'#file-menu-panel .devider { display: none !important; }' + // separator in the "File" menu

@ -11578,7 +11578,7 @@ this.getTargetDocContent(undefined,true);if(oTargetDocContent){oState.Pos=oTarge
this.clearTrackObjects();this.resetSelection(undefined,undefined,true);this.changeCurrentState(new AscFormat.NullState(this));return this.loadDocumentStateAfterLoadChanges(oState)},loadDocumentStateAfterLoadChanges:DrawingObjectsController.prototype.loadDocumentStateAfterLoadChanges,checkTrackDrawings:DrawingObjectsController.prototype.checkTrackDrawings,canChangeWrapPolygon:function(){return!this.selection.groupSelection&&!this.selection.textSelection&&!this.selection.chartSelection&&this.selectedObjects.length===
1&&this.selectedObjects[0].canChangeWrapPolygon&&this.selectedObjects[0].canChangeWrapPolygon()&&!this.selectedObjects[0].parent.Is_Inline()},startChangeWrapPolygon:function(){if(this.canChangeWrapPolygon()){var bNeedBehindDoc=this.getCompatibilityMode()<AscCommon.document_compatibility_mode_Word15;if(this.selectedObjects[0].parent.wrappingType!==WRAPPING_TYPE_THROUGH||this.selectedObjects[0].parent.wrappingType!==WRAPPING_TYPE_TIGHT||this.selectedObjects[0].parent.behindDoc!==bNeedBehindDoc)if(false===
this.document.Document_Is_SelectionLocked(changestype_Drawing_Props,{Type:AscCommon.changestype_2_Element_and_Type,Element:this.selectedObjects[0].parent.Get_ParentParagraph(),CheckType:AscCommon.changestype_Paragraph_Content})){this.document.StartAction(AscDFH.historydescription_Document_GrObjectsChangeWrapPolygon);this.selectedObjects[0].parent.Set_WrappingType(WRAPPING_TYPE_TIGHT);this.selectedObjects[0].parent.Set_BehindDoc(bNeedBehindDoc);this.selectedObjects[0].parent.Check_WrapPolygon();this.document.Recalculate();
this.document.UpdateInterface();this.document.FinalizeAction()}this.resetInternalSelection();this.selection.wrapPolygonSelection=this.selectedObjects[0];this.updateOverlay()}},removeById:function(pageIndex,id){var object=g_oTableId.Get_ById(id);if(isRealObject(object)){var hdr_ftr=object.DocumentContent.IsHdrFtr(true);var page=!hdr_ftr?this.graphicPages[pageIndex]:null;if(isRealObject(page))page.delObjectById(id)}},Remove_ById:function(id){for(var i=0;i<this.graphicPages.length;++i)this.removeById(i,
this.document.UpdateInterface();this.document.FinalizeAction()}this.resetInternalSelection();this.selection.wrapPolygonSelection=this.selectedObjects[0];this.updateOverlay()}},removeById:function(pageIndex,id){var object=g_oTableId.Get_ById(id);if(isRealObject(object)){var hdr_ftr=object.DocumentContent&&object.DocumentContent.IsHdrFtr(true);var page=!hdr_ftr?this.graphicPages[pageIndex]:null;if(isRealObject(page))page.delObjectById(id)}},Remove_ById:function(id){for(var i=0;i<this.graphicPages.length;++i)this.removeById(i,
id)},selectById:function(id,pageIndex){this.resetSelection();var obj=g_oTableId.Get_ById(id),nPageIndex=pageIndex;if(obj&&obj.GraphicObj){if(obj.DocumentContent&&obj.DocumentContent.IsHdrFtr()){if(obj.DocumentContent.Get_StartPage_Absolute()!==obj.PageNum)nPageIndex=obj.PageNum}else if(AscFormat.isRealNumber(obj.PageNum))nPageIndex=obj.PageNum;obj.GraphicObj.select(this,nPageIndex)}},calculateAfterChangeTheme:function(){for(var i=0;i<this.drawingObjects.length;++i)this.drawingObjects[i].calculateAfterChangeTheme();
editor.SyncLoadImages(this.urlMap);this.urlMap=[]},updateSelectionState:function(){return},drawSelectionPage:function(pageIndex){var oMatrix=null;if(this.selection.textSelection){if(this.selection.textSelection.selectStartPage===pageIndex){if(this.selection.textSelection.transformText)oMatrix=this.selection.textSelection.transformText.CreateDublicate();this.drawingDocument.UpdateTargetTransform(oMatrix);this.selection.textSelection.getDocContent().DrawSelectionOnPage(0)}}else if(this.selection.groupSelection){if(this.selection.groupSelection.selectStartPage===
pageIndex)this.selection.groupSelection.drawSelectionPage(0)}else if(this.selection.chartSelection&&this.selection.chartSelection.selectStartPage===pageIndex&&this.selection.chartSelection.selection.textSelection){if(this.selection.chartSelection.selection.textSelection.transformText)oMatrix=this.selection.chartSelection.selection.textSelection.transformText.CreateDublicate();this.drawingDocument.UpdateTargetTransform(oMatrix);this.selection.chartSelection.selection.textSelection.getDocContent().DrawSelectionOnPage(0)}},

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save