Commit 080b8200 authored by Igor.Zotov's avatar Igor.Zotov

в случае вставки картинок(только картинок) не лочим ячейки

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@53996 954022d7-b5bf-4e40-9824-e11837661b57
parent b8ad2316
...@@ -1728,6 +1728,7 @@ ...@@ -1728,6 +1728,7 @@
mainChildrens = pasteFragment.children; mainChildrens = pasteFragment.children;
} }
var onlyImages = null;
var addImages = null; var addImages = null;
var imCount = 0; var imCount = 0;
//пробегаемся по html //пробегаемся по html
...@@ -1761,6 +1762,8 @@ ...@@ -1761,6 +1762,8 @@
c = range.c2; c = range.c2;
cellCountAll[s] = 1; cellCountAll[s] = 1;
s++; s++;
onlyImages = false;
} }
else if(tag.nodeName.toLowerCase() == '#text') else if(tag.nodeName.toLowerCase() == '#text')
{ {
...@@ -1784,6 +1787,8 @@ ...@@ -1784,6 +1787,8 @@
c = range.c2; c = range.c2;
cellCountAll[s] = 1; cellCountAll[s] = 1;
s++; s++;
onlyImages = false;
} }
else if(tag.nodeName.toLowerCase() == 'span' || tag.nodeName.toLowerCase() == 'a' || tag.nodeName.toLowerCase() == 'form') else if(tag.nodeName.toLowerCase() == 'span' || tag.nodeName.toLowerCase() == 'a' || tag.nodeName.toLowerCase() == 'form')
...@@ -1792,6 +1797,8 @@ ...@@ -1792,6 +1797,8 @@
cellCountAll[s] = 1; cellCountAll[s] = 1;
c = range.c2; c = range.c2;
s++; s++;
onlyImages = false;
} }
else if(tag.nodeName.toLowerCase() == 'table') else if(tag.nodeName.toLowerCase() == 'table')
{ {
...@@ -1945,6 +1952,7 @@ ...@@ -1945,6 +1952,7 @@
tableRowCount += tableBody.children.length -1; tableRowCount += tableBody.children.length -1;
break; break;
//} //}
onlyImages = false;
} }
else if(tag.nodeName.toLowerCase() == 'img') else if(tag.nodeName.toLowerCase() == 'img')
...@@ -1962,6 +1970,9 @@ ...@@ -1962,6 +1970,9 @@
}; };
imCount++; imCount++;
c = range.c2; c = range.c2;
if(onlyImages !== false)
onlyImages = true;
} }
else else
{ {
...@@ -1994,6 +2005,8 @@ ...@@ -1994,6 +2005,8 @@
c = range.c2; c = range.c2;
cellCountAll[s] = 1; cellCountAll[s] = 1;
s++; s++;
onlyImages = false;
} }
} }
} }
...@@ -2006,6 +2019,8 @@ ...@@ -2006,6 +2019,8 @@
if(!api || (api && !api.isChartEditor)) if(!api || (api && !api.isChartEditor))
aResult.addImages = addImages; aResult.addImages = addImages;
aResult.fontsNew = t.fontsNew; aResult.fontsNew = t.fontsNew;
aResult.onlyImages = onlyImages;
worksheet.setSelectionInfo('paste',aResult,t); worksheet.setSelectionInfo('paste',aResult,t);
window.GlobalPasteFlagCounter = 0; window.GlobalPasteFlagCounter = 0;
window.GlobalPasteFlag = false; window.GlobalPasteFlag = false;
......
...@@ -7480,7 +7480,10 @@ ...@@ -7480,7 +7480,10 @@
else else
checkRange = t._setInfoAfterPaste(val, onlyActive, true); checkRange = t._setInfoAfterPaste(val, onlyActive, true);
} }
this._isLockedCells (checkRange, /*subType*/null, onSelectionCallback); if("paste" === prop && val.onlyImages === true)
onSelectionCallback();
else
this._isLockedCells (checkRange, /*subType*/null, onSelectionCallback);
}; };
WorksheetView.prototype._pasteFromLocalBuff = function (isLargeRange, isLocal, val, bIsUpdate, canChangeColWidth, onlyActive) { WorksheetView.prototype._pasteFromLocalBuff = function (isLargeRange, isLocal, val, bIsUpdate, canChangeColWidth, onlyActive) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment