incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wangz...@apache.org
Subject svn commit: r1381885 - in /incubator/ooo/trunk/main: editeng/inc/editeng/svxenum.hxx filter/source/msfilter/svdfppt.cxx sd/source/filter/eppt/epptso.cxx
Date Fri, 07 Sep 2012 05:46:36 GMT
Author: wangzcdl
Date: Fri Sep  7 05:46:35 2012
New Revision: 1381885

URL: http://svn.apache.org/viewvc?rev=1381885&view=rev
Log:
   Fix issue #i120773#: [From Symphony] Numbering will lose when saving or opening a ppt file

   * subversion/main/editeng/inc/editeng/svxenum.hxx
	Define some numbering types supported by MS ppt
   * subversion/main/filter/source/msfilter/svdfppt.cxx
	Mapping added MS numbering types to Symphony numbering types
   * subversion/main/sd/source/filter/eppt/epptso.cxx
	Export added MS numbering types

   Patch by: Yin Bing <steve.yin.aoo@gmail.com>
   Suggested by: Wang Zhe <kingwisemmx@gmail.com>
   Found by: Yin Bing <steve.yin.aoo@gmail.com>
   Review by: Wang Zhe <kingwisemmx@gmail.com>

Modified:
    incubator/ooo/trunk/main/editeng/inc/editeng/svxenum.hxx
    incubator/ooo/trunk/main/filter/source/msfilter/svdfppt.cxx
    incubator/ooo/trunk/main/sd/source/filter/eppt/epptso.cxx

Modified: incubator/ooo/trunk/main/editeng/inc/editeng/svxenum.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/editeng/inc/editeng/svxenum.hxx?rev=1381885&r1=1381884&r2=1381885&view=diff
==============================================================================
--- incubator/ooo/trunk/main/editeng/inc/editeng/svxenum.hxx (original)
+++ incubator/ooo/trunk/main/editeng/inc/editeng/svxenum.hxx Fri Sep  7 05:46:35 2012
@@ -207,7 +207,21 @@ enum SvxExtNumType
 	SVX_NUM_PAGEDESC,   	// Numerierung aus der Seitenvorlage
 	SVX_NUM_BITMAP,
 	SVX_NUM_CHARS_UPPER_LETTER_N, // zaehlt von  a-z, aa-zz, aaa-zzz
-	SVX_NUM_CHARS_LOWER_LETTER_N
+	SVX_NUM_CHARS_LOWER_LETTER_N,
+	SVX_NUM_TRANSLITERATION,
+	SVX_NUM_NATIVE_NUMBERING,
+	SVX_NUM_FULL_WIDTH_ARABIC,
+	SVX_NUM_CIRCLE_NUMBER,
+	SVX_NUM_NUMBER_LOWER_ZH,
+	SVX_NUM_NUMBER_UPPER_ZH,
+	SVX_NUM_NUMBER_UPPER_ZH_TW,
+	SVX_NUM_TIAN_GAN_ZH,
+	SVX_NUM_DI_ZI_ZH,
+    SVX_NUM_NUMBER_TRADITIONAL_JA,
+    SVX_NUM_AIU_FULLWIDTH_JA,
+    SVX_NUM_AIU_HALFWIDTH_JA,
+    SVX_NUM_IROHA_FULLWIDTH_JA,
+    SVX_NUM_IROHA_HALFWIDTH_JA
 };
 
 

Modified: incubator/ooo/trunk/main/filter/source/msfilter/svdfppt.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/filter/source/msfilter/svdfppt.cxx?rev=1381885&r1=1381884&r2=1381885&view=diff
==============================================================================
--- incubator/ooo/trunk/main/filter/source/msfilter/svdfppt.cxx (original)
+++ incubator/ooo/trunk/main/filter/source/msfilter/svdfppt.cxx Fri Sep  7 05:46:35 2012
@@ -3851,6 +3851,63 @@ sal_Bool PPTNumberFormatCreator::ImplGet
 				rNumberFormat.SetSuffix( String( RTL_CONSTASCII_USTRINGPARAM( ")" ) ) );
 			}
 			break;
+			case 16: // Simplified Chinese.
+			{
+				rNumberFormat.SetNumberingType( SVX_NUM_NUMBER_UPPER_ZH );
+			}
+			break;			
+			case 17: // Simplified Chinese with single-byte period.
+			{
+				rNumberFormat.SetNumberingType( SVX_NUM_NUMBER_UPPER_ZH );
+				rNumberFormat.SetSuffix( String( RTL_CONSTASCII_USTRINGPARAM( "." ) ) );
+			}
+			break;
+			case 18: // Double byte circle numbers.
+			case 19: // Wingdings white circle numbers.
+			case 20: // Wingdings black circle numbers.
+			{
+				rNumberFormat.SetNumberingType( SVX_NUM_CIRCLE_NUMBER );
+			}
+			break;
+			case 21: // Traditional Chinese.
+			{
+				rNumberFormat.SetNumberingType( SVX_NUM_NUMBER_UPPER_ZH_TW );
+			}
+			break;
+			case 22: // Traditional Chinese with single-byte period.
+			{
+				rNumberFormat.SetNumberingType( SVX_NUM_NUMBER_UPPER_ZH_TW );
+				rNumberFormat.SetSuffix( String( RTL_CONSTASCII_USTRINGPARAM( "." ) ) );
+			}
+			break;
+			case 26: // Japanese/Korean.
+			{
+				rNumberFormat.SetNumberingType( SVX_NUM_NUMBER_LOWER_ZH );
+			}
+			break;
+			case 27: // Japanese/Korean with single-byte period.
+			{
+				rNumberFormat.SetNumberingType( SVX_NUM_NUMBER_LOWER_ZH );
+				rNumberFormat.SetSuffix( String( RTL_CONSTASCII_USTRINGPARAM( "." ) ) );
+			}
+			break;
+			case 28: // Double-byte Arabic numbers.
+			{
+				rNumberFormat.SetNumberingType( SVX_NUM_FULL_WIDTH_ARABIC );
+			}
+			break;
+			case 29: // Double-byte Arabic numbers with double-byte period.
+			{
+				rNumberFormat.SetNumberingType( SVX_NUM_FULL_WIDTH_ARABIC );
+				rNumberFormat.SetSuffix( String( sal_Unicode(0xff0e) ) );
+			}
+			break;
+			case 38: // Japanese with double-byte period.
+			{
+				rNumberFormat.SetNumberingType( SVX_NUM_NUMBER_LOWER_ZH ); // No such type. Instead with
Lower Chinese Number
+				rNumberFormat.SetSuffix( String( sal_Unicode(0xff0e) ) );
+			}
+			break;
 		}
 		rStartNumbering = boost::optional< sal_Int16 >( nAnmScheme >> 16 );
 	}

Modified: incubator/ooo/trunk/main/sd/source/filter/eppt/epptso.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sd/source/filter/eppt/epptso.cxx?rev=1381885&r1=1381884&r2=1381885&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sd/source/filter/eppt/epptso.cxx (original)
+++ incubator/ooo/trunk/main/sd/source/filter/eppt/epptso.cxx Fri Sep  7 05:46:35 2012
@@ -2672,6 +2672,11 @@ void ParagraphObj::ImplGetNumberingLevel
                     case SVX_NUM_BITMAP :
                     case SVX_NUM_CHARS_UPPER_LETTER_N :     // zaehlt von  a-z, aa-zz, aaa-zzz
                     case SVX_NUM_CHARS_LOWER_LETTER_N :
+					case SVX_NUM_NUMBER_UPPER_ZH:
+					case SVX_NUM_CIRCLE_NUMBER:
+					case SVX_NUM_NUMBER_UPPER_ZH_TW:
+					case SVX_NUM_NUMBER_LOWER_ZH:
+					case SVX_NUM_FULL_WIDTH_ARABIC:
                     {
                         if ( nNumberingType != SVX_NUM_CHAR_SPECIAL )
                         {
@@ -2757,6 +2762,45 @@ void ParagraphObj::ImplGetNumberingLevel
                                     }
                                 }
                                 break;
+								case SVX_NUM_NUMBER_UPPER_ZH :
+								{
+									if ( sSuffix.Len() )			
+										nMappedNumType = 0x110001;   // Simplified Chinese with single-byte period.
+									else
+										nMappedNumType = 0x100001;   // Simplified Chinese.
+								}
+								break;
+								case SVX_NUM_CIRCLE_NUMBER :
+                                {
+									nMappedNumType = 0x120001;   // Double byte circle numbers.
+                                }
+                                break;								
+								case SVX_NUM_NUMBER_UPPER_ZH_TW :
+								{
+									if ( sSuffix.Len() )			
+										nMappedNumType = 0x160001;   // Traditional Chinese with single-byte period.
+									else
+										nMappedNumType = 0x150001;   // Traditional Chinese.
+								}
+								break;
+								case SVX_NUM_NUMBER_LOWER_ZH :
+								{
+									if ( sSuffix == String( sal_Unicode(0xff0e)) )
+										nMappedNumType = 0x260001;   // Japanese with double-byte period.
+									else if ( sSuffix.Len() )
+										nMappedNumType = 0x1B0001;   // Japanese/Korean with single-byte period.
+									else
+										nMappedNumType = 0x1A0001;   // Japanese/Korean.
+								}
+								break;
+								case SVX_NUM_FULL_WIDTH_ARABIC :
+								{
+									if ( sSuffix.Len() )			
+										nMappedNumType = 0x1D0001;   // Double-byte Arabic numbers with double-byte period.
+									else
+										nMappedNumType = 0x1C0001;   // Double-byte Arabic numbers.
+								}
+								break;
 								default:
 									break;
                             }
@@ -3397,6 +3441,11 @@ void PPTWriter::ImplWriteTextStyleAtom( 
                             case SVX_NUM_ROMAN_UPPER :
                             case SVX_NUM_ROMAN_LOWER :
                             case SVX_NUM_ARABIC :
+							case SVX_NUM_NUMBER_UPPER_ZH:
+							case SVX_NUM_CIRCLE_NUMBER:
+							case SVX_NUM_NUMBER_UPPER_ZH_TW:
+							case SVX_NUM_NUMBER_LOWER_ZH:
+							case SVX_NUM_FULL_WIDTH_ARABIC:
                                 nNumberingType = pBulletPara->nMappedNumType;
                             break;
 



Mime
View raw message