xref: /trunk/main/sw/source/filter/xml/xmlbrshi.hxx (revision 1d2dbeb0)
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 SW_XMLBRSHI_HXX
25 #define SW_XMLBRSHI_HXX
26 
27 #include <com/sun/star/io/XOutputStream.hpp>
28 
29 #include <xmloff/xmlictxt.hxx>
30 
31 class SvXMLImport;
32 class SvXMLUnitConverter;
33 class SvxBrushItem;
34 
35 namespace rtl { class OUString; }
36 namespace com { namespace sun { namespace star {
37 	namespace io { class XOutputStream; }
38 } } }
39 
40 class SwXMLBrushItemImportContext : public SvXMLImportContext
41 {
42 private:
43 	::com::sun::star::uno::Reference < ::com::sun::star::io::XOutputStream > xBase64Stream;
44 	SvxBrushItem				*pItem;
45 
46 	void ProcessAttrs(
47 			const ::com::sun::star::uno::Reference<
48 					::com::sun::star::xml::sax::XAttributeList > & xAttrList,
49 		   	const SvXMLUnitConverter& rUnitConv );
50 
51 public:
52 	TYPEINFO();
53 
54 	SwXMLBrushItemImportContext(
55 			SvXMLImport& rImport,
56 			sal_uInt16 nPrfx,
57 			const ::rtl::OUString& rLName,
58 		    const ::com::sun::star::uno::Reference<
59 					::com::sun::star::xml::sax::XAttributeList > & xAttrList,
60 			const SvXMLUnitConverter& rUnitConv,
61 		   	const SvxBrushItem& rItem	);
62 
63 	SwXMLBrushItemImportContext(
64 			SvXMLImport& rImport,
65 			sal_uInt16 nPrfx,
66 			const ::rtl::OUString& rLName,
67 			const ::com::sun::star::uno::Reference<
68 					::com::sun::star::xml::sax::XAttributeList > & xAttrList,
69 			const SvXMLUnitConverter& rUnitConv,
70 			sal_uInt16 nWhich	);
71 
72 	virtual ~SwXMLBrushItemImportContext();
73 
74 	virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
75 				const ::rtl::OUString& rLocalName,
76 			 	const ::com::sun::star::uno::Reference<
77 					::com::sun::star::xml::sax::XAttributeList > & xAttrList );
78 
79 	virtual void EndElement();
80 
GetItem() const81 	const SvxBrushItem& GetItem() const { return *pItem; }
82 };
83 
84 
85 #endif	//  _XMLBRSHI_HXX
86 
87