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