From e1f6dac6893e0ad9e1b1f03a3b882cf1e9a08d32 Mon Sep 17 00:00:00 2001 From: Ashish Banerjee Date: Wed, 3 Apr 2013 20:11:54 -0600 Subject: Replace `compareTo(...) == 0` with == MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Proposed patch for the following issue: https://bugs.freedesktop.org/show_bug.cgi?id=62096 Change-Id: Ib83a9051ea12c53642f781e5427a6ca728049a7f Reviewed-on: https://gerrit.libreoffice.org/3198 Reviewed-by: Thomas Arnhold Reviewed-by: Luboš Luňák Tested-by: Miklos Vajna --- dtrans/source/cnttype/mcnttfactory.cxx | 2 +- dtrans/source/generic/clipboardmanager.cxx | 4 ++-- dtrans/source/generic/generic_clipboard.cxx | 2 +- dtrans/source/win32/clipb/WinClipboard.cxx | 2 +- dtrans/source/win32/ftransl/ftransl.cxx | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) (limited to 'dtrans/source') diff --git a/dtrans/source/cnttype/mcnttfactory.cxx b/dtrans/source/cnttype/mcnttfactory.cxx index 86eb6179a3dd..ec43fcdbc5d6 100644 --- a/dtrans/source/cnttype/mcnttfactory.cxx +++ b/dtrans/source/cnttype/mcnttfactory.cxx @@ -87,7 +87,7 @@ sal_Bool SAL_CALL CMimeContentTypeFactory::supportsService( const OUString& Serv 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 be78cdf03b9b..7793826bb0bc 100644 --- a/dtrans/source/generic/clipboardmanager.cxx +++ b/dtrans/source/generic/clipboardmanager.cxx @@ -62,7 +62,7 @@ sal_Bool SAL_CALL ClipboardManager::supportsService( const OUString& ServiceName 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 @@ void SAL_CALL ClipboardManager::addClipboard( const Reference< XClipboard >& xCl // 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 4da2b1bfa07e..88621630ccc2 100644 --- a/dtrans/source/generic/generic_clipboard.cxx +++ b/dtrans/source/generic/generic_clipboard.cxx @@ -75,7 +75,7 @@ sal_Bool SAL_CALL GenericClipboard::supportsService( const OUString& ServiceName 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 7bf96872e34e..80ef257f489c 100644 --- a/dtrans/source/win32/clipb/WinClipboard.cxx +++ b/dtrans/source/win32/clipb/WinClipboard.cxx @@ -288,7 +288,7 @@ sal_Bool SAL_CALL CWinClipboard::supportsService( const OUString& ServiceName ) 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 53611cba47d4..1f141f2faf56 100644 --- a/dtrans/source/win32/ftransl/ftransl.cxx +++ b/dtrans/source/win32/ftransl/ftransl.cxx @@ -225,7 +225,7 @@ sal_Bool SAL_CALL CDataFormatTranslator::supportsService( const OUString& Servic 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; -- cgit