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

Исправлен баг с drag-n-drop (баг 23955).

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@55969 954022d7-b5bf-4e40-9824-e11837661b57
parent 555a6edc
...@@ -13898,32 +13898,51 @@ Paragraph.prototype = ...@@ -13898,32 +13898,51 @@ Paragraph.prototype =
Get_Paragraph_TextPr : function() Get_Paragraph_TextPr : function()
{ {
var TextPr; var TextPr;
if ( true === this.Selection.Use ) if ( true === this.ApplyToAll )
{ {
var StartPos = this.Selection.StartPos; this.Select_All(1);
var EndPos = this.Selection.EndPos;
TextPr = this.Content[0].Get_CompiledTextPr(true);
if ( StartPos > EndPos ) var Count = this.Content.length;
{
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);
for ( var CurPos = StartPos + 1; CurPos <= EndPos; CurPos++ ) for ( var CurPos = 1; CurPos < Count; CurPos++ )
{ {
var TempTextPr = this.Content[CurPos].Get_CompiledTextPr(false); var TempTextPr = this.Content[CurPos].Get_CompiledTextPr(false);
if ( null !== TempTextPr && undefined !== TempTextPr && true !== this.Content[CurPos].Selection_IsEmpty() ) if ( null !== TempTextPr && undefined !== TempTextPr && true !== this.Content[CurPos].Selection_IsEmpty() )
TextPr = TextPr.Compare( TempTextPr ); TextPr = TextPr.Compare( TempTextPr );
} }
this.Selection_Remove();
} }
else else
{ {
TextPr = this.Content[this.CurPos.ContentPos].Get_CompiledTextPr(true); 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);
for ( var CurPos = StartPos + 1; CurPos <= EndPos; CurPos++ )
{
var TempTextPr = this.Content[CurPos].Get_CompiledTextPr(false);
if ( null !== TempTextPr && undefined !== TempTextPr && true !== this.Content[CurPos].Selection_IsEmpty() )
TextPr = TextPr.Compare( TempTextPr );
}
}
else
{
TextPr = this.Content[this.CurPos.ContentPos].Get_CompiledTextPr(true);
}
} }
return TextPr; return TextPr;
......
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