[Libreoffice-commits] .: sal/test sax/source sdext/source sd/source starmath/source stoc/source sw/source

Julien Nabet serval2412 at kemper.freedesktop.org
Sun Feb 26 06:00:39 PST 2012


 sal/test/unloading/unloadTest.cxx                         |    2 -
 sax/source/expatwrap/sax_expat.cxx                        |    3 -
 sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx |    3 -
 sdext/source/presenter/PresenterClock.cxx                 |    6 +--
 starmath/source/smdetect.cxx                              |   22 +++++++-------
 stoc/source/inspect/introspection.cxx                     |   10 +++---
 sw/source/ui/uno/swdetect.cxx                             |   22 +++++++-------
 7 files changed, 33 insertions(+), 35 deletions(-)

New commits:
commit 67d01fb5d4010a2486e47cdd9f55f38a2da162f2
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Sun Feb 26 14:58:33 2012 +0100

    Avoid temporary rtl::OUString

diff --git a/sal/test/unloading/unloadTest.cxx b/sal/test/unloading/unloadTest.cxx
index 866a649..355fa47 100644
--- a/sal/test/unloading/unloadTest.cxx
+++ b/sal/test/unloading/unloadTest.cxx
@@ -560,7 +560,7 @@ sal_Bool test8()
     for( sal_Int32 i=0; i<seqTypes.getLength(); i++)
     {
         OUString name= seqTypes[i].getTypeName();
-        if( name == OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uno.XUnloadingPreference")))
+        if( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.uno.XUnloadingPreference")))
             b_ifaceSupported= sal_True;
     }
 
diff --git a/sax/source/expatwrap/sax_expat.cxx b/sax/source/expatwrap/sax_expat.cxx
index 677b7f5..487de5d 100644
--- a/sax/source/expatwrap/sax_expat.cxx
+++ b/sax/source/expatwrap/sax_expat.cxx
@@ -1041,8 +1041,7 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL expwrap_component_getFactory(
 
         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,
                                         SaxExpatParser_CreateInstance,
diff --git a/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx b/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
index 5ae050a..3bfe718 100644
--- a/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
+++ b/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
@@ -744,8 +744,7 @@ void SAL_CALL AccessibleDocumentViewBase::disposing (void)
     if (xInfo.is())
     {
         OUString sFirstService = xInfo->getSupportedServiceNames()[0];
-        if (sFirstService == OUString (
-                RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.DrawingDocumentDrawView")))
+        if (sFirstService.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.DrawingDocumentDrawView")))
         {
             sDescription = OUString (RTL_CONSTASCII_USTRINGPARAM("Draw Document"));
         }
diff --git a/sdext/source/presenter/PresenterClock.cxx b/sdext/source/presenter/PresenterClock.cxx
index f176b8b..e52f2e0 100644
--- a/sdext/source/presenter/PresenterClock.cxx
+++ b/sdext/source/presenter/PresenterClock.cxx
@@ -1038,11 +1038,11 @@ void AnalogBitmapPainter::LoadBitmap (
     if (rValues.size() == 3)
     {
         BitmapDescriptor* pDescriptor = NULL;
-        if (rsKey == OUString(RTL_CONSTASCII_USTRINGPARAM("Face")))
+        if (rsKey.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Face")))
             pDescriptor = &maFace;
-        else if (rsKey == OUString(RTL_CONSTASCII_USTRINGPARAM("HourHand")))
+        else if (rsKey.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("HourHand")))
             pDescriptor = &maHourHand;
-        else if (rsKey == OUString(RTL_CONSTASCII_USTRINGPARAM("MinuteHand")))
+        else if (rsKey.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("MinuteHand")))
             pDescriptor = &maMinuteHand;
 
         if (pDescriptor == NULL)
diff --git a/starmath/source/smdetect.cxx b/starmath/source/smdetect.cxx
index 63b0314..617d8a0 100644
--- a/starmath/source/smdetect.cxx
+++ b/starmath/source/smdetect.cxx
@@ -119,42 +119,42 @@ SmFilterDetect::~SmFilterDetect()
     for( sal_Int32 nProperty=0; nProperty<nPropertyCount; ++nProperty )
     {
         // extract properties
-        if( lDescriptor[nProperty].Name == OUString(RTL_CONSTASCII_USTRINGPARAM("URL")) )
+        if( lDescriptor[nProperty].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("URL")) )
         {
             lDescriptor[nProperty].Value >>= sTemp;
             aURL = sTemp;
         }
-        else if( !aURL.Len() && lDescriptor[nProperty].Name == OUString(RTL_CONSTASCII_USTRINGPARAM("FileName")) )
+        else if( !aURL.Len() && lDescriptor[nProperty].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("FileName")) )
         {
             lDescriptor[nProperty].Value >>= sTemp;
             aURL = sTemp;
         }
-        else if( lDescriptor[nProperty].Name == OUString(RTL_CONSTASCII_USTRINGPARAM("TypeName")) )
+        else if( lDescriptor[nProperty].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("TypeName")) )
         {
             lDescriptor[nProperty].Value >>= sTemp;
             aTypeName = sTemp;
         }
-        else if( lDescriptor[nProperty].Name == OUString(RTL_CONSTASCII_USTRINGPARAM("FilterName")) )
+        else if( lDescriptor[nProperty].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("FilterName")) )
         {
             lDescriptor[nProperty].Value >>= sTemp;
             aPreselectedFilterName = sTemp;
         }
-        else if( lDescriptor[nProperty].Name == OUString(RTL_CONSTASCII_USTRINGPARAM("InputStream")) )
+        else if( lDescriptor[nProperty].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("InputStream")) )
             nIndexOfInputStream = nProperty;
-        else if( lDescriptor[nProperty].Name == OUString(RTL_CONSTASCII_USTRINGPARAM("ReadOnly")) )
+        else if( lDescriptor[nProperty].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("ReadOnly")) )
             nIndexOfReadOnlyFlag = nProperty;
-        else if( lDescriptor[nProperty].Name == OUString(RTL_CONSTASCII_USTRINGPARAM("UCBContent")) )
+        else if( lDescriptor[nProperty].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("UCBContent")) )
             nIndexOfContent = nProperty;
-        else if( lDescriptor[nProperty].Name == OUString(RTL_CONSTASCII_USTRINGPARAM("AsTemplate")) )
+        else if( lDescriptor[nProperty].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("AsTemplate")) )
         {
             lDescriptor[nProperty].Value >>= bOpenAsTemplate;
             nIndexOfTemplateFlag = nProperty;
         }
-        else if( lDescriptor[nProperty].Name == OUString(RTL_CONSTASCII_USTRINGPARAM("InteractionHandler")) )
+        else if( lDescriptor[nProperty].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("InteractionHandler")) )
             lDescriptor[nProperty].Value >>= xInteraction;
-        else if( lDescriptor[nProperty].Name == OUString(RTL_CONSTASCII_USTRINGPARAM("RepairPackage")) )
+        else if( lDescriptor[nProperty].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("RepairPackage")) )
             lDescriptor[nProperty].Value >>= bRepairPackage;
-        else if( lDescriptor[nProperty].Name == OUString(RTL_CONSTASCII_USTRINGPARAM("DocumentTitle")) )
+        else if( lDescriptor[nProperty].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("DocumentTitle")) )
             nIndexOfDocumentTitle = nProperty;
     }
 
diff --git a/stoc/source/inspect/introspection.cxx b/stoc/source/inspect/introspection.cxx
index aad8899..2d4d13b 100644
--- a/stoc/source/inspect/introspection.cxx
+++ b/stoc/source/inspect/introspection.cxx
@@ -2355,7 +2355,7 @@ rtl::Reference< IntrospectionAccessStatic_Impl > ImplIntrospection::implInspect(
                         }
                         else if( rxMethod_i->getDeclaringClass()->equals( mxAggregationClass ) )
                         {
-                            if( aMethName == OUString( RTL_CONSTASCII_USTRINGPARAM("setDelegator")) )
+                            if( aMethName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("setDelegator")) )
                             {
                                 rMethodConcept_i |= MethodConcept::DANGEROUS;
                                 continue;
@@ -2388,7 +2388,7 @@ rtl::Reference< IntrospectionAccessStatic_Impl > ImplIntrospection::implInspect(
 
                         // Ist es eine get-Methode?
                         aStartStr = aMethName.copy( 0, 3 );
-                        if( aStartStr == OUString( RTL_CONSTASCII_USTRINGPARAM("get")) )
+                        if( aStartStr.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("get")) )
                         {
                             // Namen der potentiellen Property
                             aPropName = aMethName.copy( 3 );
@@ -2461,7 +2461,7 @@ rtl::Reference< IntrospectionAccessStatic_Impl > ImplIntrospection::implInspect(
                                 OUString aMethName2 = rxMethod_k->getName();
                                 OUString aStartStr2 = aMethName2.copy( 0, 3 );
                                 // ACHTUNG: Wegen SDL-Bug NICHT != bei OUString verwenden !!!
-                                if( !( aStartStr2 == OUString( RTL_CONSTASCII_USTRINGPARAM("set")) ) )
+                                if( !( aStartStr2.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("set")) ) )
                                     continue;
 
                                 // Ist es denn der gleiche Name?
@@ -2509,7 +2509,7 @@ rtl::Reference< IntrospectionAccessStatic_Impl > ImplIntrospection::implInspect(
                         }
 
                         // Ist es eine addListener-Methode?
-                        else if( aStartStr == OUString( RTL_CONSTASCII_USTRINGPARAM("add")) )
+                        else if( aStartStr.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("add")) )
                         {
                             OUString aListenerStr( RTL_CONSTASCII_USTRINGPARAM("Listener" ) );
 
@@ -2598,7 +2598,7 @@ rtl::Reference< IntrospectionAccessStatic_Impl > ImplIntrospection::implInspect(
 
                         // Ist es eine set-Methode ohne zugehoerige get-Methode?
                         aStartStr = aMethName.copy( 0, 3 );
-                        if( aStartStr == OUString( RTL_CONSTASCII_USTRINGPARAM("set")) )
+                        if( aStartStr.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("set")) )
                         {
                             // Namen der potentiellen Property
                             aPropName = aMethName.copy( 3 );
diff --git a/sw/source/ui/uno/swdetect.cxx b/sw/source/ui/uno/swdetect.cxx
index bcba59f..0dda760 100644
--- a/sw/source/ui/uno/swdetect.cxx
+++ b/sw/source/ui/uno/swdetect.cxx
@@ -121,45 +121,45 @@ SwFilterDetect::~SwFilterDetect()
     for( sal_Int32 nProperty=0; nProperty<nPropertyCount; ++nProperty )
     {
         // extract properties
-        if( lDescriptor[nProperty].Name == OUString(RTL_CONSTASCII_USTRINGPARAM("URL")) )
+        if( lDescriptor[nProperty].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("URL")) )
         {
             lDescriptor[nProperty].Value >>= sTemp;
             aURL = sTemp;
         }
-        else if( !aURL.Len() && lDescriptor[nProperty].Name == OUString(RTL_CONSTASCII_USTRINGPARAM("FileName")) )
+        else if( !aURL.Len() && lDescriptor[nProperty].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("FileName")) )
         {
             lDescriptor[nProperty].Value >>= sTemp;
             aURL = sTemp;
         }
-        else if( lDescriptor[nProperty].Name == OUString(RTL_CONSTASCII_USTRINGPARAM("TypeName")) )
+        else if( lDescriptor[nProperty].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("TypeName")) )
         {
             lDescriptor[nProperty].Value >>= sTemp;
             aTypeName = sTemp;
         }
-        else if( lDescriptor[nProperty].Name == OUString(RTL_CONSTASCII_USTRINGPARAM("FilterName")) )
+        else if( lDescriptor[nProperty].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("FilterName")) )
         {
             lDescriptor[nProperty].Value >>= sTemp;
             aPreselectedFilterName = sTemp;
         }
-        else if( lDescriptor[nProperty].Name == OUString(RTL_CONSTASCII_USTRINGPARAM("InputStream")) )
+        else if( lDescriptor[nProperty].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("InputStream")) )
             nIndexOfInputStream = nProperty;
-        else if( lDescriptor[nProperty].Name == OUString(RTL_CONSTASCII_USTRINGPARAM("ReadOnly")) )
+        else if( lDescriptor[nProperty].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("ReadOnly")) )
             nIndexOfReadOnlyFlag = nProperty;
-        else if( lDescriptor[nProperty].Name == OUString(RTL_CONSTASCII_USTRINGPARAM("UCBContent")) )
+        else if( lDescriptor[nProperty].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("UCBContent")) )
             nIndexOfContent = nProperty;
-        else if( lDescriptor[nProperty].Name == OUString(RTL_CONSTASCII_USTRINGPARAM("AsTemplate")) )
+        else if( lDescriptor[nProperty].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("AsTemplate")) )
         {
             lDescriptor[nProperty].Value >>= bOpenAsTemplate;
             nIndexOfTemplateFlag = nProperty;
         }
-        else if( lDescriptor[nProperty].Name == OUString(RTL_CONSTASCII_USTRINGPARAM("InteractionHandler")) )
+        else if( lDescriptor[nProperty].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("InteractionHandler")) )
         {
             lDescriptor[nProperty].Value >>= xInteraction;
             nIndexOfInteractionHandler = nProperty;
         }
-        else if( lDescriptor[nProperty].Name == OUString(RTL_CONSTASCII_USTRINGPARAM("RepairPackage")) )
+        else if( lDescriptor[nProperty].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("RepairPackage")) )
             lDescriptor[nProperty].Value >>= bRepairPackage;
-        else if( lDescriptor[nProperty].Name == OUString(RTL_CONSTASCII_USTRINGPARAM("DocumentTitle")) )
+        else if( lDescriptor[nProperty].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("DocumentTitle")) )
             nIndexOfDocumentTitle = nProperty;
     }
 


More information about the Libreoffice-commits mailing list