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

Избавление от старых, ненужных функций (которые работали до добавления класса CRun).

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@56749 954022d7-b5bf-4e40-9824-e11837661b57
parent 7f82c911
This diff is collapsed.
This diff is collapsed.
......@@ -15,8 +15,6 @@ var type_Paragraph = 0x0001;
var UnknownValue = null;
var Debug_ParaRunMode = true;
// Класс Paragraph
function Paragraph(DrawingDocument, Parent, PageNum, X, Y, XLimit, YLimit, bFromPresentation)
{
......@@ -82,7 +80,6 @@ function Paragraph(DrawingDocument, Parent, PageNum, X, Y, XLimit, YLimit, bFrom
X : 0,
Y : 0,
ContentPos : 0, // Ближайшая позиция в контенте (между элементами)
ContentPos2 : -1, // Реальный элемент
Line : -1,
Range : -1,
RealX : 0, // позиция курсора, без учета расположения букв
......@@ -12653,8 +12650,6 @@ function CParaLineRange(X, XEnd)
this.EndPos = 0; // Позиция в контенте параграфа, на которой заканчиваетсяданный отрезок
this.SpacePos = -1; // Позиция, с которой начинаем считать пробелы
this.StartPos2 = -1; // Позиции начала и конца отрисовки выделения
this.EndPos2 = -1; // текста(а также подчеркивания и зачеркивания)
}
CParaLineRange.prototype =
......@@ -12696,8 +12691,6 @@ CParaLineRange.prototype =
NewRange.EndPos = this.EndPos;
NewRange.SpacePos = this.SpacePos;
NewRange.StartPos2 = this.StartPos2;
NewRange.EndPos2 = this.EndPos2;
return NewRange;
}
......@@ -13177,9 +13170,7 @@ function CParagraphSelection()
this.Use = false;
this.StartPos = 0;
this.EndPos = 0;
this.StartPos2 = 0;
this.EndPos2 = 0,
this.Flag = selectionflag_Common;
this.Flag = selectionflag_Common;
}
CParagraphSelection.prototype =
......@@ -13187,13 +13178,11 @@ CParagraphSelection.prototype =
Set_StartPos : function(Pos1, Pos2)
{
this.StartPos = Pos1;
this.StartPos2 = ( undefined != Pos2 ? Pos2 : Pos1 );
},
Set_EndPos : function(Pos1, Pos2)
{
this.EndPos = Pos1;
this.EndPos2 = ( undefined != Pos2 ? Pos2 : Pos1 );
}
};
......
......@@ -4717,23 +4717,10 @@ ParaDrawing.prototype =
OnEnd_MoveInline : function(NearPos)
{
if ( true !== Debug_ParaRunMode )
{
var bCorrectIndex = this.Parent === NearPos.Paragraph ? true : false;
var Index = this.Remove_FromDocument( false );
if ( true === bCorrectIndex && Index < NearPos.ContentPos )
NearPos.ContentPos--;
this.Add_ToDocument( NearPos, true );
}
else
{
NearPos.Paragraph.Check_NearestPos( NearPos );
NearPos.Paragraph.Check_NearestPos( NearPos );
var RunPr = this.Remove_FromDocument( false );
this.Add_ToDocument( NearPos, true, RunPr );
}
var RunPr = this.Remove_FromDocument( false );
this.Add_ToDocument( NearPos, true, RunPr );
},
OnEnd_ResizeInline : function(W, H)
......@@ -4807,31 +4794,19 @@ ParaDrawing.prototype =
Remove_FromDocument : function(bRecalculate)
{
if ( true !== Debug_ParaRunMode )
{
var Res = this.Parent.Remove_DrawingObject( this.Id );
if ( false != bRecalculate )
editor.WordControl.m_oLogicDocument.Recalculate();
var Result = null;
var Run = this.Parent.Get_DrawingObjectRun( this.Id );
return Res;
}
else
if ( null !== Run )
{
var Result = null;
var Run = this.Parent.Get_DrawingObjectRun( this.Id );
if ( null !== Run )
{
Run.Remove_DrawingObject( this.Id );
Result = Run.Get_TextPr();
}
Run.Remove_DrawingObject( this.Id );
Result = Run.Get_TextPr();
}
if ( false != bRecalculate )
editor.WordControl.m_oLogicDocument.Recalculate();
if ( false != bRecalculate )
editor.WordControl.m_oLogicDocument.Recalculate();
return Result;
}
return Result;
},
......@@ -4848,54 +4823,35 @@ ParaDrawing.prototype =
Add_ToDocument : function(NearPos, bRecalculate, RunPr)
{
if ( true !== Debug_ParaRunMode )
{
this.Parent = NearPos.Paragraph;
NearPos.Paragraph.Internal_Content_Add( Math.min( NearPos.ContentPos, NearPos.Paragraph.Content.length - 2 ), this );
if ( false != bRecalculate )
editor.WordControl.m_oLogicDocument.Recalculate();
}
else
{
NearPos.Paragraph.Check_NearestPos( NearPos );
NearPos.Paragraph.Check_NearestPos( NearPos );
var LogicDocument = this.DrawingDocument.m_oLogicDocument;
var LogicDocument = this.DrawingDocument.m_oLogicDocument;
var Para = new Paragraph(this.DrawingDocument, LogicDocument);
var DrawingRun = new ParaRun( Para );
DrawingRun.Add_ToContent( 0, this );
var Para = new Paragraph(this.DrawingDocument, LogicDocument);
var DrawingRun = new ParaRun( Para );
DrawingRun.Add_ToContent( 0, this );
if ( undefined !== RunPr )
DrawingRun.Set_Pr( RunPr.Copy() );
if ( undefined !== RunPr )
DrawingRun.Set_Pr( RunPr.Copy() );
Para.Add_ToContent( 0, DrawingRun );
Para.Add_ToContent( 0, DrawingRun );
var SelectedElement = new CSelectedElement(Para, false)
var SelectedContent = new CSelectedContent();
SelectedContent.Add( SelectedElement );
var SelectedElement = new CSelectedElement(Para, false)
var SelectedContent = new CSelectedContent();
SelectedContent.Add( SelectedElement );
NearPos.Paragraph.Parent.Insert_Content( SelectedContent, NearPos );
NearPos.Paragraph.Parent.Insert_Content( SelectedContent, NearPos );
if ( false != bRecalculate )
LogicDocument.Recalculate();
}
if ( false != bRecalculate )
LogicDocument.Recalculate();
},
Add_ToDocument2 : function(Paragraph)
{
if ( true !== Debug_ParaRunMode )
{
this.Parent = Paragraph;
Paragraph.Internal_Content_Add( Paragraph.Internal_GetStartPos(), this );
}
else
{
var DrawingRun = new ParaRun( Paragraph );
DrawingRun.Add_ToContent( 0, this );
var DrawingRun = new ParaRun( Paragraph );
DrawingRun.Add_ToContent( 0, this );
Paragraph.Add_ToContent( 0, DrawingRun );
}
Paragraph.Add_ToContent( 0, DrawingRun );
},
Update_CursorType : function(X, Y, PageIndex)
......
This diff is collapsed.
This diff is collapsed.
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