fpicker/source/office/iodlg.cxx                 |    4 +-
 shell/source/cmdmail/cmdmailsuppl.cxx           |    2 -
 shell/source/unix/exec/shellexec.cxx            |    2 -
 shell/source/win32/SysShExec.cxx                |    2 -
 shell/source/win32/simplemail/smplmailsuppl.cxx |    2 -
 svl/source/fsstor/fsfactory.cxx                 |    2 -
 svx/source/fmcomp/fmgridif.cxx                  |   44 ++++++++++++------------
 7 files changed, 29 insertions(+), 29 deletions(-)

New commits:
commit 8398d5d9ac0f169ee7a045f6677919c79a5cbe0f
Author: Prashant Pandey <prashant3.yi...@gmail.com>
Date:   Wed Apr 10 05:53:22 2013 +0530

    fdo#62096: Replaced some OUString 'compareTo' with '=='
    
    Change-Id: I1d095cf5640595789f4ae99f1b0679be88b0baa9

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 @@ SvtFileDialogFilter_Impl* SvtFileDialog::FindFilter_Impl
             {
                 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 @@ SvtFileDialogFilter_Impl* SvtFileDialog::FindFilter_Impl
             }
         }
 #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/shell/source/cmdmail/cmdmailsuppl.cxx 
b/shell/source/cmdmail/cmdmailsuppl.cxx
index 40c19f9..81a322e 100644
--- a/shell/source/cmdmail/cmdmailsuppl.cxx
+++ b/shell/source/cmdmail/cmdmailsuppl.cxx
@@ -272,7 +272,7 @@ sal_Bool SAL_CALL CmdMailSuppl::supportsService( const 
OUString& ServiceName )
     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 dc1192c..6fe1c1e 100644
--- a/shell/source/unix/exec/shellexec.cxx
+++ b/shell/source/unix/exec/shellexec.cxx
@@ -284,7 +284,7 @@ sal_Bool SAL_CALL ShellExec::supportsService( const 
OUString& ServiceName )
     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 1279dafa..7aaaec7 100644
--- a/shell/source/win32/SysShExec.cxx
+++ b/shell/source/win32/SysShExec.cxx
@@ -361,7 +361,7 @@ sal_Bool SAL_CALL CSysShExec::supportsService( const 
OUString& ServiceName )
     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 76ba6c0..6106994 100644
--- a/shell/source/win32/simplemail/smplmailsuppl.cxx
+++ b/shell/source/win32/simplemail/smplmailsuppl.cxx
@@ -82,7 +82,7 @@ sal_Bool SAL_CALL CSmplMailSuppl::supportsService(const 
OUString& ServiceName)
     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 ffe84f8..06ca47b 100644
--- a/svl/source/fsstor/fsfactory.cxx
+++ b/svl/source/fsstor/fsfactory.cxx
@@ -178,7 +178,7 @@ sal_Bool SAL_CALL FSStorageFactory::supportsService( const 
OUString& ServiceName
     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/svx/source/fmcomp/fmgridif.cxx b/svx/source/fmcomp/fmgridif.cxx
index 4211c26..d202afc 100644
--- a/svx/source/fmcomp/fmgridif.cxx
+++ b/svx/source/fmcomp/fmgridif.cxx
@@ -1912,7 +1912,7 @@ void FmXGridPeer::setProperty( const OUString& 
PropertyName, const Any& Value) t
 
     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 @@ void FmXGridPeer::setProperty( const OUString& 
PropertyName, const Any& Value) t
         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 )
     {
         OUString sHelpURL;
         OSL_VERIFY( Value >>= sHelpURL );
@@ -1967,11 +1967,11 @@ void FmXGridPeer::setProperty( const OUString& 
PropertyName, const Any& Value) t
             sHelpURL = aHID.GetURLPath();
         pGrid->SetHelpId( 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 @@ void FmXGridPeer::setProperty( const OUString& 
PropertyName, const Any& Value) t
         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 @@ void FmXGridPeer::setProperty( const OUString& 
PropertyName, const Any& Value) t
             }
         }
     }
-    else if ( 0 == PropertyName.compareTo( FM_PROP_BACKGROUNDCOLOR ) )
+    else if ( PropertyName == FM_PROP_BACKGROUNDCOLOR )
     {
         if ( bVoid )
         {
@@ -2033,7 +2033,7 @@ void FmXGridPeer::setProperty( const OUString& 
PropertyName, const Any& Value) t
             pGrid->SetControlBackground( aColor );
         }
     }
-    else if ( 0 == PropertyName.compareTo( FM_PROP_TEXTCOLOR ) )
+    else if ( PropertyName == FM_PROP_TEXTCOLOR )
     {
         if ( bVoid )
         {
@@ -2046,7 +2046,7 @@ void FmXGridPeer::setProperty( const OUString& 
PropertyName, const Any& Value) t
             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 @@ void FmXGridPeer::setProperty( const OUString& 
PropertyName, const Any& Value) t
         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 );
@@ -2125,37 +2125,37 @@ Any FmXGridPeer::getProperty( const OUString& 
_rPropertyName ) throw( RuntimeExc
         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();
         }
@@ -2936,7 +2936,7 @@ IMPL_LINK(FmXGridPeer, OnExecuteGridSlot, void*, pSlot)
             if (m_pDispatchers[i].is())
             {
                 // commit any changes done so far, if it's not the undoRecord 
URL
-                if ( 0 == pUrls->Complete.compareTo( FMURL_RECORD_UNDO ) || 
commit() )
+                if ( pUrls->Complete == FMURL_RECORD_UNDO || commit() )
                     m_pDispatchers[i]->dispatch(*pUrls, Sequence< 
PropertyValue>());
 
                 return 1;   // handled
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to