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

Исправлен баг с передвижением списка целиком по табу (баг 20427). В апи...

Исправлен баг с передвижением списка целиком по табу (баг 20427). В апи добавлены функции для получения размеров страниц. 

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@50360 954022d7-b5bf-4e40-9824-e11837661b57
parent c17ff044
......@@ -285,6 +285,16 @@ CAbstractNum.prototype =
History.Add( this, { Type : historyitem_AbstractNum_LvlChange, Index : Index, Old : Lvl_old, New : Lvl_new } );
}
var LogicDocument = editor.WordControl.m_oLogicDocument;
var AllParagraphs = LogicDocument.Get_AllParagraphs_ByNumbering( { NumId : this.Id, Lvl : undefined } );
var Count = AllParagraphs.length;
for ( var Index = 0; Index < Count; Index++ )
{
var Para = AllParagraphs[Index];
Para.CompiledPr.NeedRecalc = true;
}
},
Get_LvlByStyle : function(StyleId)
......
......@@ -226,7 +226,7 @@ Paragraph.prototype =
{
var _NumPr = this.Numbering_Get();
if ( undefined != _NumPr && _NumPr.NumId === NumPr.NumId && _NumPr.Lvl === NumPr.Lvl )
if ( undefined != _NumPr && _NumPr.NumId === NumPr.NumId && ( _NumPr.Lvl === NumPr.Lvl || undefined === NumPr.Lvl ) )
ParaArray.push( this );
var Count = this.Content.length;
......@@ -5613,7 +5613,56 @@ Paragraph.prototype =
if ( undefined != NumPr )
{
this.Numbering_IndDec_Level( !bShift );
if ( true != this.Selection.Use )
{
var NumId = NumPr.NumId;
var Lvl = NumPr.Lvl;
var NumInfo = this.Parent.Internal_GetNumInfo( this.Id, NumPr );
if ( 0 === Lvl && NumInfo[Lvl] <= 1 )
{
var Numbering = this.Parent.Get_Numbering();
var AbstractNum = Numbering.Get_AbstractNum(NumId);
var NumLvl = AbstractNum.Lvl[Lvl];
var NumParaPr = NumLvl.ParaPr;
var ParaPr = this.Get_CompiledPr2(false).ParaPr;
if ( undefined != NumParaPr.Ind && undefined != NumParaPr.Ind.Left )
{
var NewX = ParaPr.Ind.Left;
if ( true != bShift )
NewX += Default_Tab_Stop;
else
{
NewX -= Default_Tab_Stop;
if ( NewX < 0 )
NewX = 0;
if ( ParaPr.Ind.FirstLine < 0 && NewX + ParaPr.Ind.FirstLine < 0 )
NewX = -ParaPr.Ind.FirstLine;
}
AbstractNum.Change_LeftInd( NewX );
History.Add( this, { Type : historyitem_Paragraph_Ind_First, Old : ( undefined != this.Pr.Ind.FirstLine ? this.Pr.Ind.FirstLine : undefined ), New : undefined } );
History.Add( this, { Type : historyitem_Paragraph_Ind_Left, Old : ( undefined != this.Pr.Ind.Left ? this.Pr.Ind.Left : undefined ), New : undefined } );
// При добавлении списка в параграф, удаляем все собственные сдвиги
this.Pr.Ind.FirstLine = undefined;
this.Pr.Ind.Left = undefined;
// Надо пересчитать конечный стиль
this.CompiledPr.NeedRecalc = true;
}
}
else
this.Numbering_IndDec_Level( !bShift );
}
else
this.Numbering_IndDec_Level( !bShift );
}
else if ( true === this.Is_SelectionUse() )
{
......
......@@ -843,7 +843,6 @@ asc_docs_api.prototype.LoadDocument = function(c_DocInfo)
{
this.asc_setDocInfo(c_DocInfo);
this.WordControl.m_oDrawingDocument.m_bIsOpeningDocument = true;
if(this.DocInfo){
......@@ -3856,6 +3855,17 @@ asc_docs_api.prototype.change_DocSize = function(width,height)
this.WordControl.m_oLogicDocument.Set_DocumentPageSize(height, width);
}
}
asc_docs_api.prototype.get_DocumentWidth = function()
{
return Page_Width;
}
asc_docs_api.prototype.get_DocumentHeight = function()
{
return Page_Height;
}
asc_docs_api.prototype.put_AddPageBreak = function()
{
if ( false === this.WordControl.m_oLogicDocument.Document_Is_SelectionLocked(changestype_Paragraph_Content) )
......
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