diff options
author | Marcos Paulo de Souza <marcos.souza.org@gmail.com> | 2013-10-21 19:04:05 -0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2013-10-22 10:28:10 +0000 |
commit | ee5661ecd3bbeae38b04cd3f582a320a231d11bd (patch) | |
tree | 381d9afa0c831145551ade40b6d68f22919baaf6 /fpicker | |
parent | c82a36f9c7d89fa434d3dff896c290964326f5bf (diff) |
fdo#54938: Adapt supportsService implementations..
to cppu::supportsService
Change-Id: I0b03d3910f094f2183bf9859db9d5bcaf35d1f14
Reviewed-on: https://gerrit.libreoffice.org/6370
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'fpicker')
-rw-r--r-- | fpicker/source/aqua/SalAquaFilePicker.mm | 18 | ||||
-rw-r--r-- | fpicker/source/aqua/SalAquaFolderPicker.mm | 16 |
2 files changed, 4 insertions, 30 deletions
diff --git a/fpicker/source/aqua/SalAquaFilePicker.mm b/fpicker/source/aqua/SalAquaFilePicker.mm index fbae6e4d98f1..50d251ca704f 100644 --- a/fpicker/source/aqua/SalAquaFilePicker.mm +++ b/fpicker/source/aqua/SalAquaFilePicker.mm @@ -27,6 +27,7 @@ #include <com/sun/star/ui/dialogs/CommonFilePickerElementIds.hpp> #include <com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.hpp> #include <cppuhelper/interfacecontainer.h> +#include <cppuhelper/supportsservice.hxx> #include <osl/diagnose.h> #include <com/sun/star/ui/dialogs/TemplateDescription.hpp> #include <com/sun/star/ui/dialogs/ControlActions.hpp> @@ -658,22 +659,7 @@ throw( uno::RuntimeException ) sal_Bool SAL_CALL SalAquaFilePicker::supportsService( const rtl::OUString& sServiceName ) throw( uno::RuntimeException ) { - DBG_PRINT_ENTRY(CLASS_NAME, __func__, "service name", sServiceName); - - sal_Bool retVal = sal_False; - - uno::Sequence <rtl::OUString> supportedServicesNames = FilePicker_getSupportedServiceNames(); - - for( sal_Int32 n = supportedServicesNames.getLength(); n--; ) { - if( supportedServicesNames[n] == sServiceName ) { - retVal = sal_True; - break; - } - } - - DBG_PRINT_EXIT(CLASS_NAME, __func__); - - return retVal; + return cppu:supportsService(this, sServiceName); } uno::Sequence<rtl::OUString> SAL_CALL SalAquaFilePicker::getSupportedServiceNames() diff --git a/fpicker/source/aqua/SalAquaFolderPicker.mm b/fpicker/source/aqua/SalAquaFolderPicker.mm index e7de5b709b8c..3eb590b5cfc6 100644 --- a/fpicker/source/aqua/SalAquaFolderPicker.mm +++ b/fpicker/source/aqua/SalAquaFolderPicker.mm @@ -24,6 +24,7 @@ #include <com/sun/star/ui/dialogs/CommonFilePickerElementIds.hpp> #include <com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.hpp> #include <cppuhelper/interfacecontainer.h> +#include <cppuhelper/supportsservice.hxx> #include <osl/diagnose.h> #include <com/sun/star/ui/dialogs/TemplateDescription.hpp> #include <com/sun/star/uno/Any.hxx> @@ -220,20 +221,7 @@ rtl::OUString SAL_CALL SalAquaFolderPicker::getImplementationName() sal_Bool SAL_CALL SalAquaFolderPicker::supportsService( const rtl::OUString& sServiceName ) throw( uno::RuntimeException ) { - DBG_PRINT_ENTRY(CLASS_NAME, __func__, "serviceName", sServiceName); - - sal_Bool retVal = sal_False; - uno::Sequence <rtl::OUString> supportedServicesNames = FolderPicker_getSupportedServiceNames(); - - for( sal_Int32 n = supportedServicesNames.getLength(); n--; ) { - if( supportedServicesNames[n] == sServiceName ) { - retVal = sal_True; - break; - } - } - - DBG_PRINT_EXIT(CLASS_NAME, __func__, retVal); - return retVal; + return cppu::supportsService(this, sServiceName); } uno::Sequence<rtl::OUString> SAL_CALL SalAquaFolderPicker::getSupportedServiceNames() |