openoffice-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stev...@apache.org
Subject svn commit: r1642310 - in /openoffice/trunk/main: sw/source/filter/rtf/ sw/source/filter/ww8/ writerfilter/source/dmapper/
Date Fri, 28 Nov 2014 15:27:45 GMT
Author: steve_y
Date: Fri Nov 28 15:27:41 2014
New Revision: 1642310

URL: http://svn.apache.org/r1642310
Log:
Issue 125400 - CJK numbering ordered list fallback to Arabic numerals

Contributor: Mark Hung

Modified:
    openoffice/trunk/main/sw/source/filter/rtf/rtfnum.cxx
    openoffice/trunk/main/sw/source/filter/ww8/rtfattributeoutput.cxx
    openoffice/trunk/main/sw/source/filter/ww8/wrtw8num.cxx
    openoffice/trunk/main/sw/source/filter/ww8/ww8par2.cxx
    openoffice/trunk/main/sw/source/filter/ww8/ww8par3.cxx
    openoffice/trunk/main/writerfilter/source/dmapper/ConversionHelper.cxx

Modified: openoffice/trunk/main/sw/source/filter/rtf/rtfnum.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/filter/rtf/rtfnum.cxx?rev=1642310&r1=1642309&r2=1642310&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/filter/rtf/rtfnum.cxx (original)
+++ openoffice/trunk/main/sw/source/filter/rtf/rtfnum.cxx Fri Nov 28 15:27:41 2014
@@ -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( SwNumRu
 
 		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);
 			}

Modified: openoffice/trunk/main/sw/source/filter/ww8/rtfattributeoutput.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/filter/ww8/rtfattributeoutput.cxx?rev=1642310&r1=1642309&r2=1642310&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/filter/ww8/rtfattributeoutput.cxx (original)
+++ openoffice/trunk/main/sw/source/filter/ww8/rtfattributeoutput.cxx Fri Nov 28 15:27:41
2014
@@ -1525,8 +1525,37 @@ void RtfAttributeOutput::NumberingLevel(
         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 );

Modified: openoffice/trunk/main/sw/source/filter/ww8/wrtw8num.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/filter/ww8/wrtw8num.cxx?rev=1642310&r1=1642309&r2=1642310&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/filter/ww8/wrtw8num.cxx (original)
+++ openoffice/trunk/main/sw/source/filter/ww8/wrtw8num.cxx Fri Nov 28 15:27:41 2014
@@ -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::NumberingDefiniti
     }
 }
 
+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(
     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& 
     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())

Modified: openoffice/trunk/main/sw/source/filter/ww8/ww8par2.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/filter/ww8/ww8par2.cxx?rev=1642310&r1=1642309&r2=1642310&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/filter/ww8/ww8par2.cxx (original)
+++ openoffice/trunk/main/sw/source/filter/ww8/ww8par2.cxx Fri Nov 28 15:27:41 2014
@@ -648,11 +648,40 @@ static void SetBaseAnlv(
 
     static SvxAdjust eAdjA[4] =
     { SVX_ADJUST_LEFT, SVX_ADJUST_RIGHT, SVX_ADJUST_LEFT, SVX_ADJUST_LEFT };
+    
+    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(
-        static_cast< sal_Int16 >(( SVBT8ToByte( rAV.nfc ) < 8 )
-            ? eNumA[SVBT8ToByte( rAV.nfc ) ]
-            : SVX_NUM_NUMBER_NONE) );
+    	rNum.SetNumberingType( nType ) ; 
+    }
 
     if ((SVBT8ToByte(rAV.aBits1 ) & 0x4) >> 2)
     {

Modified: openoffice/trunk/main/sw/source/filter/ww8/ww8par3.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/filter/ww8/ww8par3.cxx?rev=1642310&r1=1642309&r2=1642310&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/filter/ww8/ww8par3.cxx (original)
+++ openoffice/trunk/main/sw/source/filter/ww8/ww8par3.cxx Fri Nov 28 15:27:41 2014
@@ -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);
 	}

Modified: openoffice/trunk/main/writerfilter/source/dmapper/ConversionHelper.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/writerfilter/source/dmapper/ConversionHelper.cxx?rev=1642310&r1=1642309&r2=1642310&view=diff
==============================================================================
--- openoffice/trunk/main/writerfilter/source/dmapper/ConversionHelper.cxx (original)
+++ openoffice/trunk/main/writerfilter/source/dmapper/ConversionHelper.cxx Fri Nov 28 15:27:41
2014
@@ -561,6 +561,7 @@ sal_Int16 ConvertNumberingType(sal_Int32
         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
             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
         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
         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



Mime
View raw message