1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef _XMLOFF_FORMS_CONTROLPROPERTYHDL_HXX_
21 #define _XMLOFF_FORMS_CONTROLPROPERTYHDL_HXX_
23 #include "sal/config.h"
24 #include "xmloff/dllapi.h"
25 #include <xmloff/prhdlfac.hxx>
26 #include <rtl/ref.hxx>
27 #include <rtl/ustring.hxx>
28 #include <xmloff/xmlexppr.hxx>
29 #include <xmloff/XMLConstantsPropertyHandler.hxx>
31 struct SvXMLEnumMapEntry
;
33 //.........................................................................
36 //.........................................................................
38 class IFormsExportContext
;
39 class OFormLayerXMLImport_Impl
;
41 //=====================================================================
42 //= ORotationAngleHandler
43 //=====================================================================
44 class ORotationAngleHandler
: public XMLPropertyHandler
47 ORotationAngleHandler();
49 virtual sal_Bool
importXML( const OUString
& _rStrImpValue
, ::com::sun::star::uno::Any
& _rValue
, const SvXMLUnitConverter
& _rUnitConverter
) const;
50 virtual sal_Bool
exportXML( OUString
& _rStrExpValue
, const ::com::sun::star::uno::Any
& _rValue
, const SvXMLUnitConverter
& _rUnitConverter
) const;
53 //=====================================================================
55 //=====================================================================
56 class OFontWidthHandler
: public XMLPropertyHandler
61 virtual sal_Bool
importXML( const OUString
& _rStrImpValue
, ::com::sun::star::uno::Any
& _rValue
, const SvXMLUnitConverter
& _rUnitConverter
) const;
62 virtual sal_Bool
exportXML( OUString
& _rStrExpValue
, const ::com::sun::star::uno::Any
& _rValue
, const SvXMLUnitConverter
& _rUnitConverter
) const;
65 //=====================================================================
66 //= OControlBorderHandlerBase
67 //=====================================================================
68 class OControlBorderHandler
: public XMLPropertyHandler
77 OControlBorderHandler( const BorderFacet _eFacet
);
79 virtual sal_Bool
importXML( const OUString
& _rStrImpValue
, ::com::sun::star::uno::Any
& _rValue
, const SvXMLUnitConverter
& _rUnitConverter
) const;
80 virtual sal_Bool
exportXML( OUString
& _rStrExpValue
, const ::com::sun::star::uno::Any
& _rValue
, const SvXMLUnitConverter
& _rUnitConverter
) const;
86 //=====================================================================
87 //= OControlTextEmphasisHandler
88 //=====================================================================
89 class OControlTextEmphasisHandler
: public XMLPropertyHandler
92 OControlTextEmphasisHandler();
94 virtual sal_Bool
importXML( const OUString
& _rStrImpValue
, ::com::sun::star::uno::Any
& _rValue
, const SvXMLUnitConverter
& _rUnitConverter
) const;
95 virtual sal_Bool
exportXML( OUString
& _rStrExpValue
, const ::com::sun::star::uno::Any
& _rValue
, const SvXMLUnitConverter
& _rUnitConverter
) const;
98 //=====================================================================
99 //= ImageScaleModeHandler
100 //=====================================================================
101 class XMLOFF_DLLPUBLIC ImageScaleModeHandler
: public XMLConstantsPropertyHandler
104 ImageScaleModeHandler();
107 //=====================================================================
108 //= OControlPropertyHandlerFactory
109 //=====================================================================
110 class XMLOFF_DLLPUBLIC OControlPropertyHandlerFactory
: public XMLPropertyHandlerFactory
113 mutable XMLConstantsPropertyHandler
* m_pTextAlignHandler
;
114 mutable OControlBorderHandler
* m_pControlBorderStyleHandler
;
115 mutable OControlBorderHandler
* m_pControlBorderColorHandler
;
116 mutable ORotationAngleHandler
* m_pRotationAngleHandler
;
117 mutable OFontWidthHandler
* m_pFontWidthHandler
;
118 mutable XMLConstantsPropertyHandler
* m_pFontEmphasisHandler
;
119 mutable XMLConstantsPropertyHandler
* m_pFontReliefHandler
;
122 virtual ~OControlPropertyHandlerFactory();
125 OControlPropertyHandlerFactory();
127 virtual const XMLPropertyHandler
* GetPropertyHandler(sal_Int32 _nType
) const;
130 //.........................................................................
131 } // namespace xmloff
132 //.........................................................................
134 #endif // _XMLOFF_FORMS_CONTROLPROPERTYHDL_HXX_
136 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */