diff options
Diffstat (limited to 'svtools/source/uno/fpicker.cxx')
-rw-r--r-- | svtools/source/uno/fpicker.cxx | 52 |
1 files changed, 40 insertions, 12 deletions
diff --git a/svtools/source/uno/fpicker.cxx b/svtools/source/uno/fpicker.cxx index 1eccb579c2c9..c3961e8fc1bb 100644 --- a/svtools/source/uno/fpicker.cxx +++ b/svtools/source/uno/fpicker.cxx @@ -53,12 +53,14 @@ static OUString FilePicker_getSystemPickerServiceName() #endif } -extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL -com_sun_star_comp_svt_FilePicker_get_implementation( - css::uno::XComponentContext *context, - css::uno::Sequence<css::uno::Any> const &) +Reference< css::uno::XInterface > FilePicker_CreateInstance ( + Reference< css::uno::XComponentContext > const & context) { Reference< css::uno::XInterface > xResult; + + if (!context.is()) + return xResult; + Reference< css::lang::XMultiComponentFactory > xFactory (context->getServiceManager()); if (xFactory.is() && SvtMiscOptions().UseSystemFileDialog()) { @@ -92,8 +94,20 @@ com_sun_star_comp_svt_FilePicker_get_implementation( // Add to FilePicker history. svt::addFilePicker (xResult); } - xResult->acquire(); - return xResult.get(); + return xResult; +} + +OUString SAL_CALL FilePicker_getImplementationName() +{ + return OUString("com.sun.star.comp.svt.FilePicker"); +} + +Sequence< OUString > FilePicker_getSupportedServiceNames() +{ + Sequence< OUString > aServiceNames(1); + aServiceNames.getArray()[0] = + OUString( "com.sun.star.ui.dialogs.FilePicker"); + return aServiceNames; } /* @@ -113,12 +127,14 @@ static OUString FolderPicker_getSystemPickerServiceName() return OUString("com.sun.star.ui.dialogs.SystemFolderPicker"); } -extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL -com_sun_star_comp_svt_FolderPicker_get_implementation( - css::uno::XComponentContext *context, - css::uno::Sequence<css::uno::Any> const &) +Reference< css::uno::XInterface > FolderPicker_CreateInstance ( + Reference< css::uno::XComponentContext > const & context) { Reference< css::uno::XInterface > xResult; + + if (!context.is()) + return xResult; + Reference< css::lang::XMultiComponentFactory > xFactory (context->getServiceManager()); if (xFactory.is() && SvtMiscOptions().UseSystemFileDialog()) { @@ -149,8 +165,20 @@ com_sun_star_comp_svt_FolderPicker_get_implementation( // Add to FolderPicker history. svt::addFolderPicker (xResult); } - xResult->acquire(); - return xResult.get(); + return xResult; +} + +OUString SAL_CALL FolderPicker_getImplementationName() +{ + return OUString("com.sun.star.comp.svt.FolderPicker"); +} + +Sequence< OUString > FolderPicker_getSupportedServiceNames() +{ + Sequence< OUString > aServiceNames(1); + aServiceNames.getArray()[0] = + OUString( "com.sun.star.ui.dialogs.FolderPicker"); + return aServiceNames; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |