1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 #include "cppuhelper/implementationentry.hxx" 24 #include "com/sun/star/lang/XMultiServiceFactory.hpp" 25 #include "com/sun/star/registry/XRegistryKey.hpp" 26 #include "comphelper/servicedecl.hxx" 27 28 // ============================================================================= 29 // component exports 30 // ============================================================================= 31 using namespace ::com::sun::star; 32 using namespace ::com::sun::star::uno; 33 34 namespace sdecl = comphelper::service_decl; 35 36 // reference service helper(s) 37 namespace controlprovider 38 { 39 extern sdecl::ServiceDecl const serviceDecl; 40 } 41 42 namespace userform 43 { 44 extern sdecl::ServiceDecl const serviceDecl; 45 } 46 47 extern "C" 48 { component_getImplementationEnvironment(const sal_Char ** ppEnvTypeName,uno_Environment **)49 SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( 50 const sal_Char ** ppEnvTypeName, uno_Environment ** /*ppEnv*/ ) 51 { 52 OSL_TRACE("In component_getImplementationEnv"); 53 *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; 54 } 55 component_getFactory(const sal_Char * pImplName,lang::XMultiServiceFactory * pServiceManager,registry::XRegistryKey * pRegistryKey)56 SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( 57 const sal_Char * pImplName, lang::XMultiServiceFactory * pServiceManager, 58 registry::XRegistryKey * pRegistryKey ) 59 { 60 OSL_TRACE("In component_getFactory for %s", pImplName ); 61 void* pRet = component_getFactoryHelper( 62 pImplName, pServiceManager, pRegistryKey, controlprovider::serviceDecl, userform::serviceDecl ); 63 OSL_TRACE("Ret is 0x%x", pRet); 64 return pRet; 65 } 66 } 67