[Libreoffice-commits] .: pyuno/source sal/qa sal/workben

Thomas Arnhold tarnhold at kemper.freedesktop.org
Thu Jan 20 02:38:50 PST 2011


 pyuno/source/module/pyuno_runtime.cxx      |   10 +++++-----
 sal/qa/rtl/bootstrap/bootstrap_process.cxx |   12 ++++++------
 sal/qa/rtl/oustring/rtl_OUString2.cxx      |    2 +-
 sal/workben/measure_oustrings.cxx          |    4 ++--
 4 files changed, 14 insertions(+), 14 deletions(-)

New commits:
commit 0f6a6bac722179e1087ebbe829546adc88583fed
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Thu Jan 20 11:38:15 2011 +0100

    Replace suitable equalsAscii calls with equalsAsciiL.
    
    Done with sed -i 's%\(\.equalsAscii\)(\(\s\?"[^"]\+"\)\(\s\?\))%\1L(\3RTL_CONSTASCII_STRINGPARAM(\2\3)\3)%g'.

diff --git a/pyuno/source/module/pyuno_runtime.cxx b/pyuno/source/module/pyuno_runtime.cxx
index 355056b..eff4dc2 100644
--- a/pyuno/source/module/pyuno_runtime.cxx
+++ b/pyuno/source/module/pyuno_runtime.cxx
@@ -183,11 +183,11 @@ static void readLoggingConfig( sal_Int32 *pLevel, FILE **ppFile )
     OUString str;
     if( bootstrapHandle.getFrom( USTR_ASCII( "PYUNO_LOGLEVEL" ), str ) )
     {
-        if( str.equalsAscii( "NONE" ) )
+        if( str.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "NONE" ) ) )
             *pLevel = LogLevel::NONE;
-        else if( str.equalsAscii( "CALL" ) )
+        else if( str.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "CALL" ) ) )
             *pLevel = LogLevel::CALL;
-        else if( str.equalsAscii( "ARGS" ) )
+        else if( str.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ARGS" ) ) )
             *pLevel = LogLevel::ARGS;
         else
         {
@@ -200,9 +200,9 @@ static void readLoggingConfig( sal_Int32 *pLevel, FILE **ppFile )
         *ppFile = stdout;
         if( bootstrapHandle.getFrom( USTR_ASCII( "PYUNO_LOGTARGET" ), str ) )
         {
-            if( str.equalsAscii( "stdout" ) )
+            if( str.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "stdout" ) ) )
                 *ppFile = stdout; 
-            else if( str.equalsAscii( "stderr" ) )
+            else if( str.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "stderr" ) ) )
                 *ppFile = stderr; 
             else
             {
diff --git a/sal/qa/rtl/bootstrap/bootstrap_process.cxx b/sal/qa/rtl/bootstrap/bootstrap_process.cxx
index cad370b..cc3746e 100644
--- a/sal/qa/rtl/bootstrap/bootstrap_process.cxx
+++ b/sal/qa/rtl/bootstrap/bootstrap_process.cxx
@@ -54,7 +54,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
         aBootstrap.getFrom( 
             OUString(RTL_CONSTASCII_USTRINGPARAM("UNO_SERVICES")), 
             suValue );
-        if (suValue.equalsAscii("service.rdb") )
+        if (suValue.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("service.rdb")) )
         {
             return 10;
         }
@@ -65,7 +65,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
         aBootstrap.getFrom( 
             OUString(RTL_CONSTASCII_USTRINGPARAM("EXECUTABLE_RC")), 
             suValue );
-        if (suValue.equalsAscii("true") )
+        if (suValue.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("true")) )
         {
             return 20;
         }
@@ -76,7 +76,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
         aBootstrap.getFrom( 
             OUString(RTL_CONSTASCII_USTRINGPARAM("QADEV_BOOTSTRAP")), 
             suValue );
-        if (suValue.equalsAscii("sun&ms") )
+        if (suValue.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("sun&ms")) )
         {
             return 30;
         }
@@ -87,7 +87,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
         aBs_custom.getFrom( 
             OUString(RTL_CONSTASCII_USTRINGPARAM("RTLVALUE")), 
             suValue );
-        if (suValue.equalsAscii("qadev17") )
+        if (suValue.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("qadev17")) )
         {
             return 40;
         }
@@ -98,7 +98,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
         aBs_custom.getFrom( 
             OUString(RTL_CONSTASCII_USTRINGPARAM("EXECUTABLE_RC")), 
             suValue );
-        if (suValue.equalsAscii("true") )
+        if (suValue.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("true")) )
         {
             return 50;
         }
@@ -109,7 +109,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
         aBs_custom.getFrom( 
             OUString(RTL_CONSTASCII_USTRINGPARAM("ABCDE")), 
             suValue, suDefault );
-        if (suValue.equalsAscii("mydefault") )
+        if (suValue.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("mydefault")) )
         {
             return 60;
         }
diff --git a/sal/qa/rtl/oustring/rtl_OUString2.cxx b/sal/qa/rtl/oustring/rtl_OUString2.cxx
index 3d2c286..b81cd0f 100644
--- a/sal/qa/rtl/oustring/rtl_OUString2.cxx
+++ b/sal/qa/rtl/oustring/rtl_OUString2.cxx
@@ -1024,7 +1024,7 @@ public:
 
         ::rtl::OUString aFoo( RTL_CONSTASCII_USTRINGPARAM("foo") );
         ::rtl::OUString aFooIntern = aFoo.intern();
-        CPPUNIT_ASSERT_MESSAGE("string contents", aFooIntern.equalsAscii("foo"));
+        CPPUNIT_ASSERT_MESSAGE("string contents", aFooIntern.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("foo")));
         CPPUNIT_ASSERT_MESSAGE("string length", aFooIntern.getLength() == 3);
         // We have to dup due to no atomic 'intern' bit-set operation
         CPPUNIT_ASSERT_MESSAGE("intern dups", aFoo.pData != aFooIntern.pData);
diff --git a/sal/workben/measure_oustrings.cxx b/sal/workben/measure_oustrings.cxx
index f9ce02b..2be85a6 100644
--- a/sal/workben/measure_oustrings.cxx
+++ b/sal/workben/measure_oustrings.cxx
@@ -225,7 +225,7 @@ SAL_IMPLEMENT_MAIN()
     TIME
     (
         "rtl::OUString::equalsAscii",
-        sCompare.equalsAscii("apple");
+        sCompare.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("apple"));
     )
 
     //(const sal_Char*, sal_Int32) version has different semantics
@@ -260,7 +260,7 @@ SAL_IMPLEMENT_MAIN()
     TIME
     (
         "rtl::OUString::equalsAscii",
-        sCompare.equalsAscii("XXXXXXXXXXXXXXX");
+        sCompare.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("XXXXXXXXXXXXXXX"));
     )
 
     //(const sal_Char*, sal_Int32) version has different semantics


More information about the Libreoffice-commits mailing list