Commit ad7e60ab authored by Igor.Zotov's avatar Igor.Zotov Committed by Alexander.Trofimov

+ к rev. 56412

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@56416 954022d7-b5bf-4e40-9824-e11837661b57
parent 56dd035f
...@@ -1479,7 +1479,7 @@ ...@@ -1479,7 +1479,7 @@
return newArr; return newArr;
}, },
_pasteFromBinary: function(worksheet, node, onlyFromLocalStorage) _pasteFromBinary: function(worksheet, node, onlyFromLocalStorage, isIntoShape)
{ {
var base64 = null, base64FromWord = null, t = this; var base64 = null, base64FromWord = null, t = this;
...@@ -1540,7 +1540,7 @@ ...@@ -1540,7 +1540,7 @@
if (pasteData) { if (pasteData) {
History.TurnOn(); History.TurnOn();
if(pasteData.Drawings && pasteData.Drawings.length) if(pasteData.Drawings && pasteData.Drawings.length)
t._insertImagesFromBinary(worksheet, pasteData); t._insertImagesFromBinary(worksheet, pasteData, isIntoShape);
else { else {
var newFonts = {}; var newFonts = {};
pasteData.generateFontMap(newFonts); pasteData.generateFontMap(newFonts);
...@@ -1709,7 +1709,7 @@ ...@@ -1709,7 +1709,7 @@
//****binary**** //****binary****
if(copyPasteUseBinary) if(copyPasteUseBinary)
{ {
binaryResult = this._pasteFromBinary(worksheet, node, onlyFromLocalStorage); binaryResult = this._pasteFromBinary(worksheet, node, onlyFromLocalStorage, isIntoShape);
if(binaryResult === true) if(binaryResult === true)
return; return;
...@@ -3087,10 +3087,10 @@ ...@@ -3087,10 +3087,10 @@
return true; return true;
}, },
_insertImagesFromBinary: function(ws, data) _insertImagesFromBinary: function(ws, data, isIntoShape)
{ {
var activeRange = ws.activeRange; var activeRange = ws.activeRange;
var curCol, drawingObject, curRow, startCol, startRow, xfrm, aImagesSync = []; var curCol, drawingObject, curRow, startCol, startRow, xfrm, aImagesSync = [], activeRow, activeCol;
History.Create_NewPoint(); History.Create_NewPoint();
History.StartTransaction(); History.StartTransaction();
...@@ -3148,9 +3148,17 @@ ...@@ -3148,9 +3148,17 @@
CheckSpPrXfrm(drawingObject.graphicObject); CheckSpPrXfrm(drawingObject.graphicObject);
xfrm = drawingObject.graphicObject.spPr.xfrm; xfrm = drawingObject.graphicObject.spPr.xfrm;
curCol = xfrm.offX - startCol + ws.objectRender.convertMetric(ws.cols[activeRange.c1].left - ws.getCellLeft(0, 1), 1, 3); activeRow = activeRange.r1;
curRow = xfrm.offY - startRow + ws.objectRender.convertMetric(ws.rows[activeRange.r1].top - ws.getCellTop(0, 1), 1, 3); activeCol = activeRange.c1;
if(isIntoShape && isIntoShape.Parent && isIntoShape.Parent.parent && isIntoShape.Parent.parent.drawingBase && isIntoShape.Parent.parent.drawingBase.from)
{
activeRow = isIntoShape.Parent.parent.drawingBase.from.row;
activeCol = isIntoShape.Parent.parent.drawingBase.from.col;
};
curCol = xfrm.offX - startCol + ws.objectRender.convertMetric(ws.cols[activeCol].left - ws.getCellLeft(0, 1), 1, 3);
curRow = xfrm.offY - startRow + ws.objectRender.convertMetric(ws.rows[activeRow].top - ws.getCellTop(0, 1), 1, 3);
xfrm.setOffX(curCol); xfrm.setOffX(curCol);
xfrm.setOffY(curRow); xfrm.setOffY(curRow);
......
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