Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/3218

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/18/3218/1

fdo#62096: Replaced some OUString 'compareTo' with '=='

Change-Id: I1d095cf5640595789f4ae99f1b0679be88b0baa9
---
M comphelper/inc/comphelper/property.hxx
M comphelper/source/misc/ihwrapnofilter.cxx
M comphelper/source/misc/instancelocker.cxx
M dtrans/source/cnttype/mcnttfactory.cxx
M dtrans/source/generic/clipboardmanager.cxx
M dtrans/source/generic/generic_clipboard.cxx
M dtrans/source/win32/clipb/WinClipboard.cxx
M dtrans/source/win32/ftransl/ftransl.cxx
M embeddedobj/source/commonembedding/xfactory.cxx
M embeddedobj/source/general/xcreator.cxx
M embeddedobj/source/msole/xdialogcreator.cxx
M embeddedobj/source/msole/xolefactory.cxx
M embeddedobj/test/MainThreadExecutor/xexecutor.cxx
M embeddedobj/test/mtexecutor/bitmapcreator.cxx
M embeddedobj/test/mtexecutor/mainthreadexecutor.cxx
M fpicker/source/aqua/SalAquaFilePicker.mm
M fpicker/source/aqua/SalAquaFolderPicker.mm
M fpicker/source/office/iodlg.cxx
M fpicker/source/win32/filepicker/FilePicker.cxx
M fpicker/source/win32/filepicker/VistaFilePicker.cxx
M fpicker/source/win32/folderpicker/FolderPicker.cxx
M shell/source/cmdmail/cmdmailsuppl.cxx
M shell/source/unix/exec/shellexec.cxx
M shell/source/win32/SysShExec.cxx
M shell/source/win32/simplemail/smplmailsuppl.cxx
M svl/source/fsstor/fsfactory.cxx
M svx/source/fmcomp/fmgridif.cxx
27 files changed, 57 insertions(+), 58 deletions(-)



diff --git a/comphelper/inc/comphelper/property.hxx b/comphelper/inc/comphelper/property.hxx
index d8e0d3b..fa51d85 100644
--- a/comphelper/inc/comphelper/property.hxx
+++ b/comphelper/inc/comphelper/property.hxx
@@ -58,14 +58,14 @@
     struct PropertyStringEqualFunctor : ::std::binary_function< ::com::sun::star::beans::Property, 
::rtl::OUString, bool >
     {
         // ................................................................
-        inline bool operator()( const ::com::sun::star::beans::Property& lhs, const 
::rtl::OUString& rhs ) const
+        inline bool operator()( const ::com::sun::star::beans::Property& lhs, const OUString& rhs 
) const
         {
-            return lhs.Name.compareTo(rhs) == 0;
+            return lhs.Name == rhs;
         }
         // ................................................................
-        inline bool operator()( const ::rtl::OUString& lhs, const 
::com::sun::star::beans::Property& rhs ) const
+        inline bool operator()( const OUString& lhs, const ::com::sun::star::beans::Property& rhs 
) const
         {
-            return lhs.compareTo(rhs.Name) == 0;
+            return lhs == rhs.Name;
         }
     };
     //--------------------------------------------------------------------------
@@ -74,7 +74,7 @@
     {
         bool operator() (const ::com::sun::star::beans::Property& x, const 
::com::sun::star::beans::Property& y) const
         {
-            return x.Name.compareTo(y.Name) == 0;
+            return x.Name == y.Name;
         }
     };
 
diff --git a/comphelper/source/misc/ihwrapnofilter.cxx b/comphelper/source/misc/ihwrapnofilter.cxx
index 150da2b..c6b6697 100644
--- a/comphelper/source/misc/ihwrapnofilter.cxx
+++ b/comphelper/source/misc/ihwrapnofilter.cxx
@@ -114,7 +114,7 @@
         uno::Sequence< ::rtl::OUString > aSeq = impl_staticGetSupportedServiceNames();
 
         for ( sal_Int32 nInd = 0; nInd < aSeq.getLength(); nInd++ )
-            if ( ServiceName.compareTo( aSeq[nInd] ) == 0 )
+            if ( ServiceName == aSeq[nInd] )
                 return sal_True;
 
         return sal_False;
diff --git a/comphelper/source/misc/instancelocker.cxx b/comphelper/source/misc/instancelocker.cxx
index 50ca694..a42852f 100644
--- a/comphelper/source/misc/instancelocker.cxx
+++ b/comphelper/source/misc/instancelocker.cxx
@@ -203,7 +203,7 @@
     uno::Sequence< ::rtl::OUString > aSeq = getSupportedServiceNames();
 
     for ( sal_Int32 nInd = 0; nInd < aSeq.getLength(); nInd++ )
-        if ( ServiceName.compareTo( aSeq[nInd] ) == 0 )
+        if ( ServiceName == aSeq[nInd] )
             return sal_True;
 
     return sal_False;
diff --git a/dtrans/source/cnttype/mcnttfactory.cxx b/dtrans/source/cnttype/mcnttfactory.cxx
index 86eb617..d405b0e 100644
--- a/dtrans/source/cnttype/mcnttfactory.cxx
+++ b/dtrans/source/cnttype/mcnttfactory.cxx
@@ -87,7 +87,7 @@
     Sequence < OUString > SupportedServicesNames = 
MimeContentTypeFactory_getSupportedServiceNames();
 
     for ( sal_Int32 n = SupportedServicesNames.getLength(); n--; )
-        if (SupportedServicesNames[n].compareTo(ServiceName) == 0)
+        if (SupportedServicesNames[n] == ServiceName)
             return sal_True;
 
     return sal_False;
diff --git a/dtrans/source/generic/clipboardmanager.cxx b/dtrans/source/generic/clipboardmanager.cxx
index be78cdf..e9b8b8f 100644
--- a/dtrans/source/generic/clipboardmanager.cxx
+++ b/dtrans/source/generic/clipboardmanager.cxx
@@ -62,7 +62,7 @@
     Sequence < OUString > SupportedServicesNames = ClipboardManager_getSupportedServiceNames();
 
     for ( sal_Int32 n = 0, nmax = SupportedServicesNames.getLength(); n < nmax; n++ )
-        if (SupportedServicesNames[n].compareTo(ServiceName) == 0)
+        if (SupportedServicesNames[n] == ServiceName)
             return sal_True;
 
     return sal_False;
@@ -111,7 +111,7 @@
 
     // the name "default" is reserved for internal use
     OUString aName = xClipboard->getName();
-    if (m_aDefaultName.compareTo(aName) == 0)
+    if ( m_aDefaultName == aName) )
         throw IllegalArgumentException(OUString("name reserved"),
                                        static_cast < XClipboardManager * > (this), 1);
 
diff --git a/dtrans/source/generic/generic_clipboard.cxx 
b/dtrans/source/generic/generic_clipboard.cxx
index 4da2b1b..0b6d9aa 100644
--- a/dtrans/source/generic/generic_clipboard.cxx
+++ b/dtrans/source/generic/generic_clipboard.cxx
@@ -75,7 +75,7 @@
     Sequence < OUString > SupportedServicesNames = GenericClipboard_getSupportedServiceNames();
 
     for ( sal_Int32 n = SupportedServicesNames.getLength(); n--; )
-        if (SupportedServicesNames[n].compareTo(ServiceName) == 0)
+        if (SupportedServicesNames[n] == ServiceName)
             return sal_True;
 
     return sal_False;
diff --git a/dtrans/source/win32/clipb/WinClipboard.cxx b/dtrans/source/win32/clipb/WinClipboard.cxx
index 7bf9687..e92b51c 100644
--- a/dtrans/source/win32/clipb/WinClipboard.cxx
+++ b/dtrans/source/win32/clipb/WinClipboard.cxx
@@ -288,7 +288,7 @@
     Sequence < OUString > SupportedServicesNames = WinClipboard_getSupportedServiceNames();
 
     for ( sal_Int32 n = SupportedServicesNames.getLength(); n--; )
-        if (SupportedServicesNames[n].compareTo(ServiceName) == 0)
+        if (SupportedServicesNames[n] == ServiceName)
             return sal_True;
 
     return sal_False;
diff --git a/dtrans/source/win32/ftransl/ftransl.cxx b/dtrans/source/win32/ftransl/ftransl.cxx
index 53611cb..c985b6f 100644
--- a/dtrans/source/win32/ftransl/ftransl.cxx
+++ b/dtrans/source/win32/ftransl/ftransl.cxx
@@ -225,7 +225,7 @@
     Sequence < OUString > SupportedServicesNames = DataFormatTranslator_getSupportedServiceNames();
 
     for ( sal_Int32 n = SupportedServicesNames.getLength(); n--; )
-        if (SupportedServicesNames[n].compareTo(ServiceName) == 0)
+        if (SupportedServicesNames[n] == ServiceName)
             return sal_True;
 
     return sal_False;
diff --git a/embeddedobj/source/commonembedding/xfactory.cxx 
b/embeddedobj/source/commonembedding/xfactory.cxx
index ba5af4a..404635e 100644
--- a/embeddedobj/source/commonembedding/xfactory.cxx
+++ b/embeddedobj/source/commonembedding/xfactory.cxx
@@ -462,7 +462,7 @@
     uno::Sequence< ::rtl::OUString > aSeq = impl_staticGetSupportedServiceNames();
 
     for ( sal_Int32 nInd = 0; nInd < aSeq.getLength(); nInd++ )
-        if ( ServiceName.compareTo( aSeq[nInd] ) == 0 )
+        if ( ServiceName == aSeq[nInd] )
             return sal_True;
 
     return sal_False;
@@ -537,7 +537,7 @@
     uno::Sequence< ::rtl::OUString > aSeq = impl_staticGetSupportedServiceNames();
 
     for ( sal_Int32 nInd = 0; nInd < aSeq.getLength(); nInd++ )
-        if ( ServiceName.compareTo( aSeq[nInd] ) == 0 )
+        if ( ServiceName == aSeq[nInd] )
             return sal_True;
 
     return sal_False;
diff --git a/embeddedobj/source/general/xcreator.cxx b/embeddedobj/source/general/xcreator.cxx
index 24f5bbd..de8e956f 100644
--- a/embeddedobj/source/general/xcreator.cxx
+++ b/embeddedobj/source/general/xcreator.cxx
@@ -447,13 +447,13 @@
 }
 
 //-------------------------------------------------------------------------
-sal_Bool SAL_CALL UNOEmbeddedObjectCreator::supportsService( const ::rtl::OUString& ServiceName )
+sal_Bool SAL_CALL UNOEmbeddedObjectCreator::supportsService( const OUString& ServiceName )
     throw ( uno::RuntimeException )
 {
-    uno::Sequence< ::rtl::OUString > aSeq = impl_staticGetSupportedServiceNames();
+    uno::Sequence< OUString > aSeq = impl_staticGetSupportedServiceNames();
 
     for ( sal_Int32 nInd = 0; nInd < aSeq.getLength(); nInd++ )
-        if ( ServiceName.compareTo( aSeq[nInd] ) == 0 )
+        if ( ServiceName == aSeq[nInd] )
             return sal_True;
 
     return sal_False;
diff --git a/embeddedobj/source/msole/xdialogcreator.cxx 
b/embeddedobj/source/msole/xdialogcreator.cxx
index ea7947a..b4e5d50 100644
--- a/embeddedobj/source/msole/xdialogcreator.cxx
+++ b/embeddedobj/source/msole/xdialogcreator.cxx
@@ -346,7 +346,7 @@
     uno::Sequence< ::rtl::OUString > aSeq = impl_staticGetSupportedServiceNames();
 
     for ( sal_Int32 nInd = 0; nInd < aSeq.getLength(); nInd++ )
-        if ( ServiceName.compareTo( aSeq[nInd] ) == 0 )
+        if ( ServiceName == aSeq[nInd] )
             return sal_True;
 
     return sal_False;
diff --git a/embeddedobj/source/msole/xolefactory.cxx b/embeddedobj/source/msole/xolefactory.cxx
index 5580925..f5fdff4 100644
--- a/embeddedobj/source/msole/xolefactory.cxx
+++ b/embeddedobj/source/msole/xolefactory.cxx
@@ -317,7 +317,7 @@
     uno::Sequence< ::rtl::OUString > aSeq = impl_staticGetSupportedServiceNames();
 
     for ( sal_Int32 nInd = 0; nInd < aSeq.getLength(); nInd++ )
-        if ( ServiceName.compareTo( aSeq[nInd] ) == 0 )
+        if ( ServiceName == aSeq[nInd] )
             return sal_True;
 
     return sal_False;
diff --git a/embeddedobj/test/MainThreadExecutor/xexecutor.cxx 
b/embeddedobj/test/MainThreadExecutor/xexecutor.cxx
index f5cb25e..e35feb8 100644
--- a/embeddedobj/test/MainThreadExecutor/xexecutor.cxx
+++ b/embeddedobj/test/MainThreadExecutor/xexecutor.cxx
@@ -116,7 +116,7 @@
     uno::Sequence< ::rtl::OUString > aSeq = impl_staticGetSupportedServiceNames();
 
     for ( sal_Int32 nInd = 0; nInd < aSeq.getLength(); nInd++ )
-        if ( ServiceName.compareTo( aSeq[nInd] ) == 0 )
+        if ( ServiceName == aSeq[nInd] )
             return sal_True;
 
     return sal_False;
diff --git a/embeddedobj/test/mtexecutor/bitmapcreator.cxx 
b/embeddedobj/test/mtexecutor/bitmapcreator.cxx
index fdc86df..5937410 100644
--- a/embeddedobj/test/mtexecutor/bitmapcreator.cxx
+++ b/embeddedobj/test/mtexecutor/bitmapcreator.cxx
@@ -97,7 +97,7 @@
     uno::Sequence< ::rtl::OUString > aSeq = impl_staticGetSupportedServiceNames();
 
     for ( sal_Int32 nInd = 0; nInd < aSeq.getLength(); nInd++ )
-        if ( ServiceName.compareTo( aSeq[nInd] ) == 0 )
+        if ( ServiceName == aSeq[nInd] )
             return sal_True;
 
     return sal_False;
diff --git a/embeddedobj/test/mtexecutor/mainthreadexecutor.cxx 
b/embeddedobj/test/mtexecutor/mainthreadexecutor.cxx
index 828abef..084efe6 100644
--- a/embeddedobj/test/mtexecutor/mainthreadexecutor.cxx
+++ b/embeddedobj/test/mtexecutor/mainthreadexecutor.cxx
@@ -98,7 +98,7 @@
     uno::Sequence< ::rtl::OUString > aSeq = impl_staticGetSupportedServiceNames();
 
     for ( sal_Int32 nInd = 0; nInd < aSeq.getLength(); nInd++ )
-        if ( ServiceName.compareTo( aSeq[nInd] ) == 0 )
+        if ( ServiceName == aSeq[nInd] )
             return sal_True;
 
     return sal_False;
diff --git a/fpicker/source/aqua/SalAquaFilePicker.mm b/fpicker/source/aqua/SalAquaFilePicker.mm
index 8d1d5bc..139c5d8 100644
--- a/fpicker/source/aqua/SalAquaFilePicker.mm
+++ b/fpicker/source/aqua/SalAquaFilePicker.mm
@@ -635,7 +635,7 @@
     uno::Sequence <rtl::OUString> supportedServicesNames = FilePicker_getSupportedServiceNames();
 
     for( sal_Int32 n = supportedServicesNames.getLength(); n--; ) {
-        if( supportedServicesNames[n].compareTo( sServiceName ) == 0) {
+        if( supportedServicesNames[n] == sServiceName ) {
             retVal = sal_True;
             break;
         }
diff --git a/fpicker/source/aqua/SalAquaFolderPicker.mm b/fpicker/source/aqua/SalAquaFolderPicker.mm
index 8d06b7f..0f4913e 100644
--- a/fpicker/source/aqua/SalAquaFolderPicker.mm
+++ b/fpicker/source/aqua/SalAquaFolderPicker.mm
@@ -48,7 +48,6 @@
 // namespace directives
 //------------------------------------------------------------------------
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::ui::dialogs;
 using namespace ::com::sun::star::lang;
@@ -226,7 +225,7 @@
     uno::Sequence <rtl::OUString> supportedServicesNames = FolderPicker_getSupportedServiceNames();
 
     for( sal_Int32 n = supportedServicesNames.getLength(); n--; ) {
-        if( supportedServicesNames[n].compareTo( sServiceName ) == 0) {
+        if( supportedServicesNames[n] == sServiceName ) {
             retVal = sal_True;
             break;
         }
diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx
index 2009c23..acc3d8a 100644
--- a/fpicker/source/office/iodlg.cxx
+++ b/fpicker/source/office/iodlg.cxx
@@ -1472,7 +1472,7 @@
             {
                 aSingleType = rType.GetToken( 0, FILEDIALOG_DEF_EXTSEP, nIdx );
 #ifdef UNX
-                if ( aSingleType.CompareTo( _rFilter ) == COMPARE_EQUAL )
+                if ( aSingleType == _rFilter )
 #else
                 if ( aSingleType.CompareIgnoreCaseToAscii( _rFilter ) == COMPARE_EQUAL )
 #endif
@@ -1480,7 +1480,7 @@
             }
         }
 #ifdef UNX
-        else if ( rType.CompareTo( _rFilter ) == COMPARE_EQUAL )
+        else if ( rType == _rFilter )
 #else
         else if ( rType.CompareIgnoreCaseToAscii( _rFilter ) == COMPARE_EQUAL )
 #endif
diff --git a/fpicker/source/win32/filepicker/FilePicker.cxx 
b/fpicker/source/win32/filepicker/FilePicker.cxx
index de1f84a..e851409 100644
--- a/fpicker/source/win32/filepicker/FilePicker.cxx
+++ b/fpicker/source/win32/filepicker/FilePicker.cxx
@@ -723,7 +723,7 @@
     uno::Sequence <rtl::OUString> SupportedServicesNames = FilePicker_getSupportedServiceNames();
 
     for (sal_Int32 n = SupportedServicesNames.getLength(); n--;)
-        if (SupportedServicesNames[n].compareTo(ServiceName) == 0)
+        if (SupportedServicesNames[n] == ServiceName)
             return sal_True;
 
     return sal_False;
diff --git a/fpicker/source/win32/filepicker/VistaFilePicker.cxx 
b/fpicker/source/win32/filepicker/VistaFilePicker.cxx
index 3cb4e3a..ce51655 100644
--- a/fpicker/source/win32/filepicker/VistaFilePicker.cxx
+++ b/fpicker/source/win32/filepicker/VistaFilePicker.cxx
@@ -619,7 +619,7 @@
     css::uno::Sequence< ::rtl::OUString > lSupportedServicesNames = 
VistaFilePicker_getSupportedServiceNames();
 
     for (sal_Int32 n = lSupportedServicesNames.getLength(); n--;)
-        if (lSupportedServicesNames[n].compareTo(sServiceName) == 0)
+        if (lSupportedServicesNames[n] == sServiceName)
             return sal_True;
 
     return sal_False;
diff --git a/fpicker/source/win32/folderpicker/FolderPicker.cxx 
b/fpicker/source/win32/folderpicker/FolderPicker.cxx
index de5f714..ee1a827 100644
--- a/fpicker/source/win32/folderpicker/FolderPicker.cxx
+++ b/fpicker/source/win32/folderpicker/FolderPicker.cxx
@@ -160,7 +160,7 @@
     Sequence < OUString > SupportedServicesNames = FolderPicker_getSupportedServiceNames();
 
     for ( sal_Int32 n = SupportedServicesNames.getLength(); n--; )
-        if (SupportedServicesNames[n].compareTo(ServiceName) == 0)
+        if (SupportedServicesNames[n] == ServiceName))
             return sal_True;
 
     return sal_False;
diff --git a/shell/source/cmdmail/cmdmailsuppl.cxx b/shell/source/cmdmail/cmdmailsuppl.cxx
index c12bf98..eb7b886 100644
--- a/shell/source/cmdmail/cmdmailsuppl.cxx
+++ b/shell/source/cmdmail/cmdmailsuppl.cxx
@@ -276,7 +276,7 @@
     Sequence < OUString > SupportedServicesNames = Component_getSupportedServiceNames();
 
     for ( sal_Int32 n = SupportedServicesNames.getLength(); n--; )
-        if (SupportedServicesNames[n].compareTo(ServiceName) == 0)
+        if (SupportedServicesNames[n] == ServiceName)
             return sal_True;
 
     return sal_False;
diff --git a/shell/source/unix/exec/shellexec.cxx b/shell/source/unix/exec/shellexec.cxx
index 755e1ec..4009c31 100644
--- a/shell/source/unix/exec/shellexec.cxx
+++ b/shell/source/unix/exec/shellexec.cxx
@@ -288,7 +288,7 @@
     Sequence < OUString > SupportedServicesNames = ShellExec_getSupportedServiceNames();
 
     for ( sal_Int32 n = SupportedServicesNames.getLength(); n--; )
-        if (SupportedServicesNames[n].compareTo(ServiceName) == 0)
+        if (SupportedServicesNames[n] == ServiceName)
             return sal_True;
 
     return sal_False;
diff --git a/shell/source/win32/SysShExec.cxx b/shell/source/win32/SysShExec.cxx
index 30ff62d..7c784a4 100644
--- a/shell/source/win32/SysShExec.cxx
+++ b/shell/source/win32/SysShExec.cxx
@@ -362,7 +362,7 @@
     Sequence < OUString > SupportedServicesNames = SysShExec_getSupportedServiceNames();
 
     for ( sal_Int32 n = SupportedServicesNames.getLength(); n--; )
-        if (SupportedServicesNames[n].compareTo(ServiceName) == 0)
+        if (SupportedServicesNames[n] == ServiceName)
             return sal_True;
 
     return sal_False;
diff --git a/shell/source/win32/simplemail/smplmailsuppl.cxx 
b/shell/source/win32/simplemail/smplmailsuppl.cxx
index 3dc241a..1082f31 100644
--- a/shell/source/win32/simplemail/smplmailsuppl.cxx
+++ b/shell/source/win32/simplemail/smplmailsuppl.cxx
@@ -83,7 +83,7 @@
     Sequence <OUString> SupportedServicesNames = Component_getSupportedServiceNames();
 
     for (sal_Int32 n = SupportedServicesNames.getLength(); n--;)
-        if (SupportedServicesNames[n].compareTo(ServiceName) == 0)
+        if (SupportedServicesNames[n] == ServiceName)
             return sal_True;
 
     return sal_False;
diff --git a/svl/source/fsstor/fsfactory.cxx b/svl/source/fsstor/fsfactory.cxx
index dc762a7..7ca0537 100644
--- a/svl/source/fsstor/fsfactory.cxx
+++ b/svl/source/fsstor/fsfactory.cxx
@@ -178,7 +178,7 @@
     uno::Sequence< ::rtl::OUString > aSeq = impl_staticGetSupportedServiceNames();
 
     for ( sal_Int32 nInd = 0; nInd < aSeq.getLength(); nInd++ )
-        if ( ServiceName.compareTo( aSeq[nInd] ) == 0 )
+        if ( ServiceName == aSeq[nInd] )
             return sal_True;
 
     return sal_False;
diff --git a/svx/source/fmcomp/fmgridif.cxx b/svx/source/fmcomp/fmgridif.cxx
index 5c5b6cb..a1cc4a0 100644
--- a/svx/source/fmcomp/fmgridif.cxx
+++ b/svx/source/fmcomp/fmgridif.cxx
@@ -1912,7 +1912,7 @@
 
     sal_Bool bVoid = !Value.hasValue();
 
-    if ( 0 == PropertyName.compareTo( FM_PROP_TEXTLINECOLOR ) )
+    if ( PropertyName == FM_PROP_TEXTLINECOLOR )
     {
         ::Color aTextLineColor( bVoid ? COL_TRANSPARENT : ::comphelper::getINT32( Value ) );
         if (bVoid)
@@ -1944,21 +1944,21 @@
         if (isDesignMode())
             pGrid->Invalidate();
     }
-    else if ( 0 == PropertyName.compareTo( FM_PROP_FONTEMPHASISMARK ) )
+    else if ( PropertyName == FM_PROP_FONTEMPHASISMARK )
     {
         Font aGridFont = pGrid->GetControlFont();
         sal_Int16 nValue = ::comphelper::getINT16(Value);
         aGridFont.SetEmphasisMark( nValue );
         pGrid->SetControlFont( aGridFont );
     }
-    else if ( 0 == PropertyName.compareTo( FM_PROP_FONTRELIEF ) )
+    else if ( PropertyName == FM_PROP_FONTRELIEF )
     {
         Font aGridFont = pGrid->GetControlFont();
         sal_Int16 nValue = ::comphelper::getINT16(Value);
         aGridFont.SetRelief( (FontRelief)nValue );
         pGrid->SetControlFont( aGridFont );
     }
-    else if ( 0 == PropertyName.compareTo( FM_PROP_HELPURL ) )
+    else if ( PropertyName == FM_PROP_HELPURL )
     {
         ::rtl::OUString sHelpURL;
         OSL_VERIFY( Value >>= sHelpURL );
@@ -1967,11 +1967,11 @@
             sHelpURL = aHID.GetURLPath();
         pGrid->SetHelpId( rtl::OUStringToOString( sHelpURL, RTL_TEXTENCODING_UTF8 ) );
     }
-    else if ( 0 == PropertyName.compareTo( FM_PROP_DISPLAYSYNCHRON ) )
+    else if ( PropertyName == FM_PROP_DISPLAYSYNCHRON )
     {
         pGrid->setDisplaySynchron(::comphelper::getBOOL(Value));
     }
-    else if ( 0 == PropertyName.compareTo( FM_PROP_CURSORCOLOR ) )
+    else if ( PropertyName == FM_PROP_CURSORCOLOR )
     {
         if (bVoid)
             pGrid->SetCursorColor(COL_TRANSPARENT);
@@ -1980,13 +1980,13 @@
         if (isDesignMode())
             pGrid->Invalidate();
     }
-    else if ( 0 == PropertyName.compareTo( FM_PROP_ALWAYSSHOWCURSOR ) )
+    else if ( PropertyName == FM_PROP_ALWAYSSHOWCURSOR )
     {
         pGrid->EnablePermanentCursor(::comphelper::getBOOL(Value));
         if (isDesignMode())
             pGrid->Invalidate();
     }
-    else if ( 0 == PropertyName.compareTo( FM_PROP_FONT ) )
+    else if ( PropertyName == FM_PROP_FONT )
     {
         if ( bVoid )
             pGrid->SetControlFont( Font() );
@@ -2020,7 +2020,7 @@
             }
         }
     }
-    else if ( 0 == PropertyName.compareTo( FM_PROP_BACKGROUNDCOLOR ) )
+    else if ( PropertyName == FM_PROP_BACKGROUNDCOLOR )
     {
         if ( bVoid )
         {
@@ -2033,7 +2033,7 @@
             pGrid->SetControlBackground( aColor );
         }
     }
-    else if ( 0 == PropertyName.compareTo( FM_PROP_TEXTCOLOR ) )
+    else if ( PropertyName == FM_PROP_TEXTCOLOR )
     {
         if ( bVoid )
         {
@@ -2046,7 +2046,7 @@
             pGrid->SetControlForeground( aColor );
         }
     }
-    else if ( 0 == PropertyName.compareTo( FM_PROP_ROWHEIGHT ) )
+    else if ( PropertyName == FM_PROP_ROWHEIGHT )
     {
         sal_Int32 nLogHeight(0);
         if (Value >>= nLogHeight)
@@ -2059,19 +2059,19 @@
         else if (bVoid)
             pGrid->SetDataRowHeight(0);
     }
-    else if ( 0 == PropertyName.compareTo( FM_PROP_HASNAVIGATION ) )
+    else if ( PropertyName == FM_PROP_HASNAVIGATION )
     {
         sal_Bool bValue( sal_True );
         OSL_VERIFY( Value >>= bValue );
         pGrid->EnableNavigationBar( bValue );
     }
-    else if ( 0 == PropertyName.compareTo( FM_PROP_RECORDMARKER ) )
+    else if ( PropertyName == FM_PROP_RECORDMARKER )
     {
         sal_Bool bValue( sal_True );
         OSL_VERIFY( Value >>= bValue );
         pGrid->EnableHandle( bValue );
     }
-    else if ( 0 == PropertyName.compareTo( FM_PROP_ENABLED ) )
+    else if ( PropertyName == FM_PROP_ENABLED )
     {
         sal_Bool bValue( sal_True );
         OSL_VERIFY( Value >>= bValue );
@@ -2117,7 +2117,7 @@
 }
 
 //------------------------------------------------------------------------------
-Any FmXGridPeer::getProperty( const ::rtl::OUString& _rPropertyName ) throw( RuntimeException )
+Any FmXGridPeer::getProperty( const OUString& _rPropertyName ) throw( RuntimeException )
 {
     Any aProp;
     if (GetWindow())
@@ -2125,37 +2125,37 @@
         FmGridControl* pGrid = (FmGridControl*) GetWindow();
         Window* pDataWindow  = &pGrid->GetDataWindow();
 
-        if ( 0 == _rPropertyName.compareTo( FM_PROP_NAME ) )
+        if ( _rPropertyName == FM_PROP_NAME )
         {
             Font aFont = pDataWindow->GetControlFont();
             aProp <<= ImplCreateFontDescriptor( aFont );
         }
-        else if ( 0 == _rPropertyName.compareTo( FM_PROP_TEXTCOLOR ) )
+        else if ( _rPropertyName == FM_PROP_TEXTCOLOR )
         {
             aProp <<= (sal_Int32)pDataWindow->GetControlForeground().GetColor();
         }
-        else if ( 0 == _rPropertyName.compareTo( FM_PROP_BACKGROUNDCOLOR ) )
+        else if ( _rPropertyName == FM_PROP_BACKGROUNDCOLOR )
         {
             aProp <<= (sal_Int32)pDataWindow->GetControlBackground().GetColor();
         }
-        else if ( 0 == _rPropertyName.compareTo( FM_PROP_ROWHEIGHT ) )
+        else if ( _rPropertyName == FM_PROP_ROWHEIGHT )
         {
             sal_Int32 nPixelHeight = pGrid->GetDataRowHeight();
             // take the zoom factor into account
             nPixelHeight = pGrid->CalcReverseZoom(nPixelHeight);
             aProp <<= (sal_Int32)pGrid->PixelToLogic(Point(0,nPixelHeight),MAP_10TH_MM).Y();
         }
-        else if ( 0 == _rPropertyName.compareTo( FM_PROP_HASNAVIGATION ) )
+        else if ( _rPropertyName == FM_PROP_HASNAVIGATION )
         {
             sal_Bool bHasNavBar = pGrid->HasNavigationBar();
             aProp <<= (sal_Bool)bHasNavBar;
         }
-        else if ( 0 == _rPropertyName.compareTo( FM_PROP_RECORDMARKER ) )
+        else if ( _rPropertyName == FM_PROP_RECORDMARKER )
         {
             sal_Bool bHasHandle = pGrid->HasHandle();
             aProp <<= (sal_Bool)bHasHandle;
         }
-        else if ( 0 == _rPropertyName.compareTo( FM_PROP_ENABLED ) )
+        else if ( _rPropertyName == FM_PROP_ENABLED )
         {
             aProp <<= (sal_Bool)pDataWindow->IsEnabled();
         }

-- 
To view, visit https://gerrit.libreoffice.org/3218
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1d095cf5640595789f4ae99f1b0679be88b0baa9
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Prashant Pandey <prashant3.yishu@gmail.com>


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.