Commit 3782f393 authored by Sergey.Konovalov's avatar Sergey.Konovalov Committed by Alexander.Trofimov

проблемы при вставке текста в гиперссылку.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@55934 954022d7-b5bf-4e40-9824-e11837661b57
parent 18a3ddc3
...@@ -2722,19 +2722,49 @@ PasteProcessor.prototype = ...@@ -2722,19 +2722,49 @@ PasteProcessor.prototype =
{ {
//������� ������ � �������� //������� ������ � ��������
var oInsertPar = aNewContent[0]; var oInsertPar = aNewContent[0];
// Убираем метку конца параграфа у данного параграфа
var oTempPar = null; oInsertPar.Remove_ParaEnd();
if (true !== Item.Cursor_IsEnd()) { //Ищем в глубину run который нужно разбить
oTempPar = new Paragraph(oDoc.DrawingDocument, oDoc, 0, 50, 50, X_Right_Field, Y_Bottom_Field); var oCurContent = Item;
Item.Split(oTempPar); var nCurContentContentPos = oCurContent.CurPos.ContentPos;
} var oCurRunToSplit = oCurContent.Content[nCurContentContentPos];
Item.Concat(oInsertPar); while(null != oCurRunToSplit && para_Run != oCurRunToSplit.Type ){
Item.Cursor_MoveToEndPos(false, false); oCurContent = oCurRunToSplit;
if (null != oTempPar) if(null != oCurRunToSplit.CurPos && null != oCurRunToSplit.CurPos.ContentPos)
Item.Concat(oTempPar); nCurContentContentPos = oCurRunToSplit.CurPos.ContentPos;
Item.RecalcInfo.Set_Type_0(pararecalc_0_All); else if(null != oCurRunToSplit.State && null != oCurRunToSplit.State.ContentPos)
Item.RecalcInfo.Set_Type_0_Spell(pararecalc_0_Spell_All); nCurContentContentPos = oCurRunToSplit.State.ContentPos;
this.oRecalcDocument.ContentLastChangePos = this.oRecalcDocument.CurPos.ContentPos; oCurRunToSplit = oCurContent.Content[nCurContentContentPos];
}
if(null != oCurRunToSplit && null != oCurContent){
//разбиваем run, если находимся в середине
var bSplit = false;
if ( oCurRunToSplit.State.ContentPos > 0 && oCurRunToSplit.State.ContentPos < oCurRunToSplit.Content.length ){
var RRun = oCurRunToSplit.Split_Run( oCurRunToSplit.State.ContentPos );
oInsertPar.Content.push(RRun);
bSplit = true;
}
for(var i = 0, length = oInsertPar.Content.length; i < length; ++i){
var run = oInsertPar.Content[i];
if(run.Content.length > 0){
if(null != oCurContent.Internal_Content_Add)
oCurContent.Internal_Content_Add(++nCurContentContentPos, run, false);
else if(null != oCurContent.Add_ToContent)
oCurContent.Add_ToContent(++nCurContentContentPos, run, false);
}
}
if (bSplit)
nCurContentContentPos--;
oCurContent.Content[nCurContentContentPos].Cursor_MoveToEndPos();
if (null != oCurContent.Set_ContentPos)
oCurContent.Set_ContentPos(nCurContentContentPos, false, -1);
else
oCurContent.State.ContentPos = nCurContentContentPos;
Item.RecalcInfo.Set_Type_0(pararecalc_0_All);
Item.RecalcInfo.Set_Type_0_Spell(pararecalc_0_Spell_All);
this.oRecalcDocument.ContentLastChangePos = this.oRecalcDocument.CurPos.ContentPos;
}
} }
else else
{ {
......
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