update dev300-m58
[ooovba.git] / vbahelper / source / msforms / service.cxx
blob32159449d2c333275c8c788640135461ca725239
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: service.cxx,v $
10 * $Revision: 1.4 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #include "cppuhelper/implementationentry.hxx"
31 #include "com/sun/star/lang/XMultiServiceFactory.hpp"
32 #include "com/sun/star/registry/XRegistryKey.hpp"
33 #include "comphelper/servicedecl.hxx"
35 // =============================================================================
36 // component exports
37 // =============================================================================
38 using namespace ::com::sun::star;
39 using namespace ::com::sun::star::uno;
41 namespace sdecl = comphelper::service_decl;
43 // reference service helper(s)
44 namespace controlprovider
46 extern sdecl::ServiceDecl const serviceDecl;
49 namespace userform
51 extern sdecl::ServiceDecl const serviceDecl;
54 extern "C"
56 void SAL_CALL component_getImplementationEnvironment(
57 const sal_Char ** ppEnvTypeName, uno_Environment ** /*ppEnv*/ )
59 OSL_TRACE("In component_getImplementationEnv");
60 *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
63 sal_Bool SAL_CALL component_writeInfo(
64 lang::XMultiServiceFactory * pServiceManager, registry::XRegistryKey * pRegistryKey )
66 OSL_TRACE("In component_writeInfo");
68 // Component registration
69 return component_writeInfoHelper( pServiceManager, pRegistryKey,
70 controlprovider::serviceDecl, userform::serviceDecl );
73 void * SAL_CALL component_getFactory(
74 const sal_Char * pImplName, lang::XMultiServiceFactory * pServiceManager,
75 registry::XRegistryKey * pRegistryKey )
77 OSL_TRACE("In component_getFactory for %s", pImplName );
78 void* pRet = component_getFactoryHelper(
79 pImplName, pServiceManager, pRegistryKey, controlprovider::serviceDecl, userform::serviceDecl );
80 OSL_TRACE("Ret is 0x%x", pRet);
81 return pRet;