diff options
Diffstat (limited to 'fpicker/source/win32/filepicker/FPentry.cxx')
-rw-r--r-- | fpicker/source/win32/filepicker/FPentry.cxx | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/fpicker/source/win32/filepicker/FPentry.cxx b/fpicker/source/win32/filepicker/FPentry.cxx index 8213a57c2158..0242171c4d66 100644 --- a/fpicker/source/win32/filepicker/FPentry.cxx +++ b/fpicker/source/win32/filepicker/FPentry.cxx @@ -43,6 +43,10 @@ #include "../misc/WinImplHelper.hxx" #include <stdio.h> +#include "../folderpicker/FolderPicker.hxx" +#include "../folderpicker/FOPServiceInfo.hxx" +#include "../folderpicker/WinFOPImpl.hxx" + //----------------------------------------------- // namespace directives //----------------------------------------------- @@ -87,6 +91,13 @@ static Reference< XInterface > SAL_CALL createInstance( return xDlg; } +static Reference< XInterface > SAL_CALL +createInstance_fop( const Reference< XMultiServiceFactory >& rServiceManager ) +{ + return Reference< XInterface >( static_cast< XFolderPicker* >( new CFolderPicker( rServiceManager ) ) ); +} + + extern "C" { @@ -112,6 +123,23 @@ SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( } } + if ( pSrvManager && ( 0 == rtl_str_compare( pImplName, FOLDER_PICKER_IMPL_NAME ) ) ) + { + Sequence< OUString > aSNS( 1 ); + aSNS.getArray( )[0] = OUString( RTL_CONSTASCII_USTRINGPARAM( FOLDER_PICKER_SERVICE_NAME ) ); + + Reference< XSingleServiceFactory > xFactory ( createSingleFactory( + reinterpret_cast< XMultiServiceFactory* > ( pSrvManager ), + OUString::createFromAscii( pImplName ), + createInstance_fop, + aSNS ) ); + if ( xFactory.is() ) + { + xFactory->acquire(); + pRet = xFactory.get(); + } + } + return pRet; } |