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

Исправлен баг с выбором шрифта для символа нумерации. Реализовано...

Исправлен баг с выбором шрифта для символа нумерации. Реализовано подхыватывание табулированного списка после маркировки (баг 10854). Исправлено, что настройки линейки сбивались при добавлении нумерации к параграфу (баги 11817, 11400).

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@48027 954022d7-b5bf-4e40-9824-e11837661b57
parent 16c2cceb
......@@ -3384,50 +3384,50 @@ CDocument.prototype =
var LvlText = "";
var LvlTextPr = new CTextPr();
LvlTextPr.FontFamily = { Name : "Times New Roman", Index : -1 };
LvlTextPr.RFonts.Set_All( "Times New Roman", -1 );
switch ( NumInfo.SubType )
{
case 1:
{
LvlText = String.fromCharCode( 0x00B7 );
LvlTextPr.FontFamily = { Name : "Symbol", Index : -1 };
LvlTextPr.RFonts.Set_All( "Symbol", -1 );
break;
}
case 2:
{
LvlText = "o";
LvlTextPr.FontFamily = { Name : "Courier New", Index : -1 };
LvlTextPr.RFonts.Set_All( "Courier New", -1 );
break;
}
case 3:
{
LvlText = String.fromCharCode( 0x00A7 );
LvlTextPr.FontFamily = { Name : "Wingdings", Index : -1 };
LvlTextPr.RFonts.Set_All( "Wingdings", -1 );
break;
}
case 4:
{
LvlText = String.fromCharCode( 0x0076 );
LvlTextPr.FontFamily = { Name : "Wingdings", Index : -1 };
LvlTextPr.RFonts.Set_All( "Wingdings", -1 );
break;
}
case 5:
{
LvlText = String.fromCharCode( 0x00D8 );
LvlTextPr.FontFamily = { Name : "Wingdings", Index : -1 };
LvlTextPr.RFonts.Set_All( "Wingdings", -1 );
break;
}
case 6:
{
LvlText = String.fromCharCode( 0x00FC );
LvlTextPr.FontFamily = { Name : "Wingdings", Index : -1 };
LvlTextPr.RFonts.Set_All( "Wingdings", -1 );
break;
}
case 7:
{
LvlText = String.fromCharCode( 0x00A8 );
LvlTextPr.FontFamily = { Name : "Symbol", Index : -1 };
LvlTextPr.RFonts.Set_All( "Symbol", -1 );
break;
}
}
......@@ -3810,50 +3810,50 @@ CDocument.prototype =
var LvlText = "";
var LvlTextPr = new CTextPr();
LvlTextPr.FontFamily = { Name : "Times New Roman", Index : -1 };
LvlTextPr.RFonts.Set_All( "Times New Roman", -1 );
switch ( NumInfo.SubType )
{
case 1:
{
LvlText = String.fromCharCode( 0x00B7 );
LvlTextPr.FontFamily = { Name : "Symbol", Index : -1 };
LvlTextPr.RFonts.Set_All( "Symbol", -1 );
break;
}
case 2:
{
LvlText = "o";
LvlTextPr.FontFamily = { Name : "Courier New", Index : -1 };
LvlTextPr.RFonts.Set_All( "Courier New", -1 );
break;
}
case 3:
{
LvlText = String.fromCharCode( 0x00A7 );
LvlTextPr.FontFamily = { Name : "Wingdings", Index : -1 };
LvlTextPr.RFonts.Set_All( "Wingdings", -1 );
break;
}
case 4:
{
LvlText = String.fromCharCode( 0x0076 );
LvlTextPr.FontFamily = { Name : "Wingdings", Index : -1 };
LvlTextPr.RFonts.Set_All( "Wingdings", -1 );
break;
}
case 5:
{
LvlText = String.fromCharCode( 0x00D8 );
LvlTextPr.FontFamily = { Name : "Wingdings", Index : -1 };
LvlTextPr.RFonts.Set_All( "Wingdings", -1 );
break;
}
case 6:
{
LvlText = String.fromCharCode( 0x00FC );
LvlTextPr.FontFamily = { Name : "Wingdings", Index : -1 };
LvlTextPr.RFonts.Set_All( "Wingdings", -1 );
break;
}
case 7:
{
LvlText = String.fromCharCode( 0x00A8 );
LvlTextPr.FontFamily = { Name : "Symbol", Index : -1 };
LvlTextPr.RFonts.Set_All( "Symbol", -1 );
break;
}
}
......
......@@ -1516,7 +1516,7 @@ CDocumentContent.prototype =
{
if ( true == this.Selection.Use )
this.Remove( 1, true );
var Item = this.Content[this.CurPos.ContentPos];
if ( type_Paragraph == Item.GetType() )
{
......@@ -3582,50 +3582,51 @@ CDocumentContent.prototype =
var LvlText = "";
var LvlTextPr = new CTextPr();
LvlTextPr.FontFamily = { Name : "Times New Roman", Index : -1 };
LvlTextPr.RFonts.Set_All( "Times New Roman", -1 );
switch ( NumInfo.SubType )
{
case 1:
{
LvlText = String.fromCharCode( 0x00B7 );
LvlTextPr.FontFamily = { Name : "Symbol", Index : -1 };
LvlTextPr.RFonts.Set_All( "Symbol", -1 );
break;
}
case 2:
{
LvlText = "o";
LvlTextPr.FontFamily = { Name : "Courier New", Index : -1 };
LvlTextPr.RFonts.Set_All( "Courier New", -1 );
break;
}
case 3:
{
LvlText = String.fromCharCode( 0x00A7 );
LvlTextPr.FontFamily = { Name : "Wingdings", Index : -1 };
LvlTextPr.RFonts.Set_All( "Wingdings", -1 );
break;
}
case 4:
{
LvlText = String.fromCharCode( 0x0076 );
LvlTextPr.FontFamily = { Name : "Wingdings", Index : -1 };
LvlTextPr.RFonts.Set_All( "Wingdings", -1 );
break;
}
case 5:
{
LvlText = String.fromCharCode( 0x00D8 );
LvlTextPr.FontFamily = { Name : "Wingdings", Index : -1 };
LvlTextPr.RFonts.Set_All( "Wingdings", -1 );
break;
}
case 6:
{
LvlText = String.fromCharCode( 0x00FC );
LvlTextPr.FontFamily = { Name : "Wingdings", Index : -1 };
LvlTextPr.RFonts.Set_All( "Wingdings", -1 );
break;
}
case 7:
{
LvlText = String.fromCharCode( 0x00A8 );
LvlTextPr.FontFamily = { Name : "Symbol", Index : -1 };
LvlTextPr.RFonts.Set_All( "Symbol", -1 );
break;
}
}
......@@ -4004,50 +4005,50 @@ CDocumentContent.prototype =
var LvlText = "";
var LvlTextPr = new CTextPr();
LvlTextPr.FontFamily = { Name : "Times New Roman", Index : -1 };
LvlTextPr.RFonts.Set_All( "Times New Roman", -1 );
switch ( NumInfo.SubType )
{
case 1:
{
LvlText = String.fromCharCode( 0x00B7 );
LvlTextPr.FontFamily = { Name : "Symbol", Index : -1 };
LvlTextPr.RFonts.Set_All( "Symbol", -1 );
break;
}
case 2:
{
LvlText = "o";
LvlTextPr.FontFamily = { Name : "Courier New", Index : -1 };
LvlTextPr.RFonts.Set_All( "Courier New", -1 );
break;
}
case 3:
{
LvlText = String.fromCharCode( 0x00A7 );
LvlTextPr.FontFamily = { Name : "Wingdings", Index : -1 };
LvlTextPr.RFonts.Set_All( "Wingdings", -1 );
break;
}
case 4:
{
LvlText = String.fromCharCode( 0x0076 );
LvlTextPr.FontFamily = { Name : "Wingdings", Index : -1 };
LvlTextPr.RFonts.Set_All( "Wingdings", -1 );
break;
}
case 5:
{
LvlText = String.fromCharCode( 0x00D8 );
LvlTextPr.FontFamily = { Name : "Wingdings", Index : -1 };
LvlTextPr.RFonts.Set_All( "Wingdings", -1 );
break;
}
case 6:
{
LvlText = String.fromCharCode( 0x00FC );
LvlTextPr.FontFamily = { Name : "Wingdings", Index : -1 };
LvlTextPr.RFonts.Set_All( "Wingdings", -1 );
break;
}
case 7:
{
LvlText = String.fromCharCode( 0x00A8 );
LvlTextPr.FontFamily = { Name : "Symbol", Index : -1 };
LvlTextPr.RFonts.Set_All( "Symbol", -1 );
break;
}
}
......
......@@ -224,17 +224,17 @@ function CAbstractNum(Type)
var TextPr = new CTextPr();
if ( 0 == Index % 3 )
{
TextPr.FontFamily = { Name : "Symbol", Index : -1 };
TextPr.RFonts.Set_All( "Symbol", -1 );
Lvl.LvlText.push( new CLvlText_Text( String.fromCharCode( 0x00B7 ) ) );
}
else if ( 1 == Index % 3 )
{
TextPr.FontFamily = { Name : "Courier New", Index : -1 };
TextPr.RFonts.Set_All( "Courier New", -1 );
Lvl.LvlText.push( new CLvlText_Text( "o" ) );
}
else
{
TextPr.FontFamily = { Name : "Wingdings", Index : -1 };
TextPr.RFonts.Set_All( "Wingdings", -1 );
Lvl.LvlText.push( new CLvlText_Text( String.fromCharCode( 0x00A7 ) ) );
}
......@@ -335,7 +335,7 @@ CAbstractNum.prototype =
Lvl.ParaPr.Ind.FirstLine = FirstLine;
var TextPr = new CTextPr();
TextPr.FontFamily = { Name : "Times New Roman", Index : -1 };
TextPr.RFonts.Set_All( "Times New Roman", -1 );
Lvl.TextPr = TextPr;
......@@ -384,7 +384,7 @@ CAbstractNum.prototype =
Lvl.ParaPr.Ind.FirstLine = FirstLine;
var TextPr = new CTextPr();
TextPr.FontFamily = { Name : "Times New Roman", Index : -1 };
TextPr.RFonts.Set_All( "Times New Roman", -1 );
Lvl.TextPr = TextPr;
......@@ -464,7 +464,7 @@ CAbstractNum.prototype =
Lvl.ParaPr.Ind.FirstLine = FirstLine;
var TextPr = new CTextPr();
TextPr.FontFamily = { Name : "Times New Roman", Index : -1 };
TextPr.RFonts.Set_All( "Times New Roman", -1 );
Lvl.TextPr = TextPr;
......@@ -545,9 +545,9 @@ CAbstractNum.prototype =
var TextPr = new CTextPr();
if ( 3 === Index || 4 === Index || 7 === Index || 8 === Index )
TextPr.FontFamily = { Name : "Times New Roman", Index : -1 };
TextPr.RFonts.Set_All( "Times New Roman", -1 );
else
TextPr.FontFamily = { Name : "Wingdings", Index : -1 };
TextPr.RFonts.Set_All( "Wingdings", -1 );
Lvl.TextPr = TextPr;
......@@ -584,17 +584,17 @@ CAbstractNum.prototype =
var TextPr = new CTextPr();
if ( 0 == Index % 3 )
{
TextPr.FontFamily = { Name : "Symbol", Index : -1 };
TextPr.RFonts.Set_All( "Symbol", -1 );
Lvl.LvlText.push( new CLvlText_Text( String.fromCharCode( 0x00B7 ) ) );
}
else if ( 1 == Index % 3 )
{
TextPr.FontFamily = { Name : "Courier New", Index : -1 };
TextPr.RFonts.Set_All( "Courier New", -1 );
Lvl.LvlText.push( new CLvlText_Text( "o" ) );
}
else
{
TextPr.FontFamily = { Name : "Wingdings", Index : -1 };
TextPr.RFonts.Set_All( "Wingdings", -1 );
Lvl.LvlText.push( new CLvlText_Text( String.fromCharCode( 0x00A7 ) ) );
}
......@@ -638,7 +638,7 @@ CAbstractNum.prototype =
Lvl.LvlText = new Array();
Lvl.LvlText.push( new CLvlText_Num( iLvl ) );
Lvl.LvlText.push( new CLvlText_Text( ")" ) );
Lvl.TextPr.FontFamily = { Name : "Times New Roman", Index : -1 };
Lvl.TextPr.RFonts.Set_All( "Times New Roman", -1 );
var Lvl_new = this.Internal_CopyLvl( Lvl );
History.Add( this, { Type : historyitem_AbstractNum_LvlChange, Index : iLvl, Old : Lvl_old, New : Lvl_new } );
......@@ -659,7 +659,7 @@ CAbstractNum.prototype =
Lvl.LvlText = new Array();
Lvl.LvlText.push( new CLvlText_Num( iLvl ) );
Lvl.LvlText.push( new CLvlText_Text( "." ) );
Lvl.TextPr.FontFamily = { Name : "Times New Roman", Index : -1 };
Lvl.TextPr.RFonts.Set_All( "Times New Roman", -1 );
var Lvl_new = this.Internal_CopyLvl( Lvl );
History.Add( this, { Type : historyitem_AbstractNum_LvlChange, Index : iLvl, Old : Lvl_old, New : Lvl_new } );
......@@ -680,7 +680,7 @@ CAbstractNum.prototype =
Lvl.LvlText = new Array();
Lvl.LvlText.push( new CLvlText_Num( iLvl ) );
Lvl.LvlText.push( new CLvlText_Text( "." ) );
Lvl.TextPr.FontFamily = { Name : "Times New Roman", Index : -1 };
Lvl.TextPr.RFonts.Set_All( "Times New Roman", -1 );
var Lvl_new = this.Internal_CopyLvl( Lvl );
History.Add( this, { Type : historyitem_AbstractNum_LvlChange, Index : iLvl, Old : Lvl_old, New : Lvl_new } );
......@@ -701,7 +701,7 @@ CAbstractNum.prototype =
Lvl.LvlText = new Array();
Lvl.LvlText.push( new CLvlText_Num( iLvl ) );
Lvl.LvlText.push( new CLvlText_Text( ")" ) );
Lvl.TextPr.FontFamily = { Name : "Times New Roman", Index : -1 };
Lvl.TextPr.RFonts.Set_All( "Times New Roman", -1 );
var Lvl_new = this.Internal_CopyLvl( Lvl );
History.Add( this, { Type : historyitem_AbstractNum_LvlChange, Index : iLvl, Old : Lvl_old, New : Lvl_new } );
......@@ -722,7 +722,7 @@ CAbstractNum.prototype =
Lvl.LvlText = new Array();
Lvl.LvlText.push( new CLvlText_Num( iLvl ) );
Lvl.LvlText.push( new CLvlText_Text( "." ) );
Lvl.TextPr.FontFamily = { Name : "Times New Roman", Index : -1 };
Lvl.TextPr.RFonts.Set_All( "Times New Roman", -1 );
var Lvl_new = this.Internal_CopyLvl( Lvl );
History.Add( this, { Type : historyitem_AbstractNum_LvlChange, Index : iLvl, Old : Lvl_old, New : Lvl_new } );
......@@ -743,7 +743,7 @@ CAbstractNum.prototype =
Lvl.LvlText = new Array();
Lvl.LvlText.push( new CLvlText_Num( iLvl ) );
Lvl.LvlText.push( new CLvlText_Text( "." ) );
Lvl.TextPr.FontFamily = { Name : "Times New Roman", Index : -1 };
Lvl.TextPr.RFonts.Set_All( "Times New Roman", -1 );
var Lvl_new = this.Internal_CopyLvl( Lvl );
History.Add( this, { Type : historyitem_AbstractNum_LvlChange, Index : iLvl, Old : Lvl_old, New : Lvl_new } );
......@@ -764,7 +764,7 @@ CAbstractNum.prototype =
Lvl.LvlText = new Array();
Lvl.LvlText.push( new CLvlText_Num( iLvl ) );
Lvl.LvlText.push( new CLvlText_Text( ")" ) );
Lvl.TextPr.FontFamily = { Name : "Times New Roman", Index : -1 };
Lvl.TextPr.RFonts.Set_All( "Times New Roman", -1 );
var Lvl_new = this.Internal_CopyLvl( Lvl );
History.Add( this, { Type : historyitem_AbstractNum_LvlChange, Index : iLvl, Old : Lvl_old, New : Lvl_new } );
......@@ -785,7 +785,7 @@ CAbstractNum.prototype =
Lvl.LvlText = new Array();
Lvl.LvlText.push( new CLvlText_Num( iLvl ) );
Lvl.LvlText.push( new CLvlText_Text( "." ) );
Lvl.TextPr.FontFamily = { Name : "Times New Roman", Index : -1 };
Lvl.TextPr.RFonts.Set_All( "Times New Roman", -1 );
var Lvl_new = this.Internal_CopyLvl( Lvl );
History.Add( this, { Type : historyitem_AbstractNum_LvlChange, Index : iLvl, Old : Lvl_old, New : Lvl_new } );
......@@ -806,7 +806,7 @@ CAbstractNum.prototype =
Lvl.LvlText = new Array();
Lvl.LvlText.push( new CLvlText_Num( iLvl ) );
Lvl.LvlText.push( new CLvlText_Text( "." ) );
Lvl.TextPr.FontFamily = { Name : "Times New Roman", Index : -1 };
Lvl.TextPr.RFonts.Set_All( "Times New Roman", -1 );
var Lvl_new = this.Internal_CopyLvl( Lvl );
History.Add( this, { Type : historyitem_AbstractNum_LvlChange, Index : iLvl, Old : Lvl_old, New : Lvl_new } );
......
This diff is collapsed.
......@@ -4034,6 +4034,35 @@ function CRFonts()
CRFonts.prototype =
{
Set_All : function(FontName, FontIndex)
{
this.Ascii =
{
Name : FontName,
Index : FontIndex
};
this.EastAsia =
{
Name : FontName,
Index : FontIndex
};
this.HAnsi =
{
Name : FontName,
Index : FontIndex
};
this.CS =
{
Name : FontName,
Index : FontIndex
};
this.Hint = fonthint_Default;
},
Copy : function()
{
var RFonts = new CRFonts();
......@@ -5580,6 +5609,46 @@ CNumPr.prototype =
}
};
function CFramePr()
{
this.DropCap = undefined; // Является ли данный элемент буквицей
this.H = undefined;
this.HAnchor = undefined;
this.HRule = undefined;
this.HSpace = undefined;
this.Lines = undefined;
this.VAnchor = undefined;
this.VSpace = undefined;
this.W = undefined;
this.Wrap = undefined;
this.X = undefined;
this.XAlign = undefined;
this.Y = undefined;
this.YAlign = undefined;
}
CFramePr.prototype =
{
Copy : function()
{
var FramePr = new CFramePr();
FramePr.DropCap = this.DropCap;
FramePr.H = this.H;
FramePr.HAnchor = this.HAnchor;
FramePr.HRule = this.HRule;
FramePr.HSpace = this.HSpace;
FramePr.Lines = this.Lines;
FramePr.VAnchor = this.VAnchor;
FramePr.VSpace = this.VSpace;
FramePr.W = this.W;
FramePr.Wrap = this.Wrap;
FramePr.X = this.X;
FramePr.DropCap = this.DropCap;
FramePr.DropCap = this.DropCap;
}
};
function CParaPr()
{
this.ContextualSpacing = undefined; // Удалять ли интервал между параграфами одинакового стиля
......@@ -5604,6 +5673,7 @@ function CParaPr()
this.Tabs = undefined; // Заданные табы
this.NumPr = undefined; // Нумерация
this.PStyle = undefined; // Стиль параграфа
this.FramePr = undefined;
}
CParaPr.prototype =
......
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