diff options
Diffstat (limited to 'vcl/source/components/factory.cxx')
-rw-r--r-- | vcl/source/components/factory.cxx | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/vcl/source/components/factory.cxx b/vcl/source/components/factory.cxx index 1129203596f4..efa81d460144 100644 --- a/vcl/source/components/factory.cxx +++ b/vcl/source/components/factory.cxx @@ -4,9 +4,9 @@ * * $RCSfile: factory.cxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: hr $ $Date: 2007-06-27 20:04:16 $ + * last change: $Author: kz $ $Date: 2008-04-04 16:17:53 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -81,6 +81,10 @@ namespace vcl extern Sequence< OUString > SAL_CALL DisplayAccess_getSupportedServiceNames(); extern OUString SAL_CALL DisplayAccess_getImplementationName(); extern Reference< XInterface > SAL_CALL DisplayAccess_createInstance( const Reference< XMultiServiceFactory > & ); + +extern Sequence< OUString > SAL_CALL FontIdentificator_getSupportedServiceNames(); +extern OUString SAL_CALL FontIdentificator_getImplementationName(); +extern Reference< XInterface > SAL_CALL FontIdentificator_createInstance( const Reference< XMultiServiceFactory > & ); } extern "C" { @@ -100,18 +104,25 @@ extern "C" { { Reference< ::com::sun::star::registry::XRegistryKey > xKey( reinterpret_cast< ::com::sun::star::registry::XRegistryKey* >( pXUnoKey ) ); - OUStringBuffer aImplName = OUString::createFromAscii( "/" ); + OUStringBuffer aImplName(64); + aImplName.appendAscii( "/" ); aImplName.append( vcl_session_getImplementationName() ); aImplName.appendAscii( "/UNO/SERVICES/" ); aImplName.append( vcl_session_getSupportedServiceNames()[0] ); xKey->createKey( aImplName.makeStringAndClear() ); - aImplName = OUString::createFromAscii( "/" ); + aImplName.appendAscii( "/" ); aImplName.append( vcl::DisplayAccess_getImplementationName() ); aImplName.appendAscii( "/UNO/SERVICES/" ); aImplName.append( vcl::DisplayAccess_getSupportedServiceNames()[0] ); xKey->createKey( aImplName.makeStringAndClear() ); + aImplName.appendAscii( "/" ); + aImplName.append( vcl::FontIdentificator_getImplementationName() ); + aImplName.appendAscii( "/UNO/SERVICES/" ); + aImplName.append( vcl::FontIdentificator_getSupportedServiceNames()[0] ); + xKey->createKey( aImplName.makeStringAndClear() ); + return sal_True; } catch( ::com::sun::star::registry::InvalidRegistryException& ) @@ -147,6 +158,12 @@ extern "C" { xMgr, vcl::DisplayAccess_getImplementationName(), vcl::DisplayAccess_createInstance, vcl::DisplayAccess_getSupportedServiceNames() ); } + else if( vcl::FontIdentificator_getImplementationName().equalsAscii( pImplementationName ) ) + { + xFactory = ::cppu::createSingleFactory( + xMgr, vcl::FontIdentificator_getImplementationName(), vcl::FontIdentificator_createInstance, + vcl::FontIdentificator_getSupportedServiceNames() ); + } if( xFactory.is() ) { xFactory->acquire(); |