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;
} }
......
This diff is collapsed.
...@@ -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