[Libreoffice-commits] .: 2 commits - writerfilter/source

Caolán McNamara caolan at kemper.freedesktop.org
Fri Feb 18 08:13:19 PST 2011


 writerfilter/source/dmapper/DomainMapper.cxx |   34 +++++++++++++++--------
 writerfilter/source/doctok/replacesprmids    |   11 ++++---
 writerfilter/source/doctok/resources.xmi     |   39 ++++++++++++++++++++++++---
 3 files changed, 65 insertions(+), 19 deletions(-)

New commits:
commit 233be021cabab6baadfe0eeb686b0f7b6f0a9d36
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Feb 18 15:53:45 2011 +0000

    0x486e is sprmCRgLid1_80 not sprmCRgLid1

diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index 82ca05b..0e9326b 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -2207,18 +2207,32 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp
         break;  // sprmCFUsePgsuSettings
     case NS_sprm::LN_CCpg:
         break;  // sprmCCpg
-    case NS_sprm::LN_CLidBi:  // sprmCLidBi      language complex
-    case NS_sprm::LN_CRgLid0_80: //sprmCRgLid0_80
-        //undocumented but interpreted as western language
-    case NS_sprm::LN_CRgLid0:   // sprmCRgLid0    language Western
-    case NS_sprm::LN_CRgLid1:   // sprmCRgLid1    language Asian
+    case NS_sprm::LN_CLidBi:     // sprmCLidBi     language complex
+    case NS_sprm::LN_CRgLid0_80: // sprmCRgLid0_80 older language Western
+    case NS_sprm::LN_CRgLid0:    // sprmCRgLid0    language Western
+    case NS_sprm::LN_CRgLid1:    // sprmCRgLid1    language Asian
+    case NS_sprm::LN_CRgLid1_80: // sprmCRgLid1_80 older language Asian
         {
             lang::Locale aLocale;
             MsLangId::convertLanguageToLocale( (LanguageType)nIntValue, aLocale );
-            rContext->Insert(NS_sprm::LN_CRgLid0 == nSprmId ? PROP_CHAR_LOCALE :
-                             NS_sprm::LN_CRgLid1 == nSprmId ? PROP_CHAR_LOCALE_ASIAN : PROP_CHAR_LOCALE_COMPLEX,
-                             true,
-                             uno::makeAny( aLocale ) );
+
+            PropertyIds aPropId;
+            switch (nSprmId)
+            {
+                case NS_sprm::LN_CRgLid0:
+                case NS_sprm::LN_CRgLid0_80:
+                    aPropId = PROP_CHAR_LOCALE;
+                    break;
+                case NS_sprm::LN_CRgLid1:
+                case NS_sprm::LN_CRgLid1_80:
+                    aPropId = PROP_CHAR_LOCALE_ASIAN;
+                    break;
+                default:
+                    aPropId = PROP_CHAR_LOCALE_COMPLEX;
+                    break;
+            }
+
+            rContext->Insert(aPropId, true, uno::makeAny( aLocale ) );
         }
         break;
 
@@ -2685,8 +2699,6 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp
             rContext->Insert(PROP_CHAR_COLOR, true, uno::makeAny( nColor ) );
         }
         break;
-    case 0x4874:
-        break; //seems to be a language id for Asian text - undocumented
     case 0x6877: //underlining color
         {
             sal_Int32 nColor = ConversionHelper::ConvertColor(nIntValue);
diff --git a/writerfilter/source/doctok/replacesprmids b/writerfilter/source/doctok/replacesprmids
index ece9f18..34a7121 100755
--- a/writerfilter/source/doctok/replacesprmids
+++ b/writerfilter/source/doctok/replacesprmids
@@ -295,8 +295,11 @@ sed "s/0x486b/NS_sprm::LN_CCpg/g" < $1 > $1.out && mv $1.out $1
 sed "s/0x486B/NS_sprm::LN_CCpg/g" < $1 > $1.out && mv $1.out $1 
 sed "s/0x486d/NS_sprm::LN_CRgLid0_80/g" < $1 > $1.out && mv $1.out $1 
 sed "s/0x486D/NS_sprm::LN_CRgLid0_80/g" < $1 > $1.out && mv $1.out $1 
-sed "s/0x486e/NS_sprm::LN_CRgLid1/g" < $1 > $1.out && mv $1.out $1 
-sed "s/0x486E/NS_sprm::LN_CRgLid1/g" < $1 > $1.out && mv $1.out $1 
+sed "s/0x486e/NS_sprm::LN_CRgLid1_80/g" < $1 > $1.out && mv $1.out $1 
+sed "s/0x486E/NS_sprm::LN_CRgLid1_80/g" < $1 > $1.out && mv $1.out $1 
+sed "s/0x486B/NS_sprm::LN_CCpg/g" < $1 > $1.out && mv $1.out $1 
+sed "s/0x4873/NS_sprm::LN_CRgLid0/g" < $1 > $1.out && mv $1.out $1 
+sed "s/0x4874/NS_sprm::LN_CRgLid1/g" < $1 > $1.out && mv $1.out $1 
 sed "s/0x286f/NS_sprm::LN_CIdctHint/g" < $1 > $1.out && mv $1.out $1 
 sed "s/0x286F/NS_sprm::LN_CIdctHint/g" < $1 > $1.out && mv $1.out $1 
 sed "s/0x2e00/NS_sprm::LN_PicBrcl/g" < $1 > $1.out && mv $1.out $1 
diff --git a/writerfilter/source/doctok/resources.xmi b/writerfilter/source/doctok/resources.xmi
index 926e046..36816de 100644
--- a/writerfilter/source/doctok/resources.xmi
+++ b/writerfilter/source/doctok/resources.xmi
@@ -41271,8 +41271,8 @@
           </UML:ModelElement.taggedValue>
         </UML:Class>
         <!--SPRM sprmCRgLid0_80-->
-        <!--SPRM sprmCRgLid1-->
-        <UML:Class xmi.id="sprmCRgLid1" name="sprmCRgLid1">
+        <!--SPRM sprmCRgLid1_80-->
+        <UML:Class xmi.id="sprmCRgLid1_80" name="sprmCRgLid1_80">
           <UML:ModelElement.stereotype>
             <UML:Stereotype xmi.idref="ww8sprm"/>
           </UML:ModelElement.stereotype>
@@ -41286,7 +41286,7 @@
           </UML:ModelElement.taggedValue>
           <UML:ModelElement.taggedValue>
             <UML:TaggedValue>
-              <UML:TaggedValue.dataValue>rtf:sprmCRgLid1</UML:TaggedValue.dataValue>
+              <UML:TaggedValue.dataValue>rtf:sprmCRgLid1_80</UML:TaggedValue.dataValue>
               <UML:TaggedValue.type>
                 <UML:TagDefinition xmi.idref="sprmid"/>
               </UML:TaggedValue.type>
@@ -41301,7 +41301,7 @@
             </UML:TaggedValue>
           </UML:ModelElement.taggedValue>
         </UML:Class>
-        <!--SPRM sprmCRgLid1-->
+        <!--SPRM sprmCRgLid1_80-->
         <!--SPRM sprmCIdctHint-->
         <UML:Class xmi.id="sprmCIdctHint" name="sprmCIdctHint">
           <UML:ModelElement.stereotype>
@@ -47653,6 +47653,37 @@
           </UML:ModelElement.taggedValue>
         </UML:Class>
         <!--SPRM sprmCRgLid0-->
+        <!--SPRM sprmCRgLid1-->
+        <UML:Class xmi.id="sprmCRgLid1" name="sprmCRgLid1">
+          <UML:ModelElement.stereotype>
+            <UML:Stereotype xmi.idref="ww8sprm"/>
+          </UML:ModelElement.stereotype>
+          <UML:ModelElement.taggedValue>
+            <UML:TaggedValue>
+              <UML:TaggedValue.dataValue>0x4874</UML:TaggedValue.dataValue>
+              <UML:TaggedValue.type>
+                <UML:TagDefinition xmi.idref="sprmcode"/>
+              </UML:TaggedValue.type>
+            </UML:TaggedValue>
+          </UML:ModelElement.taggedValue>
+          <UML:ModelElement.taggedValue>
+            <UML:TaggedValue>
+              <UML:TaggedValue.dataValue>rtf:sprmCRgLid1</UML:TaggedValue.dataValue>
+              <UML:TaggedValue.type>
+                <UML:TagDefinition xmi.idref="sprmid"/>
+              </UML:TaggedValue.type>
+            </UML:TaggedValue>
+          </UML:ModelElement.taggedValue>
+          <UML:ModelElement.taggedValue>
+            <UML:TaggedValue>
+              <UML:TaggedValue.dataValue>character</UML:TaggedValue.dataValue>
+              <UML:TaggedValue.type>
+                <UML:TagDefinition xmi.idref="kind"/>
+              </UML:TaggedValue.type>
+            </UML:TaggedValue>
+          </UML:ModelElement.taggedValue>
+        </UML:Class>
+        <!--SPRM sprmCRgLid1-->
         <!--SPRM sprmTCellPaddingDefault-->
         <UML:Class xmi.id="sprmTCellPaddingDefault" name="sprmTCellPaddingDefault">
           <UML:ModelElement.stereotype>
commit 1e141a54c372bf98b7064a3c583dc44bd895c71b
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Feb 18 15:25:59 2011 +0000

    0x486d is sprmCRgLid0_80 not sprmCRgLid0

diff --git a/writerfilter/source/doctok/replacesprmids b/writerfilter/source/doctok/replacesprmids
index e4d6be3..ece9f18 100755
--- a/writerfilter/source/doctok/replacesprmids
+++ b/writerfilter/source/doctok/replacesprmids
@@ -293,8 +293,8 @@ sed "s/0x0868/NS_sprm::LN_CFUsePgsuSettings/g" < $1 > $1.out && mv $1.out $1
 sed "s/0x0868/NS_sprm::LN_CFUsePgsuSettings/g" < $1 > $1.out && mv $1.out $1 
 sed "s/0x486b/NS_sprm::LN_CCpg/g" < $1 > $1.out && mv $1.out $1 
 sed "s/0x486B/NS_sprm::LN_CCpg/g" < $1 > $1.out && mv $1.out $1 
-sed "s/0x486d/NS_sprm::LN_CRgLid0/g" < $1 > $1.out && mv $1.out $1 
-sed "s/0x486D/NS_sprm::LN_CRgLid0/g" < $1 > $1.out && mv $1.out $1 
+sed "s/0x486d/NS_sprm::LN_CRgLid0_80/g" < $1 > $1.out && mv $1.out $1 
+sed "s/0x486D/NS_sprm::LN_CRgLid0_80/g" < $1 > $1.out && mv $1.out $1 
 sed "s/0x486e/NS_sprm::LN_CRgLid1/g" < $1 > $1.out && mv $1.out $1 
 sed "s/0x486E/NS_sprm::LN_CRgLid1/g" < $1 > $1.out && mv $1.out $1 
 sed "s/0x286f/NS_sprm::LN_CIdctHint/g" < $1 > $1.out && mv $1.out $1 


More information about the Libreoffice-commits mailing list