diff options
Diffstat (limited to 'fpicker/source/win32/filepicker/FPentry.cxx')
-rw-r--r-- | fpicker/source/win32/filepicker/FPentry.cxx | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/fpicker/source/win32/filepicker/FPentry.cxx b/fpicker/source/win32/filepicker/FPentry.cxx index 3adf90836013..68d367a9e09e 100644 --- a/fpicker/source/win32/filepicker/FPentry.cxx +++ b/fpicker/source/win32/filepicker/FPentry.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -30,7 +30,7 @@ #include "precompiled_fpicker.hxx" //---------------------------------------------- -// includes of other projects +// includes of other projects //---------------------------------------------- #include <cppuhelper/factory.hxx> #include <com/sun/star/container/XSet.hpp> @@ -47,37 +47,37 @@ // namespace directives //----------------------------------------------- -using namespace ::rtl ; -using namespace ::com::sun::star::uno ; -using namespace ::com::sun::star::container ; -using namespace ::com::sun::star::lang ; -using namespace ::com::sun::star::registry ; -using namespace ::cppu ; +using namespace ::rtl ; +using namespace ::com::sun::star::uno ; +using namespace ::com::sun::star::container ; +using namespace ::com::sun::star::lang ; +using namespace ::com::sun::star::registry ; +using namespace ::cppu ; using ::com::sun::star::ui::dialogs::XFilePicker; using ::com::sun::star::ui::dialogs::XFilePicker2; //------------------------------------------------ -// +// //------------------------------------------------ -static Reference< XInterface > SAL_CALL createInstance( +static Reference< XInterface > SAL_CALL createInstance( const Reference< XMultiServiceFactory >& rServiceManager ) { Reference< XInterface > xDlg; - bool bVistaOrNewer = IsWindowsVistaOrNewer(); + bool bVistaOrNewer = IsWindowsVistaOrNewer(); if (bVistaOrNewer) { OSL_TRACE("use special (vista) system file picker ..."); - xDlg.set( - static_cast< XFilePicker2* >( + xDlg.set( + static_cast< XFilePicker2* >( new ::fpicker::win32::vista::VistaFilePicker( rServiceManager ) ) ); } else { OSL_TRACE("use normal system file picker ..."); - xDlg.set( - static_cast< XFilePicker2* >( + xDlg.set( + static_cast< XFilePicker2* >( new CFilePicker( rServiceManager ) ) ); } @@ -88,7 +88,7 @@ static Reference< XInterface > SAL_CALL createInstance( // the three uno functions that will be exported //------------------------------------------------ -extern "C" +extern "C" { //------------------------------------------------ @@ -113,12 +113,12 @@ sal_Bool SAL_CALL component_writeInfo( void*, void* pRegistryKey ) { try { - Reference< XRegistryKey > pXNewKey( static_cast< XRegistryKey* >( pRegistryKey ) ); + Reference< XRegistryKey > pXNewKey( static_cast< XRegistryKey* >( pRegistryKey ) ); pXNewKey->createKey( OUString::createFromAscii( FILE_PICKER_REGKEY_NAME ) ); } catch( InvalidRegistryException& ) - { - OSL_ENSURE( sal_False, "InvalidRegistryException caught" ); + { + OSL_ENSURE( sal_False, "InvalidRegistryException caught" ); bRetVal = sal_False; } } @@ -130,7 +130,7 @@ sal_Bool SAL_CALL component_writeInfo( void*, void* pRegistryKey ) // //------------------------------------------------ -void* SAL_CALL component_getFactory( +void* SAL_CALL component_getFactory( const sal_Char* pImplName, uno_Interface* pSrvManager, uno_Interface* ) { void* pRet = 0; @@ -138,8 +138,8 @@ void* SAL_CALL component_getFactory( if ( pSrvManager && ( 0 == rtl_str_compare( pImplName, FILE_PICKER_IMPL_NAME ) ) ) { Sequence< OUString > aSNS( 1 ); - aSNS.getArray( )[0] = OUString::createFromAscii( FILE_PICKER_SERVICE_NAME ); - + aSNS.getArray( )[0] = OUString::createFromAscii( FILE_PICKER_SERVICE_NAME ); + Reference< XSingleServiceFactory > xFactory ( createSingleFactory( reinterpret_cast< XMultiServiceFactory* > ( pSrvManager ), OUString::createFromAscii( pImplName ), @@ -149,7 +149,7 @@ void* SAL_CALL component_getFactory( { xFactory->acquire(); pRet = xFactory.get(); - } + } } return pRet; |