xref: /trunk/main/xmloff/source/text/txtexppr.hxx (revision ecfe53c5)
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 #ifndef _XMLOFF_TXTEXPPR_HXX
24 #define _XMLOFF_TXTEXPPR_HXX
25 
26 
27 #include <xmloff/xmlexppr.hxx>
28 #include "txtdrope.hxx"
29 #include "xmloff/xmltabe.hxx"
30 #include "XMLTextColumnsExport.hxx"
31 #ifndef _XMLOFF_XMLBACKGROUNDIMAGEEXPORT_HXX
32 #include "XMLBackgroundImageExport.hxx"
33 #endif
34 
35 class SvXMLExport;
36 class XMLTextExportPropertySetMapper: public SvXMLExportPropertyMapper
37 {
38 	SvXMLExport& rExport;
39 
40 	::rtl::OUString sDropCharStyle;
41 	sal_Bool bDropWholeWord;
42 
43 	void ContextFontFilter(
44 				XMLPropertyState *pFontNameState,
45 				XMLPropertyState *pFontFamilyNameState,
46 				XMLPropertyState *pFontStyleNameState,
47 				XMLPropertyState *pFontFamilyState,
48 				XMLPropertyState *pFontPitchState,
49 				XMLPropertyState *pFontCharsetState ) const;
50 	void ContextFontHeightFilter(
51 				XMLPropertyState* pCharHeightState,
52 				XMLPropertyState* pCharPropHeightState,
53 				XMLPropertyState* pCharDiffHeightState ) const;
54 
55 protected:
56 //	SvXMLUnitConverter& mrUnitConverter;
57 //	const Reference< xml::sax::XDocumentHandler > & mrHandler;
58 	XMLTextDropCapExport maDropCapExport;
59 	SvxXMLTabStopExport maTabStopExport;
60 	XMLTextColumnsExport maTextColumnsExport;
61 	XMLBackgroundImageExport maBackgroundImageExport;
62 
63 	/** Application-specific filter. By default do nothing. */
64 	virtual void ContextFilter(
65 			::std::vector< XMLPropertyState >& rProperties,
66 		    ::com::sun::star::uno::Reference<
67 						::com::sun::star::beans::XPropertySet > rPropSet ) const;
GetExport() const68 	const SvXMLExport& GetExport() const { return rExport; }
69 
70 public:
71 
72 	XMLTextExportPropertySetMapper(
73 			const UniReference< XMLPropertySetMapper >& rMapper,
74 			SvXMLExport& rExt );
75 	virtual ~XMLTextExportPropertySetMapper();
76 
77 	virtual void handleElementItem(
78         SvXMLExport& rExport,
79 		const XMLPropertyState& rProperty,
80 		sal_uInt16 nFlags,
81 		const ::std::vector< XMLPropertyState > *pProperties = 0,
82 		sal_uInt32 nIdx = 0 ) const;
83 
84 	virtual void handleSpecialItem(
85 		SvXMLAttributeList& rAttrList,
86 		const XMLPropertyState& rProperty,
87 		const SvXMLUnitConverter& rUnitConverter,
88 		const SvXMLNamespaceMap& rNamespaceMap,
89 		const ::std::vector< XMLPropertyState > *pProperties = 0,
90 		sal_uInt32 nIdx = 0 ) const;
91 };
92 
93 
94 #endif
95