1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef _XMLOFF_METAIMPORTCOMPONENT_HXX
25 #define _XMLOFF_METAIMPORTCOMPONENT_HXX
26 
27 #include <xmloff/xmlimp.hxx>
28 
29 #include <com/sun/star/uno/Reference.hxx>
30 #include <com/sun/star/document/XDocumentProperties.hpp>
31 
32 
33 class XMLMetaImportComponent : public SvXMLImport
34 {
35 private:
36 	::com::sun::star::uno::Reference<
37 		::com::sun::star::document::XDocumentProperties> mxDocProps;
38 
39 public:
40 	// #110680#
41 	// XMLMetaImportComponent() throw();
42 	XMLMetaImportComponent(
43 		const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory
44 		) throw();
45 
46 	virtual ~XMLMetaImportComponent() throw();
47 
48 
49 protected:
50 
51 	virtual SvXMLImportContext* CreateContext(
52 		sal_uInt16 nPrefix,
53 		const ::rtl::OUString& rLocalName,
54 		const ::com::sun::star::uno::Reference<
55 			::com::sun::star::xml::sax::XAttributeList > & xAttrList );
56 
57 	// XImporter
58     virtual void SAL_CALL setTargetDocument( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& xDoc )
59         throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
60 };
61 
62 
63 // global functions to support the component
64 
65 ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL
66 	XMLMetaImportComponent_getSupportedServiceNames()
67 	throw();
68 
69 ::rtl::OUString SAL_CALL XMLMetaImportComponent_getImplementationName()
70 	throw();
71 
72 ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL
73 	XMLMetaImportComponent_createInstance(
74 		const ::com::sun::star::uno::Reference<
75 			::com::sun::star::lang::XMultiServiceFactory > & )
76 	throw( ::com::sun::star::uno::Exception );
77 
78 #endif
79 
80