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 INCLUDED_XMLOFF_CONTROLPROPERTYHDL_HXX
21 #define INCLUDED_XMLOFF_CONTROLPROPERTYHDL_HXX
23 #include <sal/config.h>
27 #include <xmloff/dllapi.h>
28 #include <xmloff/prhdlfac.hxx>
29 #include <rtl/ref.hxx>
30 #include <rtl/ustring.hxx>
31 #include <xmloff/xmlexppr.hxx>
32 #include <xmloff/XMLConstantsPropertyHandler.hxx>
34 template<typename EnumT
> struct SvXMLEnumMapEntry
;
41 class IFormsExportContext
;
42 class OFormLayerXMLImport_Impl
;
45 //= ORotationAngleHandler
47 class ORotationAngleHandler
: public XMLPropertyHandler
50 ORotationAngleHandler();
52 virtual bool importXML( const OUString
& _rStrImpValue
, css::uno::Any
& _rValue
, const SvXMLUnitConverter
& _rUnitConverter
) const override
;
53 virtual bool exportXML( OUString
& _rStrExpValue
, const css::uno::Any
& _rValue
, const SvXMLUnitConverter
& _rUnitConverter
) const override
;
59 class OFontWidthHandler
: public XMLPropertyHandler
64 virtual bool importXML( const OUString
& _rStrImpValue
, css::uno::Any
& _rValue
, const SvXMLUnitConverter
& _rUnitConverter
) const override
;
65 virtual bool exportXML( OUString
& _rStrExpValue
, const css::uno::Any
& _rValue
, const SvXMLUnitConverter
& _rUnitConverter
) const override
;
69 //= OControlBorderHandlerBase
71 class OControlBorderHandler
: public XMLPropertyHandler
80 OControlBorderHandler( const BorderFacet _eFacet
);
82 virtual bool importXML( const OUString
& _rStrImpValue
, css::uno::Any
& _rValue
, const SvXMLUnitConverter
& _rUnitConverter
) const override
;
83 virtual bool exportXML( OUString
& _rStrExpValue
, const css::uno::Any
& _rValue
, const SvXMLUnitConverter
& _rUnitConverter
) const override
;
90 //= OControlTextEmphasisHandler
92 class OControlTextEmphasisHandler
: public XMLPropertyHandler
95 OControlTextEmphasisHandler();
97 virtual bool importXML( const OUString
& _rStrImpValue
, css::uno::Any
& _rValue
, const SvXMLUnitConverter
& _rUnitConverter
) const override
;
98 virtual bool exportXML( OUString
& _rStrExpValue
, const css::uno::Any
& _rValue
, const SvXMLUnitConverter
& _rUnitConverter
) const override
;
102 //= ImageScaleModeHandler
104 class XMLOFF_DLLPUBLIC ImageScaleModeHandler
: public XMLConstantsPropertyHandler
107 ImageScaleModeHandler();
111 //= OControlPropertyHandlerFactory
113 class XMLOFF_DLLPUBLIC OControlPropertyHandlerFactory
: public XMLPropertyHandlerFactory
115 mutable std::unique_ptr
<XMLConstantsPropertyHandler
> m_pTextAlignHandler
;
116 mutable std::unique_ptr
<OControlBorderHandler
> m_pControlBorderStyleHandler
;
117 mutable std::unique_ptr
<OControlBorderHandler
> m_pControlBorderColorHandler
;
118 mutable std::unique_ptr
<ORotationAngleHandler
> m_pRotationAngleHandler
;
119 mutable std::unique_ptr
<OFontWidthHandler
> m_pFontWidthHandler
;
120 mutable std::unique_ptr
<XMLConstantsPropertyHandler
> m_pFontEmphasisHandler
;
121 mutable std::unique_ptr
<XMLConstantsPropertyHandler
> m_pFontReliefHandler
;
124 OControlPropertyHandlerFactory();
126 virtual const XMLPropertyHandler
* GetPropertyHandler(sal_Int32 _nType
) const override
;
130 } // namespace xmloff
133 #endif // INCLUDED_XMLOFF_CONTROLPROPERTYHDL_HXX
135 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */