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

Переделана схема работы с нумерацией параграфов, изменен алгоритм рассчета...

Переделана схема работы с нумерацией параграфов, изменен алгоритм рассчета положения нумерации относительно параграфа.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@47852 954022d7-b5bf-4e40-9824-e11837661b57
parent 59f52ad9
...@@ -5344,8 +5344,14 @@ CDocument.prototype = ...@@ -5344,8 +5344,14 @@ CDocument.prototype =
if ( null == this.Selection.Data || this.Selection.Data.length <= 0 ) if ( null == this.Selection.Data || this.Selection.Data.length <= 0 )
break; break;
var NumPr = this.Content[this.Selection.Data[0]].Numbering_Get(); var CurPara = this.Content[this.Selection.Data[0]];
VisTextPr = this.Numbering.Get_AbstractNum( NumPr.NumId ).Lvl[NumPr.Lvl].TextPr; for ( var Index = 0; Index < this.Selection.Data.length; Index++ )
{
if ( this.CurPos.ContentPos === this.Selection.Data[Index] )
CurPara = this.Content[this.Selection.Data[Index]];
}
VisTextPr = CurPara.Internal_Get_NumberingTextPr();
break; break;
} }
......
...@@ -5526,8 +5526,14 @@ CDocumentContent.prototype = ...@@ -5526,8 +5526,14 @@ CDocumentContent.prototype =
if ( null == this.Selection.Data || this.Selection.Data.length <= 0 ) if ( null == this.Selection.Data || this.Selection.Data.length <= 0 )
break; break;
var NumPr = this.Content[this.Selection.Data[0]].Numbering_Get(); var CurPara = this.Content[this.Selection.Data[0]];
VisTextPr = this.Numbering.Get_AbstractNum( NumPr.NumId ).Lvl[NumPr.Lvl].TextPr; for ( var Index = 0; Index < this.Selection.Data.length; Index++ )
{
if ( this.CurPos.ContentPos === this.Selection.Data[Index] )
CurPara = this.Content[this.Selection.Data[Index]];
}
VisTextPr = CurPara.Internal_Get_NumberingTextPr();
break; break;
} }
......
...@@ -47,9 +47,10 @@ function Paragraph(DrawingDocument, Parent, PageNum, X, Y, XLimit, YLimit) ...@@ -47,9 +47,10 @@ function Paragraph(DrawingDocument, Parent, PageNum, X, Y, XLimit, YLimit)
// Добавляем в контент элемент "конец параграфа" // Добавляем в контент элемент "конец параграфа"
this.Content = new Array(); this.Content = new Array();
this.Content[0] = new ParaNumbering(); this.Content[0] = new ParaEnd();
this.Content[1] = new ParaEnd(); this.Content[1] = new ParaEmpty();
this.Content[2] = new ParaEmpty();
this.Numbering = new ParaNumbering();
this.CurPos = this.CurPos =
{ {
...@@ -717,22 +718,9 @@ Paragraph.prototype = ...@@ -717,22 +718,9 @@ Paragraph.prototype =
var ContentLength = this.Content.length; var ContentLength = this.Content.length;
for ( var Pos = 0; Pos < ContentLength; Pos++ ) if ( para_PresentationNumbering === this.Numbering.Type )
{
var Item = this.Content[Pos];
Item.Parent = this;
Item.DocumentContent = this.Parent;
Item.DrawingDocument = this.Parent.DrawingDocument;
switch( Item.Type )
{
case para_Numbering:
{
break;
}
case para_PresentationNumbering:
{ {
var Item = this.Numbering;
var Level = this.PresentationPr.Level; var Level = this.PresentationPr.Level;
var Bullet = this.PresentationPr.Bullet; var Bullet = this.PresentationPr.Bullet;
...@@ -771,9 +759,18 @@ Paragraph.prototype = ...@@ -771,9 +759,18 @@ Paragraph.prototype =
Item.Bullet = Bullet; Item.Bullet = Bullet;
Item.BulletNum = BulletNum + 1; Item.BulletNum = BulletNum + 1;
Item.Measure( g_oTextMeasurer, FirstTextPr ); Item.Measure( g_oTextMeasurer, FirstTextPr );
break;
} }
for ( var Pos = 0; Pos < ContentLength; Pos++ )
{
var Item = this.Content[Pos];
Item.Parent = this;
Item.DocumentContent = this.Parent;
Item.DrawingDocument = this.Parent.DrawingDocument;
switch( Item.Type )
{
case para_Text: case para_Text:
case para_Space: case para_Space:
{ {
...@@ -899,6 +896,23 @@ Paragraph.prototype = ...@@ -899,6 +896,23 @@ Paragraph.prototype =
var bForceNewPage = false; var bForceNewPage = false;
var bBreakPageLine = false; var bBreakPageLine = false;
if ( CurPage > 1 )
bAddNumbering = false;
else if ( 0 === CurPage )
bAddNumbering = true;
else
{
// Проверим, есть ли какие-нибудь реальные элементы (к которым можно было бы
// дорисовать нумерацию) до стартовой позиции текущей страницы
for ( var Pos = 0; Pos < StartPos; Pos++ )
{
var Item = this.Content[Pos];
if ( true === Item.Can_AddNumbering() )
bAddNumbering = false;
}
}
// Получаем промежутки обтекания, т.е. промежутки, которые нам нельзя использовать // Получаем промежутки обтекания, т.е. промежутки, которые нам нельзя использовать
var Ranges = [];//this.Parent.CheckRange( X, Y, XLimit, Y, Y, Y, this.PageNum + CurPage, true ); var Ranges = [];//this.Parent.CheckRange( X, Y, XLimit, Y, Y, Y, this.PageNum + CurPage, true );
var RangesCount = Ranges.length; var RangesCount = Ranges.length;
...@@ -983,6 +997,7 @@ Paragraph.prototype = ...@@ -983,6 +997,7 @@ Paragraph.prototype =
var RecalcResult = recalcresult_NextElement; var RecalcResult = recalcresult_NextElement;
var bAddNumbering = this.Internal_CheckAddNumbering( CurPage, CurLine, CurRange );
for ( var Pos = LineStart_Pos; Pos < this.Content.length; Pos++ ) for ( var Pos = LineStart_Pos; Pos < this.Content.length; Pos++ )
{ {
if ( false === bStartWord && true === bFirstItemOnLine && Math.abs(XEnd - X) < 0.001 && RangesCount > 0 ) if ( false === bStartWord && true === bFirstItemOnLine && Math.abs(XEnd - X) < 0.001 && RangesCount > 0 )
...@@ -1020,18 +1035,23 @@ Paragraph.prototype = ...@@ -1020,18 +1035,23 @@ Paragraph.prototype =
var bBreak = false; var bBreak = false;
switch( Item.Type ) if ( true === bAddNumbering )
{ {
case para_Numbering: // Проверим, возможно на текущем элементе стоит добавить нумерацию
if ( true === Item.Can_AddNumbering() )
{
var NumberingItem = this.Numbering;
var NumberingType = this.Numbering.Type;
if ( para_Numbering === NumberingType )
{ {
var NumPr = ParaPr.NumPr; var NumPr = ParaPr.NumPr;
if ( undefined === NumPr || undefined === NumPr.NumId || 0 === NumPr.NumId ) if ( undefined === NumPr || undefined === NumPr.NumId || 0 === NumPr.NumId )
{ {
// Так мы обнуляем все рассчитанные ширины данного элемента // Так мы обнуляем все рассчитанные ширины данного элемента
Item.Measure( g_oTextMeasurer, undefined ); NumberingItem.Measure( g_oTextMeasurer, undefined );
break;
} }
else
{
var Numbering = this.Parent.Get_Numbering(); var Numbering = this.Parent.Get_Numbering();
var NumLvl = Numbering.Get_AbstractNum( NumPr.NumId ).Lvl[NumPr.Lvl]; var NumLvl = Numbering.Get_AbstractNum( NumPr.NumId ).Lvl[NumPr.Lvl];
var NumSuff = NumLvl.Suff; var NumSuff = NumLvl.Suff;
...@@ -1042,32 +1062,32 @@ Paragraph.prototype = ...@@ -1042,32 +1062,32 @@ Paragraph.prototype =
NumTextPr.Merge( NumLvl.TextPr ); NumTextPr.Merge( NumLvl.TextPr );
// Здесь измеряется только ширина символов нумерации, без суффикса // Здесь измеряется только ширина символов нумерации, без суффикса
Item.Measure( g_oTextMeasurer, Numbering, NumInfo, NumTextPr, NumPr ); NumberingItem.Measure( g_oTextMeasurer, Numbering, NumInfo, NumTextPr, NumPr );
// При рассчете высоты строки, если у нас параграф со списком, то размер символа // При рассчете высоты строки, если у нас параграф со списком, то размер символа
// в списке влияет только на высоту строки над Baseline, но не влияет на высоту строки // в списке влияет только на высоту строки над Baseline, но не влияет на высоту строки
// ниже baseline. // ниже baseline.
if ( LineAscent < Item.Height ) if ( LineAscent < NumberingItem.Height )
LineAscent = Item.Height; LineAscent = NumberingItem.Height;
switch ( NumJc ) switch ( NumJc )
{ {
case align_Right: case align_Right:
{ {
Item.WidthVisible = 0; NumberingItem.WidthVisible = 0;
break; break;
} }
case align_Center: case align_Center:
{ {
Item.WidthVisible = Item.WidthNum / 2; NumberingItem.WidthVisible = NumberingItem.WidthNum / 2;
X += Item.WidthNum / 2; X += NumberingItem.WidthNum / 2;
break; break;
} }
case align_Left: case align_Left:
default: default:
{ {
Item.WidthVisible = Item.WidthNum; NumberingItem.WidthVisible = NumberingItem.WidthNum;
X += Item.WidthNum; X += NumberingItem.WidthNum;
break; break;
} }
} }
...@@ -1084,7 +1104,7 @@ Paragraph.prototype = ...@@ -1084,7 +1104,7 @@ Paragraph.prototype =
var OldTextPr = g_oTextMeasurer.GetTextPr(); var OldTextPr = g_oTextMeasurer.GetTextPr();
g_oTextMeasurer.SetTextPr( NumTextPr ); g_oTextMeasurer.SetTextPr( NumTextPr );
g_oTextMeasurer.SetFontSlot( fontslot_ASCII ); g_oTextMeasurer.SetFontSlot( fontslot_ASCII );
Item.WidthSuff = g_oTextMeasurer.Measure( " " ).Width; NumberingItem.WidthSuff = g_oTextMeasurer.Measure( " " ).Width;
g_oTextMeasurer.SetTextPr( OldTextPr ); g_oTextMeasurer.SetTextPr( OldTextPr );
break; break;
} }
...@@ -1143,34 +1163,40 @@ Paragraph.prototype = ...@@ -1143,34 +1163,40 @@ Paragraph.prototype =
} }
} }
Item.WidthSuff = NewX - X; NumberingItem.WidthSuff = NewX - X;
break; break;
} }
} }
Item.Width = Item.WidthNum; NumberingItem.Width = NumberingItem.WidthNum;
Item.WidthVisible += Item.WidthSuff; NumberingItem.WidthVisible += NumberingItem.WidthSuff;
X += Item.WidthSuff; X += NumberingItem.WidthSuff;
this.Numbering.Pos = Pos;
break;
} }
case para_PresentationNumbering: }
else if ( para_PresentationNumbering === NumberingType )
{ {
var Bullet = this.PresentationPr.Bullet; var Bullet = this.PresentationPr.Bullet;
if ( numbering_presentationnumfrmt_None != Bullet.Get_Type() ) if ( numbering_presentationnumfrmt_None != Bullet.Get_Type() )
{ {
if ( ParaPr.Ind.FirstLine < 0 ) if ( ParaPr.Ind.FirstLine < 0 )
Item.WidthVisible = Math.max( Item.Width, this.X + ParaPr.Ind.Left + ParaPr.Ind.FirstLine - X, this.X + ParaPr.Ind.Left - X ); NumberingItem.WidthVisible = Math.max( NumberingItem.Width, this.X + ParaPr.Ind.Left + ParaPr.Ind.FirstLine - X, this.X + ParaPr.Ind.Left - X );
else else
Item.WidthVisible = Math.max( this.X + ParaPr.Ind.Left + Item.Width - X, this.X + ParaPr.Ind.Left + ParaPr.Ind.FirstLine - X, this.X + ParaPr.Ind.Left - X ); NumberingItem.WidthVisible = Math.max( this.X + ParaPr.Ind.Left + NumberingItem.Width - X, this.X + ParaPr.Ind.Left + ParaPr.Ind.FirstLine - X, this.X + ParaPr.Ind.Left - X );
} }
X += Item.WidthVisible; X += NumberingItem.WidthVisible;
this.Numbering.Pos = Pos;
}
break; bAddNumbering = false;
}
} }
switch( Item.Type )
{
case para_Text: case para_Text:
{ {
bStartWord = true; bStartWord = true;
...@@ -2281,6 +2307,7 @@ Paragraph.prototype = ...@@ -2281,6 +2307,7 @@ Paragraph.prototype =
bExtendBoundToBottom = false; bExtendBoundToBottom = false;
nWordLen = 0; nWordLen = 0;
nSpacesCount = 0; nSpacesCount = 0;
bAddNumbering = this.Internal_CheckAddNumbering( CurPage, CurLine, CurRange );
} }
else else
{ {
...@@ -2489,6 +2516,8 @@ Paragraph.prototype = ...@@ -2489,6 +2516,8 @@ Paragraph.prototype =
RecalcResult = recalcresult_NextPage; RecalcResult = recalcresult_NextPage;
break; break;
} }
bAddNumbering = this.Internal_CheckAddNumbering( CurPage, CurLine, CurRange );
} }
else else
{ {
...@@ -2531,6 +2560,11 @@ Paragraph.prototype = ...@@ -2531,6 +2560,11 @@ Paragraph.prototype =
for ( var TempRange = CurRange + 1; TempRange <= RangesCount; TempRange++ ) for ( var TempRange = CurRange + 1; TempRange <= RangesCount; TempRange++ )
this.Lines[CurLine].Set_RangeStartPos( TempRange, Pos ); this.Lines[CurLine].Set_RangeStartPos( TempRange, Pos );
// Если у нас нумерация относится к знаку конца параграфа, тогда в такой
// ситуации не рисуем нумерацию у такого параграфа.
if ( Pos === this.Numbering.Pos )
this.Numbering.Pos = -1;
} }
else else
{ {
...@@ -2600,6 +2634,7 @@ Paragraph.prototype = ...@@ -2600,6 +2634,7 @@ Paragraph.prototype =
bWord = false; bWord = false;
nWordLen = 0; nWordLen = 0;
nSpacesCount = 0; nSpacesCount = 0;
bAddNumbering = this.Internal_CheckAddNumbering( CurPage, CurLine, CurRange );
} }
} }
...@@ -2943,18 +2978,11 @@ Paragraph.prototype = ...@@ -2943,18 +2978,11 @@ Paragraph.prototype =
this.CurPos.PagesPos = CurPage; this.CurPos.PagesPos = CurPage;
} }
if ( ItemNum == this.Numbering.Pos )
X += this.Numbering.WidthVisible;
switch( Item.Type ) switch( Item.Type )
{ {
case para_Numbering:
{
X += Item.WidthVisible;
break;
}
case para_PresentationNumbering:
{
X += Item.WidthVisible;
break;
}
case para_Text: case para_Text:
{ {
bFirstLineItem = false; bFirstLineItem = false;
...@@ -3147,6 +3175,9 @@ Paragraph.prototype = ...@@ -3147,6 +3175,9 @@ Paragraph.prototype =
{ {
var Item = this.Content[ItemNum]; var Item = this.Content[ItemNum];
if ( ItemNum === this.Numbering.Pos )
X += this.Numbering.WidthVisible;
if ( Pos === ItemNum ) if ( Pos === ItemNum )
{ {
if ( true === UpdateCurPos) if ( true === UpdateCurPos)
...@@ -3220,8 +3251,6 @@ Paragraph.prototype = ...@@ -3220,8 +3251,6 @@ Paragraph.prototype =
switch( Item.Type ) switch( Item.Type )
{ {
case para_Numbering:
case para_PresentationNumbering:
case para_Text: case para_Text:
case para_Space: case para_Space:
case para_PageNum: case para_PageNum:
...@@ -3245,6 +3274,43 @@ Paragraph.prototype = ...@@ -3245,6 +3274,43 @@ Paragraph.prototype =
} }
}, },
// Нужно ли добавлять нумерацию в начале данной строки
Internal_CheckAddNumbering : function(CurPage, CurLine, CurRange)
{
var StartLine = this.Pages[CurPage].StartLine;
var bRes = false;
if ( CurLine != StartLine )
bRes = false;
else
{
if ( CurPage > 1 )
bRes = false;
else
{
var StartPos = this.Lines[CurLine].Ranges[CurRange].StartPos;
bRes = true;
// Проверим, есть ли какие-нибудь реальные элементы (к которым можно было бы
// дорисовать нумерацию) до стартовой позиции текущей страницы
for ( var Pos = 0; Pos < StartPos; Pos++ )
{
var Item = this.Content[Pos];
if ( true === Item.Can_AddNumbering() )
{
bRes = false;
break;
}
}
}
}
if ( true === bRes )
this.Numbering.Pos = -1;
return bRes;
},
// Можно ли объединить границы двух параграфов с заданными настройками Pr1, Pr2 // Можно ли объединить границы двух параграфов с заданными настройками Pr1, Pr2
Internal_CompareBrd : function(Pr1, Pr2) Internal_CompareBrd : function(Pr1, Pr2)
{ {
...@@ -3276,6 +3342,26 @@ Paragraph.prototype = ...@@ -3276,6 +3342,26 @@ Paragraph.prototype =
return true; return true;
}, },
Internal_Get_NumberingTextPr : function()
{
var Pr = this.Get_CompiledPr();
var ParaPr = Pr.ParaPr;
var NumPr = ParaPr.NumPr;
if ( undefined === NumPr || undefined === NumPr.NumId || 0 === NumPr.NumId )
return new CTextPr();
var Numbering = this.Parent.Get_Numbering();
var NumLvl = Numbering.Get_AbstractNum( NumPr.NumId ).Lvl[NumPr.Lvl];
var NumSuff = NumLvl.Suff;
var NumJc = NumLvl.Jc;
var NumInfo = this.Parent.Internal_GetNumInfo( this.Id, NumPr );
var NumTextPr = this.Get_CompiledPr2(false).TextPr.Copy();
NumTextPr.Merge( this.TextPr.Value );
NumTextPr.Merge( NumLvl.TextPr );
return NumTextPr;
},
Internal_Get_ClearPos : function(Pos) Internal_Get_ClearPos : function(Pos)
{ {
// TODO: Переделать. Надо ускорить. При пересчете параграфа запоминать // TODO: Переделать. Надо ускорить. При пересчете параграфа запоминать
...@@ -3383,30 +3469,6 @@ Paragraph.prototype = ...@@ -3383,30 +3469,6 @@ Paragraph.prototype =
} }
} }
// Подготавливаем контент параграфа к новому пересчету:
// 1. Если у нас есть нумерация в параграфе, то переносим ее в начало. (это делаем на пересчете первой страницы)
// 2. Удаляем все рассчитанные переносы строк, внутренние переносы, переносы страниц
// 3. Объединяем подряд идущие TextPr
History.TurnOff();
if ( 0 === CurPage )
{
if ( para_Numbering != this.Content[0].Type )
{
this.Internal_Content_Add( 0, new ParaNumbering() );
}
for ( var Pos = 1; Pos < this.Content.length; Pos++ )
{
var Item = this.Content[Pos];
if ( para_Numbering === Item.Type )
{
this.Internal_Content_Remove( Pos );
Pos--;
}
}
}
History.TurnOn();
// Пересчет параграфа: // Пересчет параграфа:
// 1. Сначала рассчитаем новые переносы строк, при этом подсчитав количество // 1. Сначала рассчитаем новые переносы строк, при этом подсчитав количество
// слов и пробелов между словами. // слов и пробелов между словами.
...@@ -3449,6 +3511,8 @@ Paragraph.prototype = ...@@ -3449,6 +3511,8 @@ Paragraph.prototype =
{ {
var Item = this.Content[Pos]; var Item = this.Content[Pos];
// TODO: Продумать здесь учет нумерации
switch( Item.Type ) switch( Item.Type )
{ {
case para_Text : case para_Text :
...@@ -3755,9 +3819,11 @@ Paragraph.prototype = ...@@ -3755,9 +3819,11 @@ Paragraph.prototype =
} }
} }
switch( Item.Type ) if ( Pos === this.Numbering.Pos )
{ {
case para_Numbering: var NumberingType = this.Numbering.Type;
var NumberingItem = this.Numbering;
if ( para_Numbering === NumberingType )
{ {
var NumPr = Pr.ParaPr.NumPr; var NumPr = Pr.ParaPr.NumPr;
if ( undefined === NumPr || undefined === NumPr.NumId || 0 === NumPr.NumId ) if ( undefined === NumPr || undefined === NumPr.NumId || 0 === NumPr.NumId )
...@@ -3773,27 +3839,27 @@ Paragraph.prototype = ...@@ -3773,27 +3839,27 @@ Paragraph.prototype =
var X_start = X; var X_start = X;
if ( align_Right === NumJc ) if ( align_Right === NumJc )
X_start = X - Item.WidthNum; X_start = X - NumberingItem.WidthNum;
else if ( align_Center === NumJc ) else if ( align_Center === NumJc )
X_start = X - Item.WidthNum / 2; X_start = X - NumberingItem.WidthNum / 2;
// Если есть выделение текста, рисуем его сначала // Если есть выделение текста, рисуем его сначала
if ( highlight_None != NumTextPr.HighLight ) if ( highlight_None != NumTextPr.HighLight )
aHigh.Add( Y0, Y1, X_start, X_start + Item.WidthNum + Item.WidthSuff, 0, NumTextPr.HighLight.r, NumTextPr.HighLight.g, NumTextPr.HighLight.b ); aHigh.Add( Y0, Y1, X_start, X_start + NumberingItem.WidthNum + NumberingItem.WidthSuff, 0, NumTextPr.HighLight.r, NumTextPr.HighLight.g, NumTextPr.HighLight.b );
if ( CollaborativeChanges > 0 ) if ( CollaborativeChanges > 0 )
aColl.Add( Y0, Y1, X_start, X_start + Item.WidthNum + Item.WidthSuff, 0, 0, 0, 0 ); aColl.Add( Y0, Y1, X_start, X_start + NumberingItem.WidthNum + NumberingItem.WidthSuff, 0, 0, 0, 0 );
X += Item.WidthVisible;
break; X += NumberingItem.WidthVisible;
} }
case para_PresentationNumbering : else if ( para_PresentationNumbering === NumberingType )
{ {
X += Item.WidthVisible; X += NumberingItem.WidthVisible;
break; }
} }
switch( Item.Type )
{
case para_PageNum: case para_PageNum:
case para_Drawing: case para_Drawing:
case para_Tab: case para_Tab:
...@@ -4165,9 +4231,10 @@ Paragraph.prototype = ...@@ -4165,9 +4231,10 @@ Paragraph.prototype =
} }
} }
switch( Item.Type ) if ( Pos === this.Numbering.Pos )
{ {
case para_Numbering: var NumberingItem = this.Numbering;
if ( para_Numbering === this.Numbering.Type )
{ {
var NumPr = Pr.ParaPr.NumPr; var NumPr = Pr.ParaPr.NumPr;
if ( undefined === NumPr || undefined === NumPr.NumId || 0 === NumPr.NumId ) if ( undefined === NumPr || undefined === NumPr.NumId || 0 === NumPr.NumId )
...@@ -4191,9 +4258,9 @@ Paragraph.prototype = ...@@ -4191,9 +4258,9 @@ Paragraph.prototype =
var X_start = X; var X_start = X;
if ( align_Right === NumJc ) if ( align_Right === NumJc )
X_start = X - Item.WidthNum; X_start = X - NumberingItem.WidthNum;
else if ( align_Center === NumJc ) else if ( align_Center === NumJc )
X_start = X - Item.WidthNum / 2; X_start = X - NumberingItem.WidthNum / 2;
pGraphics.b_color1( NumTextPr.Color.r, NumTextPr.Color.g, NumTextPr.Color.b, 255 ); pGraphics.b_color1( NumTextPr.Color.r, NumTextPr.Color.g, NumTextPr.Color.b, 255 );
...@@ -4201,22 +4268,22 @@ Paragraph.prototype = ...@@ -4201,22 +4268,22 @@ Paragraph.prototype =
switch ( NumJc ) switch ( NumJc )
{ {
case align_Right: case align_Right:
Item.Draw( X - Item.WidthNum, Y, pGraphics, Numbering, NumTextPr, NumPr ); NumberingItem.Draw( X - NumberingItem.WidthNum, Y, pGraphics, Numbering, NumTextPr, NumPr );
break; break;
case align_Center: case align_Center:
Item.Draw( X - Item.WidthNum / 2, Y, pGraphics, Numbering, NumTextPr, NumPr ); NumberingItem.Draw( X - NumberingItem.WidthNum / 2, Y, pGraphics, Numbering, NumTextPr, NumPr );
break; break;
case align_Left: case align_Left:
default: default:
Item.Draw( X, Y, pGraphics, Numbering, NumTextPr, NumPr ); NumberingItem.Draw( X, Y, pGraphics, Numbering, NumTextPr, NumPr );
break; break;
} }
if ( true === editor.ShowParaMarks && numbering_suff_Tab === NumSuff ) if ( true === editor.ShowParaMarks && numbering_suff_Tab === NumSuff )
{ {
var TempWidth = Item.WidthSuff; var TempWidth = NumberingItem.WidthSuff;
var TempRealWidth = 3.143; // ширина символа "стрелка влево" в шрифте Wingding3,10 var TempRealWidth = 3.143; // ширина символа "стрелка влево" в шрифте Wingding3,10
var X1 = X; var X1 = X;
...@@ -4226,12 +4293,12 @@ Paragraph.prototype = ...@@ -4226,12 +4293,12 @@ Paragraph.prototype =
break; break;
case align_Center: case align_Center:
X1 += Item.WidthNum / 2; X1 += NumberingItem.WidthNum / 2;
break; break;
case align_Left: case align_Left:
default: default:
X1 += Item.WidthNum; X1 += NumberingItem.WidthNum;
break; break;
} }
...@@ -4249,18 +4316,15 @@ Paragraph.prototype = ...@@ -4249,18 +4316,15 @@ Paragraph.prototype =
pGraphics.p_color( NumTextPr.Color.r, NumTextPr.Color.g, NumTextPr.Color.b, 255 ); pGraphics.p_color( NumTextPr.Color.r, NumTextPr.Color.g, NumTextPr.Color.b, 255 );
if ( true === NumTextPr.Strikeout ) if ( true === NumTextPr.Strikeout )
pGraphics.drawHorLine(0, (Y - NumTextPr.FontSize * g_dKoef_pt_to_mm * 0.27), X_start, X_start + Item.WidthNum, (NumTextPr.FontSize / 18) * g_dKoef_pt_to_mm); pGraphics.drawHorLine(0, (Y - NumTextPr.FontSize * g_dKoef_pt_to_mm * 0.27), X_start, X_start + NumberingItem.WidthNum, (NumTextPr.FontSize / 18) * g_dKoef_pt_to_mm);
if ( true === NumTextPr.Underline ) if ( true === NumTextPr.Underline )
pGraphics.drawHorLine( 0, (Y + this.Lines[CurLine].Metrics.TextDescent * 0.4), X_start, X_start + Item.WidthNum, (NumTextPr.FontSize / 18) * g_dKoef_pt_to_mm); pGraphics.drawHorLine( 0, (Y + this.Lines[CurLine].Metrics.TextDescent * 0.4), X_start, X_start + NumberingItem.WidthNum, (NumTextPr.FontSize / 18) * g_dKoef_pt_to_mm);
X += Item.WidthVisible; X += NumberingItem.WidthVisible;
break;
} }
else if ( para_PresentationNumbering === this.Numbering.Type )
case para_PresentationNumbering:
{ {
if ( true != this.IsEmpty() ) if ( true != this.IsEmpty() )
{ {
...@@ -4268,16 +4332,17 @@ Paragraph.prototype = ...@@ -4268,16 +4332,17 @@ Paragraph.prototype =
var FirstTextPr = this.Internal_CalculateTextPr( this.Internal_GetStartPos() ); var FirstTextPr = this.Internal_CalculateTextPr( this.Internal_GetStartPos() );
if ( Pr.ParaPr.Ind.FirstLine < 0 ) if ( Pr.ParaPr.Ind.FirstLine < 0 )
Item.Draw( X, Y, pGraphics, FirstTextPr ); NumberingItem.Draw( X, Y, pGraphics, FirstTextPr );
else else
Item.Draw( this.X + Pr.ParaPr.Ind.Left, Y, pGraphics, FirstTextPr ); NumberingItem.Draw( this.X + Pr.ParaPr.Ind.Left, Y, pGraphics, FirstTextPr );
} }
X += Item.WidthVisible; X += NumberingItem.WidthVisible;
}
break;
} }
switch( Item.Type )
{
case para_PageNum: case para_PageNum:
case para_Drawing: case para_Drawing:
case para_Tab: case para_Tab:
...@@ -4423,14 +4488,15 @@ Paragraph.prototype = ...@@ -4423,14 +4488,15 @@ Paragraph.prototype =
{ {
var Item = this.Content[Pos]; var Item = this.Content[Pos];
// Нумерацию подчеркиваем и зачеркиваем в Internal_Draw_4
if ( Pos === this.Numbering.Pos )
X += this.Numbering.WidthVisible;
switch( Item.Type ) switch( Item.Type )
{ {
case para_Numbering:
case para_PresentationNumbering:
case para_End: case para_End:
case para_NewLine: case para_NewLine:
{ {
// Нумерацию подчеркиваем и зачеркиваем в Internal_Draw_4
X += Item.WidthVisible; X += Item.WidthVisible;
break; break;
...@@ -6878,7 +6944,45 @@ Paragraph.prototype = ...@@ -6878,7 +6944,45 @@ Paragraph.prototype =
var TempDx = 0; var TempDx = 0;
var bCheck = false; var bCheck = false;
var bNumbering = false;
if ( ItemNum === this.Numbering.Pos )
{
if ( para_Numbering === this.Numbering.Type )
{
var NumberingItem = this.Numbering;
var NumPr = this.Numbering_Get();
var NumJc = this.Parent.Get_Numbering().Get_AbstractNum( NumPr.NumId ).Lvl[NumPr.Lvl].Jc;
var NumX0 = CurX;
var NumX1 = CurX;
switch( NumJc )
{
case align_Right:
{
NumX0 -= NumberingItem.WidthNum;
break;
}
case align_Center:
{
NumX0 -= NumberingItem.WidthNum / 2;
NumX1 += NumberingItem.WidthNum / 2;
break;
}
case align_Left:
default:
{
NumX1 += NumberingItem.WidthNum;
break;
}
}
if ( X >= NumX0 && X <= NumX1 )
NumberingDiffX = 0;
}
CurX += this.Numbering.WidthVisible;
}
switch( Item.Type ) switch( Item.Type )
{ {
...@@ -6896,24 +7000,6 @@ Paragraph.prototype = ...@@ -6896,24 +7000,6 @@ Paragraph.prototype =
} }
break; break;
} }
case para_Numbering:
{
var NumPr = this.Numbering_Get();
if ( undefined === NumPr || undefined === NumPr.NumId || 0 === NumPr.NumId )
break;
TempDx = Item.WidthVisible;
bCheck = true;
bNumbering = true;
break;
}
case para_PresentationNumbering:
{
TempDx = Item.WidthVisible;
bCheck = false;
break;
}
case para_PageNum: case para_PageNum:
case para_Text: case para_Text:
...@@ -6949,50 +7035,17 @@ Paragraph.prototype = ...@@ -6949,50 +7035,17 @@ Paragraph.prototype =
if ( bCheck ) if ( bCheck )
{ {
if ( false === bNumbering && Math.abs( X - CurX ) < DiffX ) if ( Math.abs( X - CurX ) < DiffX )
{ {
DiffX = Math.abs( X - CurX ); DiffX = Math.abs( X - CurX );
DiffPos = ItemNum; DiffPos = ItemNum;
} }
if ( false === bNumbering && true != bEnd && ItemNum === this.Lines[CurLine].EndPos && X > CurX + TempDx ) if ( true != bEnd && ItemNum === this.Lines[CurLine].EndPos && X > CurX + TempDx )
{ {
DiffPos = ItemNum + 1; DiffPos = ItemNum + 1;
} }
if ( true === bNumbering )
{
var NumPr = this.Numbering_Get();
var NumJc = this.Parent.Get_Numbering().Get_AbstractNum( NumPr.NumId ).Lvl[NumPr.Lvl].Jc;
var NumX0 = CurX;
var NumX1 = CurX;
switch( NumJc )
{
case align_Right:
{
NumX0 -= Item.WidthNum;
break;
}
case align_Center:
{
NumX0 -= Item.WidthNum / 2;
NumX1 += Item.WidthNum / 2;
break;
}
case align_Left:
default:
{
NumX1 += Item.WidthNum;
break;
}
}
if ( X >= NumX0 && X <= NumX1 )
NumberingDiffX = 0;
}
// Заглушка для знака параграфа // Заглушка для знака параграфа
if ( bEnd ) if ( bEnd )
{ {
...@@ -7616,9 +7669,14 @@ Paragraph.prototype = ...@@ -7616,9 +7669,14 @@ Paragraph.prototype =
// Найдем начальный сдвиг в данном отрезке // Найдем начальный сдвиг в данном отрезке
var StartX = this.Lines[CurLine].Ranges[CurRange].XVisible; var StartX = this.Lines[CurLine].Ranges[CurRange].XVisible;
var Pos, Item; var Pos, Item;
if ( this.Numbering.Pos === this.Lines[CurLine].Ranges[CurRange].StartPos || ( this.Numbering.Pos >= this.Lines[CurLine].Ranges[CurRange].StartPos && this.Numbering.Pos <= StartPos ) )
StartX += this.Numbering.WidthVisible;
for ( Pos = this.Lines[CurLine].Ranges[CurRange].StartPos; Pos <= StartPos - 1; Pos++ ) for ( Pos = this.Lines[CurLine].Ranges[CurRange].StartPos; Pos <= StartPos - 1; Pos++ )
{ {
Item = this.Content[Pos]; Item = this.Content[Pos];
if ( undefined != Item.WidthVisible && ( para_Drawing != Item.Type || drawing_Inline === Item.DrawingType ) ) if ( undefined != Item.WidthVisible && ( para_Drawing != Item.Type || drawing_Inline === Item.DrawingType ) )
StartX += Item.WidthVisible; StartX += Item.WidthVisible;
} }
...@@ -7683,44 +7741,40 @@ Paragraph.prototype = ...@@ -7683,44 +7741,40 @@ Paragraph.prototype =
} }
case selectionflag_Numbering: case selectionflag_Numbering:
{ {
var ParaNum = null; var ParaNum = this.Numbering;
var CurRange = 0; var NumberingPos = this.Numbering.Pos;
if ( -1 === NumberingPos )
for ( var Index = 0; Index < this.Content.length; Index++ ) break;
{
if ( para_Numbering == this.Content[Index].Type )
{
ParaNum = this.Content[Index];
var ParaPos = this.Internal_Get_ParaPos_By_Pos( Index );
CurRange = ParaPos.Range;
PNum = ParaPos.Page;
var ParaNumPos = this.Internal_Get_ParaPos_By_Pos(NumberingPos);
if ( ParaNumPos.Page != CurPage )
break; break;
}
} var CurRange = ParaNumPos.Range;
var CurLine = ParaNumPos.Line;
var NumPr = this.Numbering_Get(); var NumPr = this.Numbering_Get();
var SelectX = this.Lines[0].Ranges[CurRange].XVisible; var SelectX = this.Lines[CurLine].Ranges[CurRange].XVisible;
var SelectW = ParaNum.WidthVisible; var SelectW = ParaNum.WidthVisible;
var NumJc = this.Parent.Get_Numbering().Get_AbstractNum( NumPr.NumId ).Lvl[NumPr.Lvl].Jc; var NumJc = this.Parent.Get_Numbering().Get_AbstractNum( NumPr.NumId ).Lvl[NumPr.Lvl].Jc;
switch ( NumJc ) switch ( NumJc )
{ {
case align_Center: case align_Center:
SelectX = this.Lines[0].Ranges[CurRange].XVisible - ParaNum.WidthNum / 2; SelectX = this.Lines[CurLine].Ranges[CurRange].XVisible - ParaNum.WidthNum / 2;
SelectW = ParaNum.WidthVisible + ParaNum.WidthNum / 2; SelectW = ParaNum.WidthVisible + ParaNum.WidthNum / 2;
break; break;
case align_Right: case align_Right:
SelectX = this.Lines[0].Ranges[CurRange].XVisible - ParaNum.WidthNum; SelectX = this.Lines[CurLine].Ranges[CurRange].XVisible - ParaNum.WidthNum;
SelectW = ParaNum.WidthVisible + ParaNum.WidthNum; SelectW = ParaNum.WidthVisible + ParaNum.WidthNum;
break; break;
case align_Left: case align_Left:
default: default:
SelectX = this.Lines[0].Ranges[CurRange].XVisible; SelectX = this.Lines[CurLine].Ranges[CurRange].XVisible;
SelectW = ParaNum.WidthVisible; SelectW = ParaNum.WidthVisible;
break; break;
} }
this.DrawingDocument.AddPageSelection(Page_abs, SelectX, this.Lines[0].Top + this.Pages[PNum].Y, SelectW, this.Lines[0].Bottom - this.Lines[0].Top); this.DrawingDocument.AddPageSelection(Page_abs, SelectX, this.Lines[CurLine].Top + this.Pages[CurPage].Y, SelectW, this.Lines[CurLine].Bottom - this.Lines[CurLine].Top);
break; break;
} }
...@@ -8071,27 +8125,6 @@ Paragraph.prototype = ...@@ -8071,27 +8125,6 @@ Paragraph.prototype =
var NewType = Bullet.Get_Type(); var NewType = Bullet.Get_Type();
this.PresentationPr.Bullet = Bullet; this.PresentationPr.Bullet = Bullet;
if ( numbering_presentationnumfrmt_None != NewType )
{
if ( numbering_presentationnumfrmt_None === OldType )
{
// Добавляем также специальные знаки в начало параграфа
this.Internal_Content_Add( 0, new ParaPresentationNumbering(Bullet) );
}
}
else
{
// Ищем элемент с типом para_PresentationNumbering и удаляем его
for ( var Index = 0; Index < this.Content.length; Index++ )
{
if ( this.Content[Index].Type == para_PresentationNumbering )
{
this.Internal_Content_Remove( Index );
break;
}
}
}
if ( OldType != NewType ) if ( OldType != NewType )
{ {
var ParaPr = this.Get_CompiledPr2(false).ParaPr; var ParaPr = this.Get_CompiledPr2(false).ParaPr;
...@@ -9160,6 +9193,9 @@ Paragraph.prototype = ...@@ -9160,6 +9193,9 @@ Paragraph.prototype =
for ( Pos = this.Lines[CurLine].Ranges[CurRange].StartPos; Pos <= StartPos - 1; Pos++ ) for ( Pos = this.Lines[CurLine].Ranges[CurRange].StartPos; Pos <= StartPos - 1; Pos++ )
{ {
Item = this.Content[Pos]; Item = this.Content[Pos];
if ( Pos === this.Numbering.Pos )
StartX += this.Numbering.WidthVisible;
if ( undefined != Item.WidthVisible && ( para_Drawing != Item.Type || drawing_Inline === Item.DrawingType ) ) if ( undefined != Item.WidthVisible && ( para_Drawing != Item.Type || drawing_Inline === Item.DrawingType ) )
StartX += Item.WidthVisible; StartX += Item.WidthVisible;
} }
...@@ -9218,7 +9254,6 @@ Paragraph.prototype = ...@@ -9218,7 +9254,6 @@ Paragraph.prototype =
} }
} }
if ( undefined != Item.WidthVisible ) if ( undefined != Item.WidthVisible )
W += Item.WidthVisible; W += Item.WidthVisible;
...@@ -9779,7 +9814,6 @@ Paragraph.prototype = ...@@ -9779,7 +9814,6 @@ Paragraph.prototype =
NewParagraph.Internal_Content_Remove2(0, NewParagraph.Content.length); NewParagraph.Internal_Content_Remove2(0, NewParagraph.Content.length);
NewParagraph.Internal_Content_Concat( this.Content.slice( Pos ) ); NewParagraph.Internal_Content_Concat( this.Content.slice( Pos ) );
NewParagraph.Internal_Content_Add( 0, new ParaTextPr( TextPr ) ); NewParagraph.Internal_Content_Add( 0, new ParaTextPr( TextPr ) );
NewParagraph.Internal_Content_Add( 0, new ParaNumbering() );
NewParagraph.DeleteCommentOnRemove = true; NewParagraph.DeleteCommentOnRemove = true;
NewParagraph.TextPr.Value = this.TextPr.Value.Copy(); NewParagraph.TextPr.Value = this.TextPr.Value.Copy();
...@@ -9820,9 +9854,6 @@ Paragraph.prototype = ...@@ -9820,9 +9854,6 @@ Paragraph.prototype =
Para.Numbering_Remove(); Para.Numbering_Remove();
Para.Remove_PresentationNumbering(); Para.Remove_PresentationNumbering();
if ( Para.Content.length > 0 && para_Numbering === Para.Content[0].Type )
Para.Internal_Content_Remove(0);
this.Internal_Content_Concat( Para.Content ); this.Internal_Content_Concat( Para.Content );
this.RecalcInfo.Set_Type_0(pararecalc_0_All); this.RecalcInfo.Set_Type_0(pararecalc_0_All);
...@@ -12250,6 +12281,10 @@ CParaLine.prototype = ...@@ -12250,6 +12281,10 @@ CParaLine.prototype =
for ( var Pos = StartRangePos; Pos <= EndRangePos; Pos++ ) for ( var Pos = StartRangePos; Pos <= EndRangePos; Pos++ )
{ {
var Item = Content[Pos]; var Item = Content[Pos];
if ( Pos === Paragraph.Numbering.Pos )
this.Ranges[CurRange].W += Paragraph.Numbering.WidthVisible;
switch( Item.Type ) switch( Item.Type )
{ {
case para_Text: case para_Text:
......
...@@ -168,6 +168,11 @@ ParaText.prototype = ...@@ -168,6 +168,11 @@ ParaText.prototype =
return true; return true;
}, },
Can_AddNumbering : function()
{
return true;
},
Copy : function() Copy : function()
{ {
return new ParaText( this.Value ); return new ParaText( this.Value );
...@@ -331,6 +336,11 @@ ParaSpace.prototype = ...@@ -331,6 +336,11 @@ ParaSpace.prototype =
return true; return true;
}, },
Can_AddNumbering : function()
{
return true;
},
Copy : function() Copy : function()
{ {
return new ParaSpace(this.Value); return new ParaSpace(this.Value);
...@@ -398,6 +408,11 @@ ParaTextPr.prototype = ...@@ -398,6 +408,11 @@ ParaTextPr.prototype =
return true; return true;
}, },
Can_AddNumbering : function()
{
return false;
},
Set_Id : function(newId) Set_Id : function(newId)
{ {
g_oTableId.Reset_Id( this, newId, this.Id ); g_oTableId.Reset_Id( this, newId, this.Id );
...@@ -1690,6 +1705,11 @@ ParaEnd.prototype = ...@@ -1690,6 +1705,11 @@ ParaEnd.prototype =
return true; return true;
}, },
Can_AddNumbering : function()
{
return true;
},
Copy : function() Copy : function()
{ {
return new ParaEnd(); return new ParaEnd();
...@@ -1813,6 +1833,14 @@ ParaNewLine.prototype = ...@@ -1813,6 +1833,14 @@ ParaNewLine.prototype =
return true; return true;
}, },
Can_AddNumbering : function()
{
if ( break_Line === this.BreakType )
return true;
return false;
},
Copy : function() Copy : function()
{ {
return new ParaNewLine(this.BreakType); return new ParaNewLine(this.BreakType);
...@@ -1876,6 +1904,12 @@ ParaNewLineRendered.prototype = ...@@ -1876,6 +1904,12 @@ ParaNewLineRendered.prototype =
return false; return false;
}, },
Can_AddNumbering : function()
{
return false;
},
Write_ToBinary : function(Writer) Write_ToBinary : function(Writer)
{ {
// Long : Type // Long : Type
...@@ -1912,6 +1946,12 @@ ParaInlineBreak.prototype = ...@@ -1912,6 +1946,12 @@ ParaInlineBreak.prototype =
return false; return false;
}, },
Can_AddNumbering : function()
{
return false;
},
Write_ToBinary : function(Writer) Write_ToBinary : function(Writer)
{ {
// Long : Type // Long : Type
...@@ -1948,6 +1988,11 @@ ParaPageBreakRenderer.prototype = ...@@ -1948,6 +1988,11 @@ ParaPageBreakRenderer.prototype =
return false; return false;
}, },
Can_AddNumbering : function()
{
return false;
},
Write_ToBinary : function(Writer) Write_ToBinary : function(Writer)
{ {
// Long : Type // Long : Type
...@@ -1989,6 +2034,12 @@ ParaEmpty.prototype = ...@@ -1989,6 +2034,12 @@ ParaEmpty.prototype =
return true; return true;
}, },
Can_AddNumbering : function()
{
return false;
},
Copy : function() Copy : function()
{ {
return new ParaEmpty(this.NeedToDelete); return new ParaEmpty(this.NeedToDelete);
...@@ -2018,6 +2069,7 @@ ParaEmpty.prototype = ...@@ -2018,6 +2069,7 @@ ParaEmpty.prototype =
function ParaNumbering() function ParaNumbering()
{ {
this.Type = para_Numbering; this.Type = para_Numbering;
this.Pos = -1;
this.Internal = this.Internal =
{ {
...@@ -2058,6 +2110,11 @@ ParaNumbering.prototype = ...@@ -2058,6 +2110,11 @@ ParaNumbering.prototype =
return true; return true;
}, },
Can_AddNumbering : function()
{
return false;
},
Copy : function() Copy : function()
{ {
return new ParaNumbering(); return new ParaNumbering();
...@@ -2122,6 +2179,11 @@ ParaTab.prototype = ...@@ -2122,6 +2179,11 @@ ParaTab.prototype =
return true; return true;
}, },
Can_AddNumbering : function()
{
return true;
},
Copy : function() Copy : function()
{ {
return new ParaTab(); return new ParaTab();
...@@ -3301,6 +3363,14 @@ ParaDrawing.prototype = ...@@ -3301,6 +3363,14 @@ ParaDrawing.prototype =
return true; return true;
}, },
Can_AddNumbering : function()
{
if ( drawing_Inline === this.DrawingType )
return true;
return false;
},
Copy : function() Copy : function()
{ {
return this.copy(); return this.copy();
...@@ -6031,6 +6101,11 @@ ParaPageNum.prototype = ...@@ -6031,6 +6101,11 @@ ParaPageNum.prototype =
return true; return true;
}, },
Can_AddNumbering : function()
{
return true;
},
Copy : function() Copy : function()
{ {
return new ParaPageNum(); return new ParaPageNum();
...@@ -6076,6 +6151,12 @@ ParaFlowObjectAnchor.prototype = ...@@ -6076,6 +6151,12 @@ ParaFlowObjectAnchor.prototype =
return false; return false;
}, },
Can_AddNumbering : function()
{
return false;
},
Set_FlowObject : function(Object) Set_FlowObject : function(Object)
{ {
this.FlowObject = Object; this.FlowObject = Object;
...@@ -6137,6 +6218,11 @@ ParaHyperlinkStart.prototype = ...@@ -6137,6 +6218,11 @@ ParaHyperlinkStart.prototype =
return true; return true;
}, },
Can_AddNumbering : function()
{
return false;
},
Copy : function() Copy : function()
{ {
var Hyper = new ParaHyperlinkStart(); var Hyper = new ParaHyperlinkStart();
...@@ -6377,6 +6463,12 @@ ParaHyperlinkEnd.prototype = ...@@ -6377,6 +6463,12 @@ ParaHyperlinkEnd.prototype =
return true; return true;
}, },
Can_AddNumbering : function()
{
return false;
},
Copy : function() Copy : function()
{ {
return new ParaHyperlinkEnd(); return new ParaHyperlinkEnd();
...@@ -6419,6 +6511,12 @@ ParaCollaborativeChangesStart.prototype = ...@@ -6419,6 +6511,12 @@ ParaCollaborativeChangesStart.prototype =
return false; return false;
}, },
Can_AddNumbering : function()
{
return false;
},
Write_ToBinary : function(Writer) Write_ToBinary : function(Writer)
{ {
// Long : Type // Long : Type
...@@ -6455,6 +6553,12 @@ ParaCollaborativeChangesEnd.prototype = ...@@ -6455,6 +6553,12 @@ ParaCollaborativeChangesEnd.prototype =
return false; return false;
}, },
Can_AddNumbering : function()
{
return false;
},
Write_ToBinary : function(Writer) Write_ToBinary : function(Writer)
{ {
// Long : Type // Long : Type
...@@ -6493,6 +6597,12 @@ ParaCommentStart.prototype = ...@@ -6493,6 +6597,12 @@ ParaCommentStart.prototype =
return true; return true;
}, },
Can_AddNumbering : function()
{
return false;
},
Copy : function() Copy : function()
{ {
return new ParaCommentStart(this.Id); return new ParaCommentStart(this.Id);
...@@ -6537,6 +6647,12 @@ ParaCommentEnd.prototype = ...@@ -6537,6 +6647,12 @@ ParaCommentEnd.prototype =
return true; return true;
}, },
Can_AddNumbering : function()
{
return false;
},
Copy : function() Copy : function()
{ {
return new ParaCommentEnd(this.Id); return new ParaCommentEnd(this.Id);
...@@ -6589,6 +6705,12 @@ ParaPresentationNumbering.prototype = ...@@ -6589,6 +6705,12 @@ ParaPresentationNumbering.prototype =
return true; return true;
}, },
Can_AddNumbering : function()
{
return false;
},
Copy : function() Copy : function()
{ {
return new ParaPresentationNumbering(); return new ParaPresentationNumbering();
......
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