[Libreoffice-commits] core.git: 2 commits - basic/source chart2/source ucbhelper/source

Stephan Bergmann sbergman at redhat.com
Tue Mar 19 09:47:22 PDT 2013


 basic/source/uno/namecont.cxx                               |    2 +-
 chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx |    4 ++--
 ucbhelper/source/provider/registerucb.cxx                   |    2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit dfcc20fd8ed59c44c0394e5608cd261345bb5e03
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Mar 19 17:46:35 2013 +0100

    More "compareToAscii(RTL_CONSTASCII_STRINGPARAM(s)) != compareTo(s)" fixes
    
    Change-Id: Ia93b281b07559fb6f0d67d53dd91dfacf2be0d0b

diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx
index d0c7d14..1f1031e 100644
--- a/basic/source/uno/namecont.cxx
+++ b/basic/source/uno/namecont.cxx
@@ -2842,7 +2842,7 @@ void SAL_CALL SfxLibraryContainer::exportLibrary( const OUString& Name, const OU
 OUString SfxLibraryContainer::expand_url( const OUString& url )
     throw(::com::sun::star::uno::RuntimeException)
 {
-    if (0 == url.compareTo( EXPAND_PROTOCOL ":" ))
+    if (url.startsWith( EXPAND_PROTOCOL ":" ))
     {
         if( !mxMacroExpander.is() )
         {
diff --git a/ucbhelper/source/provider/registerucb.cxx b/ucbhelper/source/provider/registerucb.cxx
index bc7990d..33dd0c2 100644
--- a/ucbhelper/source/provider/registerucb.cxx
+++ b/ucbhelper/source/provider/registerucb.cxx
@@ -52,7 +52,7 @@ registerAtUcb(
     OSL_ENSURE(rServiceFactory.is(),
                "ucb::registerAtUcb(): No service factory");
 
-    bool bNoProxy = rArguments.compareTo("{noproxy}") == 0;
+    bool bNoProxy = rArguments.startsWith("{noproxy}");
     rtl::OUString
         aProviderArguments(bNoProxy ?
                                rArguments.
commit dc53c77ad54a156267ecd2b98b7940d40ab20065
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Mar 19 16:47:23 2013 +0100

    Assume that these shall indeed check full string equality
    
    ...instead of prefix match as the use of
    compareToAscii(RTL_CONSTASCII_STRINGPARAM(...)) prior to
    b380744c205089aa0b480e059bec645631010444 "Remove some RTL_* and some rtl::
    prefixes in chart2" would have suggested.  But the only two clients of
    com.sun.star.comp.chart2.WizardDialog that I could find
    (sc/source/ui/drawfunc/fuins2.cxx, sw/source/ui/table/chartins.cxx) indeed only
    use "ChartModel" and "ParentWindow".
    
    Change-Id: I0553c2c9648959ed558afb4f6cdea0e15a29cb9e

diff --git a/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx b/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx
index ed19ec5..2776e33 100644
--- a/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx
+++ b/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx
@@ -256,11 +256,11 @@ void SAL_CALL CreationWizardUnoDlg::initialize( const uno::Sequence< uno::Any >&
         beans::PropertyValue aProperty;
         if(*pArguments >>= aProperty)
         {
-            if( aProperty.Name.compareTo( "ParentWindow" ) == 0 )
+            if( aProperty.Name == "ParentWindow" )
             {
                 aProperty.Value >>= m_xParentWindow;
             }
-            else if( aProperty.Name.compareTo( "ChartModel" ) == 0 )
+            else if( aProperty.Name == "ChartModel" )
             {
                 aProperty.Value >>= m_xChartModel;
             }


More information about the Libreoffice-commits mailing list