summaryrefslogtreecommitdiff
path: root/ucb
diff options
context:
space:
mode:
authorMarcos Paulo de Souza <marcos.souza.org@gmail.com>2014-03-04 08:41:53 -0300
committerMarcos Paulo de Souza <marcos.souza.org@gmail.com>2014-03-04 07:30:02 -0600
commit4d6560f5066d143552cba861aaadc2f49b4357d4 (patch)
tree34c7cfba1a7cd2fce5f9bfde5d4d06910e1ac774 /ucb
parent8f210c26c53cf5480819d983e57977d531422ff1 (diff)
fdo#54938: Convert some places to use cppu::supportsService
The last cases are non obvious, so it's pratically done Change-Id: Icae1da8e238f516eaed0f7fbdf96fff778eac547 Reviewed-on: https://gerrit.libreoffice.org/8445 Reviewed-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com> Tested-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Diffstat (limited to 'ucb')
-rw-r--r--ucb/source/ucp/file/bc.cxx20
-rw-r--r--ucb/source/ucp/file/prov.cxx14
2 files changed, 6 insertions, 28 deletions
diff --git a/ucb/source/ucp/file/bc.cxx b/ucb/source/ucp/file/bc.cxx
index 06ea3a994bb5..9723918069e7 100644
--- a/ucb/source/ucp/file/bc.cxx
+++ b/ucb/source/ucp/file/bc.cxx
@@ -34,6 +34,7 @@
#include <com/sun/star/beans/PropertySetInfoChange.hpp>
#include <com/sun/star/ucb/ContentAction.hpp>
#include <com/sun/star/ucb/NameClash.hpp>
+#include <cppuhelper/supportsservice.hxx>
#include "filglob.hxx"
#include "filid.hxx"
#include "filrow.hxx"
@@ -251,12 +252,7 @@ BaseContent::dispose()
delete pPropertySetInfoChangeListeners;
}
-
-
-
// XServiceInfo
-
-
OUString SAL_CALL
BaseContent::getImplementationName()
throw( RuntimeException, std::exception)
@@ -264,20 +260,13 @@ BaseContent::getImplementationName()
return OUString("com.sun.star.comp.ucb.FileContent");
}
-
-
sal_Bool SAL_CALL
BaseContent::supportsService( const OUString& ServiceName )
throw( RuntimeException, std::exception)
{
- if ( ServiceName == "com.sun.star.ucb.FileContent" )
- return true;
- else
- return false;
+ return cppu::supportsService( this, ServiceName );
}
-
-
Sequence< OUString > SAL_CALL
BaseContent::getSupportedServiceNames()
throw( RuntimeException, std::exception )
@@ -287,12 +276,7 @@ BaseContent::getSupportedServiceNames()
return ret;
}
-
-
-
// XTypeProvider
-
-
XTYPEPROVIDER_IMPL_10( BaseContent,
lang::XComponent,
lang::XTypeProvider,
diff --git a/ucb/source/ucp/file/prov.cxx b/ucb/source/ucp/file/prov.cxx
index 56c579ce3297..1510a77a2422 100644
--- a/ucb/source/ucp/file/prov.cxx
+++ b/ucb/source/ucp/file/prov.cxx
@@ -21,10 +21,11 @@
#include <osl/file.hxx>
#include <osl/socket.h>
#include <comphelper/processfactory.hxx>
-#include <cppuhelper/factory.hxx>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/ucb/FileSystemNotation.hpp>
#include <com/sun/star/beans/PropertyState.hpp>
+#include <cppuhelper/factory.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include "filglob.hxx"
#include "filid.hxx"
#include "shell.hxx"
@@ -183,7 +184,6 @@ XTYPEPROVIDER_IMPL_7( FileProvider,
// XServiceInfo methods.
-
OUString SAL_CALL
FileProvider::getImplementationName()
throw( RuntimeException, std::exception )
@@ -191,16 +191,12 @@ FileProvider::getImplementationName()
return fileaccess::shell::getImplementationName_static();
}
-
-sal_Bool SAL_CALL
-FileProvider::supportsService(
- const OUString& ServiceName )
+sal_Bool SAL_CALL FileProvider::supportsService(const OUString& ServiceName )
throw( RuntimeException, std::exception )
{
- return ServiceName == "com.sun.star.ucb.FileContentProvider";
+ return cppu::supportsService(this, ServiceName);
}
-
Sequence< OUString > SAL_CALL
FileProvider::getSupportedServiceNames(
void )
@@ -209,8 +205,6 @@ FileProvider::getSupportedServiceNames(
return fileaccess::shell::getSupportedServiceNames_static();
}
-
-
Reference< XSingleServiceFactory > SAL_CALL
FileProvider::createServiceFactory(
const Reference< XMultiServiceFactory >& rxServiceMgr )