Update ooo320-m1
[ooovba.git] / xmlscript / source / misc / unoservices.cxx
blob891fe518a0f0c2a58f055653558288bd2ae8f5e8
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: unoservices.cxx,v $
10 * $Revision: 1.6 $
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 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_xmlscript.hxx"
34 #ifndef _CPPUHELPER_IMPLEMENTATIONENTRY_HXX_
35 #include <cppuhelper/implementationentry.hxx>
36 #endif
38 using namespace ::rtl;
39 using namespace ::com::sun::star::uno;
42 // =============================================================================
44 namespace xmlscript
46 Sequence< OUString > SAL_CALL getSupportedServiceNames_DocumentHandlerImpl();
47 OUString SAL_CALL getImplementationName_DocumentHandlerImpl();
48 Reference< XInterface > SAL_CALL create_DocumentHandlerImpl(
49 Reference< XComponentContext > const & xContext )
50 SAL_THROW( (Exception) );
52 Sequence< OUString > SAL_CALL getSupportedServiceNames_XMLBasicExporter();
53 OUString SAL_CALL getImplementationName_XMLBasicExporter();
54 Reference< XInterface > SAL_CALL create_XMLBasicExporter(
55 Reference< XComponentContext > const & xContext )
56 SAL_THROW( (Exception) );
58 Sequence< OUString > SAL_CALL getSupportedServiceNames_XMLOasisBasicExporter();
59 OUString SAL_CALL getImplementationName_XMLOasisBasicExporter();
60 Reference< XInterface > SAL_CALL create_XMLOasisBasicExporter(
61 Reference< XComponentContext > const & xContext )
62 SAL_THROW( (Exception) );
64 Sequence< OUString > SAL_CALL getSupportedServiceNames_XMLBasicImporter();
65 OUString SAL_CALL getImplementationName_XMLBasicImporter();
66 Reference< XInterface > SAL_CALL create_XMLBasicImporter(
67 Reference< XComponentContext > const & xContext )
68 SAL_THROW( (Exception) );
70 Sequence< OUString > SAL_CALL getSupportedServiceNames_XMLOasisBasicImporter();
71 OUString SAL_CALL getImplementationName_XMLOasisBasicImporter();
72 Reference< XInterface > SAL_CALL create_XMLOasisBasicImporter(
73 Reference< XComponentContext > const & xContext )
74 SAL_THROW( (Exception) );
76 // -----------------------------------------------------------------------------
78 static struct ::cppu::ImplementationEntry s_entries [] =
81 create_DocumentHandlerImpl, getImplementationName_DocumentHandlerImpl,
82 getSupportedServiceNames_DocumentHandlerImpl, ::cppu::createSingleComponentFactory,
83 0, 0
86 create_XMLBasicExporter, getImplementationName_XMLBasicExporter,
87 getSupportedServiceNames_XMLBasicExporter, ::cppu::createSingleComponentFactory,
88 0, 0
91 create_XMLOasisBasicExporter, getImplementationName_XMLOasisBasicExporter,
92 getSupportedServiceNames_XMLOasisBasicExporter, ::cppu::createSingleComponentFactory,
93 0, 0
96 create_XMLBasicImporter, getImplementationName_XMLBasicImporter,
97 getSupportedServiceNames_XMLBasicImporter, ::cppu::createSingleComponentFactory,
98 0, 0
101 create_XMLOasisBasicImporter, getImplementationName_XMLOasisBasicImporter,
102 getSupportedServiceNames_XMLOasisBasicImporter, ::cppu::createSingleComponentFactory,
103 0, 0
105 { 0, 0, 0, 0, 0, 0 }
109 // =============================================================================
111 extern "C"
113 void SAL_CALL component_getImplementationEnvironment(
114 const sal_Char ** ppEnvTypeName, uno_Environment ** )
116 *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
119 // -----------------------------------------------------------------------------
121 sal_Bool SAL_CALL component_writeInfo(
122 void * pServiceManager, void * pRegistryKey )
124 return ::cppu::component_writeInfoHelper(
125 pServiceManager, pRegistryKey, ::xmlscript::s_entries );
128 // -----------------------------------------------------------------------------
130 void * SAL_CALL component_getFactory(
131 const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey )
133 return ::cppu::component_getFactoryHelper(
134 pImplName, pServiceManager, pRegistryKey, ::xmlscript::s_entries );