diff options
Diffstat (limited to 'fpicker/source')
-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() |