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

правки для копрования/вставки шейпов, вставки с помощью кнопок на тулбаре(через бинарник)

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@52303 954022d7-b5bf-4e40-9824-e11837661b57
parent a6a29e40
...@@ -283,6 +283,8 @@ ...@@ -283,6 +283,8 @@
} }
if(this.element.children[0]) if(this.element.children[0])
$(this.element.children[0]).addClass("xslData;" + sBase64); $(this.element.children[0]).addClass("xslData;" + sBase64);
//for buttons copy/paste
this.lStorage = sBase64;
} }
...@@ -345,6 +347,16 @@ ...@@ -345,6 +347,16 @@
t.copyText = t._getTextFromTable(table); t.copyText = t._getTextFromTable(table);
return true; return true;
} }
else if(copyPasteUseBinary)
{
var t = this;
var table = t._makeTableNode(range, worksheet, isCut);
t.copyText = t._getTextFromTable(table);
var oBinaryFileWriter = new BinaryFileWriter(worksheet.model.workbook, worksheet.activeRange);
var sBase64 = oBinaryFileWriter.Write();
t.lStorage = sBase64;
return true;
}
return false; return false;
}, },
...@@ -385,7 +397,7 @@ ...@@ -385,7 +397,7 @@
t._editorPasteExec(worksheet,pastebin) t._editorPasteExec(worksheet,pastebin)
return true; return true;
} }
else if(activateLocalStorage) else if(activateLocalStorage || copyPasteUseBinary)
{ {
var t = this; var t = this;
var onlyFromLocalStorage = true; var onlyFromLocalStorage = true;
...@@ -1400,7 +1412,12 @@ ...@@ -1400,7 +1412,12 @@
//****binary**** //****binary****
if(copyPasteUseBinary) if(copyPasteUseBinary)
{ {
//find class xsl if(onlyFromLocalStorage)
{
base64 = t.lStorage
}
else//find class xsl
{
var base64 = null; var base64 = null;
var classNode; var classNode;
if(node.children[0] && node.children[0].getAttribute("class") != null && node.children[0].getAttribute("class").indexOf("xslData;") > -1) if(node.children[0] && node.children[0].getAttribute("class") != null && node.children[0].getAttribute("class").indexOf("xslData;") > -1)
...@@ -1419,6 +1436,7 @@ ...@@ -1419,6 +1436,7 @@
} }
} }
} }
}
if(base64 != null) if(base64 != null)
{ {
var oBinaryFileReader = new BinaryFileReader(null, true); var oBinaryFileReader = new BinaryFileReader(null, true);
...@@ -2844,6 +2862,8 @@ ...@@ -2844,6 +2862,8 @@
}; };
for(var i = 0; i < data.Drawings.length; i++) for(var i = 0; i < data.Drawings.length; i++)
{ {
if(i == 0)
window["Asc"]["editor"].isStartAddShape = true;
drawingObject = data.Drawings[i]; drawingObject = data.Drawings[i];
// Object types // Object types
if (drawingObject.graphicObject instanceof CChartAsGroup) { if (drawingObject.graphicObject instanceof CChartAsGroup) {
...@@ -2888,6 +2908,7 @@ ...@@ -2888,6 +2908,7 @@
drawingObject.graphicObject.recalculate(); drawingObject.graphicObject.recalculate();
drawingObject.graphicObject.addToDrawingObjects(); drawingObject.graphicObject.addToDrawingObjects();
drawingObject.graphicObject.select(ws.objectRender.controller);
} }
}; };
History.EndTransaction(); History.EndTransaction();
......
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