Commit b097329c authored by Ilya.Kirillov's avatar Ilya.Kirillov Committed by Alexander.Trofimov

Переделано копирование стилей в новом параграфе (баг 24129).

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@56030 954022d7-b5bf-4e40-9824-e11837661b57
parent 5d5d52b9
......@@ -7116,15 +7116,6 @@ CDocument.prototype =
StartPos = this.Selection.EndPos;
var Item = this.Content[StartPos];
if ( type_Paragraph == Item.GetType() )
{
var StartPos_item = Item.Selection.StartPos;
if ( Item.Selection.EndPos < StartPos_item )
StartPos_item = Item.Selection.EndPos;
VisTextPr = Item.Internal_CalculateTextPr( StartPos_item - 1 );
}
else if ( type_Table == Item.GetType() )
VisTextPr = Item.Get_Paragraph_TextPr_Copy();
break;
......@@ -7147,15 +7138,8 @@ CDocument.prototype =
else
{
var Item = this.Content[this.CurPos.ContentPos];
if ( type_Paragraph == Item.GetType() )
{
Result_TextPr = Item.Internal_CalculateTextPr( Item.CurPos.ContentPos - 1 );
}
else if ( type_Table == Item.GetType() )
{
Result_TextPr = Item.Get_Paragraph_TextPr_Copy();
}
}
return Result_TextPr;
}
......
......@@ -6545,15 +6545,7 @@ CDocumentContent.prototype =
if ( true === this.ApplyToAll )
{
var Item = this.Content[0];
if ( type_Paragraph == Item.GetType() )
{
Item.Cursor_MoveToStartPos();
Result_TextPr = Item.Internal_CalculateTextPr( Item.CurPos.ContentPos - 1 );
}
else if ( type_Table == Item.GetType() )
Result_TextPr = Item.Get_Paragraph_TextPr_Copy();
return Result_TextPr;
}
......@@ -6573,15 +6565,6 @@ CDocumentContent.prototype =
StartPos = this.Selection.EndPos;
var Item = this.Content[StartPos];
if ( type_Paragraph == Item.GetType() )
{
var StartPos_item = Item.Selection.StartPos;
if ( Item.Selection.EndPos < StartPos_item )
StartPos_item = Item.Selection.EndPos
VisTextPr = Item.Internal_CalculateTextPr( StartPos_item - 1 );
}
else if ( type_Table == Item.GetType() )
VisTextPr = Item.Get_Paragraph_TextPr_Copy();
break;
......@@ -6604,15 +6587,8 @@ CDocumentContent.prototype =
else
{
var Item = this.Content[this.CurPos.ContentPos];
if ( type_Paragraph == Item.GetType() )
{
Result_TextPr = Item.Internal_CalculateTextPr( Item.CurPos.ContentPos - 1 );
}
else if ( type_Table == Item.GetType() )
{
Result_TextPr = Item.Get_Paragraph_TextPr_Copy();
}
}
return Result_TextPr;
}
......
......@@ -14772,6 +14772,49 @@ Paragraph.prototype =
return Result;
},
Get_Paragraph_TextPr_Copy : function()
{
var TextPr;
if ( true === this.ApplyToAll )
{
this.Select_All(1);
var Count = this.Content.length;
var StartPos = 0;
while ( true === this.Content[StartPos].Selection_IsEmpty() && StartPos < Count )
StartPos++;
TextPr = this.Content[StartPos].Get_CompiledTextPr(true);
this.Selection_Remove();
}
else
{
if ( true === this.Selection.Use )
{
var StartPos = this.Selection.StartPos;
var EndPos = this.Selection.EndPos;
if ( StartPos > EndPos )
{
StartPos = this.Selection.EndPos;
EndPos = this.Selection.StartPos;
}
while ( true === this.Content[StartPos].Selection_IsEmpty() && StartPos < EndPos )
StartPos++;
TextPr = this.Content[StartPos].Get_CompiledTextPr(true);
}
else
{
TextPr = this.Content[this.CurPos.ContentPos].Get_CompiledTextPr(true);
}
}
return TextPr;
},
Get_Paragraph_ParaPr_Copy : function()
{
var ParaPr = this.Pr.Copy();
......
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