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,22 +1412,28 @@ ...@@ -1400,22 +1412,28 @@
//****binary**** //****binary****
if(copyPasteUseBinary) if(copyPasteUseBinary)
{ {
//find class xsl if(onlyFromLocalStorage)
var base64 = null; {
var classNode; base64 = t.lStorage
if(node.children[0] && node.children[0].getAttribute("class") != null && node.children[0].getAttribute("class").indexOf("xslData;") > -1) }
classNode = node.children[0].getAttribute("class"); else//find class xsl
else if(node.children[0] && node.children[0].children[0] && node.children[0].children[0].getAttribute("class") != null && node.children[0].children[0].getAttribute("class").indexOf("xslData;") > -1) {
classNode = node.children[0].children[0].getAttribute("class"); var base64 = null;
else if(node.children[0] && node.children[0].children[0] && node.children[0].children[0].children[0] && node.children[0].children[0].children[0].getAttribute("class") != null && node.children[0].children[0].children[0].getAttribute("class").indexOf("xslData;") > -1) var classNode;
classNode = node.children[0].children[0].children[0].getAttribute("class"); if(node.children[0] && node.children[0].getAttribute("class") != null && node.children[0].getAttribute("class").indexOf("xslData;") > -1)
classNode = node.children[0].getAttribute("class");
if( classNode != null ){ else if(node.children[0] && node.children[0].children[0] && node.children[0].children[0].getAttribute("class") != null && node.children[0].children[0].getAttribute("class").indexOf("xslData;") > -1)
cL = classNode.split(" "); classNode = node.children[0].children[0].getAttribute("class");
for (var i = 0; i < cL.length; i++){ else if(node.children[0] && node.children[0].children[0] && node.children[0].children[0].children[0] && node.children[0].children[0].children[0].getAttribute("class") != null && node.children[0].children[0].children[0].getAttribute("class").indexOf("xslData;") > -1)
if(cL[i].indexOf("xslData;") > -1) classNode = node.children[0].children[0].children[0].getAttribute("class");
{
base64 = cL[i].split('xslData;')[1]; if( classNode != null ){
cL = classNode.split(" ");
for (var i = 0; i < cL.length; i++){
if(cL[i].indexOf("xslData;") > -1)
{
base64 = cL[i].split('xslData;')[1];
}
} }
} }
} }
...@@ -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