[Libreoffice-commits] .: hwpfilter/source oox/source sax/source unoxml/source

Julien Nabet serval2412 at kemper.freedesktop.org
Sat Mar 3 06:06:27 PST 2012


 hwpfilter/source/hwpreader.hxx   |    2 +-
 oox/source/drawingml/shape.cxx   |    4 ++--
 sax/source/fastparser/facreg.cxx |    4 ++--
 unoxml/source/dom/saxbuilder.cxx |    2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 5122196acc2e8e9d8e71dad3d941b373b09e0b03
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Sat Mar 3 15:05:28 2012 +0100

    Avoid temporary rtl::OUString

diff --git a/hwpfilter/source/hwpreader.hxx b/hwpfilter/source/hwpreader.hxx
index 6a7ce4f..62205a7 100644
--- a/hwpfilter/source/hwpreader.hxx
+++ b/hwpfilter/source/hwpreader.hxx
@@ -351,7 +351,7 @@ extern "C"
 
             OUString aImplementationName = OUString::createFromAscii( pImplName );
 
-            if (aImplementationName == OUString(RTL_CONSTASCII_USTRINGPARAM( IMPLEMENTATION_NAME )) )
+            if (aImplementationName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM( IMPLEMENTATION_NAME )) )
             {
                 xRet = createSingleFactory( xSMgr, aImplementationName,
                                             HwpImportFilter_CreateInstance,
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index 2b2d815..a2e29c5 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -383,7 +383,7 @@ Reference< XShape > Shape::createAndInsert(
     aTransformation.scale(1/360.0, 1/360.0);
 
     // special for lineshape
-    if ( aServiceName == OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.LineShape")) )
+    if ( aServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.LineShape")) )
     {
         ::basegfx::B2DPolygon aPoly;
         aPoly.insert( 0, ::basegfx::B2DPoint( 0, 0 ) );
@@ -404,7 +404,7 @@ Reference< XShape > Shape::createAndInsert(
 
         maShapeProperties[ PROP_PolyPolygon ] <<= aPolyPolySequence;
     }
-    else if ( aServiceName == OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.ConnectorShape")) )
+    else if ( aServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.ConnectorShape")) )
     {
         ::basegfx::B2DPolygon aPoly;
         aPoly.insert( 0, ::basegfx::B2DPoint( 0, 0 ) );
diff --git a/sax/source/fastparser/facreg.cxx b/sax/source/fastparser/facreg.cxx
index 2f0eba3..35db3e1 100644
--- a/sax/source/fastparser/facreg.cxx
+++ b/sax/source/fastparser/facreg.cxx
@@ -52,13 +52,13 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL fastsax_component_getFactory(
 
         OUString aImplementationName( OUString::createFromAscii( pImplName ) );
 
-        if (aImplementationName == OUString( RTL_CONSTASCII_USTRINGPARAM( PARSER_IMPLEMENTATION_NAME  ) ) )
+        if (aImplementationName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( PARSER_IMPLEMENTATION_NAME  ) ) )
         {
             xRet = createSingleFactory( xSMgr, aImplementationName,
                                         FastSaxParser_CreateInstance,
                                         FastSaxParser::getSupportedServiceNames_Static() );
         }
-        else if (aImplementationName == OUString( RTL_CONSTASCII_USTRINGPARAM( SERIALIZER_IMPLEMENTATION_NAME  ) ) )
+        else if (aImplementationName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SERIALIZER_IMPLEMENTATION_NAME  ) ) )
         {
             xRet = createSingleFactory( xSMgr, aImplementationName,
                                         FastSaxSerializer_CreateInstance,
diff --git a/unoxml/source/dom/saxbuilder.cxx b/unoxml/source/dom/saxbuilder.cxx
index fb79fff..f91851b 100644
--- a/unoxml/source/dom/saxbuilder.cxx
+++ b/unoxml/source/dom/saxbuilder.cxx
@@ -231,7 +231,7 @@ namespace DOM
                 newprefix = attr_qname.copy(attr_qname.indexOf(':')+1);
                 aNSMap.insert(NSMap::value_type(newprefix, attr_value));
             }
-            else if (attr_qname == OUString(RTL_CONSTASCII_USTRINGPARAM("xmlns")))
+            else if (attr_qname.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("xmlns")))
             {
                 // new default prefix
                 aNSMap.insert(NSMap::value_type(OUString(), attr_value));


More information about the Libreoffice-commits mailing list