Commit 1494b482 authored by Sergey.Luzyanin's avatar Sergey.Luzyanin Committed by Alexander.Trofimov

копирование текста из заголовков диаграмм и вставка текста в заголовки диаграмм.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@52903 954022d7-b5bf-4e40-9824-e11837661b57
parent 594d4768
......@@ -1599,6 +1599,14 @@ CopyProcessor.prototype =
oDocument = text_object.textBoxContent;
break;
}
case STATES_ID_CHART_TITLE_TEXT:
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:
{
......@@ -1675,13 +1683,12 @@ CopyProcessor.prototype =
var sBase64 = this.oBinaryFileWriter.GetResult();
if(this.ElemToSelect.children && this.ElemToSelect.children.length == 1 && window.USER_AGENT_SAFARI_MACOS)
{
$(this.ElemToSelect.children[0]).css("font-weight", "normal");;
$(this.ElemToSelect.children[0]).css("font-weight", "normal");
$(this.ElemToSelect.children[0]).wrap(document.createElement("b"));
}
if(this.ElemToSelect.children[0])
$(this.ElemToSelect.children[0]).addClass("docData;" + sBase64);
}
return;
}
default :
......@@ -2808,6 +2815,14 @@ PasteProcessor.prototype =
oDocument = text_object.textBoxContent;
break;
}
case STATES_ID_CHART_TITLE_TEXT:
case STATES_ID_CHART_TITLE_TEXT_GROUP:
{
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;
}
}
}
......
......@@ -892,6 +892,30 @@ CTextBody.prototype =
}
},
getDocContentForCopyPaste: function()
{
var history_is_on = History.Is_On();
if(history_is_on)
History.TurnOff();
var ret = this.content.Copy(this);
ret.Styles = this.content.Styles;
ret.Recalculate_Page(0, true);
ret.CurPos = this.content.CurPos;
ret.Selection = this.content.Selection;
for(var i = 0; i < ret.Content.length; ++i)
{
var text_pr = ret.Content[i].Get_CompiledPr2().TextPr;
ret.Content[i].Style_Remove();
var start_pos = ret.Content[i].Internal_GetStartPos();
ret.Content[i].Internal_Content_Add(start_pos, new ParaTextPr(text_pr), true);
ret.Content[i].CurPos = this.content.Content[i].CurPos;
ret.Content[i].Selection = this.content.Content[i].Selection;
}
if(history_is_on)
History.TurnOn();
return ret;
},
copyFromOther: function(txBody)
{
if(isRealObject(this.parent) && this.parent.setBodyPr)
......
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