1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: unoservices.cxx,v $
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>
38 using namespace ::rtl
;
39 using namespace ::com::sun::star::uno
;
42 // =============================================================================
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
,
86 create_XMLBasicExporter
, getImplementationName_XMLBasicExporter
,
87 getSupportedServiceNames_XMLBasicExporter
, ::cppu::createSingleComponentFactory
,
91 create_XMLOasisBasicExporter
, getImplementationName_XMLOasisBasicExporter
,
92 getSupportedServiceNames_XMLOasisBasicExporter
, ::cppu::createSingleComponentFactory
,
96 create_XMLBasicImporter
, getImplementationName_XMLBasicImporter
,
97 getSupportedServiceNames_XMLBasicImporter
, ::cppu::createSingleComponentFactory
,
101 create_XMLOasisBasicImporter
, getImplementationName_XMLOasisBasicImporter
,
102 getSupportedServiceNames_XMLOasisBasicImporter
, ::cppu::createSingleComponentFactory
,
109 // =============================================================================
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
);