[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 3 commits - configure.cmd svtools/source sw/source writerfilter/source
Steve Yin
steve_y at apache.org
Fri Nov 28 08:07:30 PST 2014
configure.cmd | 2
svtools/source/svrtf/parrtf.cxx | 10 +--
sw/source/filter/rtf/rtfnum.cxx | 76 +++++++++++++++++++----
sw/source/filter/ww8/rtfattributeoutput.cxx | 29 ++++++++
sw/source/filter/ww8/wrtw8num.cxx | 55 ++++++++++++++++
sw/source/filter/ww8/ww8par2.cxx | 37 +++++++++--
sw/source/filter/ww8/ww8par3.cxx | 65 +++++++++++++------
writerfilter/source/dmapper/ConversionHelper.cxx | 13 +++
8 files changed, 240 insertions(+), 47 deletions(-)
New commits:
commit 0138631f2551dd526e9f63f779e442b185801f9e
Author: Steve Yin <steve_y at apache.org>
Date: Fri Nov 28 15:30:07 2014 +0000
Issue 125495 - Awkward Chinese (ZH-TW) numbering suffix when importing RTF document
Contributor: Mark Hung
diff --git a/svtools/source/svrtf/parrtf.cxx b/svtools/source/svrtf/parrtf.cxx
index f84ac09..574194c 100644
--- a/svtools/source/svrtf/parrtf.cxx
+++ b/svtools/source/svrtf/parrtf.cxx
@@ -649,20 +649,20 @@ void SvRTFParser::Continue( int nToken )
break; // unbekannte Token ueberspringen
case RTF_NEXTTYPE:
case RTF_ANSITYPE:
- SetSrcEncoding( eCodeSet = RTL_TEXTENCODING_MS_1252 );
+ SetEncoding( eCodeSet = RTL_TEXTENCODING_MS_1252 );
break;
case RTF_MACTYPE:
- SetSrcEncoding( eCodeSet = RTL_TEXTENCODING_APPLE_ROMAN );
+ SetEncoding( eCodeSet = RTL_TEXTENCODING_APPLE_ROMAN );
break;
case RTF_PCTYPE:
- SetSrcEncoding( eCodeSet = RTL_TEXTENCODING_IBM_437 );
+ SetEncoding( eCodeSet = RTL_TEXTENCODING_IBM_437 );
break;
case RTF_PCATYPE:
- SetSrcEncoding( eCodeSet = RTL_TEXTENCODING_IBM_850 );
+ SetEncoding( eCodeSet = RTL_TEXTENCODING_IBM_850 );
break;
case RTF_ANSICPG:
eCodeSet = rtl_getTextEncodingFromWindowsCodePage(nTokenValue);
- SetSrcEncoding(eCodeSet);
+ SetEncoding(eCodeSet);
break;
default:
NEXTTOKEN:
commit a2fdc4c281b66d927295b93b1102046845b1b958
Author: Steve Yin <steve_y at apache.org>
Date: Fri Nov 28 15:27:41 2014 +0000
Issue 125400 - CJK numbering ordered list fallback to Arabic numerals
Contributor: Mark Hung
diff --git a/sw/source/filter/rtf/rtfnum.cxx b/sw/source/filter/rtf/rtfnum.cxx
index 641f9ad..d989f99 100644
--- a/sw/source/filter/rtf/rtfnum.cxx
+++ b/sw/source/filter/rtf/rtfnum.cxx
@@ -57,6 +57,70 @@
#define RTF_NUMRULE_NAME "RTF_Num"
+static sal_Int16 lcl_GetStyleForNFC( sal_Int16 nNFC)
+{
+ static const sal_Int16 aMap[] =
+ {
+ style::NumberingType::ARABIC, // 0 - Arabic (1, 2, 3)
+ style::NumberingType::ROMAN_UPPER, // 1 - Uppercase Roman numeral (I, II, III)
+ style::NumberingType::ROMAN_LOWER, // 2 - Lowercase Roman numeral (i, ii, iii)
+ style::NumberingType::CHARS_UPPER_LETTER_N, // 3 - Uppercase letter (A, B, C)
+ style::NumberingType::CHARS_LOWER_LETTER_N, // 4 - Lowercase letter (a, b, c)
+ style::NumberingType::ARABIC, // 5 - Ordinal number (1st, 2nd, 3rd)
+ style::NumberingType::ARABIC, // 6 - Cardinal text number (One, Two Three)
+ style::NumberingType::ARABIC, // 7 - Ordinal text number (First, Second, Third)
+ style::NumberingType::NUMBER_NONE, // 8 - Not defined
+ style::NumberingType::NUMBER_NONE, // 9 - Not defined
+ style::NumberingType::NUMBER_LOWER_ZH, // 10 - Kanji numbering without the digit character (*dbnum1).
+ style::NumberingType::NUMBER_LOWER_ZH, // 11 - Kanji numbering with the digit character (*dbnum2).
+ style::NumberingType::AIU_HALFWIDTH_JA, // 12 - phonetic Katakana characters in "aiueo" order (*aiueo).
+ style::NumberingType::IROHA_HALFWIDTH_JA, // 13 - phonetic katakana characters in "iroha" order (*iroha).
+ style::NumberingType::FULLWIDTH_ARABIC, // 14 - Double Byte character
+ style::NumberingType::ARABIC, // 15 - Single Byte character
+ style::NumberingType::NUMBER_TRADITIONAL_JA, // 16 - Kanji numbering 3 (*dbnum3).
+ style::NumberingType::ARABIC, // 17 - Kanji numbering 4 (*dbnum4).
+ style::NumberingType::ARABIC, // 18 - Circle numbering (*circlenum). - decimalEnclosedCircleChinese
+ style::NumberingType::FULLWIDTH_ARABIC, // 19 - Double-byte Arabic numbering
+ style::NumberingType::AIU_FULLWIDTH_JA, // 20 - phonetic double-byte Katakana characters (*aiueo*dbchar).
+ style::NumberingType::IROHA_FULLWIDTH_JA, // 21 - phonetic double-byte katakana characters (*iroha*dbchar).
+ style::NumberingType::ARABIC, // 22 - Arabic with leading zero (01, 02, 03, ..., 10, 11)
+ style::NumberingType::CHAR_SPECIAL, // 23 - Bullet (no number at all)
+ style::NumberingType::HANGUL_SYLLABLE_KO, // 24 - Korean numbering 2 (*ganada).
+ style::NumberingType::HANGUL_JAMO_KO, // 25 - Korean numbering 1 (*chosung).
+ style::NumberingType::ARABIC, // 26 - Chinese numbering 1 (*gb1). - decimalEnclosedFullstop
+ style::NumberingType::ARABIC, // 27 - Chinese numbering 2 (*gb2). - decimalEnclosedParen
+ style::NumberingType::ARABIC, // 28 - Chinese numbering 3 (*gb3). - decimalEnclosedCircleChinese
+ style::NumberingType::ARABIC, // 29 - Chinese numbering 4 (*gb4). - ideographEnclosedCircle
+ style::NumberingType::TIAN_GAN_ZH, // 30 - Chinese Zodiac numbering 1 (* zodiac1)
+ style::NumberingType::DI_ZI_ZH, // 31 - Chinese Zodiac numbering 2 (* zodiac2)
+ style::NumberingType::ARABIC, // 32 - Chinese Zodiac numbering 3 (* zodiac3)
+ style::NumberingType::NUMBER_LOWER_ZH, // 33 - Taiwanese double-byte numbering 1
+ style::NumberingType::NUMBER_UPPER_ZH_TW, // 34 - Taiwanese double-byte numbering 2
+ style::NumberingType::NUMBER_LOWER_ZH, // 35 - Taiwanese double-byte numbering 3
+ style::NumberingType::ARABIC, // 36 - Taiwanese double-byte numbering 4
+ style::NumberingType::NUMBER_LOWER_ZH, // 37 - Chinese double-byte numbering 1
+ style::NumberingType::NUMBER_UPPER_ZH, // 38 - Chinese double-byte numbering 2
+ style::NumberingType::NUMBER_LOWER_ZH, // 39 - Chinese double-byte numbering 3
+ style::NumberingType::ARABIC, // 40 - Chinese double-byte numbering 4
+ style::NumberingType::NUMBER_HANGUL_KO, // 41 - Korean double-byte numbering 1
+ style::NumberingType::NUMBER_HANGUL_KO, // 42 - Korean double-byte numbering 2
+ style::NumberingType::NUMBER_HANGUL_KO, // 43 - Korean double-byte numbering 3
+ style::NumberingType::NUMBER_LOWER_ZH, // 44 - Korean double-byte numbering 4
+ style::NumberingType::CHARS_HEBREW, // 45 - Hebrew non-standard decimal
+ style::NumberingType::CHARS_ARABIC, // 46 - Arabic Alif Ba Tah
+ style::NumberingType::CHARS_HEBREW, // 47 - Hebrew Biblical standard
+ style::NumberingType::ARABIC // 48 - Arabic Abjad style
+
+ };
+ const int nLen = sizeof(aMap)/sizeof(aMap[0]);
+ sal_Int16 nRet = style::NumberingType::NUMBER_NONE;
+ if (nNFC>=0 && nNFC<nLen)
+ nRet = aMap[nNFC];
+ else if (nNFC==255)
+ nRet = style::NumberingType::CHAR_SPECIAL;
+ return nRet;
+}
+
void lcl_ExpandNumFmts( SwNumRule& rRule )
{
// dann noch das NumFormat in alle Ebenen setzen
@@ -152,16 +216,8 @@ void SwRTFParser::ReadListLevel( SwNumRule& rRule, sal_uInt8 nNumLvl )
case RTF_LEVELNFC:
{
- sal_Int16 eType = SVX_NUM_ARABIC;
- switch( nTokenValue )
- {
- case 1: eType = SVX_NUM_ROMAN_UPPER; break;
- case 2: eType = SVX_NUM_ROMAN_LOWER; break;
- case 3: eType = SVX_NUM_CHARS_UPPER_LETTER_N; break;
- case 4: eType = SVX_NUM_CHARS_LOWER_LETTER_N; break;
- case 255:
- case 23: eType = SVX_NUM_CHAR_SPECIAL; break;
- }
+ sal_Int16 eType = lcl_GetStyleForNFC( nTokenValue ) ;
+
if( pCurNumFmt )
pCurNumFmt->SetNumberingType(eType);
}
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx
index 5563916..2f3201d 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -1525,8 +1525,37 @@ void RtfAttributeOutput::NumberingLevel( sal_uInt8 nLevel,
case SVX_NUM_CHARS_LOWER_LETTER:
case SVX_NUM_CHARS_LOWER_LETTER_N: nVal = 4; break;
+ case SVX_NUM_FULL_WIDTH_ARABIC: nVal=19; break;
+ case SVX_NUM_CIRCLE_NUMBER: nVal=18; break;
+ case SVX_NUM_NUMBER_LOWER_ZH:
+ nVal=35;
+ if (pOutSet)
+ {
+ const SvxLanguageItem rlang = (const SvxLanguageItem&) pOutSet->Get(RES_CHRATR_CJK_LANGUAGE,true);
+ if (LANGUAGE_CHINESE_SIMPLIFIED == rlang.GetLanguage())
+ nVal=39;
+ }
+ break;
+ case SVX_NUM_NUMBER_UPPER_ZH: nVal=38; break;
+ case SVX_NUM_NUMBER_UPPER_ZH_TW: nVal=34; break;
+ case SVX_NUM_TIAN_GAN_ZH: nVal=30; break;
+ case SVX_NUM_DI_ZI_ZH: nVal=31; break;
+ case SVX_NUM_NUMBER_TRADITIONAL_JA: nVal=16; break;
+ case SVX_NUM_AIU_FULLWIDTH_JA: nVal=20; break;
+ case SVX_NUM_AIU_HALFWIDTH_JA: nVal=12; break;
+ case SVX_NUM_IROHA_FULLWIDTH_JA: nVal=21; break;
+ case SVX_NUM_IROHA_HALFWIDTH_JA: nVal=13; break;
+ case style::NumberingType::HANGUL_SYLLABLE_KO: nVal = 24; break;// ganada
+ case style::NumberingType::HANGUL_JAMO_KO: nVal = 25; break;// chosung
+ case style::NumberingType::HANGUL_CIRCLED_SYLLABLE_KO: nVal = 24; break;
+ case style::NumberingType::HANGUL_CIRCLED_JAMO_KO: nVal = 25; break;
+ case style::NumberingType::NUMBER_HANGUL_KO: nVal = 41; break;
+ case style::NumberingType::NUMBER_UPPER_KO: nVal = 44; break;
case SVX_NUM_BITMAP:
case SVX_NUM_CHAR_SPECIAL: nVal = 23; break;
+ case SVX_NUM_NUMBER_NONE:
+ nVal = 255;
+ break;
}
m_rExport.Strm() << OOO_STRING_SVTOOLS_RTF_LEVELNFC;
m_rExport.OutULong( nVal );
diff --git a/sw/source/filter/ww8/wrtw8num.cxx b/sw/source/filter/ww8/wrtw8num.cxx
index 6af14a6..d759a9e 100644
--- a/sw/source/filter/ww8/wrtw8num.cxx
+++ b/sw/source/filter/ww8/wrtw8num.cxx
@@ -45,6 +45,7 @@
#include "writerwordglue.hxx"
#include "wrtww8.hxx"
#include "ww8par.hxx"
+#include <editeng/langitem.hxx>
//#define DUMPSYMBOLS
#ifdef DUMPSYMBOLS
@@ -203,6 +204,52 @@ void MSWordExportBase::NumberingDefinitions()
}
}
+static sal_uInt8 GetLevelNFC( sal_uInt16 eNumType, const SfxItemSet *pOutSet)
+{
+ sal_uInt8 nRet = 0;
+ switch( eNumType )
+ {
+ case SVX_NUM_CHARS_UPPER_LETTER:
+ case SVX_NUM_CHARS_UPPER_LETTER_N: nRet = 3; break;
+ case SVX_NUM_CHARS_LOWER_LETTER:
+ case SVX_NUM_CHARS_LOWER_LETTER_N: nRet = 4; break;
+ case SVX_NUM_ROMAN_UPPER: nRet = 1; break;
+ case SVX_NUM_ROMAN_LOWER: nRet = 2; break;
+
+ case SVX_NUM_BITMAP:
+ case SVX_NUM_CHAR_SPECIAL: nRet = 23; break;
+ case SVX_NUM_FULL_WIDTH_ARABIC: nRet = 14; break;
+ case SVX_NUM_CIRCLE_NUMBER: nRet = 18;break;
+ case SVX_NUM_NUMBER_LOWER_ZH:
+ nRet = 35;
+ if ( pOutSet ) {
+ const SvxLanguageItem rLang = (const SvxLanguageItem&) pOutSet->Get( RES_CHRATR_CJK_LANGUAGE,true);
+ const LanguageType eLang = rLang.GetLanguage();
+ if (LANGUAGE_CHINESE_SIMPLIFIED ==eLang) {
+ nRet = 39;
+ }
+ }
+ break;
+ case SVX_NUM_NUMBER_UPPER_ZH: nRet = 38; break;
+ case SVX_NUM_NUMBER_UPPER_ZH_TW: nRet = 34;break;
+ case SVX_NUM_TIAN_GAN_ZH: nRet = 30; break;
+ case SVX_NUM_DI_ZI_ZH: nRet = 31; break;
+ case SVX_NUM_NUMBER_TRADITIONAL_JA: nRet = 16; break;
+ case SVX_NUM_AIU_FULLWIDTH_JA: nRet = 20; break;
+ case SVX_NUM_AIU_HALFWIDTH_JA: nRet = 12; break;
+ case SVX_NUM_IROHA_FULLWIDTH_JA: nRet = 21; break;
+ case SVX_NUM_IROHA_HALFWIDTH_JA: nRet = 13; break;
+ case style::NumberingType::HANGUL_SYLLABLE_KO: nRet = 24; break;// ganada
+ case style::NumberingType::HANGUL_JAMO_KO: nRet = 25; break;// chosung
+ case style::NumberingType::HANGUL_CIRCLED_SYLLABLE_KO: nRet = 24; break;
+ case style::NumberingType::HANGUL_CIRCLED_JAMO_KO: nRet = 25; break;
+ case style::NumberingType::NUMBER_HANGUL_KO: nRet = 41; break;
+ case style::NumberingType::NUMBER_UPPER_KO: nRet = 44; break;
+ case SVX_NUM_NUMBER_NONE: nRet = 0xff; break;
+ }
+ return nRet;
+}
+
void WW8AttributeOutput::NumberingLevel( sal_uInt8 /*nLevel*/,
sal_uInt16 nStart,
sal_uInt16 nNumberingType,
@@ -222,7 +269,7 @@ void WW8AttributeOutput::NumberingLevel( sal_uInt8 /*nLevel*/,
SwWW8Writer::WriteLong( *m_rWW8Export.pTableStrm, nStart );
// Type
- *m_rWW8Export.pTableStrm << WW8Export::GetNumId( nNumberingType );
+ *m_rWW8Export.pTableStrm << GetLevelNFC( nNumberingType ,pOutSet);
// Justification
sal_uInt8 nAlign;
@@ -811,7 +858,11 @@ void WW8Export::BuildAnlvBase(WW8_ANLV& rAnlv, sal_uInt8*& rpCh,
sal_uInt16& rCharLen, const SwNumRule& rRul, const SwNumFmt& rFmt,
sal_uInt8 nSwLevel)
{
- ByteToSVBT8(WW8Export::GetNumId(rFmt.GetNumberingType()), rAnlv.nfc);
+ const SfxItemSet *pOutSet = NULL;
+ if (rFmt.GetCharFmt())
+ pOutSet = &rFmt.GetCharFmt()->GetAttrSet();
+
+ ByteToSVBT8(GetLevelNFC(rFmt.GetNumberingType(),pOutSet ), rAnlv.nfc);
sal_uInt8 nb = 0;
switch (rFmt.GetNumAdjust())
diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index 419a8ef..d432a23 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -649,10 +649,39 @@ static void SetBaseAnlv(
static SvxAdjust eAdjA[4] =
{ SVX_ADJUST_LEFT, SVX_ADJUST_RIGHT, SVX_ADJUST_LEFT, SVX_ADJUST_LEFT };
- rNum.SetNumberingType(
- static_cast< sal_Int16 >(( SVBT8ToByte( rAV.nfc ) < 8 )
- ? eNumA[SVBT8ToByte( rAV.nfc ) ]
- : SVX_NUM_NUMBER_NONE) );
+ if (SVBT8ToByte( rAV.nfc ) < 8) {
+ rNum.SetNumberingType(static_cast< sal_Int16 >(eNumA[SVBT8ToByte( rAV.nfc ) ]));
+ } else {
+ sal_Int16 nType = style::NumberingType::ARABIC; // Fallback to ARABIC instead of NONE
+ switch(SVBT8ToByte( rAV.nfc ))
+ {
+ case 14:
+ case 19:nType = style::NumberingType::FULLWIDTH_ARABIC ; break;
+ case 30:nType = style::NumberingType::TIAN_GAN_ZH ; break;
+ case 31:nType = style::NumberingType::DI_ZI_ZH ; break;
+ case 35:
+ case 36:
+ case 37:
+ case 39:
+ nType = style::NumberingType::NUMBER_LOWER_ZH ; break;
+ case 34:nType = style::NumberingType::NUMBER_UPPER_ZH_TW ; break;
+ case 38:nType = style::NumberingType::NUMBER_UPPER_ZH ; break;
+ case 10:
+ case 11:
+ nType = style::NumberingType::NUMBER_TRADITIONAL_JA ; break;
+ case 20: nType = style::NumberingType::AIU_FULLWIDTH_JA ; break;
+ case 12: nType = style::NumberingType::AIU_HALFWIDTH_JA ; break;
+ case 21: nType = style::NumberingType::IROHA_FULLWIDTH_JA ; break;
+ case 13: nType = style::NumberingType::IROHA_HALFWIDTH_JA ; break;
+ case 24: nType = style::NumberingType::HANGUL_SYLLABLE_KO;break;
+ case 25: nType = style::NumberingType::HANGUL_JAMO_KO;break;
+ case 41: nType = style::NumberingType::NUMBER_HANGUL_KO; break;
+ case 44: nType = style::NumberingType::NUMBER_UPPER_KO; break;
+ default: nType = style::NumberingType::ARABIC; break;
+ }
+
+ rNum.SetNumberingType( nType ) ;
+ }
if ((SVBT8ToByte(rAV.aBits1 ) & 0x4) >> 2)
{
diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx
index 2040c2e..580cc2f 100644
--- a/sw/source/filter/ww8/ww8par3.cxx
+++ b/sw/source/filter/ww8/ww8par3.cxx
@@ -541,7 +541,7 @@ bool WW8ListManager::ReadLVL(
{
sal_uInt8 aBits1;
sal_uInt16 nStartNo = 0; // Start-Nr. fuer den Writer
- SvxExtNumType eType; // Writer-Num-Typ
+ sal_Int16 nType(style::NumberingType::ARABIC);
SvxAdjust eAdj; // Ausrichtung (Links/rechts/zent.)
sal_Unicode cBullet(0x2190); // default safe bullet
@@ -749,55 +749,76 @@ bool WW8ListManager::ReadLVL(
// 4. den Nummerierungsstring einlesen: ergibt Prefix und Postfix
//
String sNumString(WW8Read_xstz(rSt, 0, false));
-
//
// 5. gelesene Werte in Writer Syntax umwandeln
//
if( 0 <= aLVL.nStartAt )
nStartNo = (sal_uInt16)aLVL.nStartAt;
-
switch( aLVL.nNFC )
{
case 0:
- eType = SVX_NUM_ARABIC;
+ nType = style::NumberingType::ARABIC;
break;
case 1:
- eType = SVX_NUM_ROMAN_UPPER;
+ nType = style::NumberingType::ROMAN_UPPER;
break;
case 2:
- eType = SVX_NUM_ROMAN_LOWER;
+ nType = style::NumberingType::ROMAN_LOWER;
break;
case 3:
- eType = SVX_NUM_CHARS_UPPER_LETTER_N;
+ nType = style::NumberingType::CHARS_UPPER_LETTER_N;
break;
case 4:
- eType = SVX_NUM_CHARS_LOWER_LETTER_N;
+ nType = style::NumberingType::CHARS_LOWER_LETTER_N;
break;
case 5:
// eigentlich: ORDINAL
- eType = SVX_NUM_ARABIC;
+ nType = style::NumberingType::ARABIC;
break;
case 23:
- case 25: //#114412#
- eType = SVX_NUM_CHAR_SPECIAL;
+ nType = style::NumberingType::CHAR_SPECIAL;
//For i120928,type info
if (bIsPicBullet)
{
- eType = SVX_NUM_BITMAP;
+ nType = style::NumberingType::BITMAP;
}
break;
case 255:
- eType = SVX_NUM_NUMBER_NONE;
+ nType = style::NumberingType::NUMBER_NONE;
break;
- default:
+ case 18: nType = style::NumberingType::CIRCLE_NUMBER ; break;
+ case 14:
+ case 19: nType = style::NumberingType::FULLWIDTH_ARABIC ; break;
+ case 30: nType = style::NumberingType::TIAN_GAN_ZH ; break;
+ case 31: nType = style::NumberingType::DI_ZI_ZH ; break;
+ case 35:
+ case 36:
+ case 37:
+ case 39:
+ nType = style::NumberingType::NUMBER_LOWER_ZH ; break;
+ case 34: nType = style::NumberingType::NUMBER_UPPER_ZH_TW ; break;
+ case 38: nType = style::NumberingType::NUMBER_UPPER_ZH ; break;
+ case 10:
+ case 11:
+ nType = style::NumberingType::NUMBER_TRADITIONAL_JA ; break;
+ case 20: nType = style::NumberingType::AIU_FULLWIDTH_JA ; break;
+ case 12: nType = style::NumberingType::AIU_HALFWIDTH_JA ; break;
+ case 21: nType = style::NumberingType::IROHA_FULLWIDTH_JA ; break;
+ case 13: nType = style::NumberingType::IROHA_HALFWIDTH_JA ; break;
+ case 24: nType = style::NumberingType::HANGUL_SYLLABLE_KO; break;
+ case 25: nType = style::NumberingType::HANGUL_JAMO_KO; break;
+ case 41: nType = style::NumberingType::NUMBER_HANGUL_KO; break;
+ case 44: nType = style::NumberingType::NUMBER_UPPER_KO; break;
+
+ default:
// take default
- eType = SVX_NUM_ARABIC;
- break;
+ nType = style::NumberingType::ARABIC;
+ break;
}
//If a number level is not going to be used, then record this fact
- if (SVX_NUM_NUMBER_NONE == eType)
+ if (style::NumberingType::NUMBER_NONE == nType)
rNotReallyThere[nLevel] = true;
/*
@@ -853,13 +874,13 @@ bool WW8ListManager::ReadLVL(
if (!nUpperLevel)
nUpperLevel = nMaxLevel;
- if (SVX_NUM_CHAR_SPECIAL == eType)
+ if (style::NumberingType::CHAR_SPECIAL == nType)
{
cBullet = sNumString.Len() ? sNumString.GetChar(0) : 0x2190;
if (!cBullet) // unsave control code?
cBullet = 0x2190;
- } else if (SVX_NUM_BITMAP == eType) //For i120928,position index info of graphic
+ } else if (style::NumberingType::BITMAP == nType) //For i120928,position index info of graphic
{
cGrfBulletCP = nWitchPicIsBullet; // This is a bullet picture ID
} else
@@ -922,10 +943,10 @@ bool WW8ListManager::ReadLVL(
// 6. entsprechendes NumFmt konfigurieren
if( bSetStartNo )
rNumFmt.SetStart( nStartNo );
- rNumFmt.SetNumberingType( static_cast< sal_Int16 >(eType) );
+ rNumFmt.SetNumberingType( nType );
rNumFmt.SetNumAdjust( eAdj );
- if( SVX_NUM_CHAR_SPECIAL == eType )
+ if( style::NumberingType::CHAR_SPECIAL == nType )
{
// first character of the Prefix-Text is the Bullet
rNumFmt.SetBulletChar(cBullet);
@@ -933,7 +954,7 @@ bool WW8ListManager::ReadLVL(
// SetBulletFont() rufen !!!
}
//For i120928,position index info
- else if (SVX_NUM_BITMAP == eType)
+ else if (style::NumberingType::BITMAP == nType)
{
rNumFmt.SetGrfBulletCP(cGrfBulletCP);
}
diff --git a/writerfilter/source/dmapper/ConversionHelper.cxx b/writerfilter/source/dmapper/ConversionHelper.cxx
index 2578559..fca3378 100644
--- a/writerfilter/source/dmapper/ConversionHelper.cxx
+++ b/writerfilter/source/dmapper/ConversionHelper.cxx
@@ -561,6 +561,7 @@ sal_Int16 ConvertNumberingType(sal_Int32 nNFC)
case 2:
nRet = style::NumberingType::ROMAN_LOWER;
break;
+ case NS_ooxml::LN_Value_ST_NumberFormat_ordinal:
case 3:
nRet = style::NumberingType::CHARS_UPPER_LETTER_N;
break;
@@ -580,10 +581,10 @@ sal_Int16 ConvertNumberingType(sal_Int32 nNFC)
nRet = style::NumberingType::NUMBER_NONE;
break;
case NS_ooxml::LN_Value_ST_NumberFormat_upperLetter:
- nRet = style::NumberingType::CHARS_UPPER_LETTER;
+ nRet = style::NumberingType::CHARS_UPPER_LETTER_N;
break;
case NS_ooxml::LN_Value_ST_NumberFormat_lowerLetter:
- nRet = style::NumberingType::CHARS_LOWER_LETTER;
+ nRet = style::NumberingType::CHARS_LOWER_LETTER_N;
break;
case NS_ooxml::LN_Value_ST_NumberFormat_iroha:
nRet = style::NumberingType::IROHA_HALFWIDTH_JA;
@@ -625,9 +626,9 @@ sal_Int16 ConvertNumberingType(sal_Int32 nNFC)
case NS_ooxml::LN_Value_ST_NumberFormat_chosung:
nRet = style::NumberingType::HANGUL_JAMO_KO;
break;
+ case NS_ooxml::LN_Value_ST_NumberFormat_koreanLegal:
case NS_ooxml::LN_Value_ST_NumberFormat_koreanDigital:
case NS_ooxml::LN_Value_ST_NumberFormat_koreanCounting:
- case NS_ooxml::LN_Value_ST_NumberFormat_koreanDigital2:
nRet = style::NumberingType::NUMBER_HANGUL_KO;
break;
case NS_ooxml::LN_Value_ST_NumberFormat_ideographLegalTraditional:
@@ -645,13 +646,19 @@ sal_Int16 ConvertNumberingType(sal_Int32 nNFC)
case NS_ooxml::LN_Value_ST_NumberFormat_chineseCounting:
case NS_ooxml::LN_Value_ST_NumberFormat_japaneseCounting:
case NS_ooxml::LN_Value_ST_NumberFormat_taiwaneseCounting:
+ case NS_ooxml::LN_Value_ST_NumberFormat_taiwaneseCountingThousand:
case NS_ooxml::LN_Value_ST_NumberFormat_ideographDigital:
case NS_ooxml::LN_Value_ST_NumberFormat_chineseCountingThousand:
+ case NS_ooxml::LN_Value_ST_NumberFormat_koreanDigital2:
nRet = style::NumberingType::NUMBER_LOWER_ZH;
break;
case NS_ooxml::LN_Value_ST_NumberFormat_chineseLegalSimplified:
nRet = style::NumberingType::NUMBER_UPPER_ZH;
break;
+ case NS_ooxml::LN_Value_ST_NumberFormat_decimalFullWidth:
+ case NS_ooxml::LN_Value_ST_NumberFormat_decimalFullWidth2:
+ nRet = style::NumberingType::FULLWIDTH_ARABIC;
+ break;
default: nRet = style::NumberingType::ARABIC;
}
/* TODO: Lots of additional values are available - some are supported in the I18 framework
commit 0e8953709094680e31f0f104c3c2576cb913370e
Author: Yuri Dario <ydario at apache.org>
Date: Fri Nov 28 14:05:44 2014 +0000
#i125592# enable NSS modules also on OS/2 port.
diff --git a/configure.cmd b/configure.cmd
index 89ffec8..192166c 100755
--- a/configure.cmd
+++ b/configure.cmd
@@ -27,5 +27,5 @@ SET PATH=%JAVA_HOME%\bin;%PATH%;%MY_ANT_HOME%\bin;
set config_shell=sh
set perl_sh_dir=%UNIXROOT%/usr/bin
-sh ./configure --prefix=/@unixroot/usr --with-system-zlib --with-system-jpeg --without-stlport --with-system-icu --with-system-curl --with-system-python --with-system-openssl --with-system-libxml --with-system-libxslt --disable-werror --disable-mozilla --disable-odk --with-x=no --disable-fontconfig --disable-gnome-vfs --disable-gtk --with-java=yes --disable-gcjaot --without-fonts --with-ant-home=%MY_ANT_HOME% --without-junit --with-system-apr --with-system-apr-util --with-system-serf --enable-bundled-dictionaries --enable-category-b --with-lang="de es fr it nl ru" | tee configure.log
+sh ./configure --prefix=/@unixroot/usr --with-system-zlib --with-system-jpeg --without-stlport --with-system-icu --with-system-curl --with-system-python --with-system-openssl --with-system-libxml --with-system-libxslt --disable-werror --disable-mozilla --disable-odk --with-x=no --disable-fontconfig --disable-gnome-vfs --disable-gtk --with-java=yes --disable-gcjaot --without-fonts --with-ant-home=%MY_ANT_HOME% --without-junit --with-system-apr --with-system-apr-util --with-system-serf --with-system-nss --enable-bundled-dictionaries --enable-category-b --with-lang="de es fr it nl ru" | tee configure.log
endlocal
More information about the Libreoffice-commits
mailing list