Commit 254a0080 authored by Alexander.Trofimov's avatar Alexander.Trofimov

fix bug 32389

parent 9909ac09
...@@ -2396,6 +2396,86 @@ function CPresentationBullet() ...@@ -2396,6 +2396,86 @@ function CPresentationBullet()
}; };
} }
function getNumInfoLvl(Lvl) {
var NumType = -1;
var NumSubType = -1;
var NumFormat = Lvl.Format;
var NumText = Lvl.LvlText;
var TextLen;
if ( numbering_numfmt_Bullet === NumFormat )
{
NumType = 0;
NumSubType = 0;
TextLen = NumText.length;
if ( 1 === TextLen && numbering_lvltext_Text === NumText[0].Type )
{
var NumVal = NumText[0].Value.charCodeAt(0);
if ( 0x00B7 === NumVal )
NumSubType = 1;
else if ( 0x006F === NumVal )
NumSubType = 2;
else if ( 0x00A7 === NumVal )
NumSubType = 3;
else if ( 0x0076 === NumVal )
NumSubType = 4;
else if ( 0x00D8 === NumVal )
NumSubType = 5;
else if ( 0x00FC === NumVal )
NumSubType = 6;
else if ( 0x00A8 === NumVal )
NumSubType = 7;
}
}
else
{
NumType = 1;
NumSubType = 0;
TextLen = NumText.length;
if ( 2 === TextLen && numbering_lvltext_Num === NumText[0].Type && numbering_lvltext_Text === NumText[1].Type )
{
var NumVal2 = NumText[1].Value;
if ( numbering_numfmt_Decimal === NumFormat )
{
if ( "." === NumVal2 )
NumSubType = 1;
else if ( ")" === NumVal2 )
NumSubType = 2;
}
else if ( numbering_numfmt_UpperRoman === NumFormat )
{
if ( "." === NumVal2 )
NumSubType = 3;
}
else if ( numbering_numfmt_UpperLetter === NumFormat )
{
if ( "." === NumVal2 )
NumSubType = 4;
}
else if ( numbering_numfmt_LowerLetter === NumFormat )
{
if ( ")" === NumVal2 )
NumSubType = 5;
else if ( "." === NumVal2 )
NumSubType = 6;
}
else if ( numbering_numfmt_LowerRoman === NumFormat )
{
if ( "." === NumVal2 )
NumSubType = 7;
}
}
}
return {NumType: NumType, NumSubType: NumSubType};
}
//--------------------------------------------------------export---------------------------------------------------- //--------------------------------------------------------export----------------------------------------------------
window['AscCommonWord'] = window['AscCommonWord'] || {}; window['AscCommonWord'] = window['AscCommonWord'] || {};
window['AscCommonWord'].CAbstractNum = CAbstractNum; window['AscCommonWord'].CAbstractNum = CAbstractNum;
window['AscCommonWord'].getNumInfoLvl = getNumInfoLvl;
...@@ -10738,3 +10738,5 @@ window["AscCommonWord"].CStyle = CStyle; ...@@ -10738,3 +10738,5 @@ window["AscCommonWord"].CStyle = CStyle;
window["AscCommonWord"].Default_Tab_Stop = Default_Tab_Stop; window["AscCommonWord"].Default_Tab_Stop = Default_Tab_Stop;
window["AscCommonWord"].highlight_None = highlight_None; window["AscCommonWord"].highlight_None = highlight_None;
window["AscCommonWord"].spacing_Auto = spacing_Auto; window["AscCommonWord"].spacing_Auto = spacing_Auto;
window["AscCommonWord"].wrap_NotBeside = wrap_NotBeside;
window["AscCommonWord"].wrap_Around = wrap_Around;
...@@ -1557,77 +1557,9 @@ asc_docs_api.prototype.UpdateParagraphProp = function(ParaPr) ...@@ -1557,77 +1557,9 @@ asc_docs_api.prototype.UpdateParagraphProp = function(ParaPr)
if ( undefined !== Numb && undefined !== Numb.Lvl[ParaPr.NumPr.Lvl] ) if ( undefined !== Numb && undefined !== Numb.Lvl[ParaPr.NumPr.Lvl] )
{ {
var Lvl = Numb.Lvl[ParaPr.NumPr.Lvl]; var res = AscCommonWord.getNumInfoLvl(Numb.Lvl[ParaPr.NumPr.Lvl]);
var NumFormat = Lvl.Format; NumType = res.NumType;
var NumText = Lvl.LvlText; NumSubType = res.NumSubType;
if ( numbering_numfmt_Bullet === NumFormat )
{
NumType = 0;
NumSubType = 0;
var TextLen = NumText.length;
if ( 1 === TextLen && numbering_lvltext_Text === NumText[0].Type )
{
var NumVal = NumText[0].Value.charCodeAt(0);
if ( 0x00B7 === NumVal )
NumSubType = 1;
else if ( 0x006F === NumVal )
NumSubType = 2;
else if ( 0x00A7 === NumVal )
NumSubType = 3;
else if ( 0x0076 === NumVal )
NumSubType = 4;
else if ( 0x00D8 === NumVal )
NumSubType = 5;
else if ( 0x00FC === NumVal )
NumSubType = 6;
else if ( 0x00A8 === NumVal )
NumSubType = 7;
}
}
else
{
NumType = 1;
NumSubType = 0;
var TextLen = NumText.length;
if ( 2 === TextLen && numbering_lvltext_Num === NumText[0].Type && numbering_lvltext_Text === NumText[1].Type )
{
var NumVal2 = NumText[1].Value;
if ( numbering_numfmt_Decimal === NumFormat )
{
if ( "." === NumVal2 )
NumSubType = 1;
else if ( ")" === NumVal2 )
NumSubType = 2;
}
else if ( numbering_numfmt_UpperRoman === NumFormat )
{
if ( "." === NumVal2 )
NumSubType = 3;
}
else if ( numbering_numfmt_UpperLetter === NumFormat )
{
if ( "." === NumVal2 )
NumSubType = 4;
}
else if ( numbering_numfmt_LowerLetter === NumFormat )
{
if ( ")" === NumVal2 )
NumSubType = 5;
else if ( "." === NumVal2 )
NumSubType = 6;
}
else if ( numbering_numfmt_LowerRoman === NumFormat )
{
if ( "." === NumVal2 )
NumSubType = 7;
}
}
}
} }
} }
...@@ -1635,9 +1567,9 @@ asc_docs_api.prototype.UpdateParagraphProp = function(ParaPr) ...@@ -1635,9 +1567,9 @@ asc_docs_api.prototype.UpdateParagraphProp = function(ParaPr)
if ( undefined !== ParaPr.FramePr && undefined !== ParaPr.FramePr.Wrap ) if ( undefined !== ParaPr.FramePr && undefined !== ParaPr.FramePr.Wrap )
{ {
if ( wrap_NotBeside === ParaPr.FramePr.Wrap ) if ( AscCommonWord.wrap_NotBeside === ParaPr.FramePr.Wrap )
ParaPr.FramePr.Wrap = false; ParaPr.FramePr.Wrap = false;
else if ( wrap_Around === ParaPr.FramePr.Wrap ) else if ( AscCommonWord.wrap_Around === ParaPr.FramePr.Wrap )
ParaPr.FramePr.Wrap = true; ParaPr.FramePr.Wrap = true;
else else
ParaPr.FramePr.Wrap = undefined; ParaPr.FramePr.Wrap = undefined;
......
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