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

Изменена схема drag-n-drop в случае, когда выделен только знак параграфа (баги...

Изменена схема drag-n-drop в случае, когда выделен только знак параграфа (баги 25308, 24401). Изменен алогритм работы кнопки изменения заливки фона, когда мы находимся в таблице (баг 17877).

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@57238 954022d7-b5bf-4e40-9824-e11837661b57
parent 06cf082c
......@@ -8507,7 +8507,7 @@ CDocument.prototype =
return;
var FirstElement = SelectedContent.Elements[0];
if ( 1 === ElementsCount && true !== FirstElement.SelectedAll && type_Paragraph === FirstElement.Element.GetType() )
if ( 1 === ElementsCount && true !== FirstElement.SelectedAll && type_Paragraph === FirstElement.Element.GetType() && true !== FirstElement.Element.Is_Empty() )
{
// Нам нужно в заданный параграф вставить выделенный текст
var NewPara = FirstElement.Element;
......@@ -8541,7 +8541,10 @@ CDocument.prototype =
}
if ( PrevClass.Correct_Content )
{
PrevClass.Correct_Content();
PrevPos = ParaNearPos.NearPos.ContentPos.Data[ParaNearPos.Classes.length - 2];
}
if ( true === bNeedSelect )
{
......@@ -8580,6 +8583,12 @@ CDocument.prototype =
if ( true === Para.Cursor_IsEnd() )
{
bConcatE = false;
if ( 1 === ElementsCount && type_Paragraph === FirstElement.Element.GetType() && true === FirstElement.Element.Is_Empty() )
{
bConcatS = false;
DstIndex++;
}
}
else if ( true === Para.Cursor_IsStart() )
{
......@@ -8616,7 +8625,7 @@ CDocument.prototype =
}
var EndIndex = ElementsCount - 1;
if ( true === bConcatE )
if ( true === bConcatE && StartIndex < EndIndex )
{
var _ParaE = Elements[ElementsCount - 1].Element;
......
......@@ -3924,7 +3924,10 @@ CDocumentContent.prototype =
}
if ( PrevClass.Correct_Content )
{
PrevClass.Correct_Content();
PrevPos = ParaNearPos.NearPos.ContentPos.Data[ParaNearPos.Classes.length - 2];
}
if ( true === bNeedSelect )
{
......@@ -3963,6 +3966,12 @@ CDocumentContent.prototype =
if ( true === Para.Cursor_IsEnd() )
{
bConcatE = false;
if ( 1 === ElementsCount && type_Paragraph === FirstElement.Element.GetType() && true === FirstElement.Element.Is_Empty() )
{
bConcatS = false;
DstIndex++;
}
}
else if ( true === Para.Cursor_IsStart() )
{
......
......@@ -3207,6 +3207,11 @@ CTable.prototype =
}
},
ReDraw : function()
{
this.Parent.OnContentReDraw( this.Get_StartPage_Absolute(), this.Get_StartPage_Absolute() + this.Pages.length - 1 );
},
Draw : function(nPageIndex, pGraphics)
{
var PNum = nPageIndex - this.PageNum;
......@@ -9720,7 +9725,7 @@ CTable.prototype =
Set_ParagraphShd : function(Shd)
{
if ( true === this.ApplyToAll || ( true === this.Selection.Use && table_Selection_Cell === this.Selection.Type && this.Selection.Data.length > 0 ) )
if ( true === this.ApplyToAll )
{
var Cells_array = this.Internal_Get_SelectionArray();
for ( var Index = 0; Index < Cells_array.length; Index++ )
......@@ -9743,8 +9748,31 @@ CTable.prototype =
this.Internal_OnContentRecalculate( true, 0, this.Index );
}
}
else if ( true === this.Selection.Use && table_Selection_Cell === this.Selection.Type && this.Selection.Data.length > 0 )
{
var Cells_array = this.Internal_Get_SelectionArray();
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 );
Cell.Set_Shd( Shd );
}
this.ReDraw();
}
else
{
var CellContent = this.CurCell.Content;
if ( docpostype_Content === CellContent.CurPos.Type && true !== CellContent.Selection.Use && type_Paragraph === CellContent.Content[CellContent.CurPos.ContentPos].GetType() )
{
this.CurCell.Set_Shd( Shd );
this.CurCell.Content.ReDraw();
}
else
return this.CurCell.Content.Set_ParagraphShd( Shd );
}
},
Set_ParagraphStyle : function(Name)
......
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