Commit 68a3e08a authored by Sergey.Luzyanin's avatar Sergey.Luzyanin Committed by Alexander.Trofimov

правки в wordcopypaste.js в связи с изменениями в дроуингах

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@55924 954022d7-b5bf-4e40-9824-e11837661b57
parent 6b2e1583
......@@ -1409,34 +1409,15 @@ CopyProcessor.prototype =
if(oDocument.CurPos.Type === docpostype_DrawingObjects)
{
switch(oDocument.DrawingObjects.curState.id)
var content = oDocument.DrawingObjects.getTargetDocContent();
if(content)
{
case STATES_ID_TEXT_ADD:
{
var text_object = oDocument.DrawingObjects.curState.textObject;
if(text_object != null && text_object.GraphicObj != null && text_object.GraphicObj.textBoxContent != null)
oDocument = text_object.GraphicObj.textBoxContent;
break;
}
case STATES_ID_TEXT_ADD_IN_GROUP:
{
text_object = oDocument.DrawingObjects.curState.textObject;
if(text_object != null && text_object.textBoxContent != null)
oDocument = text_object.textBoxContent;
break;
oDocument = content;
}
case STATES_ID_CHART_TITLE_TEXT:
case STATES_ID_CHART_TITLE_TEXT_GROUP:
else if(oDocument.DrawingObjects.selection.groupSelection)
{
var text_object = oDocument.DrawingObjects.curState.title;
if(text_object != null && text_object.txBody != null && text_object.txBody != null)
oDocument = text_object.txBody.getDocContentForCopyPaste();
break;
}
case STATES_ID_GROUP:
{
var s_arr = oDocument.DrawingObjects.curState.group.selectionInfo.selectionArray;
var s_arr = oDocument.DrawingObjects.selection.groupSelection.selectedObjects;
this.Para = document.createElement( "p" );
......@@ -1449,7 +1430,7 @@ CopyProcessor.prototype =
tempAr = [];
for(var k = 0; k < s_arr.length; k++)
{
tempAr[k] = s_arr[k].absOffsetY;
tempAr[k] = s_arr[k].y;
}
}
tempAr.sort(function(a,b){return a-b;})
......@@ -1459,7 +1440,7 @@ CopyProcessor.prototype =
var absOffsetY = tempAr[k];
for(var i = 0; i < s_arr.length; i++)
{
if(absOffsetY == s_arr[i].absOffsetY)
if(absOffsetY == s_arr[i].y)
{
newArr[k] = s_arr[i];
}
......@@ -1474,18 +1455,18 @@ CopyProcessor.prototype =
var cur_element = s_arr[i];
if(isRealObject(cur_element.parent))
{
var base64_img = cur_element.parent.getBase64Img();
var base64_img = cur_element.getBase64Img();
if(copyPasteUseBinery)
{
var wrappingType = cur_element.parent.wrappingType;
var DrawingType = cur_element.parent.DrawingType;
var wrappingType = oDocument.DrawingObjects.selection.groupSelection.parent.wrappingType;
var DrawingType = oDocument.DrawingObjects.selection.groupSelection.parent.DrawingType;
var tempParagraph = new Paragraph(oDocument, oDocument, 0, 0, 0, 0, 0);
var index = 0;
tempParagraph.Content.unshift(new ParaDrawing());
tempParagraph.Content[index].wrappingType = wrappingType;
tempParagraph.Content[index].DrawingType = DrawingType;
tempParagraph.Content[index].GraphicObj = cur_element
tempParagraph.Content[index].GraphicObj = cur_element;
tempParagraph.Selection.EndPos = index + 1;
tempParagraph.Selection.StartPos = index;
tempParagraph.Selection.Use = true;
......@@ -1513,19 +1494,18 @@ CopyProcessor.prototype =
if(this.ElemToSelect.children[0])
$(this.ElemToSelect.children[0]).addClass("docData;" + sBase64);
}
return;
}
default :
else
{
var gr_objects = oDocument.DrawingObjects;
var selection_array = gr_objects.selectionInfo.selectionArray;
var selection_array = gr_objects.selectedObjects;
this.Para = document.createElement( "span" );
var selectionTrue;
var selectIndex;
for(var i = 0; i < selection_array.length; ++i)
{
var cur_element = selection_array[i];
var cur_element = selection_array[i].parent;
var base64_img = cur_element.getBase64Img();
var src = this.getSrc(base64_img);
......@@ -1563,7 +1543,6 @@ CopyProcessor.prototype =
}
}
if(copyPasteUseBinery)
{
this.oBinaryFileWriter.CopyEnd();
......@@ -1578,8 +1557,6 @@ CopyProcessor.prototype =
}
return;
}
}
}
if ( true === oDocument.Selection.Use )
{
......@@ -2637,30 +2614,10 @@ PasteProcessor.prototype =
if(oDocument.CurPos.Type === docpostype_DrawingObjects)
{
switch(oDocument.DrawingObjects.curState.id)
{
case STATES_ID_TEXT_ADD:
{
var text_object = oDocument.DrawingObjects.curState.textObject;
if(text_object != null && text_object.GraphicObj != null && text_object.GraphicObj.textBoxContent != null)
oDocument = text_object.GraphicObj.textBoxContent;
break;
}
case STATES_ID_TEXT_ADD_IN_GROUP:
{
text_object = oDocument.DrawingObjects.curState.textObject;
if(text_object != null && text_object.textBoxContent != null)
oDocument = text_object.textBoxContent;
break;
}
case STATES_ID_CHART_TITLE_TEXT:
case STATES_ID_CHART_TITLE_TEXT_GROUP:
var content = oDocument.DrawingObjects.getTargetDocContent();
if(content)
{
text_object = oDocument.DrawingObjects.curState.title;
if(text_object != null && text_object.txBody != null && text_object.txBody.content != null)
oDocument = text_object.txBody.content;
break;
}
oDocument = content;
}
}
......
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