[Libreoffice-commits] .: xmloff/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sat Dec 8 06:32:22 PST 2012


 xmloff/source/core/DocumentSettingsContext.cxx        |   42 +--
 xmloff/source/core/DomExport.cxx                      |    4 
 xmloff/source/core/SettingsExportHelper.cxx           |   54 ++--
 xmloff/source/core/XMLEmbeddedObjectImportContext.cxx |    2 
 xmloff/source/core/xmlexp.cxx                         |   10 
 xmloff/source/core/xmlimp.cxx                         |  229 ++++++------------
 xmloff/source/core/xmlmultiimagehelper.cxx            |   16 -
 7 files changed, 140 insertions(+), 217 deletions(-)

New commits:
commit 649c6b38911e9b77d21efba5fa1d6affa9fc4b0e
Author: Chr. Rossmanith <ChrRossmanith at gmx.de>
Date:   Tue Dec 4 14:35:40 2012 +0100

    RTL_CONSTASCII_USTRINGPARAM clean up
    
    Change-Id: I4d57a449c2bd61be0cb7b7ed9016b3ee71825b57

diff --git a/xmloff/source/core/DocumentSettingsContext.cxx b/xmloff/source/core/DocumentSettingsContext.cxx
index 0af9f1b..6ec025c 100644
--- a/xmloff/source/core/DocumentSettingsContext.cxx
+++ b/xmloff/source/core/DocumentSettingsContext.cxx
@@ -106,7 +106,7 @@ uno::Reference<container::XNameContainer> XMLMyList::GetNameContainer()
 
     if( mxServiceFactory.is() )
     {
-        rtl::OUString sName(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.document.NamedPropertyValues"));
+        rtl::OUString sName("com.sun.star.document.NamedPropertyValues");
         xNameContainer = uno::Reference<container::XNameContainer>(mxServiceFactory->createInstance(sName), uno::UNO_QUERY);
         if (xNameContainer.is())
         {
@@ -128,7 +128,7 @@ uno::Reference<container::XIndexContainer> XMLMyList::GetIndexContainer()
 
     if( mxServiceFactory.is() )
     {
-        rtl::OUString sName(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.document.IndexedPropertyValues"));
+        rtl::OUString sName("com.sun.star.document.IndexedPropertyValues");
         xIndexContainer = uno::Reference<container::XIndexContainer>(mxServiceFactory->createInstance(sName), uno::UNO_QUERY);
         if (xIndexContainer.is())
         {
@@ -683,16 +683,14 @@ void XMLConfigItemContext::EndElement()
  * manipulate the values accordingly. */
 void XMLConfigItemContext::ManipulateConfigItem()
 {
-    if( mrItemName.equalsAsciiL(
-            RTL_CONSTASCII_STRINGPARAM( "PrinterIndependentLayout" ) ) )
+    if( mrItemName == "PrinterIndependentLayout" )
     {
         rtl::OUString sValue;
         mrAny >>= sValue;
 
         sal_Int16 nTmp = document::PrinterIndependentLayout::HIGH_RESOLUTION;
 
-        if( sValue.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("enabled")) ||
-            sValue.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("low-resolution")) )
+        if( sValue == "enabled" || sValue == "low-resolution" )
         {
             nTmp = document::PrinterIndependentLayout::LOW_RESOLUTION;
         }
@@ -797,7 +795,7 @@ void XMLConfigItemMapIndexedContext::EndElement()
             uno::Reference< lang::XMultiServiceFactory > xFac( GetImport().GetModel(), uno::UNO_QUERY );
             if( xFac.is() )
             {
-                uno::Reference< beans::XPropertySet > xProps( xFac->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.document.Settings" ) ) ), uno::UNO_QUERY );
+                uno::Reference< beans::XPropertySet > xProps( xFac->createInstance( "com.sun.star.document.Settings" ), uno::UNO_QUERY );
                 if( xProps.is() && xProps->getPropertySetInfo()->hasPropertyByName( maConfigItemName ) )
                 {
                     xProps->getPropertyValue( maConfigItemName ) >>= xForbChars;
@@ -818,11 +816,11 @@ void XMLConfigItemMapIndexedContext::EndElement()
                         beans::PropertyValue *pForChar = aProps.getArray();
                         i18n::ForbiddenCharacters aForbid;
                         lang::Locale aLocale;
-                        const rtl::OUString sLanguage  ( RTL_CONSTASCII_USTRINGPARAM ( "Language" ) );
-                        const rtl::OUString sCountry   ( RTL_CONSTASCII_USTRINGPARAM ( "Country" ) );
-                        const rtl::OUString sVariant   ( RTL_CONSTASCII_USTRINGPARAM ( "Variant" ) );
-                        const rtl::OUString sBeginLine ( RTL_CONSTASCII_USTRINGPARAM ( "BeginLine" ) );
-                        const rtl::OUString sEndLine   ( RTL_CONSTASCII_USTRINGPARAM ( "EndLine" ) );
+                        const rtl::OUString sLanguage  ( "Language" );
+                        const rtl::OUString sCountry   ( "Country" );
+                        const rtl::OUString sVariant   ( "Variant" );
+                        const rtl::OUString sBeginLine ( "BeginLine" );
+                        const rtl::OUString sEndLine   ( "EndLine" );
                         sal_Bool bHaveLanguage = sal_False, bHaveCountry = sal_False, bHaveVariant = sal_False,
                                  bHaveBegin = sal_False, bHaveEnd = sal_False;
 
@@ -886,16 +884,16 @@ void XMLConfigItemMapIndexedContext::EndElement()
 
             formula::SymbolDescriptor *pDescriptor = aSymbolList.getArray();
 
-            const rtl::OUString sName     ( RTL_CONSTASCII_USTRINGPARAM ( "Name" ) );
-            const rtl::OUString sExportName ( RTL_CONSTASCII_USTRINGPARAM ( "ExportName" ) );
-            const rtl::OUString sFontName ( RTL_CONSTASCII_USTRINGPARAM ( "FontName" ) );
-            const rtl::OUString sSymbolSet ( RTL_CONSTASCII_USTRINGPARAM ( "SymbolSet" ) );
-            const rtl::OUString sCharacter ( RTL_CONSTASCII_USTRINGPARAM ( "Character" ) );
-            const rtl::OUString sCharSet  ( RTL_CONSTASCII_USTRINGPARAM ( "CharSet" ) );
-            const rtl::OUString sFamily   ( RTL_CONSTASCII_USTRINGPARAM ( "Family" ) );
-            const rtl::OUString sPitch    ( RTL_CONSTASCII_USTRINGPARAM ( "Pitch" ) );
-            const rtl::OUString sWeight   ( RTL_CONSTASCII_USTRINGPARAM ( "Weight" ) );
-            const rtl::OUString sItalic   ( RTL_CONSTASCII_USTRINGPARAM ( "Italic" ) );
+            const rtl::OUString sName     ( "Name" );
+            const rtl::OUString sExportName ( "ExportName" );
+            const rtl::OUString sFontName ( "FontName" );
+            const rtl::OUString sSymbolSet ( "SymbolSet" );
+            const rtl::OUString sCharacter ( "Character" );
+            const rtl::OUString sCharSet  ( "CharSet" );
+            const rtl::OUString sFamily   ( "Family" );
+            const rtl::OUString sPitch    ( "Pitch" );
+            const rtl::OUString sWeight   ( "Weight" );
+            const rtl::OUString sItalic   ( "Italic" );
             sal_Int16 nNumFullEntries = 0;
 
             for ( sal_Int32 i = 0; i < nCount; i++ )
diff --git a/xmloff/source/core/DomExport.cxx b/xmloff/source/core/DomExport.cxx
index 73972b0..1266815 100644
--- a/xmloff/source/core/DomExport.cxx
+++ b/xmloff/source/core/DomExport.cxx
@@ -208,9 +208,7 @@ void DomExport::addNamespace( const OUString& sPrefix, const OUString& sURI )
     {
         // add prefix to map, and add declaration
         rMap.Add( sPrefix, sURI );
-        mrExport.AddAttribute(
-            OUString( RTL_CONSTASCII_USTRINGPARAM( "xmlns:" ) ) + sPrefix,
-            sURI );
+        mrExport.AddAttribute( "xmlns:" + sPrefix, sURI );
     }
 }
 
diff --git a/xmloff/source/core/SettingsExportHelper.cxx b/xmloff/source/core/SettingsExportHelper.cxx
index e4e39d6..d28dab4 100644
--- a/xmloff/source/core/SettingsExportHelper.cxx
+++ b/xmloff/source/core/SettingsExportHelper.cxx
@@ -46,13 +46,13 @@ using namespace ::xmloff::token;
 
 XMLSettingsExportHelper::XMLSettingsExportHelper( ::xmloff::XMLSettingsExportContext& i_rContext )
 : m_rContext( i_rContext )
-, msPrinterIndependentLayout( RTL_CONSTASCII_USTRINGPARAM( "PrinterIndependentLayout" ) )
-, msColorTableURL( RTL_CONSTASCII_USTRINGPARAM( "ColorTableURL" ) )
-, msLineEndTableURL( RTL_CONSTASCII_USTRINGPARAM( "LineEndTableURL" ) )
-, msHatchTableURL( RTL_CONSTASCII_USTRINGPARAM( "HatchTableURL" ) )
-, msDashTableURL( RTL_CONSTASCII_USTRINGPARAM( "DashTableURL" ) )
-, msGradientTableURL( RTL_CONSTASCII_USTRINGPARAM( "GradientTableURL" ) )
-, msBitmapTableURL( RTL_CONSTASCII_USTRINGPARAM( "BitmapTableURL" ) )
+, msPrinterIndependentLayout( "PrinterIndependentLayout" )
+, msColorTableURL( "ColorTableURL" )
+, msLineEndTableURL( "LineEndTableURL" )
+, msHatchTableURL( "HatchTableURL" )
+, msDashTableURL( "DashTableURL" )
+, msGradientTableURL( "GradientTableURL" )
+, msBitmapTableURL( "BitmapTableURL" )
 {
 }
 
@@ -297,20 +297,20 @@ void XMLSettingsExportHelper::exportSymbolDescriptors(
 
     if( xServiceFactory.is() )
     {
-        uno::Reference< container::XIndexContainer > xBox(xServiceFactory->createInstance(rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ("com.sun.star.document.IndexedPropertyValues") ) ), uno::UNO_QUERY);
+        uno::Reference< container::XIndexContainer > xBox(xServiceFactory->createInstance( "com.sun.star.document.IndexedPropertyValues" ), uno::UNO_QUERY);
         DBG_ASSERT( xBox.is(), "could not create service com.sun.star.document.IndexedPropertyValues" );
         if (xBox.is() )
         {
-            const rtl::OUString sName     ( RTL_CONSTASCII_USTRINGPARAM ( "Name" ) );
-            const rtl::OUString sExportName ( RTL_CONSTASCII_USTRINGPARAM ( "ExportName" ) );
-            const rtl::OUString sSymbolSet ( RTL_CONSTASCII_USTRINGPARAM ( "SymbolSet" ) );
-            const rtl::OUString sCharacter ( RTL_CONSTASCII_USTRINGPARAM ( "Character" ) );
-            const rtl::OUString sFontName ( RTL_CONSTASCII_USTRINGPARAM ( "FontName" ) );
-            const rtl::OUString sCharSet  ( RTL_CONSTASCII_USTRINGPARAM ( "CharSet" ) );
-            const rtl::OUString sFamily   ( RTL_CONSTASCII_USTRINGPARAM ( "Family" ) );
-            const rtl::OUString sPitch    ( RTL_CONSTASCII_USTRINGPARAM ( "Pitch" ) );
-            const rtl::OUString sWeight   ( RTL_CONSTASCII_USTRINGPARAM ( "Weight" ) );
-            const rtl::OUString sItalic   ( RTL_CONSTASCII_USTRINGPARAM ( "Italic" ) );
+            const rtl::OUString sName     ( "Name" );
+            const rtl::OUString sExportName ( "ExportName" );
+            const rtl::OUString sSymbolSet ( "SymbolSet" );
+            const rtl::OUString sCharacter ( "Character" );
+            const rtl::OUString sFontName ( "FontName" );
+            const rtl::OUString sCharSet  ( "CharSet" );
+            const rtl::OUString sFamily   ( "Family" );
+            const rtl::OUString sPitch    ( "Pitch" );
+            const rtl::OUString sWeight   ( "Weight" );
+            const rtl::OUString sItalic   ( "Italic" );
 
             sal_Int32 nCount = rProps.getLength();
             const formula::SymbolDescriptor *pDescriptor = rProps.getConstArray();
@@ -446,7 +446,7 @@ void XMLSettingsExportHelper::exportForbiddenCharacters(
 
     if( xServiceFactory.is() )
     {
-        uno::Reference< container::XIndexContainer > xBox(xServiceFactory->createInstance(rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ("com.sun.star.document.IndexedPropertyValues") ) ), uno::UNO_QUERY);
+        uno::Reference< container::XIndexContainer > xBox(xServiceFactory->createInstance( "com.sun.star.document.IndexedPropertyValues" ), uno::UNO_QUERY);
         DBG_ASSERT( xBox.is(), "could not create service com.sun.star.document.IndexedPropertyValues" );
         if (xBox.is() )
         {
@@ -455,11 +455,11 @@ void XMLSettingsExportHelper::exportForbiddenCharacters(
 
             const sal_Int32 nCount = aLocales.getLength();
 
-            const rtl::OUString sLanguage  ( RTL_CONSTASCII_USTRINGPARAM ( "Language" ) );
-            const rtl::OUString sCountry   ( RTL_CONSTASCII_USTRINGPARAM ( "Country" ) );
-            const rtl::OUString sVariant   ( RTL_CONSTASCII_USTRINGPARAM ( "Variant" ) );
-            const rtl::OUString sBeginLine ( RTL_CONSTASCII_USTRINGPARAM ( "BeginLine" ) );
-            const rtl::OUString sEndLine   ( RTL_CONSTASCII_USTRINGPARAM ( "EndLine" ) );
+            const rtl::OUString sLanguage  ( "Language" );
+            const rtl::OUString sCountry   ( "Country" );
+            const rtl::OUString sVariant   ( "Variant" );
+            const rtl::OUString sBeginLine ( "BeginLine" );
+            const rtl::OUString sEndLine   ( "EndLine" );
 
             sal_Int32 nPos = 0;
             for( sal_Int32 nIndex = 0; nIndex < nCount; nIndex++, pLocales++ )
@@ -513,11 +513,11 @@ void XMLSettingsExportHelper::ManipulateSetting( uno::Any& rAny, const rtl::OUSt
         if( rAny >>= nTmp )
         {
             if( nTmp == document::PrinterIndependentLayout::LOW_RESOLUTION )
-                rAny <<= rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("low-resolution"));
+                rAny <<= rtl::OUString("low-resolution");
             else if( nTmp == document::PrinterIndependentLayout::DISABLED )
-                rAny <<= rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("disabled"));
+                rAny <<= rtl::OUString("disabled");
             else if( nTmp == document::PrinterIndependentLayout::HIGH_RESOLUTION )
-                rAny <<= rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("high-resolution"));
+                rAny <<= rtl::OUString("high-resolution");
         }
     }
     else if( (rName == msColorTableURL) || (rName == msLineEndTableURL) || (rName == msHatchTableURL) ||
diff --git a/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx b/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx
index 0ded850..402c8a8 100644
--- a/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx
+++ b/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx
@@ -186,7 +186,7 @@ XMLEmbeddedObjectImportContext::XMLEmbeddedObjectImportContext(
     if( nPrfx == XML_NAMESPACE_MATH &&
         IsXMLToken( rLName, XML_MATH ) )
     {
-        sFilterService = OUString( RTL_CONSTASCII_USTRINGPARAM(XML_IMPORT_FILTER_MATH) );
+        sFilterService = OUString( XML_IMPORT_FILTER_MATH );
         aName = SvGlobalName(SO3_SM_CLASSID);
     }
     else if( nPrfx == XML_NAMESPACE_OFFICE &&
diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx
index f8ca19e..b51e896 100644
--- a/xmloff/source/core/xmlexp.cxx
+++ b/xmloff/source/core/xmlexp.cxx
@@ -906,12 +906,8 @@ OUString SAL_CALL SvXMLExport::getImplementationName(  ) throw(uno::RuntimeExcep
 sal_Bool SAL_CALL SvXMLExport::supportsService( const OUString& rServiceName ) throw(uno::RuntimeException)
 {
     return
-        rServiceName.equalsAsciiL(
-            "com.sun.star.document.ExportFilter",
-            sizeof("com.sun.star.document.ExportFilter")-1 ) ||
-        rServiceName.equalsAsciiL(
-            "com.sun.star.xml.XMLExportFilter",
-            sizeof("com.sun.star.xml.XMLExportFilter")-1);
+        (rServiceName == "com.sun.star.document.ExportFilter") ||
+        (rServiceName == "com.sun.star.xml.XMLExportFilter");
 }
 
 uno::Sequence< OUString > SAL_CALL SvXMLExport::getSupportedServiceNames(  )
@@ -2140,7 +2136,7 @@ sal_Bool SvXMLExport::ExportEmbeddedOwnObject( Reference< XComponent >& rComp )
     {
         static ::comphelper::PropertyMapEntry aInfoMap[] =
         {
-            { RTL_CONSTASCII_STRINGPARAM("ExportTableNumberList"), 0, &::getBooleanCppuType(), PropertyAttribute::MAYBEVOID, 0},
+            { "ExportTableNumberList", 21, 0, &::getBooleanCppuType(), PropertyAttribute::MAYBEVOID, 0},
             { NULL, 0, 0, NULL, 0, 0 }
         };
         Reference< XPropertySet > xInfoProp(
diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx
index d6e29df..3cdd319 100644
--- a/xmloff/source/core/xmlimp.cxx
+++ b/xmloff/source/core/xmlimp.cxx
@@ -292,100 +292,44 @@ void SvXMLImport::_InitCtor()
     if( mnImportFlags != 0 )
     {
         // implicit "xml" namespace prefix
-        mpNamespaceMap->Add( GetXMLToken(XML_XML), GetXMLToken(XML_N_XML),
-                            XML_NAMESPACE_XML );
-        mpNamespaceMap->Add( OUString( RTL_CONSTASCII_USTRINGPARAM ( sXML_np__office ) ),
-                            GetXMLToken(XML_N_OFFICE),
-                            XML_NAMESPACE_OFFICE );
-        mpNamespaceMap->Add( OUString( RTL_CONSTASCII_USTRINGPARAM ( sXML_np__office_ext ) ),
-                            GetXMLToken(XML_N_OFFICE_EXT),
-                            XML_NAMESPACE_OFFICE_EXT );
-        mpNamespaceMap->Add( OUString( RTL_CONSTASCII_USTRINGPARAM ( sXML_np__ooo ) ), GetXMLToken(XML_N_OOO), XML_NAMESPACE_OOO );
-        mpNamespaceMap->Add( OUString( RTL_CONSTASCII_USTRINGPARAM ( sXML_np__style) ),
-                            GetXMLToken(XML_N_STYLE),
-                            XML_NAMESPACE_STYLE );
-        mpNamespaceMap->Add( OUString( RTL_CONSTASCII_USTRINGPARAM ( sXML_np__text) ),
-                            GetXMLToken(XML_N_TEXT),
-                            XML_NAMESPACE_TEXT );
-        mpNamespaceMap->Add( OUString( RTL_CONSTASCII_USTRINGPARAM ( sXML_np__table ) ),
-                            GetXMLToken(XML_N_TABLE),
-                            XML_NAMESPACE_TABLE );
-        mpNamespaceMap->Add( OUString( RTL_CONSTASCII_USTRINGPARAM ( sXML_np__table_ext ) ),
-                            GetXMLToken(XML_N_TABLE_EXT),
-                            XML_NAMESPACE_TABLE_EXT );
-        mpNamespaceMap->Add( OUString( RTL_CONSTASCII_USTRINGPARAM ( sXML_np__draw ) ),
-                            GetXMLToken(XML_N_DRAW),
-                            XML_NAMESPACE_DRAW );
-        mpNamespaceMap->Add( OUString( RTL_CONSTASCII_USTRINGPARAM ( sXML_np__draw_ext ) ),
-                            GetXMLToken(XML_N_DRAW_EXT),
-                            XML_NAMESPACE_DRAW_EXT );
-        mpNamespaceMap->Add( OUString( RTL_CONSTASCII_USTRINGPARAM (sXML_np__dr3d ) ),
-                            GetXMLToken(XML_N_DR3D),
-                            XML_NAMESPACE_DR3D );
-        mpNamespaceMap->Add( OUString( RTL_CONSTASCII_USTRINGPARAM ( sXML_np__fo) ),
-                            GetXMLToken(XML_N_FO_COMPAT),
-                            XML_NAMESPACE_FO );
-        mpNamespaceMap->Add( OUString( RTL_CONSTASCII_USTRINGPARAM ( sXML_np__xlink) ),
-                            GetXMLToken(XML_N_XLINK),
-                            XML_NAMESPACE_XLINK );
-        mpNamespaceMap->Add( OUString( RTL_CONSTASCII_USTRINGPARAM ( sXML_np__dc) ),
-                            GetXMLToken(XML_N_DC),
-                            XML_NAMESPACE_DC );
-        mpNamespaceMap->Add( OUString( RTL_CONSTASCII_USTRINGPARAM ( sXML_np__dom ) ),
-                            GetXMLToken(XML_N_DOM),
-                            XML_NAMESPACE_DOM );
-        mpNamespaceMap->Add( OUString( RTL_CONSTASCII_USTRINGPARAM ( sXML_np__meta) ),
-                            GetXMLToken(XML_N_META),
-                            XML_NAMESPACE_META );
-        mpNamespaceMap->Add( OUString( RTL_CONSTASCII_USTRINGPARAM ( sXML_np__number) ),
-                            GetXMLToken(XML_N_NUMBER),
-                            XML_NAMESPACE_NUMBER );
-        mpNamespaceMap->Add( OUString( RTL_CONSTASCII_USTRINGPARAM ( sXML_np__svg) ),
-                            GetXMLToken(XML_N_SVG_COMPAT),
-                            XML_NAMESPACE_SVG );
-        mpNamespaceMap->Add( OUString( RTL_CONSTASCII_USTRINGPARAM ( sXML_np__chart) ),
-                            GetXMLToken(XML_N_CHART),
-                            XML_NAMESPACE_CHART );
-        mpNamespaceMap->Add( OUString( RTL_CONSTASCII_USTRINGPARAM ( sXML_np__math) ),
-                            GetXMLToken(XML_N_MATH),
-                            XML_NAMESPACE_MATH );
-        mpNamespaceMap->Add(OUString(RTL_CONSTASCII_USTRINGPARAM( sXML_np__form )),
-                            GetXMLToken(XML_N_FORM),
-                            XML_NAMESPACE_FORM );
-        mpNamespaceMap->Add( OUString( RTL_CONSTASCII_USTRINGPARAM ( sXML_np__script) ),
-                            GetXMLToken(XML_N_SCRIPT),
-                            XML_NAMESPACE_SCRIPT );
-        mpNamespaceMap->Add( OUString( RTL_CONSTASCII_USTRINGPARAM ( sXML_np__config) ),
-                            GetXMLToken(XML_N_CONFIG),
-                            XML_NAMESPACE_CONFIG );
-        mpNamespaceMap->Add( OUString( RTL_CONSTASCII_USTRINGPARAM ( sXML_np__xforms) ),
-                            GetXMLToken(XML_N_XFORMS_1_0),
-                            XML_NAMESPACE_XFORMS );
-        mpNamespaceMap->Add( OUString( RTL_CONSTASCII_USTRINGPARAM ( sXML_np__formx) ),
-                            GetXMLToken( XML_N_FORMX ),
-                            XML_NAMESPACE_FORMX );
-        mpNamespaceMap->Add( OUString( RTL_CONSTASCII_USTRINGPARAM ( sXML_np__xsd) ),
-                            GetXMLToken(XML_N_XSD),
-                            XML_NAMESPACE_XSD );
-        mpNamespaceMap->Add( OUString( RTL_CONSTASCII_USTRINGPARAM ( sXML_np__xsi) ),
-                            GetXMLToken(XML_N_XSI),
-                            XML_NAMESPACE_XFORMS );
-        mpNamespaceMap->Add( OUString( RTL_CONSTASCII_USTRINGPARAM ( sXML_np__ooow ) ), GetXMLToken(XML_N_OOOW), XML_NAMESPACE_OOOW );
-        mpNamespaceMap->Add( OUString( RTL_CONSTASCII_USTRINGPARAM ( sXML_np__oooc ) ), GetXMLToken(XML_N_OOOC), XML_NAMESPACE_OOOC );
-        mpNamespaceMap->Add( OUString( RTL_CONSTASCII_USTRINGPARAM ( sXML_np__field ) ), GetXMLToken(XML_N_FIELD), XML_NAMESPACE_FIELD );
-        mpNamespaceMap->Add( OUString( RTL_CONSTASCII_USTRINGPARAM ( sXML_np__of ) ),
-                            GetXMLToken(XML_N_OF), XML_NAMESPACE_OF );
-        mpNamespaceMap->Add(
-            OUString( RTL_CONSTASCII_USTRINGPARAM ( sXML_np__xhtml ) ),
-            GetXMLToken(XML_N_XHTML), XML_NAMESPACE_XHTML );
-        mpNamespaceMap->Add(
-            OUString( RTL_CONSTASCII_USTRINGPARAM( sXML_np__css3text ) ),
-            GetXMLToken(XML_N_CSS3TEXT), XML_NAMESPACE_CSS3TEXT );
-
-        mpNamespaceMap->Add( OUString("_calc_libo"), GetXMLToken(XML_N_CALC_EXT), XML_NAMESPACE_CALC_EXT);
+        mpNamespaceMap->Add( GetXMLToken(XML_XML), GetXMLToken(XML_N_XML), XML_NAMESPACE_XML );
+        mpNamespaceMap->Add( OUString( sXML_np__office ), GetXMLToken(XML_N_OFFICE), XML_NAMESPACE_OFFICE );
+        mpNamespaceMap->Add( OUString( sXML_np__office_ext ), GetXMLToken(XML_N_OFFICE_EXT), XML_NAMESPACE_OFFICE_EXT );
+        mpNamespaceMap->Add( OUString( sXML_np__ooo ), GetXMLToken(XML_N_OOO), XML_NAMESPACE_OOO );
+        mpNamespaceMap->Add( OUString( sXML_np__style ), GetXMLToken(XML_N_STYLE), XML_NAMESPACE_STYLE );
+        mpNamespaceMap->Add( OUString( sXML_np__text ), GetXMLToken(XML_N_TEXT), XML_NAMESPACE_TEXT );
+        mpNamespaceMap->Add( OUString( sXML_np__table ), GetXMLToken(XML_N_TABLE), XML_NAMESPACE_TABLE );
+        mpNamespaceMap->Add( OUString( sXML_np__table_ext ), GetXMLToken(XML_N_TABLE_EXT), XML_NAMESPACE_TABLE_EXT );
+        mpNamespaceMap->Add( OUString( sXML_np__draw ), GetXMLToken(XML_N_DRAW), XML_NAMESPACE_DRAW );
+        mpNamespaceMap->Add( OUString( sXML_np__draw_ext ), GetXMLToken(XML_N_DRAW_EXT), XML_NAMESPACE_DRAW_EXT );
+        mpNamespaceMap->Add( OUString( sXML_np__dr3d ), GetXMLToken(XML_N_DR3D), XML_NAMESPACE_DR3D );
+        mpNamespaceMap->Add( OUString( sXML_np__fo ), GetXMLToken(XML_N_FO_COMPAT), XML_NAMESPACE_FO );
+        mpNamespaceMap->Add( OUString( sXML_np__xlink ), GetXMLToken(XML_N_XLINK), XML_NAMESPACE_XLINK );
+        mpNamespaceMap->Add( OUString( sXML_np__dc ), GetXMLToken(XML_N_DC), XML_NAMESPACE_DC );
+        mpNamespaceMap->Add( OUString( sXML_np__dom ), GetXMLToken(XML_N_DOM), XML_NAMESPACE_DOM );
+        mpNamespaceMap->Add( OUString( sXML_np__meta ), GetXMLToken(XML_N_META), XML_NAMESPACE_META );
+        mpNamespaceMap->Add( OUString( sXML_np__number ), GetXMLToken(XML_N_NUMBER), XML_NAMESPACE_NUMBER );
+        mpNamespaceMap->Add( OUString( sXML_np__svg ), GetXMLToken(XML_N_SVG_COMPAT), XML_NAMESPACE_SVG );
+        mpNamespaceMap->Add( OUString( sXML_np__chart ), GetXMLToken(XML_N_CHART), XML_NAMESPACE_CHART );
+        mpNamespaceMap->Add( OUString( sXML_np__math ), GetXMLToken(XML_N_MATH), XML_NAMESPACE_MATH );
+        mpNamespaceMap->Add(OUString( sXML_np__form ), GetXMLToken(XML_N_FORM), XML_NAMESPACE_FORM );
+        mpNamespaceMap->Add( OUString( sXML_np__script ), GetXMLToken(XML_N_SCRIPT), XML_NAMESPACE_SCRIPT );
+        mpNamespaceMap->Add( OUString( sXML_np__config ), GetXMLToken(XML_N_CONFIG), XML_NAMESPACE_CONFIG );
+        mpNamespaceMap->Add( OUString( sXML_np__xforms ), GetXMLToken(XML_N_XFORMS_1_0), XML_NAMESPACE_XFORMS );
+        mpNamespaceMap->Add( OUString( sXML_np__formx ), GetXMLToken( XML_N_FORMX ), XML_NAMESPACE_FORMX );
+        mpNamespaceMap->Add( OUString( sXML_np__xsd ), GetXMLToken(XML_N_XSD), XML_NAMESPACE_XSD );
+        mpNamespaceMap->Add( OUString( sXML_np__xsi ), GetXMLToken(XML_N_XSI), XML_NAMESPACE_XFORMS );
+        mpNamespaceMap->Add( OUString( sXML_np__ooow ), GetXMLToken(XML_N_OOOW), XML_NAMESPACE_OOOW );
+        mpNamespaceMap->Add( OUString( sXML_np__oooc ), GetXMLToken(XML_N_OOOC), XML_NAMESPACE_OOOC );
+        mpNamespaceMap->Add( OUString( sXML_np__field ), GetXMLToken(XML_N_FIELD), XML_NAMESPACE_FIELD );
+        mpNamespaceMap->Add( OUString( sXML_np__of ), GetXMLToken(XML_N_OF), XML_NAMESPACE_OF );
+        mpNamespaceMap->Add( OUString( sXML_np__xhtml ), GetXMLToken(XML_N_XHTML), XML_NAMESPACE_XHTML );
+        mpNamespaceMap->Add( OUString( sXML_np__css3text ), GetXMLToken(XML_N_CSS3TEXT), XML_NAMESPACE_CSS3TEXT );
+
+        mpNamespaceMap->Add( "_calc_libo", GetXMLToken(XML_N_CALC_EXT), XML_NAMESPACE_CALC_EXT);
     }
 
-    msPackageProtocol = OUString( RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.Package:" ) );
+    msPackageProtocol = "vnd.sun.star.Package:";
 
     if (mxNumberFormatsSupplier.is())
         mpNumImport = new SvXMLNumFmtHelper(mxNumberFormatsSupplier, getServiceFactory());
@@ -502,9 +446,8 @@ void SAL_CALL SvXMLImport::startDocument( void )
                 {
                     mxGraphicResolver = Reference< XGraphicObjectResolver >::query(
                         xFactory->createInstance(
-                            OUString(RTL_CONSTASCII_USTRINGPARAM(
                                 // #99870# Import... instead of Export...
-                                "com.sun.star.document.ImportGraphicObjectResolver"))));
+                                "com.sun.star.document.ImportGraphicObjectResolver"));
                     mpImpl->mbOwnGraphicResolver = mxGraphicResolver.is();
                 }
 
@@ -512,9 +455,8 @@ void SAL_CALL SvXMLImport::startDocument( void )
                 {
                     mxEmbeddedResolver = Reference< XEmbeddedObjectResolver >::query(
                         xFactory->createInstance(
-                            OUString(RTL_CONSTASCII_USTRINGPARAM(
                                 // #99870# Import... instead of Export...
-                                "com.sun.star.document.ImportEmbeddedObjectResolver"))));
+                                "com.sun.star.document.ImportEmbeddedObjectResolver"));
                     mpImpl->mbOwnEmbeddedResolver = mxEmbeddedResolver.is();
                 }
             }
@@ -555,9 +497,9 @@ void SAL_CALL SvXMLImport::endDocument( void )
         {
             if (mpProgressBarHelper)
             {
-                OUString sProgressMax(RTL_CONSTASCII_USTRINGPARAM(XML_PROGRESSMAX));
-                OUString sProgressCurrent(RTL_CONSTASCII_USTRINGPARAM(XML_PROGRESSCURRENT));
-                OUString sRepeat(RTL_CONSTASCII_USTRINGPARAM(XML_PROGRESSREPEAT));
+                OUString sProgressMax(XML_PROGRESSMAX);
+                OUString sProgressCurrent(XML_PROGRESSCURRENT);
+                OUString sRepeat(XML_PROGRESSREPEAT);
                 if (xPropertySetInfo->hasPropertyByName(sProgressMax) &&
                     xPropertySetInfo->hasPropertyByName(sProgressCurrent))
                 {
@@ -573,7 +515,7 @@ void SAL_CALL SvXMLImport::endDocument( void )
                     mxImportInfo->setPropertyValue(sRepeat, cppu::bool2any(mpProgressBarHelper->GetRepeat()));
                 // pProgressBarHelper is deleted in dtor
             }
-            OUString sNumberStyles(RTL_CONSTASCII_USTRINGPARAM(XML_NUMBERSTYLES));
+            OUString sNumberStyles(XML_NUMBERSTYLES);
             if (mxNumberStyles.is() && xPropertySetInfo->hasPropertyByName(sNumberStyles))
             {
                 uno::Any aAny;
@@ -629,7 +571,7 @@ void SAL_CALL SvXMLImport::startElement( const OUString& rName,
     throw(xml::sax::SAXException, uno::RuntimeException)
 {
     SvXMLNamespaceMap *pRewindMap = 0;
-
+    //    SAL_INFO("svg", "startElement " << rName);
     // Process namespace attributes. This must happen before creating the
     // context, because namespace decaration apply to the element name itself.
     sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
@@ -643,14 +585,10 @@ void SAL_CALL SvXMLImport::startElement( const OUString& rName,
             // the ODF version in content.xml and manifest.xml must be the same starting from ODF1.2
             if ( mpImpl->mStreamName == "content.xml" && !IsODFVersionConsistent( mpImpl->aODFVersion ) )
             {
-                throw xml::sax::SAXException(
-                        ::rtl::OUString(
-                            RTL_CONSTASCII_USTRINGPARAM( "Inconsistent ODF versions in content.xml and manifest.xml!" ) ),
+                throw xml::sax::SAXException("Inconsistent ODF versions in content.xml and manifest.xml!",
                         uno::Reference< uno::XInterface >(),
                         uno::makeAny(
-                            packages::zip::ZipIOException(
-                                ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
-                                    "Inconsistent ODF versions in content.xml and manifest.xml!" ) ),
+                            packages::zip::ZipIOException("Inconsistent ODF versions in content.xml and manifest.xml!",
                                 Reference< XInterface >() ) ) );
             }
         }
@@ -717,7 +655,7 @@ void SAL_CALL SvXMLImport::startElement( const OUString& rName,
         if( (nPrefix & XML_NAMESPACE_UNKNOWN_FLAG) != 0 &&
             IS_TYPE( SvXMLImportContext, pContext ) )
         {
-            OUString aMsg( RTL_CONSTASCII_USTRINGPARAM( "Root element unknown" ) );
+            OUString aMsg( "Root element unknown" );
             Reference<xml::sax::XLocator> xDummyLocator;
             Sequence < OUString > aParams(1);
             aParams.getArray()[0] = rName;
@@ -914,14 +852,14 @@ void SAL_CALL SvXMLImport::initialize( const uno::Sequence< uno::Any >& aArgumen
             uno::Reference< beans::XPropertySetInfo > xPropertySetInfo = mxImportInfo->getPropertySetInfo();
             if (xPropertySetInfo.is())
             {
-                OUString sPropName(RTL_CONSTASCII_USTRINGPARAM(XML_NUMBERSTYLES));
+                OUString sPropName(XML_NUMBERSTYLES);
                 if (xPropertySetInfo->hasPropertyByName(sPropName))
                 {
                     uno::Any aAny = mxImportInfo->getPropertyValue(sPropName);
                     aAny >>= mxNumberStyles;
                 }
 
-                sPropName = OUString( RTL_CONSTASCII_USTRINGPARAM("PrivateData" ) );
+                sPropName = "PrivateData";
                 if (xPropertySetInfo->hasPropertyByName(sPropName))
                 {
                     Reference < XInterface > xIfc;
@@ -936,7 +874,7 @@ void SAL_CALL SvXMLImport::initialize( const uno::Sequence< uno::Any >& aArgumen
                     }
                 }
                 OUString sBaseURI;
-                sPropName = OUString( RTL_CONSTASCII_USTRINGPARAM("BaseURI" ) );
+                sPropName = "BaseURI";
                 if (xPropertySetInfo->hasPropertyByName(sPropName))
                 {
                     uno::Any aAny = mxImportInfo->getPropertyValue(sPropName);
@@ -945,14 +883,14 @@ void SAL_CALL SvXMLImport::initialize( const uno::Sequence< uno::Any >& aArgumen
                     mpImpl->aDocBase.SetURL( sBaseURI );
                 }
                 OUString sRelPath;
-                sPropName = OUString( RTL_CONSTASCII_USTRINGPARAM("StreamRelPath" ) );
+                sPropName = "StreamRelPath";
                 if( xPropertySetInfo->hasPropertyByName(sPropName) )
                 {
                     uno::Any aAny = mxImportInfo->getPropertyValue(sPropName);
                     aAny >>= sRelPath;
                 }
                 OUString sName;
-                sPropName = OUString( RTL_CONSTASCII_USTRINGPARAM("StreamName" ) );
+                sPropName = "StreamName";
                 if( xPropertySetInfo->hasPropertyByName(sPropName) )
                 {
                     uno::Any aAny = mxImportInfo->getPropertyValue(sPropName);
@@ -966,20 +904,20 @@ void SAL_CALL SvXMLImport::initialize( const uno::Sequence< uno::Any >& aArgumen
                 }
                 mpImpl->mStreamName = sName; // Note: may be empty (XSLT)
                 // Retrieve property <ShapePositionInHoriL2R> (#i28749#)
-                sPropName = OUString( RTL_CONSTASCII_USTRINGPARAM("ShapePositionInHoriL2R" ) );
+                sPropName = "ShapePositionInHoriL2R";
                 if( xPropertySetInfo->hasPropertyByName(sPropName) )
                 {
                     uno::Any aAny = mxImportInfo->getPropertyValue(sPropName);
                     aAny >>= (mpImpl->mbShapePositionInHoriL2R);
                 }
-                sPropName = OUString( RTL_CONSTASCII_USTRINGPARAM("TextDocInOOoFileFormat" ) );
+                sPropName = "TextDocInOOoFileFormat";
                 if( xPropertySetInfo->hasPropertyByName(sPropName) )
                 {
                     uno::Any aAny = mxImportInfo->getPropertyValue(sPropName);
                     aAny >>= (mpImpl->mbTextDocInOOoFileFormat);
                 }
 
-                sPropName = OUString( RTL_CONSTASCII_USTRINGPARAM("SourceStorage" ) );
+                sPropName = "SourceStorage";
                 if( xPropertySetInfo->hasPropertyByName(sPropName) )
                     mxImportInfo->getPropertyValue(sPropName) >>= mpImpl->mxSourceStorage;
             }
@@ -999,22 +937,16 @@ sal_Bool SAL_CALL SvXMLImport::supportsService( const OUString& rServiceName )
     throw(::com::sun::star::uno::RuntimeException)
 {
     return
-        rServiceName.equalsAsciiL(
-            "com.sun.star.document.ImportFilter",
-            sizeof("com.sun.star.document.ImportFilter")-1 ) ||
-        rServiceName.equalsAsciiL(
-            "com.sun.star.xml.XMLImportFilter",
-            sizeof("com.sun.star.xml.XMLImportFilter")-1);
+        (rServiceName == "com.sun.star.document.ImportFilter") ||
+        (rServiceName == "com.sun.star.xml.XMLImportFilter");
 }
 
 uno::Sequence< OUString > SAL_CALL SvXMLImport::getSupportedServiceNames(  )
     throw(uno::RuntimeException)
 {
     uno::Sequence<OUString> aSeq(2);
-    aSeq[0] = OUString(
-        RTL_CONSTASCII_USTRINGPARAM("com.sun.star.document.ImportFilter"));
-    aSeq[1] = OUString(
-        RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.XMLImportFilter"));
+    aSeq[0] = "com.sun.star.document.ImportFilter";
+    aSeq[1] = "com.sun.star.xml.XMLImportFilter";
     return aSeq;
 }
 
@@ -1058,7 +990,7 @@ const Reference< container::XNameContainer > & SvXMLImport::GetGradientHelper()
                 try
                 {
                     mxGradientHelper =  Reference< container::XNameContainer >( xServiceFact->createInstance(
-                        OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.GradientTable" ) ) ), UNO_QUERY);
+                        "com.sun.star.drawing.GradientTable" ), UNO_QUERY);
                 }
                 catch( lang::ServiceNotRegisteredException& )
                 {}
@@ -1081,7 +1013,7 @@ const Reference< container::XNameContainer > & SvXMLImport::GetHatchHelper()
                 try
                 {
                     mxHatchHelper =  Reference< container::XNameContainer >( xServiceFact->createInstance(
-                        OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.HatchTable" ) ) ), UNO_QUERY);
+                        "com.sun.star.drawing.HatchTable" ), UNO_QUERY);
                 }
                 catch( lang::ServiceNotRegisteredException& )
                 {}
@@ -1104,7 +1036,7 @@ const Reference< container::XNameContainer > & SvXMLImport::GetBitmapHelper()
                 try
                 {
                     mxBitmapHelper =  Reference< container::XNameContainer >( xServiceFact->createInstance(
-                        OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.BitmapTable" ) ) ), UNO_QUERY);
+                        "com.sun.star.drawing.BitmapTable" ), UNO_QUERY);
                 }
                 catch( lang::ServiceNotRegisteredException& )
                 {}
@@ -1127,7 +1059,7 @@ const Reference< container::XNameContainer > & SvXMLImport::GetTransGradientHelp
                 try
                 {
                     mxTransGradientHelper =  Reference< container::XNameContainer >( xServiceFact->createInstance(
-                        OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.TransparencyGradientTable" ) ) ), UNO_QUERY);
+                        "com.sun.star.drawing.TransparencyGradientTable" ), UNO_QUERY);
                 }
                 catch( lang::ServiceNotRegisteredException& )
                 {}
@@ -1150,7 +1082,7 @@ const Reference< container::XNameContainer > & SvXMLImport::GetMarkerHelper()
                 try
                 {
                     mxMarkerHelper =  Reference< container::XNameContainer >( xServiceFact->createInstance(
-                        OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.MarkerTable" ) ) ), UNO_QUERY);
+                        "com.sun.star.drawing.MarkerTable" ), UNO_QUERY);
                 }
                 catch( lang::ServiceNotRegisteredException& )
                 {}
@@ -1173,7 +1105,7 @@ const Reference< container::XNameContainer > & SvXMLImport::GetDashHelper()
                 try
                 {
                     mxDashHelper =  Reference< container::XNameContainer >( xServiceFact->createInstance(
-                        OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.DashTable" ) ) ), UNO_QUERY);
+                        "com.sun.star.drawing.DashTable" ), UNO_QUERY);
                 }
                 catch( lang::ServiceNotRegisteredException& )
                 {}
@@ -1319,7 +1251,7 @@ Reference < XOutputStream >
         Reference< XNameAccess > xNA( mxEmbeddedResolver, UNO_QUERY );
         if( xNA.is() )
         {
-            OUString aURL( RTL_CONSTASCII_USTRINGPARAM( "Obj12345678" ) );
+            OUString aURL( "Obj12345678" );
             Any aAny = xNA->getByName( aURL );
             aAny >>= xOLEStream;
         }
@@ -1334,7 +1266,7 @@ Reference < XOutputStream >
 
     if( mxEmbeddedResolver.is() )
     {
-        OUString aURL( RTL_CONSTASCII_USTRINGPARAM( "Obj12345678" ) );
+        OUString aURL( "Obj12345678" );
         sRet = mxEmbeddedResolver->resolveEmbeddedObjectURL( aURL );
     }
 
@@ -1351,8 +1283,7 @@ void SvXMLImport::AddStyleDisplayName( sal_uInt16 nFamily,
         mpStyleMap->acquire();
         if( mxImportInfo.is() )
         {
-            OUString sPrivateData(
-                    RTL_CONSTASCII_USTRINGPARAM("PrivateData" ) );
+            OUString sPrivateData( "PrivateData" );
             Reference< beans::XPropertySetInfo > xPropertySetInfo =
                 mxImportInfo->getPropertySetInfo();
             if( xPropertySetInfo.is() &&
@@ -1415,10 +1346,10 @@ ProgressBarHelper*  SvXMLImport::GetProgressBarHelper()
             uno::Reference< beans::XPropertySetInfo > xPropertySetInfo = mxImportInfo->getPropertySetInfo();
             if (xPropertySetInfo.is())
             {
-                OUString sProgressRange(RTL_CONSTASCII_USTRINGPARAM(XML_PROGRESSRANGE));
-                OUString sProgressMax(RTL_CONSTASCII_USTRINGPARAM(XML_PROGRESSMAX));
-                OUString sProgressCurrent(RTL_CONSTASCII_USTRINGPARAM(XML_PROGRESSCURRENT));
-                OUString sRepeat(RTL_CONSTASCII_USTRINGPARAM(XML_PROGRESSREPEAT));
+                OUString sProgressRange(XML_PROGRESSRANGE);
+                OUString sProgressMax(XML_PROGRESSMAX);
+                OUString sProgressCurrent(XML_PROGRESSCURRENT);
+                OUString sRepeat(XML_PROGRESSREPEAT);
                 if (xPropertySetInfo->hasPropertyByName(sProgressMax) &&
                     xPropertySetInfo->hasPropertyByName(sProgressCurrent) &&
                     xPropertySetInfo->hasPropertyByName(sProgressRange))
@@ -1490,7 +1421,7 @@ XMLEventImportHelper& SvXMLImport::GetEventImport()
         mpEventImportHelper->AddTranslationTable(aStandardEventTable);
 
         // register StarBasic event handler with capitalized spelling
-        OUString sStarBasicCap(RTL_CONSTASCII_USTRINGPARAM("StarBasic"));
+        OUString sStarBasicCap( "StarBasic" );
         mpEventImportHelper->RegisterFactory(sStarBasicCap,
                                             new XMLStarBasicContextFactory());
     }
@@ -1608,13 +1539,13 @@ sal_Bool SvXMLImport::IsODFVersionConsistent( const ::rtl::OUString& aODFVersion
 
             // the check should be done only for OASIS format
             ::rtl::OUString aMediaType;
-            xStorProps->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MediaType" ) ) ) >>= aMediaType;
+            xStorProps->getPropertyValue( "MediaType" ) >>= aMediaType;
             if ( ::comphelper::OStorageHelper::GetXStorageFormat( xStor ) >= SOFFICE_FILEFORMAT_8 )
             {
                 sal_Bool bRepairPackage = sal_False;
                 try
                 {
-                    xStorProps->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "RepairPackage" ) ) )
+                    xStorProps->getPropertyValue( "RepairPackage" )
                         >>= bRepairPackage;
                 } catch ( uno::Exception& )
                 {}
@@ -1623,7 +1554,7 @@ sal_Bool SvXMLImport::IsODFVersionConsistent( const ::rtl::OUString& aODFVersion
                 if ( !bRepairPackage )
                 {
                     ::rtl::OUString aStorVersion;
-                    xStorProps->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Version" ) ) )
+                    xStorProps->getPropertyValue( "Version" )
                         >>= aStorVersion;
 
                     // if the storage version is set in manifest.xml, it must be the same as in content.xml
@@ -1633,13 +1564,13 @@ sal_Bool SvXMLImport::IsODFVersionConsistent( const ::rtl::OUString& aODFVersion
                     if ( !aStorVersion.isEmpty() )
                         bResult = aODFVersion.equals( aStorVersion );
                     else
-                        xStorProps->setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Version" ) ),
+                        xStorProps->setPropertyValue( "Version",
                                                       uno::makeAny( aODFVersion ) );
 
                     if ( bResult )
                     {
                         sal_Bool bInconsistent = sal_False;
-                        xStorProps->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsInconsistent" ) ) )
+                        xStorProps->getPropertyValue( "IsInconsistent" )
                             >>= bInconsistent;
                         bResult = !bInconsistent;
                     }
@@ -1678,7 +1609,7 @@ sal_Unicode SvXMLImport::ConvStarBatsCharToStarSymbol( sal_Unicode c )
     sal_Unicode cNew = c;
     if( !mpImpl->hBatsFontConv )
     {
-        OUString sStarBats( RTL_CONSTASCII_USTRINGPARAM( "StarBats" ) );
+        OUString sStarBats( "StarBats" );
         mpImpl->hBatsFontConv = CreateFontToSubsFontConverter( sStarBats,
                  FONTTOSUBSFONT_IMPORT|FONTTOSUBSFONT_ONLYOLDSOSYMBOLFONTS );
         OSL_ENSURE( mpImpl->hBatsFontConv, "Got no symbol font converter" );
@@ -1696,7 +1627,7 @@ sal_Unicode SvXMLImport::ConvStarMathCharToStarSymbol( sal_Unicode c )
     sal_Unicode cNew = c;
     if( !mpImpl->hMathFontConv )
     {
-        OUString sStarMath( RTL_CONSTASCII_USTRINGPARAM( "StarMath" ) );
+        OUString sStarMath( "StarMath" );
         mpImpl->hMathFontConv = CreateFontToSubsFontConverter( sStarMath,
                  FONTTOSUBSFONT_IMPORT|FONTTOSUBSFONT_ONLYOLDSOSYMBOLFONTS );
         OSL_ENSURE( mpImpl->hMathFontConv, "Got no symbol font converter" );
@@ -1840,7 +1771,7 @@ bool SvXMLImport::getBuildIds( sal_Int32& rUPD, sal_Int32& rBuild ) const
     bool bRet = false;
     if( mxImportInfo.is() ) try
     {
-        const OUString aPropName(RTL_CONSTASCII_USTRINGPARAM("BuildId"));
+        const OUString aPropName( "BuildId" );
         Reference< XPropertySetInfo > xSetInfo( mxImportInfo->getPropertySetInfo() );
         if( xSetInfo.is() && xSetInfo->hasPropertyByName( aPropName ) )
         {
diff --git a/xmloff/source/core/xmlmultiimagehelper.cxx b/xmloff/source/core/xmlmultiimagehelper.cxx
index c2214f2..e060de1 100644
--- a/xmloff/source/core/xmlmultiimagehelper.cxx
+++ b/xmloff/source/core/xmlmultiimagehelper.cxx
@@ -33,37 +33,37 @@ namespace
         sal_uInt32 nRetval(0);
 
         // pixel formats first
-        if(rString.endsWithAsciiL(RTL_CONSTASCII_STRINGPARAM(".bmp")))
+        if(rString.endsWithAsciiL(".bmp", 4))
         {
             return 10;
         }
-        if(rString.endsWithAsciiL(RTL_CONSTASCII_STRINGPARAM(".gif")))
+        if(rString.endsWithAsciiL(".gif", 4))
         {
             return 20;
         }
-        if(rString.endsWithAsciiL(RTL_CONSTASCII_STRINGPARAM(".jpg")))
+        if(rString.endsWithAsciiL(".jpg", 4))
         {
             return 30;
         }
-        if(rString.endsWithAsciiL(RTL_CONSTASCII_STRINGPARAM(".png")))
+        if(rString.endsWithAsciiL(".png", 4))
         {
             return 40;
         }
 
         // vector formats, prefer always
-        if(rString.endsWithAsciiL(RTL_CONSTASCII_STRINGPARAM(".svm")))
+        if(rString.endsWithAsciiL(".svm", 4))
         {
             return 1000;
         }
-        if(rString.endsWithAsciiL(RTL_CONSTASCII_STRINGPARAM(".wmf")))
+        if(rString.endsWithAsciiL(".wmf", 4))
         {
             return 1010;
         }
-        if(rString.endsWithAsciiL(RTL_CONSTASCII_STRINGPARAM(".emf")))
+        if(rString.endsWithAsciiL(".emf", 4))
         {
             return 1020;
         }
-        else if(rString.endsWithAsciiL(RTL_CONSTASCII_STRINGPARAM(".svg")))
+        else if(rString.endsWithAsciiL(".svg", 4))
         {
             return 1030;
         }


More information about the Libreoffice-commits mailing list