merge the formfield patch from ooo-build
[ooovba.git] / xmloff / inc / txtimppr.hxx
blob19cccdaf16606debe3e17617583cad544652a450
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: txtimppr.hxx,v $
10 * $Revision: 1.4 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _XMLOFF_TXTIMPPR_HXX
31 #define _XMLOFF_TXTIMPPR_HXX
33 #include "xmloff/dllapi.h"
34 #include <xmloff/xmlimppr.hxx>
36 class XMLFontStylesContext;
38 class XMLOFF_DLLPUBLIC XMLTextImportPropertyMapper : public SvXMLImportPropertyMapper
40 sal_Int32 nSizeTypeIndex;
41 sal_Int32 nWidthTypeIndex;
42 SvXMLImportContextRef xFontDecls;
44 void FontFinished(
45 XMLPropertyState *pFontFamilyNameState,
46 XMLPropertyState *pFontStyleNameState,
47 XMLPropertyState *pFontFamilyState,
48 XMLPropertyState *pFontPitchState,
49 XMLPropertyState *pFontCharsetState ) const;
51 void FontDefaultsCheck(
52 XMLPropertyState*pFontFamilyName,
53 XMLPropertyState* pFontStyleName,
54 XMLPropertyState* pFontFamily,
55 XMLPropertyState* pFontPitch,
56 XMLPropertyState* pFontCharSet,
57 XMLPropertyState** ppNewFontStyleName,
58 XMLPropertyState** ppNewFontFamily,
59 XMLPropertyState** ppNewFontPitch,
60 XMLPropertyState** ppNewFontCharSet ) const;
62 protected:
63 virtual sal_Bool handleSpecialItem(
64 XMLPropertyState& rProperty,
65 ::std::vector< XMLPropertyState >& rProperties,
66 const ::rtl::OUString& rValue,
67 const SvXMLUnitConverter& rUnitConverter,
68 const SvXMLNamespaceMap& rNamespaceMap ) const;
69 public:
70 XMLTextImportPropertyMapper(
71 const UniReference< XMLPropertySetMapper >& rMapper,
72 SvXMLImport& rImport,
73 XMLFontStylesContext *pFontDecls = 0 );
74 virtual ~XMLTextImportPropertyMapper();
76 void SetFontDecls( XMLFontStylesContext *pFontDecls );
78 /** This method is called when all attributes have benn processed. It may be used to remove items that are incomplete */
79 virtual void finished(
80 ::std::vector< XMLPropertyState >& rProperties,
81 sal_Int32 nStartIndex, sal_Int32 nEndIndex ) const;
84 #endif // _XMLOFF_XMLIMPPR_HXX