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

правки для copy/paste

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@59968 954022d7-b5bf-4e40-9824-e11837661b57
parent 3a0b78f8
...@@ -1531,9 +1531,13 @@ CopyProcessor.prototype = ...@@ -1531,9 +1531,13 @@ CopyProcessor.prototype =
{ {
//DocContent/ Drawings/ SlideObjects //DocContent/ Drawings/ SlideObjects
var presentation = this.oDocument; var presentation = this.oDocument;
if(elementsContent.DocContent || (elementsContent.Drawings && elementsContent.Drawings.length) || (elementsContent.SlideObjects && elementsContent.SlideObjects.length))
{
this.oPresentationWriter.WriteString2(editor.DocumentUrl); this.oPresentationWriter.WriteString2(editor.DocumentUrl);
this.oPresentationWriter.WriteDouble(presentation.Width); this.oPresentationWriter.WriteDouble(presentation.Width);
this.oPresentationWriter.WriteDouble(presentation.Height); this.oPresentationWriter.WriteDouble(presentation.Height);
}
if(elementsContent.DocContent)//пишем контент if(elementsContent.DocContent)//пишем контент
{ {
...@@ -1586,7 +1590,7 @@ CopyProcessor.prototype = ...@@ -1586,7 +1590,7 @@ CopyProcessor.prototype =
for(var i = 0; i < elements.length; ++i) for(var i = 0; i < elements.length; ++i)
{ {
if(!(elements[i] instanceof CGraphicFrame)) if(!(elements[i].Drawing instanceof CGraphicFrame))
{ {
this.oPresentationWriter.WriteBool(true); this.oPresentationWriter.WriteBool(true);
...@@ -1595,16 +1599,22 @@ CopyProcessor.prototype = ...@@ -1595,16 +1599,22 @@ CopyProcessor.prototype =
this.oPresentationWriter.WriteDouble(elements[i].Y); this.oPresentationWriter.WriteDouble(elements[i].Y);
this.oPresentationWriter.WriteDouble(elements[i].ExtX); this.oPresentationWriter.WriteDouble(elements[i].ExtX);
this.oPresentationWriter.WriteDouble(elements[i].ExtY); this.oPresentationWriter.WriteDouble(elements[i].ExtY);
this.oPresentationWriter.WriteString2(elements[i].ImageUrl);
} }
else else
{ {
this.oPresentationWriter.WriteBool(false);
this.CopyPresentationTableFull(this.ElemToSelect, elements[i].Drawing); this.CopyPresentationTableFull(this.ElemToSelect, elements[i].Drawing);
this.oPresentationWriter.WriteDouble(elements[i].X);
this.oPresentationWriter.WriteDouble(elements[i].Y);
this.oPresentationWriter.WriteDouble(elements[i].ExtX);
this.oPresentationWriter.WriteDouble(elements[i].ExtY);
this.oPresentationWriter.WriteString2(elements[i].ImageUrl);
} }
} }
for(var i = 0; i < this.Para.childNodes.length; i++) //for(var i = 0; i < this.Para.childNodes.length; i++)
this.ElemToSelect.appendChild( this.Para.childNodes[i].cloneNode(true)); //this.ElemToSelect.appendChild( this.Para.childNodes[i].cloneNode(true));
} }
else if(elementsContent.SlideObjects && elementsContent.SlideObjects.length)//пишем слайды целиком else if(elementsContent.SlideObjects && elementsContent.SlideObjects.length)//пишем слайды целиком
{ {
...@@ -1659,6 +1669,23 @@ CopyProcessor.prototype = ...@@ -1659,6 +1669,23 @@ CopyProcessor.prototype =
for(var i = 0; i < this.Para.childNodes.length; i++) for(var i = 0; i < this.Para.childNodes.length; i++)
this.ElemToSelect.appendChild( this.Para.childNodes[i].cloneNode(true) ); this.ElemToSelect.appendChild( this.Para.childNodes[i].cloneNode(true) );
} }
else if(elementsContent && elementsContent.Content && elementsContent.Content.length)//пишем таблицу в html
{
for ( var Index = 0; Index < elementsContent.Content.length; Index++ )
{
var Item = elementsContent.Content[Index];
if( type_Table === Item.GetType() )
{
this.CopyTable(oDomTarget, Item, null);
}
else if ( type_Paragraph === Item.GetType() )
{
this.CopyParagraph(oDomTarget, Item, true, false);
}
}
}
} }
if(!this.onlyBinaryCopy) if(!this.onlyBinaryCopy)
...@@ -1984,8 +2011,7 @@ CopyProcessor.prototype = ...@@ -1984,8 +2011,7 @@ CopyProcessor.prototype =
var oRowElems = {}; var oRowElems = {};
var Item = graphicFrame.graphicObject; var Item = graphicFrame.graphicObject;
this.CopyTable(oDomTarget, Item, null); /*var b_style_index = false;
var b_style_index = false;
if(isRealNumber(graphicFrame.graphicObject.styleIndex) && graphicFrame.graphicObject.styleIndex > -1) if(isRealNumber(graphicFrame.graphicObject.styleIndex) && graphicFrame.graphicObject.styleIndex > -1)
{ {
b_style_index = true; b_style_index = true;
...@@ -1996,12 +2022,17 @@ CopyProcessor.prototype = ...@@ -1996,12 +2022,17 @@ CopyProcessor.prototype =
{ {
this.oPresentationWriter.WriteULong(graphicFrame.graphicObject.styleIndex); this.oPresentationWriter.WriteULong(graphicFrame.graphicObject.styleIndex);
} }
var old_style_index = graphicFrame.graphicObject.styleIndex; var old_style_index = graphicFrame.graphicObject.styleIndex;*/
//graphicFrame.graphicObject.styleIndex = -1;
graphicFrame.graphicObject.styleIndex = -1; this.oPresentationWriter.WriteBool(true);
this.oPresentationWriter.WriteTable(graphicFrame); this.oPresentationWriter.WriteTable(graphicFrame);
graphicFrame.graphicObject.styleIndex = old_style_index;
this.oBinaryFileWriter.copyParams.itemCount = 0; //graphicFrame.graphicObject.styleIndex = old_style_index;
//this.oBinaryFileWriter.copyParams.itemCount = 0;
this.CopyTable(oDomTarget, Item, null);
}, },
CopyPresentationText : function(oDomTarget, oDocument, bUseSelection) CopyPresentationText : function(oDomTarget, oDocument, bUseSelection)
...@@ -2095,9 +2126,9 @@ CopyProcessor.prototype = ...@@ -2095,9 +2126,9 @@ CopyProcessor.prototype =
height = Math.round((_bounds_cheker.Bounds.max_y - _bounds_cheker.Bounds.min_y + 1) * g_dKoef_mm_to_pix); height = Math.round((_bounds_cheker.Bounds.max_y - _bounds_cheker.Bounds.min_y + 1) * g_dKoef_mm_to_pix);
if (this.api.DocumentReaderMode) if (this.api.DocumentReaderMode)
this.Para.innerHTML += "<img style=\"max-width:100%;\" width=\""+ width +"\" height=\""+ height +"\" src=\""+sSrc+"\" />"; oDomTarget.innerHTML += "<img style=\"max-width:100%;\" width=\""+ width +"\" height=\""+ height +"\" src=\""+sSrc+"\" />";
else else
this.Para.innerHTML += "<img width=\""+ width +"\" height=\""+ height +"\" src=\""+sSrc+"\" />"; oDomTarget.innerHTML += "<img width=\""+ width +"\" height=\""+ height +"\" src=\""+sSrc+"\" />";
if(oGraphicObj instanceof CShape) if(oGraphicObj instanceof CShape)
{ {
...@@ -3810,8 +3841,27 @@ PasteProcessor.prototype = ...@@ -3810,8 +3841,27 @@ PasteProcessor.prototype =
} }
else if(type_Table == element.GetType())//table else if(type_Table == element.GetType())//table
{ {
selectedElement.Element = ConvertParagraphToPPTX(element); //TODO переделать количество строк и ширину
elements.push(selectedElement); var W = 100;
var Rows = 3;
var graphic_frame = new CGraphicFrame();
graphic_frame.setSpPr(new CSpPr());
graphic_frame.spPr.setParent(graphic_frame);
graphic_frame.spPr.setXfrm(new CXfrm());
graphic_frame.spPr.xfrm.setParent(graphic_frame.spPr);
graphic_frame.spPr.xfrm.setOffX((this.oDocument.Width - W)/2);
graphic_frame.spPr.xfrm.setOffY(this.oDocument.Height/5);
graphic_frame.spPr.xfrm.setExtX(W);
graphic_frame.spPr.xfrm.setExtY(7.478268771701388 * Rows);
graphic_frame.setNvSpPr(new UniNvPr());
element = this._convertTableToPPTX(element);
graphic_frame.graphicObject = element;
drawingCopyObject = new DrawingCopyObject();
drawingCopyObject.Drawing = graphic_frame;
pDrawings.push(drawingCopyObject);
} }
} }
...@@ -3912,7 +3962,7 @@ PasteProcessor.prototype = ...@@ -3912,7 +3962,7 @@ PasteProcessor.prototype =
var aContentExcel = this._readFromBinaryExcel(base64FromExcel); var aContentExcel = this._readFromBinaryExcel(base64FromExcel);
//если есть шейпы, то вставляем их из excel //если есть шейпы, то вставляем их из excel
if(aContentExcel && aContentExcel.aWorksheets && aContentExcel.aWorksheets[0] && aContentExcel.aWorksheets[0].Drawings) if(aContentExcel && aContentExcel.aWorksheets && aContentExcel.aWorksheets[0] && aContentExcel.aWorksheets[0].Drawings && aContentExcel.aWorksheets[0].Drawings.length)
{ {
var arr_shapes = aContentExcel.aWorksheets[0].Drawings; var arr_shapes = aContentExcel.aWorksheets[0].Drawings;
var arrImages = []; var arrImages = [];
...@@ -4066,18 +4116,31 @@ PasteProcessor.prototype = ...@@ -4066,18 +4116,31 @@ PasteProcessor.prototype =
arrShapes[i] = new DrawingCopyObject(shape, 0, 0, w, h); arrShapes[i] = new DrawingCopyObject(shape, 0, 0, w, h);
} }
for(var i = 0; i < arrTables.length; ++i)
{
shape = arrTables[i];
//var w = shape.txBody.getRectWidth(presentation.Width*2/3);
//var h = shape.txBody.content.Get_SummaryHeight();
CheckSpPrXfrm(shape);
shape.spPr.xfrm.setExtX(w);
shape.spPr.xfrm.setExtY(h);
shape.spPr.xfrm.setOffX(0);
shape.spPr.xfrm.setOffY(0);
arrShapes[i] = new DrawingCopyObject(shape, 0, 0, w, h);
}
var presentation = editor.WordControl.m_oLogicDocument; var presentation = editor.WordControl.m_oLogicDocument;
/*var font_map = {}; var font_map = {};
var images = []; var images = [];
if(shape.getAllFonts) /*if(shape.getAllFonts)
shape.getAllFonts(font_map); shape.getAllFonts(font_map);*/
if(shape.getAllImages) if(shape.getAllImages)
shape.getAllImages(images); shape.getAllImages(images);
var oImagesToDownload = {}; var oImagesToDownload = {};
if(objects && objects.arrImages.length > 0) if(objects && objects.arrImages.length > 0)
{ {
...@@ -4088,11 +4151,17 @@ PasteProcessor.prototype = ...@@ -4088,11 +4151,17 @@ PasteProcessor.prototype =
oImagesToDownload[src] = 1; oImagesToDownload[src] = 1;
} }
}*/ }
var aImagesToDownload = [];
for(var i in oImagesToDownload)
aImagesToDownload.push(i);
var slide = presentation.Slides[presentation.CurPage]; var slide = presentation.Slides[presentation.CurPage];
var targetDocContent = slide.graphicObjects.getTargetDocContent(); var targetDocContent = slide.graphicObjects.getTargetDocContent();
var paste_callback = function()
{
if(targetDocContent && arrShapes.length === 1 && arrImages.length === 0 && arrTables.length === 0) if(targetDocContent && arrShapes.length === 1 && arrImages.length === 0 && arrTables.length === 0)
{ {
if(presentation.Document_Is_SelectionLocked(changestype_Drawing_Props) === false) if(presentation.Document_Is_SelectionLocked(changestype_Drawing_Props) === false)
...@@ -4111,6 +4180,50 @@ PasteProcessor.prototype = ...@@ -4111,6 +4180,50 @@ PasteProcessor.prototype =
presentation.Recalculate(); presentation.Recalculate();
presentation.Document_UpdateInterfaceState(); presentation.Document_UpdateInterfaceState();
} }
}
var aContent = oThis.aContent;
if(aImagesToDownload.length > 0)
{
var rData = {"id":documentId, "c":"imgurls", "vkey": documentVKey, "data": JSON.stringify(aImagesToDownload)};
sendCommand( this.api, function(incomeObject){
if(incomeObject && "imgurls" == incomeObject.type)
{
var oFromTo = JSON.parse(incomeObject.data);
var arr_images =[];
var image_map = {};
for(var i = 0, length = aContent.images.length; i < length; ++i)
{
var sFrom = aContent.images[i];
var sTo = oFromTo[sFrom];
if(sTo)
arr_images.push(sTo);
}
for(var i = 0, length = aContent.images.length; i < length; ++i)
{
var imageElem = aContent.aPastedImages[i];
if(null != imageElem)
{
var sNewSrc = oFromTo[imageElem.Url];
if(null != sNewSrc)
{
image_map[sNewSrc] = sNewSrc;
imageElem.SetUrl(sNewSrc);
}
else
{
image_map[imageElem.Url] = imageElem.Url;
}
}
}
}
oThis.api.pre_Paste(fonts, image_map, paste_callback);
}, rData );
}
else
oThis.api.pre_Paste(aContent.fonts, aContent.images, paste_callback);
nodeDisplay.blur(); nodeDisplay.blur();
nodeDisplay.style.display = ELEMENT_DISPAY_STYLE; nodeDisplay.style.display = ELEMENT_DISPAY_STYLE;
...@@ -4121,7 +4234,7 @@ PasteProcessor.prototype = ...@@ -4121,7 +4234,7 @@ PasteProcessor.prototype =
_convertExcelBinary: function(aContentExcel, pDrawings) _convertExcelBinary: function(aContentExcel, pDrawings)
{ {
//пока только распознаём только графические объекты //пока только распознаём только графические объекты
var aContent = null; var aContent = null, tempParagraph = null;
var aPastedImages = []; var aPastedImages = [];
var imageUrl, images = []; var imageUrl, images = [];
...@@ -4133,12 +4246,27 @@ PasteProcessor.prototype = ...@@ -4133,12 +4246,27 @@ PasteProcessor.prototype =
//var wrappingType = this.oDocument.DrawingObjects.selection.groupSelection.parent.wrappingType; //var wrappingType = this.oDocument.DrawingObjects.selection.groupSelection.parent.wrappingType;
//var DrawingType = this.oDocument.DrawingObjects.selection.groupSelection.parent.DrawingType; //var DrawingType = this.oDocument.DrawingObjects.selection.groupSelection.parent.DrawingType;
var tempParagraph = new Paragraph(this.oDocument, this.oDocument, 0, 0, 0, 0, 0); aContent = [];
//из excel в word они вставляются в один параграф //из excel в word они вставляются в один параграф
for(var i = 0; i < drawings.length; i++) for(var i = 0; i < drawings.length; i++)
{ {
drawing = drawings[i] && drawings[i].Drawing ? drawings[i].Drawing : drawings[i]; drawing = drawings[i] && drawings[i].Drawing ? drawings[i].Drawing : drawings[i];
//TODO нужна отдельная обработка для таблиц из презентаций
if(typeof CTable !== "undefined" && drawing.graphicObject instanceof CTable)
{
drawing.graphicObject.Set_Parent(this.oDocument);
drawing.setBDeleted(true);
drawing.setWordFlag(false);
aContent[aContent.length] = drawing.graphicObject.Copy();
drawing.setWordFlag(true);
}
else
{
if(!tempParagraph)
tempParagraph = new Paragraph(this.oDocument.DrawingDocument, this.oDocument, 0, 0, 0, 0, 0);
graphicObj = drawing.graphicObject ? drawing.graphicObject.convertToWord(this.oLogicDocument) : drawing.convertToWord(this.oLogicDocument) ; graphicObj = drawing.graphicObject ? drawing.graphicObject.convertToWord(this.oLogicDocument) : drawing.convertToWord(this.oLogicDocument) ;
tempParaRun = new ParaRun(); tempParaRun = new ParaRun();
...@@ -4178,14 +4306,36 @@ PasteProcessor.prototype = ...@@ -4178,14 +4306,36 @@ PasteProcessor.prototype =
} }
} }
} }
}
aContent = []; if(tempParagraph)
aContent[0] = tempParagraph; aContent[aContent.length] = tempParagraph;
} }
return {content: aContent, aPastedImages: aPastedImages, images: images}; return {content: aContent, aPastedImages: aPastedImages, images: images};
}, },
_convertTableToPPTX: function(table)
{
//ковертим внутренние параграфы
table.bPresentation = true;
for(var i = 0; i < table.Content.length; i++)
{
for(var j = 0; j < table.Content[i].Content.length; j++)
{
var cDocumentContent = table.Content[i].Content[j].Content;
cDocumentContent.bPresentation = true;
for(var n = 0; n < cDocumentContent.Content.length; n++)
{
cDocumentContent.Content[n] = ConvertParagraphToPPTX(cDocumentContent.Content[n]);
}
}
}
return table;
},
_getImagesFromExcelShapes: function(pDrawings) _getImagesFromExcelShapes: function(pDrawings)
{ {
//пока только распознаём только графические объекты //пока только распознаём только графические объекты
...@@ -4338,6 +4488,7 @@ PasteProcessor.prototype = ...@@ -4338,6 +4488,7 @@ PasteProcessor.prototype =
var y = stream.GetULong()/100000; var y = stream.GetULong()/100000;
var extX = stream.GetULong()/100000; var extX = stream.GetULong()/100000;
var extY = stream.GetULong()/100000; var extY = stream.GetULong()/100000;
var base64 = stream.GetString2();
if(presentation.Slides) if(presentation.Slides)
arr_shapes[i] = new DrawingCopyObject(); arr_shapes[i] = new DrawingCopyObject();
...@@ -6790,11 +6941,13 @@ PasteProcessor.prototype = ...@@ -6790,11 +6941,13 @@ PasteProcessor.prototype =
var presentation = editor.WordControl.m_oLogicDocument; var presentation = editor.WordControl.m_oLogicDocument;
var graphicFrame = new CGraphicFrame(presentation.Slides[presentation.CurPage]); var graphicFrame = new CGraphicFrame(presentation.Slides[presentation.CurPage]);
var table = new CTable(presentation.DrawingDocument, graphicFrame, true, 0, 0, 0, X_Right_Field, Y_Bottom_Field, 0, 0, aGrid); var table = new CTable(presentation.DrawingDocument, graphicFrame, true, 0, 0, 0, X_Right_Field, Y_Bottom_Field, 0, 0, aGrid, true);
table.Set_TableStyle(0); table.Set_TableStyle(0);
var dd = editor.WordControl.m_oDrawingDocument; var dd = editor.WordControl.m_oDrawingDocument;
graphicFrame.setGraphicObject(table); graphicFrame.setGraphicObject(table);
arrTables.push(graphicFrame); arrTables.push(graphicFrame);
//TODO пересмотреть!!!
//graphicFrame.setXfrm(dd.GetMMPerDot(node["offsetLeft"]), dd.GetMMPerDot(node["offsetTop"]), dd.GetMMPerDot(node["offsetWidth"]), dd.GetMMPerDot(node["offsetHeight"]), null, null, null); //graphicFrame.setXfrm(dd.GetMMPerDot(node["offsetLeft"]), dd.GetMMPerDot(node["offsetTop"]), dd.GetMMPerDot(node["offsetWidth"]), dd.GetMMPerDot(node["offsetHeight"]), null, null, null);
//считаем aSumGrid //считаем aSumGrid
...@@ -6942,7 +7095,7 @@ PasteProcessor.prototype = ...@@ -6942,7 +7095,7 @@ PasteProcessor.prototype =
{ {
var oThis = this; var oThis = this;
var table = row.Table; var table = row.Table;
if(null != spacing && spacing >= tableSpacingMinValue) if(null != spacing /*&& spacing >= tableSpacingMinValue*/)
row.Set_CellSpacing(spacing); row.Set_CellSpacing(spacing);
if(node.style.height) if(node.style.height)
{ {
...@@ -7087,10 +7240,9 @@ PasteProcessor.prototype = ...@@ -7087,10 +7240,9 @@ PasteProcessor.prototype =
var arrShapes2 = [], arrImages2 = [], arrTables2 = []; var arrShapes2 = [], arrImages2 = [], arrTables2 = [];
var presentation = editor.WordControl.m_oLogicDocument; var presentation = editor.WordControl.m_oLogicDocument;
var shape = new CShape(presentation.Slides[presentation.CurPage]); var shape = new CShape();
var dd = presentation.DrawingDocument; shape.setParent(presentation.Slides[presentation.CurPage]);
shape.setTextBody(new CTextBody(shape)); shape.setTxBody(CreateTextBodyFromString("", presentation.DrawingDocument, shape));
shape.setXfrm(dd.GetMMPerDot(node["offsetLeft"]), dd.GetMMPerDot(node["offsetTop"]), dd.GetMMPerDot(node["offsetWidth"]), dd.GetMMPerDot(node["offsetHeight"]), null, null, null);
arrShapes2.push(shape); arrShapes2.push(shape);
this._ExecutePresentation(node, {}, true, true, false, arrShapes2, arrImages2, arrTables); this._ExecutePresentation(node, {}, true, true, false, arrShapes2, arrImages2, arrTables);
if(arrShapes2.length > 0) if(arrShapes2.length > 0)
......
...@@ -1814,18 +1814,21 @@ ...@@ -1814,18 +1814,21 @@
var count = stream.GetULong(); var count = stream.GetULong();
var arr_shapes = []; var arr_shapes = [];
var arr_transforms = []; var arr_transforms = [];
var arrBase64Img = [];
for(var i = 0; i < count; ++i) for(var i = 0; i < count; ++i)
{ {
//loader.TempMainObject = presentation.Slides[presentation.CurPage]; //loader.TempMainObject = presentation.Slides[presentation.CurPage];
var style_index = null; /*var style_index = null;
if(!loader.stream.GetBool()) if(!loader.stream.GetBool())
{ {
if(loader.stream.GetBool()) if(loader.stream.GetBool())
{ {
style_index = stream.GetULong(); style_index = stream.GetULong();
} }
} }*/
loader.stream.GetBool();
var drawing = loader.ReadGraphicObject(); var drawing = loader.ReadGraphicObject();
...@@ -1833,16 +1836,15 @@ ...@@ -1833,16 +1836,15 @@
var y = stream.GetULong()/100000; var y = stream.GetULong()/100000;
var extX = stream.GetULong()/100000; var extX = stream.GetULong()/100000;
var extY = stream.GetULong()/100000; var extY = stream.GetULong()/100000;
var base64 = stream.GetString2();
if(count !== 1 && typeof CGraphicFrame !== "undefined" && drawing instanceof CGraphicFrame)
{
drawing = DrawingObjectsController.prototype.createImage(base64, x, y, extX, extY);
}
arr_shapes[i] = worksheet.objectRender.createDrawingObject(); arr_shapes[i] = worksheet.objectRender.createDrawingObject();
arr_shapes[i].graphicObject = drawing; arr_shapes[i].graphicObject = drawing;
/*arr_shapes[i].Drawing = drawing;
arr_shapes[i].X = x;
arr_shapes[i].Y = y;
arr_shapes[i].ExtX = extX;
arr_shapes[i].ExtY = extY;*/
} }
return {arrShapes: arr_shapes, arrImages: loader.End_UseFullUrl(), arrTransforms: arr_transforms}; return {arrShapes: arr_shapes, arrImages: loader.End_UseFullUrl(), arrTransforms: arr_transforms};
...@@ -3276,6 +3278,29 @@ ...@@ -3276,6 +3278,29 @@
data.Drawings[i].graphicObject = data.Drawings[i].graphicObject.copy(); data.Drawings[i].graphicObject = data.Drawings[i].graphicObject.copy();
drawingObject = data.Drawings[i]; drawingObject = data.Drawings[i];
//отдельная обработка для вставки таблички из презентаций
if(data.Drawings.length === 1 && typeof CGraphicFrame !== "undefined" && drawingObject.graphicObject instanceof CGraphicFrame)
{
//вставляем табличку из презентаций
var pasteFromBinaryWord = new Asc.pasteFromBinaryWord(this, ws);
var newCDocument = new CDocument(oTempDrawingDocument);
newCDocument.bFromDocument = true;
newCDocument.theme = this.Api.wbModel.theme;
drawingObject.graphicObject.setBDeleted(true);
drawingObject.graphicObject.setWordFlag(false, newCDocument);
var oTempDrawingDocument = ws.model.DrawingDocument;
oTempDrawingDocument.m_oLogicDocument = newCDocument;
drawingObject.graphicObject.graphicObject.Set_Parent(newCDocument);
pasteFromBinaryWord._paste(ws, {DocumentContent: [drawingObject.graphicObject.graphicObject]});
return;
}
CheckSpPrXfrm(drawingObject.graphicObject); CheckSpPrXfrm(drawingObject.graphicObject);
xfrm = drawingObject.graphicObject.spPr.xfrm; xfrm = drawingObject.graphicObject.spPr.xfrm;
...@@ -3285,7 +3310,7 @@ ...@@ -3285,7 +3310,7 @@
{ {
activeRow = isIntoShape.Parent.parent.drawingBase.from.row; activeRow = isIntoShape.Parent.parent.drawingBase.from.row;
activeCol = isIntoShape.Parent.parent.drawingBase.from.col; activeCol = isIntoShape.Parent.parent.drawingBase.from.col;
}; }
curCol = xfrm.offX - startCol + ws.objectRender.convertMetric(ws.cols[activeCol].left - ws.getCellLeft(0, 1), 1, 3); 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); curRow = xfrm.offY - startRow + ws.objectRender.convertMetric(ws.rows[activeRow].top - ws.getCellTop(0, 1), 1, 3);
......
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