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

Переделана схема удаления выделенных элементов таблицы во время набора текста (баг 18903).

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@48148 954022d7-b5bf-4e40-9824-e11837661b57
parent 1231f5fc
...@@ -7694,24 +7694,49 @@ CTable.prototype = ...@@ -7694,24 +7694,49 @@ CTable.prototype =
if ( true === this.ApplyToAll || ( true === this.Selection.Use && table_Selection_Cell === this.Selection.Type && this.Selection.Data.length > 0 ) ) if ( true === this.ApplyToAll || ( true === this.Selection.Use && table_Selection_Cell === this.Selection.Type && this.Selection.Data.length > 0 ) )
{ {
var Cells_array = this.Internal_Get_SelectionArray(); var Cells_array = this.Internal_Get_SelectionArray();
for ( var Index = 0; Index < Cells_array.length; Index++ )
if ( true === bOnTextAdd && Cells_array.length > 0 )
{ {
var Pos = Cells_array[Index]; // Снимаем выделением со всемх ячеек, кроме первой, попавшей в выделение
var Row = this.Content[Pos.Row]; var Pos = Cells_array[0];
var Cell = Row.Get_Cell( Pos.Cell ); var Cell = this.Content[Pos.Row].Get_Cell( Pos.Cell );
Cell.Content.Select_All();
Cell.Content.Remove( Count, bOnlyText, bRemoveOnlySelection, true );
var Cell_Content = Cell.Content; this.CurCell = Cell;
Cell_Content.Set_ApplyToAll( true );
Cell.Content.Remove(Count, bOnlyText, bRemoveOnlySelection, false);
Cell_Content.Set_ApplyToAll( false );
}
if ( Cells_array[0].Row - 1 >= 0 ) this.Selection.Use = false;
this.Internal_RecalculateFrom( Cells_array[0].Row - 1, 0, true, true ); this.Selection.Start = false;
this.Selection.StartPos.Pos = { Row : Cell.Row.Index, Cell : Cell.Index };
this.Selection.EndPos.Pos = { Row : Cell.Row.Index, Cell : Cell.Index };
this.Document_SetThisElementCurrent();
editor.WordControl.m_oLogicDocument.Recalculate();
}
else else
{ {
this.Internal_Recalculate_1(); var Cells_array = this.Internal_Get_SelectionArray();
this.Internal_OnContentRecalculate( true, 0, this.Index ); for ( var Index = 0; Index < Cells_array.length; Index++ )
{
var Pos = Cells_array[Index];
var Row = this.Content[Pos.Row];
var Cell = Row.Get_Cell( Pos.Cell );
var Cell_Content = Cell.Content;
Cell_Content.Set_ApplyToAll( true );
Cell.Content.Remove(Count, bOnlyText, bRemoveOnlySelection, false);
Cell_Content.Set_ApplyToAll( false );
}
if ( Cells_array[0].Row - 1 >= 0 )
this.Internal_RecalculateFrom( Cells_array[0].Row - 1, 0, true, true );
else
{
this.Internal_Recalculate_1();
this.Internal_OnContentRecalculate( true, 0, this.Index );
}
} }
} }
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