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