summaryrefslogtreecommitdiff
path: root/comphelper/source/compare
diff options
context:
space:
mode:
authorAlexandre Vicenzi <vicenzi.alexandre@gmail.com>2014-01-31 03:39:50 -0200
committerMarcos Souza <marcos.souza.org@gmail.com>2014-02-05 14:29:57 +0000
commite17cf910320848edbc3d11ec62acbf1c8f531ae5 (patch)
treec5652289152a460c42b7e4f3e54ce006be4e52cd /comphelper/source/compare
parenta7395942aecd2523ab392b09018dcc1a05527077 (diff)
fdo#54938 Convert comphelper and vcl to cppu::supportsService
Change-Id: I391a7324bf92208fe632dac17874943343b1f65a Reviewed-on: https://gerrit.libreoffice.org/7757 Reviewed-by: Marcos Souza <marcos.souza.org@gmail.com> Tested-by: Marcos Souza <marcos.souza.org@gmail.com>
Diffstat (limited to 'comphelper/source/compare')
-rw-r--r--comphelper/source/compare/AnyCompareFactory.cxx16
1 files changed, 2 insertions, 14 deletions
diff --git a/comphelper/source/compare/AnyCompareFactory.cxx b/comphelper/source/compare/AnyCompareFactory.cxx
index 88842f0b333d..28017292cfa0 100644
--- a/comphelper/source/compare/AnyCompareFactory.cxx
+++ b/comphelper/source/compare/AnyCompareFactory.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include "comphelper_module.hxx"
#include <com/sun/star/ucb/XAnyCompareFactory.hpp>
@@ -27,21 +26,18 @@
#include <com/sun/star/beans/PropertyValue.hpp>
#include <cppuhelper/implbase3.hxx>
#include <cppuhelper/implbase1.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/lang/IllegalArgumentException.hpp>
#include <com/sun/star/lang/XMultiComponentFactory.hpp>
#include <map>
-
using namespace com::sun::star::uno;
using namespace com::sun::star::ucb;
using namespace com::sun::star::lang;
using namespace com::sun::star::i18n;
-
-//=============================================================================
-
class AnyCompare : public ::cppu::WeakImplHelper1< XAnyCompare >
{
Reference< XCollator > m_rCollator;
@@ -57,8 +53,6 @@ public:
virtual sal_Int16 SAL_CALL compare( const Any& any1, const Any& any2 ) throw(RuntimeException);
};
-//=============================================================================
-
class AnyCompareFactory : public cppu::WeakImplHelper3< XAnyCompareFactory, XInitialization, XServiceInfo >
{
Reference< XAnyCompare > m_rAnyCompare;
@@ -87,8 +81,6 @@ public:
static Reference< XInterface > SAL_CALL Create( const Reference< XComponentContext >& );
};
-//===========================================================================================
-
sal_Int16 SAL_CALL AnyCompare::compare( const Any& any1, const Any& any2 ) throw(::com::sun::star::uno::RuntimeException)
{
sal_Int16 aResult = 0;
@@ -104,8 +96,6 @@ sal_Int16 SAL_CALL AnyCompare::compare( const Any& any1, const Any& any2 ) throw
return aResult;
}
-//===========================================================================================
-
Reference< XAnyCompare > SAL_CALL AnyCompareFactory::createAnyCompareByName( const OUString& aPropertyName ) throw(::com::sun::star::uno::RuntimeException)
{
// for now only OUString properties compare is implemented
@@ -127,7 +117,6 @@ void SAL_CALL AnyCompareFactory::initialize( const Sequence< Any >& aArguments )
return;
}
}
-
}
OUString SAL_CALL AnyCompareFactory::getImplementationName( ) throw( RuntimeException )
@@ -142,8 +131,7 @@ OUString SAL_CALL AnyCompareFactory::getImplementationName_static( )
sal_Bool SAL_CALL AnyCompareFactory::supportsService( const OUString& ServiceName ) throw(RuntimeException)
{
- OUString aServiceName( "com.sun.star.ucb.AnyCompareFactory" );
- return aServiceName == ServiceName;
+ return cppu::supportsService(this, ServiceName);
}
Sequence< OUString > SAL_CALL AnyCompareFactory::getSupportedServiceNames( ) throw(RuntimeException)