Branch libreoffice-5-0-4
[LibreOffice.git] / include / xmloff / controlpropertyhdl.hxx
blobed59bfd0833fc49f150538d8f17b8f5d8249d0d5
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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>
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;
32 class Color;
34 namespace xmloff
38 class IFormsExportContext;
39 class OFormLayerXMLImport_Impl;
42 //= ORotationAngleHandler
44 class ORotationAngleHandler : public XMLPropertyHandler
46 public:
47 ORotationAngleHandler();
49 virtual bool importXML( const OUString& _rStrImpValue, ::com::sun::star::uno::Any& _rValue, const SvXMLUnitConverter& _rUnitConverter ) const SAL_OVERRIDE;
50 virtual bool exportXML( OUString& _rStrExpValue, const ::com::sun::star::uno::Any& _rValue, const SvXMLUnitConverter& _rUnitConverter ) const SAL_OVERRIDE;
54 //= OFontWidthHandler
56 class OFontWidthHandler : public XMLPropertyHandler
58 public:
59 OFontWidthHandler();
61 virtual bool importXML( const OUString& _rStrImpValue, ::com::sun::star::uno::Any& _rValue, const SvXMLUnitConverter& _rUnitConverter ) const SAL_OVERRIDE;
62 virtual bool exportXML( OUString& _rStrExpValue, const ::com::sun::star::uno::Any& _rValue, const SvXMLUnitConverter& _rUnitConverter ) const SAL_OVERRIDE;
66 //= OControlBorderHandlerBase
68 class OControlBorderHandler : public XMLPropertyHandler
70 public:
71 enum BorderFacet
73 STYLE,
74 COLOR
77 OControlBorderHandler( const BorderFacet _eFacet );
79 virtual bool importXML( const OUString& _rStrImpValue, ::com::sun::star::uno::Any& _rValue, const SvXMLUnitConverter& _rUnitConverter ) const SAL_OVERRIDE;
80 virtual bool exportXML( OUString& _rStrExpValue, const ::com::sun::star::uno::Any& _rValue, const SvXMLUnitConverter& _rUnitConverter ) const SAL_OVERRIDE;
82 private:
83 BorderFacet m_eFacet;
87 //= OControlTextEmphasisHandler
89 class OControlTextEmphasisHandler : public XMLPropertyHandler
91 public:
92 OControlTextEmphasisHandler();
94 virtual bool importXML( const OUString& _rStrImpValue, ::com::sun::star::uno::Any& _rValue, const SvXMLUnitConverter& _rUnitConverter ) const SAL_OVERRIDE;
95 virtual bool exportXML( OUString& _rStrExpValue, const ::com::sun::star::uno::Any& _rValue, const SvXMLUnitConverter& _rUnitConverter ) const SAL_OVERRIDE;
99 //= ImageScaleModeHandler
101 class XMLOFF_DLLPUBLIC ImageScaleModeHandler : public XMLConstantsPropertyHandler
103 public:
104 ImageScaleModeHandler();
108 //= OControlPropertyHandlerFactory
110 class XMLOFF_DLLPUBLIC OControlPropertyHandlerFactory : public XMLPropertyHandlerFactory
112 protected:
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;
121 protected:
122 virtual ~OControlPropertyHandlerFactory();
124 public:
125 OControlPropertyHandlerFactory();
127 virtual const XMLPropertyHandler* GetPropertyHandler(sal_Int32 _nType) const SAL_OVERRIDE;
131 } // namespace xmloff
134 #endif // INCLUDED_XMLOFF_CONTROLPROPERTYHDL_HXX
136 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */