[Libreoffice-commits] core.git: 3 commits - oox/source writerfilter/source xmloff/source

Luboš Luňák l.lunak at suse.cz
Thu May 2 08:01:39 PDT 2013


 oox/source/vml/vmldrawing.cxx                    |    3 
 writerfilter/source/dmapper/NumberingManager.cxx |   19 ++++
 writerfilter/source/dmapper/NumberingManager.hxx |    4 
 writerfilter/source/dmapper/PropertyIds.cxx      |    1 
 writerfilter/source/dmapper/PropertyIds.hxx      |    1 
 xmloff/source/style/xmlnume.cxx                  |   76 +++++-------------
 xmloff/source/style/xmlnumi.cxx                  |   96 ++++++-----------------
 7 files changed, 75 insertions(+), 125 deletions(-)

New commits:
commit f13f3b42eb113ead6fcffba39e8fcfb31808627d
Author: Luboš Luňák <l.lunak at suse.cz>
Date:   Mon Apr 29 16:10:00 2013 +0200

    place ooxml shapes properly to paragraph area (part of bnc#816583)
    
    style="position:absolute;left:0" is relative to paragraph area,
    not paragraph text area (which is different if it's indented).
    
    Change-Id: I12a1d2b8a68aa3fa9c65b3d469118b5334f83d7f

diff --git a/oox/source/vml/vmldrawing.cxx b/oox/source/vml/vmldrawing.cxx
index 88282dd..8a68bd7 100644
--- a/oox/source/vml/vmldrawing.cxx
+++ b/oox/source/vml/vmldrawing.cxx
@@ -25,6 +25,7 @@
 #include <com/sun/star/drawing/XShapes.hpp>
 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
 #include <com/sun/star/text/HoriOrientation.hpp>
+#include <com/sun/star/text/RelOrientation.hpp>
 #include <com/sun/star/text/VertOrientation.hpp>
 #include <rtl/ustring.hxx>
 #include "oox/core/xmlfilterbase.hxx"
@@ -228,6 +229,8 @@ Reference< XShape > Drawing::createAndInsertXShape( const OUString& rService,
             xPropSet->setPropertyValue( OUString::createFromAscii( "VertOrient" ), makeAny( VertOrientation::NONE ) );
             xPropSet->setPropertyValue( OUString::createFromAscii( "HoriOrientPosition" ), makeAny( rShapeRect.X ) );
             xPropSet->setPropertyValue( OUString::createFromAscii( "VertOrientPosition" ), makeAny( rShapeRect.Y ) );
+            xPropSet->setPropertyValue( OUString::createFromAscii( "HoriOrientRelation" ), makeAny( RelOrientation::FRAME ) );
+            xPropSet->setPropertyValue( OUString::createFromAscii( "VertOrientRelation" ), makeAny( RelOrientation::FRAME ) );
         }
         xShape->setSize( awt::Size( rShapeRect.Width, rShapeRect.Height ) );
     }
commit 7dfc4da808bb26d38090f8afb0d742adabe8cedf
Author: Luboš Luňák <l.lunak at suse.cz>
Date:   Fri Apr 26 21:30:39 2013 +0200

    handle graphic bullets in .docx also when saved as <w:pict>
    
    Change-Id: I7225b4b024c6b7c549d0c9fbf5204df653577bec

diff --git a/writerfilter/source/dmapper/NumberingManager.cxx b/writerfilter/source/dmapper/NumberingManager.cxx
index 3c6019d..87ddf75 100644
--- a/writerfilter/source/dmapper/NumberingManager.cxx
+++ b/writerfilter/source/dmapper/NumberingManager.cxx
@@ -278,7 +278,7 @@ uno::Sequence< beans::PropertyValue > ListLevel::GetLevelProperties( )
     sal_Int16 nNumberFormat = ConversionHelper::ConvertNumberingType(m_nNFC);
     if( m_nNFC >= 0)
     {
-        if (!m_sGraphicURL.isEmpty())
+        if (!m_sGraphicURL.isEmpty() || m_sGraphicBitmap.is())
             nNumberFormat = style::NumberingType::BITMAP;
         aNumberingProperties.push_back( MAKE_PROPVAL(PROP_NUMBERING_TYPE, nNumberFormat ));
     }
@@ -293,6 +293,8 @@ uno::Sequence< beans::PropertyValue > ListLevel::GetLevelProperties( )
             aNumberingProperties.push_back( MAKE_PROPVAL(PROP_BULLET_CHAR, m_sBulletChar.copy(0,1)));
         if (!m_sGraphicURL.isEmpty())
             aNumberingProperties.push_back(MAKE_PROPVAL(PROP_GRAPHIC_URL, m_sGraphicURL));
+        if (m_sGraphicBitmap.is())
+            aNumberingProperties.push_back(MAKE_PROPVAL(PROP_GRAPHIC_BITMAP, m_sGraphicBitmap));
     }
 
     aNumberingProperties.push_back( MAKE_PROPVAL( PROP_LISTTAB_STOP_POSITION, m_nTabstop ) );
@@ -931,7 +933,20 @@ void ListsManager::lcl_sprm( Sprm& rSprm )
                 if (xShape.is())
                 {
                     uno::Reference<beans::XPropertySet> xPropertySet(xShape, uno::UNO_QUERY);
-                    m_pCurrentDefinition->GetCurrentLevel()->SetGraphicURL(xPropertySet->getPropertyValue("GraphicURL").get<OUString>());
+                    uno::Reference<beans::XPropertySetInfo> info = xPropertySet->getPropertySetInfo();
+                    uno::Sequence<beans::Property> properties = info->getProperties();
+                    try
+                    {
+                        m_pCurrentDefinition->GetCurrentLevel()->SetGraphicURL(xPropertySet->getPropertyValue("GraphicURL").get<OUString>());
+                    } catch(const beans::UnknownPropertyException&)
+                    {}
+                    try
+                    {
+                        uno::Reference< graphic::XGraphic > gr;
+                        xPropertySet->getPropertyValue("Bitmap") >>= gr;
+                        m_pCurrentDefinition->GetCurrentLevel()->SetGraphicBitmap( gr );
+                    } catch(const beans::UnknownPropertyException&)
+                    {}
 
                     // Now that we saved the URL of the graphic, remove it from the document.
                     uno::Reference<lang::XComponent> xShapeComponent(xShape, uno::UNO_QUERY);
diff --git a/writerfilter/source/dmapper/NumberingManager.hxx b/writerfilter/source/dmapper/NumberingManager.hxx
index 2a109ff..eb23f52 100644
--- a/writerfilter/source/dmapper/NumberingManager.hxx
+++ b/writerfilter/source/dmapper/NumberingManager.hxx
@@ -29,6 +29,7 @@
 #include <editeng/numitem.hxx>
 
 #include <com/sun/star/container/XIndexReplace.hpp>
+#include <com/sun/star/graphic/XGraphic.hpp>
 
 namespace writerfilter {
 namespace dmapper {
@@ -53,6 +54,7 @@ class ListLevel : public PropertyMap
     sal_Int16                                     m_nXChFollow;      //LN_IXCHFOLLOW
     OUString                               m_sBulletChar;
     OUString                               m_sGraphicURL;
+    com::sun::star::uno::Reference< com::sun::star::graphic::XGraphic > m_sGraphicBitmap;
     sal_Int32                                     m_nTabstop;
     boost::shared_ptr< StyleSheetEntry >          m_pParaStyle;
     bool                                          m_outline;
@@ -81,6 +83,8 @@ public:
     void SetValue( Id nId, sal_Int32 nValue );
     void SetBulletChar( OUString sValue ) { m_sBulletChar = sValue; };
     void SetGraphicURL( OUString sValue ) { m_sGraphicURL = sValue; };
+    void SetGraphicBitmap( com::sun::star::uno::Reference< com::sun::star::graphic::XGraphic > sValue )
+        { m_sGraphicBitmap = sValue; }
     void SetParaStyle( boost::shared_ptr< StyleSheetEntry > pStyle );
     void AddRGBXchNums( OUString sValue ) { m_sRGBXchNums += sValue; };
 
diff --git a/writerfilter/source/dmapper/PropertyIds.cxx b/writerfilter/source/dmapper/PropertyIds.cxx
index 08f3ac2..86438b9 100644
--- a/writerfilter/source/dmapper/PropertyIds.cxx
+++ b/writerfilter/source/dmapper/PropertyIds.cxx
@@ -323,6 +323,7 @@ const OUString& PropertyNameSupplier::GetName( PropertyIds eId ) const
             case PROP_RELATIVE_WIDTH: sName = "RelativeWidth"; break;
             case PROP_IS_WIDTH_RELATIVE: sName = "IsWidthRelative"; break;
             case PROP_GRAPHIC_URL: sName = "GraphicURL"; break;
+            case PROP_GRAPHIC_BITMAP: sName = "GraphicBitmap"; break;
         }
         ::std::pair<PropertyNameMap_t::iterator,bool> aInsertIt =
                 m_pImpl->aNameMap.insert( PropertyNameMap_t::value_type( eId, sName ));
diff --git a/writerfilter/source/dmapper/PropertyIds.hxx b/writerfilter/source/dmapper/PropertyIds.hxx
index c4f30bf..3467321 100644
--- a/writerfilter/source/dmapper/PropertyIds.hxx
+++ b/writerfilter/source/dmapper/PropertyIds.hxx
@@ -294,6 +294,7 @@ enum PropertyIds
         ,PROP_RELATIVE_WIDTH
         ,PROP_IS_WIDTH_RELATIVE
         ,PROP_GRAPHIC_URL
+        ,PROP_GRAPHIC_BITMAP
     };
 struct PropertyNameSupplier_Impl;
 class PropertyNameSupplier
commit 829027abe3d9c7f0419fbf311dffb31b0b72b028
Author: Luboš Luňák <l.lunak at suse.cz>
Date:   Fri Apr 26 20:19:08 2013 +0200

    ditch explicit char arrays for string literals
    
    Change-Id: I77a4f6d338751c00942f091f4267e5f7d1d1742f

diff --git a/xmloff/source/style/xmlnume.cxx b/xmloff/source/style/xmlnume.cxx
index 7cbc207..0493325 100644
--- a/xmloff/source/style/xmlnume.cxx
+++ b/xmloff/source/style/xmlnume.cxx
@@ -59,31 +59,6 @@ using namespace ::com::sun::star::container;
 using namespace ::com::sun::star::beans;
 using namespace ::xmloff::token;
 
-static sal_Char const XML_UNO_NAME_NRULE_SYMBOL_TEXT_DISTANCE[] = "SymbolTextDistance";
-static sal_Char const XML_UNO_NAME_NRULE_PARENT_NUMBERING[] = "ParentNumbering";
-static sal_Char const XML_UNO_NAME_NRULE_CHAR_STYLE_NAME[] = "CharStyleName";
-static sal_Char const XML_UNO_NAME_NRULE_BULLET_CHAR[] = "BulletChar";
-static sal_Char const XML_UNO_NAME_NRULE_BULLET_RELSIZE[] = "BulletRelSize";
-static sal_Char const XML_UNO_NAME_NRULE_BULLET_COLOR[] = "BulletColor";
-static sal_Char const XML_UNO_NAME_NRULE_GRAPHIC_BITMAP[] = "GraphicBitmap";
-static sal_Char const XML_UNO_NAME_NRULE_GRAPHIC_SIZE[] = "GraphicSize";
-static sal_Char const XML_UNO_NAME_NRULE_VERT_ORIENT[] = "VertOrient";
-static sal_Char const XML_UNO_NAME_NRULE_NUMBERINGTYPE[] = "NumberingType";
-static sal_Char const XML_UNO_NAME_NRULE_HEADING_STYLE_NAME[] = "HeadingStyleName";
-static sal_Char const XML_UNO_NAME_NRULE_PREFIX[] = "Prefix";
-static sal_Char const XML_UNO_NAME_NRULE_SUFFIX[] = "Suffix";
-static sal_Char const XML_UNO_NAME_NRULE_ADJUST[] = "Adjust";
-static sal_Char const XML_UNO_NAME_NRULE_LEFT_MARGIN[] = "LeftMargin";
-static sal_Char const XML_UNO_NAME_NRULE_FIRST_LINE_OFFSET[] = "FirstLineOffset";
-static sal_Char const XML_UNO_NAME_NRULE_BULLET_FONT[] = "BulletFont";
-static sal_Char const XML_UNO_NAME_NRULE_GRAPHICURL[] = "GraphicURL";
-static sal_Char const XML_UNO_NAME_NRULE_START_WITH[] = "StartWith";
-static sal_Char const XML_UNO_NAME_NRULE_POSITION_AND_SPACE_MODE[] = "PositionAndSpaceMode";
-static sal_Char const XML_UNO_NAME_NRULE_LABEL_FOLLOWED_BY[] = "LabelFollowedBy";
-static sal_Char const XML_UNO_NAME_NRULE_LISTTAB_STOP_POSITION[] = "ListtabStopPosition";
-static sal_Char const XML_UNO_NAME_NRULE_FIRST_LINE_INDENT[] = "FirstLineIndent";
-static sal_Char const XML_UNO_NAME_NRULE_INDENT_AT[] = "IndentAt";
-
 void SvxXMLNumRuleExport::exportLevelStyles( const uno::Reference< ::com::sun::star::container::XIndexReplace > & xNumRule,
                                              sal_Bool bOutline )
 {
@@ -137,19 +112,19 @@ void SvxXMLNumRuleExport::exportLevelStyle( sal_Int32 nLevel,
     {
         const beans::PropertyValue& rProp = pPropArray[i];
 
-        if( rProp.Name.equalsAsciiL( XML_UNO_NAME_NRULE_NUMBERINGTYPE, sizeof(XML_UNO_NAME_NRULE_NUMBERINGTYPE)-1 ) )
+        if( rProp.Name == "NumberingType" )
         {
             rProp.Value >>= eType;
         }
-        else if( rProp.Name.equalsAsciiL( XML_UNO_NAME_NRULE_PREFIX, sizeof(XML_UNO_NAME_NRULE_PREFIX)-1 ) )
+        else if( rProp.Name == "Prefix" )
         {
             rProp.Value >>= sPrefix;
         }
-        else if( rProp.Name.equalsAsciiL( XML_UNO_NAME_NRULE_SUFFIX, sizeof(XML_UNO_NAME_NRULE_SUFFIX)-1 ) )
+        else if( rProp.Name == "Suffix" )
         {
             rProp.Value >>= sSuffix;
         }
-        else if( rProp.Name.equalsAsciiL( XML_UNO_NAME_NRULE_BULLET_CHAR, sizeof(XML_UNO_NAME_NRULE_BULLET_CHAR)-1 ) )
+        else if( rProp.Name == "BulletChar" )
         {
             OUString sValue;
             rProp.Value >>= sValue;
@@ -158,17 +133,17 @@ void SvxXMLNumRuleExport::exportLevelStyle( sal_Int32 nLevel,
                 cBullet = (sal_Unicode)sValue[0];
             }
         }
-        else if( rProp.Name.equalsAsciiL( XML_UNO_NAME_NRULE_BULLET_RELSIZE, sizeof(XML_UNO_NAME_NRULE_BULLET_RELSIZE)-1 ) )
+        else if( rProp.Name == "BulletRelSize" )
         {
             rProp.Value >>= nBullRelSize;
         }
-        else if( rProp.Name.equalsAsciiL( XML_UNO_NAME_NRULE_ADJUST, sizeof(XML_UNO_NAME_NRULE_ADJUST)-1 ) )
+        else if( rProp.Name == "Adjust" )
         {
             sal_Int16 nValue = 0;
             rProp.Value >>= nValue;
             eAdjust = nValue;
         }
-        else if( rProp.Name.equalsAsciiL( XML_UNO_NAME_NRULE_BULLET_FONT, sizeof(XML_UNO_NAME_NRULE_BULLET_FONT)-1 ) )
+        else if( rProp.Name == "BulletFont" )
         {
             awt::FontDescriptor rFDesc;
             if( rProp.Value >>= rFDesc )
@@ -180,46 +155,46 @@ void SvxXMLNumRuleExport::exportLevelStyle( sal_Int32 nLevel,
                 eBulletFontEncoding = (rtl_TextEncoding)rFDesc.CharSet;
             }
         }
-        else if( rProp.Name.equalsAsciiL( XML_UNO_NAME_NRULE_GRAPHICURL, sizeof(XML_UNO_NAME_NRULE_GRAPHICURL)-1 ) )
+        else if( rProp.Name == "GraphicURL" )
         {
             rProp.Value >>= sImageURL;
         }
-        else if( rProp.Name.equalsAsciiL( XML_UNO_NAME_NRULE_GRAPHIC_BITMAP, sizeof(XML_UNO_NAME_NRULE_GRAPHIC_BITMAP)-1 ) )
+        else if( rProp.Name == "GraphicBitmap" )
         {
             rProp.Value >>= xBitmap;
         }
-        else if( rProp.Name.equalsAsciiL( XML_UNO_NAME_NRULE_BULLET_COLOR, sizeof(XML_UNO_NAME_NRULE_BULLET_COLOR)-1 ) )
+        else if( rProp.Name == "BulletColor" )
         {
             rProp.Value >>= nColor;
             bHasColor = sal_True;
         }
-        else  if( rProp.Name.equalsAsciiL( XML_UNO_NAME_NRULE_START_WITH, sizeof(XML_UNO_NAME_NRULE_START_WITH)-1 ) )
+        else  if( rProp.Name == "StartWith" )
         {
             rProp.Value >>= nStartValue;
         }
-        else  if( rProp.Name.equalsAsciiL( XML_UNO_NAME_NRULE_LEFT_MARGIN, sizeof(XML_UNO_NAME_NRULE_LEFT_MARGIN)-1 ) )
+        else  if( rProp.Name == "LeftMargin" )
         {
             rProp.Value >>= nSpaceBefore;
         }
-        else  if( rProp.Name.equalsAsciiL( XML_UNO_NAME_NRULE_FIRST_LINE_OFFSET, sizeof(XML_UNO_NAME_NRULE_FIRST_LINE_OFFSET)-1 ) )
+        else  if( rProp.Name == "FirstLineOffset" )
         {
             rProp.Value >>= nMinLabelWidth;
         }
-        else  if( rProp.Name.equalsAsciiL( XML_UNO_NAME_NRULE_SYMBOL_TEXT_DISTANCE, sizeof(XML_UNO_NAME_NRULE_SYMBOL_TEXT_DISTANCE)-1 ) )
+        else  if( rProp.Name == "SymbolTextDistance" )
         {
             rProp.Value >>= nMinLabelDist;
         }
-        else if( rProp.Name.equalsAsciiL( XML_UNO_NAME_NRULE_PARENT_NUMBERING, sizeof(XML_UNO_NAME_NRULE_PARENT_NUMBERING)-1 ) )
+        else if( rProp.Name == "ParentNumbering" )
         {
             rProp.Value >>= nDisplayLevels;
             if( nDisplayLevels > nLevel+1 )
                 nDisplayLevels = static_cast<sal_Int16>( nLevel )+1;
         }
-        else if( rProp.Name.equalsAsciiL( XML_UNO_NAME_NRULE_CHAR_STYLE_NAME, sizeof(XML_UNO_NAME_NRULE_CHAR_STYLE_NAME)-1 ) )
+        else if( rProp.Name == "CharStyleName" )
         {
             rProp.Value >>= sTextStyleName;
         }
-        else if( rProp.Name.equalsAsciiL( XML_UNO_NAME_NRULE_GRAPHIC_SIZE, sizeof(XML_UNO_NAME_NRULE_GRAPHIC_SIZE)-1 ) )
+        else if( rProp.Name == "GraphicSize" )
         {
             awt::Size aSize;
             if( rProp.Value >>= aSize )
@@ -228,38 +203,33 @@ void SvxXMLNumRuleExport::exportLevelStyle( sal_Int32 nLevel,
                 nImageHeight = aSize.Height;
             }
         }
-        else if( rProp.Name.equalsAsciiL( XML_UNO_NAME_NRULE_VERT_ORIENT, sizeof(XML_UNO_NAME_NRULE_VERT_ORIENT)-1 ) )
+        else if( rProp.Name == "VertOrient" )
         {
             sal_Int16 nValue = 0;
             rProp.Value >>= nValue;
             eImageVertOrient = nValue;
         }
-        else if( rProp.Name.equalsAsciiL( XML_UNO_NAME_NRULE_POSITION_AND_SPACE_MODE,
-                                          sizeof(XML_UNO_NAME_NRULE_POSITION_AND_SPACE_MODE)-1 ) )
+        else if( rProp.Name == "PositionAndSpaceMode" )
         {
             sal_Int16 nValue = 0;
             rProp.Value >>= nValue;
             ePosAndSpaceMode = nValue;
         }
-        else if( rProp.Name.equalsAsciiL( XML_UNO_NAME_NRULE_LABEL_FOLLOWED_BY,
-                                          sizeof(XML_UNO_NAME_NRULE_LABEL_FOLLOWED_BY)-1 ) )
+        else if( rProp.Name == "LabelFollowedBy" )
         {
             sal_Int16 nValue = 0;
             rProp.Value >>= nValue;
             eLabelFollowedBy = nValue;
         }
-        else if( rProp.Name.equalsAsciiL( XML_UNO_NAME_NRULE_LISTTAB_STOP_POSITION,
-                                          sizeof(XML_UNO_NAME_NRULE_LISTTAB_STOP_POSITION)-1 ) )
+        else if( rProp.Name == "ListtabStopPosition" )
         {
             rProp.Value >>= nListtabStopPosition;
         }
-        else if( rProp.Name.equalsAsciiL( XML_UNO_NAME_NRULE_FIRST_LINE_INDENT,
-                                          sizeof(XML_UNO_NAME_NRULE_FIRST_LINE_INDENT)-1 ) )
+        else if( rProp.Name == "FirstLineIndent" )
         {
             rProp.Value >>= nFirstLineIndent;
         }
-        else if( rProp.Name.equalsAsciiL( XML_UNO_NAME_NRULE_INDENT_AT,
-                                          sizeof(XML_UNO_NAME_NRULE_INDENT_AT)-1 ) )
+        else if( rProp.Name == "IndentAt" )
         {
             rProp.Value >>= nIndentAt;
         }
diff --git a/xmloff/source/style/xmlnumi.cxx b/xmloff/source/style/xmlnumi.cxx
index ee243bb..af11d35 100644
--- a/xmloff/source/style/xmlnumi.cxx
+++ b/xmloff/source/style/xmlnumi.cxx
@@ -65,35 +65,6 @@ using namespace ::com::sun::star::frame;
 using namespace ::xmloff::token;
 using namespace ::com::sun::star::io;
 
-static sal_Char const XML_UNO_NAME_NRULE_SYMBOL_TEXT_DISTANCE[] =
-        "SymbolTextDistance";
-static sal_Char const XML_UNO_NAME_NRULE_PARENT_NUMBERING[] =
-        "ParentNumbering";
-static sal_Char const XML_UNO_NAME_NRULE_CHAR_STYLE_NAME[] =
-        "CharStyleName";
-static sal_Char const XML_UNO_NAME_NRULE_BULLET_CHAR[] ="BulletChar";
-static sal_Char const XML_UNO_NAME_NRULE_BULLET_RELSIZE[] = "BulletRelSize";
-static sal_Char const XML_UNO_NAME_NRULE_GRAPHIC_SIZE[] =
-        "GraphicSize";
-static sal_Char const XML_UNO_NAME_NRULE_VERT_ORIENT[] ="VertOrient";
-
-static sal_Char const XML_UNO_NAME_NRULE_NUMBERINGTYPE[] = "NumberingType";
-static sal_Char const XML_UNO_NAME_NRULE_PREFIX[] = "Prefix";
-static sal_Char const XML_UNO_NAME_NRULE_SUFFIX[] = "Suffix";
-static sal_Char const XML_UNO_NAME_NRULE_ADJUST[] = "Adjust";
-static sal_Char const XML_UNO_NAME_NRULE_LEFT_MARGIN[] = "LeftMargin";
-static sal_Char const XML_UNO_NAME_NRULE_FIRST_LINE_OFFSET[] =
-    "FirstLineOffset";
-static sal_Char const XML_UNO_NAME_NRULE_BULLET_FONT[] = "BulletFont";
-static sal_Char const XML_UNO_NAME_NRULE_GRAPHICURL[] = "GraphicURL";
-static sal_Char const XML_UNO_NAME_NRULE_START_WITH[] = "StartWith";
-static sal_Char const XML_UNO_NAME_NRULE_BULLET_COLOR[] = "BulletColor";
-static sal_Char const XML_UNO_NAME_NRULE_POSITION_AND_SPACE_MODE[] = "PositionAndSpaceMode";
-static sal_Char const XML_UNO_NAME_NRULE_LABEL_FOLLOWED_BY[] = "LabelFollowedBy";
-static sal_Char const XML_UNO_NAME_NRULE_LISTTAB_STOP_POSITION[] = "ListtabStopPosition";
-static sal_Char const XML_UNO_NAME_NRULE_FIRST_LINE_INDENT[] = "FirstLineIndent";
-static sal_Char const XML_UNO_NAME_NRULE_INDENT_AT[] = "IndentAt";
-
 // ---------------------------------------------------------------------
 
 class SvxXMLListLevelStyleContext_Impl;
@@ -493,48 +464,39 @@ Sequence<beans::PropertyValue> SvxXMLListLevelStyleContext_Impl::GetProperties(
     {
         beans::PropertyValue *pProps = aPropSeq.getArray();
         sal_Int32 nPos = 0;
-        pProps[nPos].Name =
-                OUString(XML_UNO_NAME_NRULE_NUMBERINGTYPE );
+        pProps[nPos].Name = "NumberingType";
         pProps[nPos++].Value <<= (sal_Int16)eType ;
 
-        pProps[nPos].Name = OUString(XML_UNO_NAME_NRULE_PREFIX );
+        pProps[nPos].Name = "Prefix";
         pProps[nPos++].Value <<= sPrefix;
 
-        pProps[nPos].Name = OUString(XML_UNO_NAME_NRULE_SUFFIX );
+        pProps[nPos].Name = "Suffix";
         pProps[nPos++].Value <<= sSuffix;
 
-        pProps[nPos].Name = OUString(XML_UNO_NAME_NRULE_ADJUST );
+        pProps[nPos].Name = "Adjust";
         pProps[nPos++].Value <<= eAdjust;
 
         sal_Int32 nLeftMargin = nSpaceBefore + nMinLabelWidth;
-        pProps[nPos].Name =
-            OUString(XML_UNO_NAME_NRULE_LEFT_MARGIN );
+        pProps[nPos].Name = "LeftMargin";
         pProps[nPos++].Value <<= (sal_Int32)nLeftMargin;
 
         sal_Int32 nFirstLineOffset = -nMinLabelWidth;
 
-        pProps[nPos].Name =
-                OUString(XML_UNO_NAME_NRULE_FIRST_LINE_OFFSET );
+        pProps[nPos].Name = "FirstLineOffset";
         pProps[nPos++].Value <<= (sal_Int32)nFirstLineOffset;
 
-        pProps[nPos].Name =
-            OUString(XML_UNO_NAME_NRULE_SYMBOL_TEXT_DISTANCE);
+        pProps[nPos].Name = "SymbolTextDistance";
         pProps[nPos++].Value <<= (sal_Int16)nMinLabelDist;
 
-        pProps[nPos].Name =
-            OUString(XML_UNO_NAME_NRULE_POSITION_AND_SPACE_MODE);
+        pProps[nPos].Name = "PositionAndSpaceMode";
         pProps[nPos++].Value <<= (sal_Int16)ePosAndSpaceMode;
-        pProps[nPos].Name =
-            OUString(XML_UNO_NAME_NRULE_LABEL_FOLLOWED_BY);
+        pProps[nPos].Name = "LabelFollowedBy";
         pProps[nPos++].Value <<= (sal_Int16)eLabelFollowedBy;
-        pProps[nPos].Name =
-            OUString(XML_UNO_NAME_NRULE_LISTTAB_STOP_POSITION);
+        pProps[nPos].Name = "ListtabStopPosition";
         pProps[nPos++].Value <<= (sal_Int32)nListtabStopPosition;
-        pProps[nPos].Name =
-            OUString(XML_UNO_NAME_NRULE_FIRST_LINE_INDENT);
+        pProps[nPos].Name = "FirstLineIndent";
         pProps[nPos++].Value <<= (sal_Int32)nFirstLineIndent;
-        pProps[nPos].Name =
-            OUString(XML_UNO_NAME_NRULE_INDENT_AT);
+        pProps[nPos].Name = "IndentAt";
         pProps[nPos++].Value <<= (sal_Int32)nIndentAt;
 
         OUString sDisplayTextStyleName = GetImport().GetStyleDisplayName(
@@ -542,8 +504,7 @@ Sequence<beans::PropertyValue> SvxXMLListLevelStyleContext_Impl::GetProperties(
         OUString sStyleName = sDisplayTextStyleName;
         if( !sStyleName.isEmpty() && pI18NMap )
             sStyleName = pI18NMap->Get( SFX_STYLE_FAMILY_CHAR, sStyleName );
-        pProps[nPos].Name =
-                OUString(XML_UNO_NAME_NRULE_CHAR_STYLE_NAME );
+        pProps[nPos].Name = "CharStyleName";
         pProps[nPos++].Value <<= sDisplayTextStyleName;
 
         if( bBullet )
@@ -576,12 +537,11 @@ Sequence<beans::PropertyValue> SvxXMLListLevelStyleContext_Impl::GetProperties(
             {
                 OUStringBuffer sTmp(1);
                 sTmp.append( cBullet );
-                pProps[nPos].Name =
-                        OUString(XML_UNO_NAME_NRULE_BULLET_CHAR );
+                pProps[nPos].Name = "BulletChar";
                 pProps[nPos++].Value <<= sTmp.makeStringAndClear();
             }
 
-            pProps[nPos].Name = OUString(XML_UNO_NAME_NRULE_BULLET_FONT );
+            pProps[nPos].Name = "BulletFont";
             pProps[nPos++].Value <<= aFDesc;
 
         }
@@ -601,36 +561,36 @@ Sequence<beans::PropertyValue> SvxXMLListLevelStyleContext_Impl::GetProperties(
 
             if( !sStr.isEmpty() )
             {
-                pProps[nPos].Name = OUString(XML_UNO_NAME_NRULE_GRAPHICURL );
+                pProps[nPos].Name = "GraphicURL";
                 pProps[nPos++].Value <<= sStr;
             }
 
             awt::Size aSize( nImageWidth, nImageHeight );
-            pProps[nPos].Name = OUString(XML_UNO_NAME_NRULE_GRAPHIC_SIZE );
+            pProps[nPos].Name = "GraphicSize";
             pProps[nPos++].Value <<= aSize;
 
-            pProps[nPos].Name = OUString(XML_UNO_NAME_NRULE_VERT_ORIENT );
+            pProps[nPos].Name = "VertOrient";
             pProps[nPos++].Value <<= (sal_Int16)eImageVertOrient;
         }
 
         if( bNum )
         {
-            pProps[nPos].Name = OUString(XML_UNO_NAME_NRULE_START_WITH );
+            pProps[nPos].Name = "StartWith";
             pProps[nPos++].Value <<= (sal_Int16)nNumStartValue;
 
-            pProps[nPos].Name = OUString(XML_UNO_NAME_NRULE_PARENT_NUMBERING);
+            pProps[nPos].Name = "ParentNumbering";
             pProps[nPos++].Value <<= (sal_Int16)nNumDisplayLevels;
         }
 
         if( ( bNum || bBullet ) && nRelSize )
         {
-            pProps[nPos].Name = OUString(XML_UNO_NAME_NRULE_BULLET_RELSIZE );
+            pProps[nPos].Name = "BulletRelSize";
             pProps[nPos++].Value <<= nRelSize;
         }
 
         if( !bImage && bHasColor )
         {
-            pProps[nPos].Name = OUString(XML_UNO_NAME_NRULE_BULLET_COLOR );
+            pProps[nPos].Name = "BulletColor";
             pProps[nPos++].Value <<= m_nColor;
         }
 
@@ -1330,8 +1290,7 @@ void SvxXMLListStyleContext::SetDefaultStyle(
     Sequence<beans::PropertyValue> aPropSeq( bOrdered ? 1 : 4  );
     beans::PropertyValue *pProps = aPropSeq.getArray();
 
-    pProps->Name =
-                OUString(XML_UNO_NAME_NRULE_NUMBERINGTYPE );
+    pProps->Name = "NumberingType";
     (pProps++)->Value <<= (sal_Int16)(bOrdered ? NumberingType::ARABIC
                                                  : NumberingType::CHAR_SPECIAL );
     if( !bOrdered )
@@ -1349,17 +1308,14 @@ void SvxXMLListStyleContext::SetDefaultStyle(
         aFDesc.Pitch = PITCH_DONTKNOW ;
         aFDesc.CharSet = RTL_TEXTENCODING_SYMBOL ;
         aFDesc.Weight = WEIGHT_DONTKNOW;
-        pProps->Name =
-                    OUString(XML_UNO_NAME_NRULE_BULLET_FONT );
+        pProps->Name = "BulletFont";
         (pProps++)->Value <<= aFDesc;
 
         OUStringBuffer sTmp(1);
         sTmp.append( (sal_Unicode)(0xF000 + 149) );
-        pProps->Name =
-                    OUString(XML_UNO_NAME_NRULE_BULLET_CHAR );
+        pProps->Name = "BulletChar";
         (pProps++)->Value <<= sTmp.makeStringAndClear();
-        pProps->Name =
-                OUString(XML_UNO_NAME_NRULE_CHAR_STYLE_NAME );
+        pProps->Name = "CharStyleName";
         (pProps++)->Value <<= OUString( "Numbering Symbols"  );
     }
 


More information about the Libreoffice-commits mailing list