merge the formfield patch from ooo-build
[ooovba.git] / sw / source / ui / vba / service.cxx
blob0ed949246c34d8cd2a7299617c8084035f41e4bb
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 namespace globals
45 extern sdecl::ServiceDecl const serviceDecl;
48 namespace document
50 extern sdecl::ServiceDecl const serviceDecl;
53 namespace wrapformat
55 extern sdecl::ServiceDecl const serviceDecl;
58 extern "C"
60 void SAL_CALL component_getImplementationEnvironment(
61 const sal_Char ** ppEnvTypeName, uno_Environment ** /*ppEnv*/ )
63 OSL_TRACE("In component_getImplementationEnv");
64 *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
67 sal_Bool SAL_CALL component_writeInfo(
68 lang::XMultiServiceFactory * pServiceManager, registry::XRegistryKey * pRegistryKey )
70 OSL_TRACE("In component_writeInfo");
72 // Component registration
73 return component_writeInfoHelper( pServiceManager, pRegistryKey,
74 globals::serviceDecl, document::serviceDecl, wrapformat::serviceDecl );
77 void * SAL_CALL component_getFactory(
78 const sal_Char * pImplName, lang::XMultiServiceFactory * pServiceManager,
79 registry::XRegistryKey * pRegistryKey )
81 OSL_TRACE("In component_getFactory for %s", pImplName );
82 void* pRet = component_getFactoryHelper(
83 pImplName, pServiceManager, pRegistryKey, globals::serviceDecl, document::serviceDecl, wrapformat::serviceDecl );
84 OSL_TRACE("Ret is 0x%x", pRet);
85 return pRet;