1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 // MARKER(update_precomp.py): autogen include statement, do not remove 29 #include "precompiled_xmlscript.hxx" 30 31 #ifndef _CPPUHELPER_IMPLEMENTATIONENTRY_HXX_ 32 #include <cppuhelper/implementationentry.hxx> 33 #endif 34 35 using namespace ::rtl; 36 using namespace ::com::sun::star::uno; 37 38 39 // ============================================================================= 40 41 namespace xmlscript 42 { 43 Sequence< OUString > SAL_CALL getSupportedServiceNames_DocumentHandlerImpl(); 44 OUString SAL_CALL getImplementationName_DocumentHandlerImpl(); 45 Reference< XInterface > SAL_CALL create_DocumentHandlerImpl( 46 Reference< XComponentContext > const & xContext ) 47 SAL_THROW( (Exception) ); 48 49 Sequence< OUString > SAL_CALL getSupportedServiceNames_XMLBasicExporter(); 50 OUString SAL_CALL getImplementationName_XMLBasicExporter(); 51 Reference< XInterface > SAL_CALL create_XMLBasicExporter( 52 Reference< XComponentContext > const & xContext ) 53 SAL_THROW( (Exception) ); 54 55 Sequence< OUString > SAL_CALL getSupportedServiceNames_XMLOasisBasicExporter(); 56 OUString SAL_CALL getImplementationName_XMLOasisBasicExporter(); 57 Reference< XInterface > SAL_CALL create_XMLOasisBasicExporter( 58 Reference< XComponentContext > const & xContext ) 59 SAL_THROW( (Exception) ); 60 61 Sequence< OUString > SAL_CALL getSupportedServiceNames_XMLBasicImporter(); 62 OUString SAL_CALL getImplementationName_XMLBasicImporter(); 63 Reference< XInterface > SAL_CALL create_XMLBasicImporter( 64 Reference< XComponentContext > const & xContext ) 65 SAL_THROW( (Exception) ); 66 67 Sequence< OUString > SAL_CALL getSupportedServiceNames_XMLOasisBasicImporter(); 68 OUString SAL_CALL getImplementationName_XMLOasisBasicImporter(); 69 Reference< XInterface > SAL_CALL create_XMLOasisBasicImporter( 70 Reference< XComponentContext > const & xContext ) 71 SAL_THROW( (Exception) ); 72 73 // ----------------------------------------------------------------------------- 74 75 static struct ::cppu::ImplementationEntry s_entries [] = 76 { 77 { 78 create_DocumentHandlerImpl, getImplementationName_DocumentHandlerImpl, 79 getSupportedServiceNames_DocumentHandlerImpl, ::cppu::createSingleComponentFactory, 80 0, 0 81 }, 82 { 83 create_XMLBasicExporter, getImplementationName_XMLBasicExporter, 84 getSupportedServiceNames_XMLBasicExporter, ::cppu::createSingleComponentFactory, 85 0, 0 86 }, 87 { 88 create_XMLOasisBasicExporter, getImplementationName_XMLOasisBasicExporter, 89 getSupportedServiceNames_XMLOasisBasicExporter, ::cppu::createSingleComponentFactory, 90 0, 0 91 }, 92 { 93 create_XMLBasicImporter, getImplementationName_XMLBasicImporter, 94 getSupportedServiceNames_XMLBasicImporter, ::cppu::createSingleComponentFactory, 95 0, 0 96 }, 97 { 98 create_XMLOasisBasicImporter, getImplementationName_XMLOasisBasicImporter, 99 getSupportedServiceNames_XMLOasisBasicImporter, ::cppu::createSingleComponentFactory, 100 0, 0 101 }, 102 { 0, 0, 0, 0, 0, 0 } 103 }; 104 } 105 106 // ============================================================================= 107 108 extern "C" 109 { 110 void SAL_CALL component_getImplementationEnvironment( 111 const sal_Char ** ppEnvTypeName, uno_Environment ** ) 112 { 113 *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; 114 } 115 116 // ----------------------------------------------------------------------------- 117 118 void * SAL_CALL component_getFactory( 119 const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey ) 120 { 121 return ::cppu::component_getFactoryHelper( 122 pImplName, pServiceManager, pRegistryKey, ::xmlscript::s_entries ); 123 } 124 } 125