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

Internal_CalculateTextPr -> Internal_FindBackward

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@50300 954022d7-b5bf-4e40-9824-e11837661b57
parent 69a22315
......@@ -2827,7 +2827,12 @@ PasteProcessor.prototype =
var nContentLength = oInsertPar.Content.length;
if(nContentLength > 2)
{
var TextPr = Item.Internal_CalculateTextPr(Item.CurPos.ContentPos);
var oFindObj = Item.Internal_FindBackward(Item.CurPos.ContentPos, [para_TextPr]);
var TextPr = null;
if ( true === oFindObj.Found && para_TextPr === oFindObj.Type )
TextPr = Item.Content[oFindObj.LetterPos].Copy();
else
TextPr = new ParaTextPr();
var nContentPos = Item.CurPos.ContentPos;
for(var i = 0; i < nContentLength - 2; ++i)// -2 �� ����������� ����� ���������
{
......@@ -2838,7 +2843,7 @@ PasteProcessor.prototype =
nContentPos++;
}
}
Item.Internal_Content_Add(nContentPos, new ParaTextPr(TextPr));
Item.Internal_Content_Add(nContentPos, TextPr);
}
Item.RecalcInfo.Set_Type_0(pararecalc_0_All);
Item.RecalcInfo.Set_Type_0_Spell(pararecalc_0_Spell_All);
......@@ -2936,7 +2941,12 @@ PasteProcessor.prototype =
var nContentLength = oInsertPar.Content.length;
if(nContentLength > 2)
{
var TextPr = Item.Internal_CalculateTextPr(Item.CurPos.ContentPos);
var oFindObj = Item.Internal_FindBackward(Item.CurPos.ContentPos, [para_TextPr]);
var TextPr = null;
if ( true === oFindObj.Found && para_TextPr === oFindObj.Type )
TextPr = Item.Content[oFindObj.LetterPos].Copy();
else
TextPr = new ParaTextPr();
var nContentPos = Item.CurPos.ContentPos;
for(var i = 0; i < nContentLength - 2; ++i)// -2 �� ����������� ����� ���������
{
......@@ -2947,7 +2957,7 @@ PasteProcessor.prototype =
nContentPos++;
}
}
Item.Internal_Content_Add(nContentPos, new ParaTextPr(TextPr));
Item.Internal_Content_Add(nContentPos, TextPr);
}
Item.RecalcInfo.Set_Type_0(pararecalc_0_All);
Item.RecalcInfo.Set_Type_0_Spell(pararecalc_0_Spell_All);
......
......@@ -2153,15 +2153,9 @@ function BinaryDocumentTableWriter(memory, doc, oMapCommentId, oNumIdMap)
if( bUseSelection && ParaStart == i && para_TextPr != item.Type)
{
//ищем предыдущие TextPr
for ( var j = ParaStart - 1; j >= 0; --j )
{
var oCurElem = Content[j];
if(para_TextPr == oCurElem.Type)
{
this.oCur_rPr = oCurElem.Value;
break;
}
}
var oFindObj = par.Internal_FindBackward(ParaStart, [para_TextPr]);
if ( true === oFindObj.Found && para_TextPr === oFindObj.Type )
this.oCur_rPr = par.Content[oFindObj.LetterPos].Value;
}
switch ( item.Type )
{
......@@ -2272,6 +2266,7 @@ function BinaryDocumentTableWriter(memory, doc, oMapCommentId, oNumIdMap)
}
if(bUseSelection && ParaEnd < Content.length - 1)
{
this.oCur_rPr = null;
this.WriteRun(function(){
oThis.memory.WriteByte(c_oSerRunType._LastRun);
oThis.memory.WriteLong(c_oSerPropLenType.Null);
......
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