Commit f9cd78e0 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@54607 954022d7-b5bf-4e40-9824-e11837661b57
parent db70c759
......@@ -908,6 +908,9 @@ function ParaComment(Start, Id)
this.StartLine = 0;
this.StartRange = 0;
this.Lines = new Array();
this.LinesLength = 0;
}
ParaComment.prototype =
......@@ -979,9 +982,11 @@ ParaComment.prototype =
Save_Lines : function()
{
var CommentLines = new CParagraphLinesInfo(this.StartLine, this.StartRange);
return CommentLines;
},
Restore_Lines : function(SL)
Restore_Lines : function(CommentLines)
{
},
......
......@@ -11557,6 +11557,9 @@ CDocument.prototype =
this.Content[Pos].Hyperlink_Remove();
}
if ( true === Debug_ParaRunMode )
this.Recalculate();
this.Document_UpdateInterfaceState();
},
......
This diff is collapsed.
This diff is collapsed.
......@@ -70,6 +70,39 @@ ParaRun.prototype =
// Функции для работы с содержимым данного рана
//-----------------------------------------------------------------------------------
Get_Text : function(Text)
{
if ( null === Text.Text )
return;
var ContentLen = this.Content.length;
for ( var CurPos = 0; CurPos < ContentLen; CurPos++ )
{
var Item = this.Content[CurPos];
var bBreak = false;
switch ( Item.Type )
{
case para_Drawing:
case para_End:
case para_PageNum:
{
Text.Text = null;
bBreak = true;
break;
}
case para_Text : Text.Text += Item.Value; break;
case para_Space:
case para_Tab : Text.Text += " "; break;
}
if ( true === bBreak )
break;
}
},
// Проверяем пустой ли ран
Is_Empty : function(Props)
{
......@@ -1852,20 +1885,22 @@ ParaRun.prototype =
Save_Lines : function()
{
var Lines = new Array();
var RunLines = new CParagraphLinesInfo(this.StartLine, this.StartRange);
for ( var CurLine = 0; CurLine < this.LinesLength; CurLine++ )
{
Lines.push( this.Lines[CurLine].Copy() );
RunLines.Lines.push( this.Lines[CurLine].Copy() );
}
return { Lines : Lines, LinesLength : this.LinesLength } ;
RunLines.LinesLength = this.LinesLength;
return RunLines;
},
Restore_Lines : function(SL)
Restore_Lines : function(RunLines)
{
this.Lines = SL.Lines;
this.LinesLength = SL.LinesLength;
this.Lines = RunLines.Lines;
this.LinesLength = RunLines.LinesLength;
this.Range = this.Lines[0].Ranges[0];
},
......@@ -3093,7 +3128,23 @@ ParaRun.prototype =
this.Recalc_CompiledPr(true);
},
Apply_TextPr : function(TextPr, IncFontSize)
Apply_TextPr : function(TextPr, IncFontSize, ApplyToAll)
{
if ( true === ApplyToAll )
{
if ( undefined === IncFontSize )
{
this.Apply_Pr( TextPr );
}
else
{
var _TextPr = new CTextPr();
var CurTextPr = this.Get_CompiledPr( false );
this.Set_FontSize( FontSize_IncreaseDecreaseValue( IncFontSize, CurTextPr.FontSize ) );
}
}
else
{
var Result = [];
var LRun = this, CRun = null, RRun = null;
......@@ -3216,6 +3267,7 @@ ParaRun.prototype =
Result.push( RRun );
return Result;
}
},
Split_Run : function(Pos)
......@@ -3272,46 +3324,46 @@ ParaRun.prototype =
Apply_Pr : function(TextPr)
{
if ( undefined != TextPr.Bold )
this.Set_Bold( TextPr.Bold );
this.Set_Bold( null === TextPr.Bold ? undefined : TextPr.Bold );
if ( undefined != TextPr.Italic )
this.Set_Italic( TextPr.Italic );
this.Set_Italic( null === TextPr.Italic ? undefined : TextPr.Italic );
if ( undefined != TextPr.Strikeout )
this.Set_Strikeout( TextPr.Strikeout );
this.Set_Strikeout( null === TextPr.Strikeout ? undefined : TextPr.Strikeout );
if ( undefined != TextPr.Underline )
this.Set_Underline( TextPr.Underline );
if ( undefined !== TextPr.Underline )
this.Set_Underline( null === TextPr.Underline ? undefined : TextPr.Underline );
if ( undefined != TextPr.FontSize )
this.Set_FontSize( TextPr.FontSize );
this.Set_FontSize( null === TextPr.FontSize ? undefined : TextPr.FontSize );
if ( undefined != TextPr.Color )
this.Set_Color( TextPr.Color );
if ( undefined !== TextPr.Color )
this.Set_Color( null === TextPr.Color ? undefined : TextPr.Color );
if ( undefined != TextPr.VertAlign )
this.Set_VertAlign( TextPr.VertAlign );
this.Set_VertAlign( null === TextPr.VertAlign ? undefined : TextPr.VertAlign );
if ( undefined != TextPr.HighLight )
this.Set_HighLight( TextPr.HighLight );
this.Set_HighLight( null === TextPr.HighLight ? undefined : TextPr.HighLight );
if ( undefined != TextPr.RStyle )
this.Set_RStyle( TextPr.RStyle );
if ( undefined !== TextPr.RStyle )
this.Set_RStyle( null === TextPr.RStyle ? undefined : TextPr.RStyle );
if ( undefined != TextPr.Spacing )
this.Set_Spacing( TextPr.Spacing );
this.Set_Spacing( null === TextPr.Spacing ? undefined : TextPr.Spacing );
if ( undefined != TextPr.DStrikeout )
this.Set_DStrikeout( TextPr.DStrikeout );
this.Set_DStrikeout( null === TextPr.DStrikeout ? undefined : TextPr.DStrikeout );
if ( undefined != TextPr.Caps )
this.Set_Caps( TextPr.Caps );
this.Set_Caps( null === TextPr.Caps ? undefined : TextPr.Caps );
if ( undefined != TextPr.SmallCaps )
this.Set_SmallCaps( TextPr.SmallCaps );
this.Set_SmallCaps( null === TextPr.SmallCaps ? undefined : TextPr.SmallCaps );
if ( undefined != TextPr.Position )
this.Set_Position( TextPr.Position );
this.Set_Position( null === TextPr.Position ? undefined : TextPr.Position );
if ( undefined != TextPr.RFonts )
this.Set_RFonts2( TextPr.RFonts );
......
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