LibreOffice Module xmloff (master) 1
controlpropertyhdl.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#ifndef INCLUDED_XMLOFF_CONTROLPROPERTYHDL_HXX
21#define INCLUDED_XMLOFF_CONTROLPROPERTYHDL_HXX
22
23#include <sal/config.h>
24
25#include <memory>
26
27#include <xmloff/dllapi.h>
28#include <xmloff/prhdlfac.hxx>
29#include <rtl/ustring.hxx>
32
33namespace xmloff
34{
35
36
37 //= ORotationAngleHandler
38
40 {
41 public:
42 SAL_DLLPRIVATE ORotationAngleHandler();
43
44 SAL_DLLPRIVATE virtual bool importXML( const OUString& _rStrImpValue, css::uno::Any& _rValue, const SvXMLUnitConverter& _rUnitConverter ) const override;
45 SAL_DLLPRIVATE virtual bool exportXML( OUString& _rStrExpValue, const css::uno::Any& _rValue, const SvXMLUnitConverter& _rUnitConverter ) const override;
46 };
47
48
49 //= OFontWidthHandler
50
52 {
53 public:
54 SAL_DLLPRIVATE OFontWidthHandler();
55
56 SAL_DLLPRIVATE virtual bool importXML( const OUString& _rStrImpValue, css::uno::Any& _rValue, const SvXMLUnitConverter& _rUnitConverter ) const override;
57 SAL_DLLPRIVATE virtual bool exportXML( OUString& _rStrExpValue, const css::uno::Any& _rValue, const SvXMLUnitConverter& _rUnitConverter ) const override;
58 };
59
60
61 //= OControlBorderHandlerBase
62
64 {
65 public:
67 {
69 COLOR
70 };
71
72 SAL_DLLPRIVATE OControlBorderHandler( const BorderFacet _eFacet );
73
74 SAL_DLLPRIVATE virtual bool importXML( const OUString& _rStrImpValue, css::uno::Any& _rValue, const SvXMLUnitConverter& _rUnitConverter ) const override;
75 SAL_DLLPRIVATE virtual bool exportXML( OUString& _rStrExpValue, const css::uno::Any& _rValue, const SvXMLUnitConverter& _rUnitConverter ) const override;
76
77 private:
79 };
80
81
82 //= OControlTextEmphasisHandler
83
85 {
86 public:
88
89 virtual bool importXML( const OUString& _rStrImpValue, css::uno::Any& _rValue, const SvXMLUnitConverter& _rUnitConverter ) const override;
90 virtual bool exportXML( OUString& _rStrExpValue, const css::uno::Any& _rValue, const SvXMLUnitConverter& _rUnitConverter ) const override;
91 };
92
93
94 //= ImageScaleModeHandler
95
97 {
98 public:
100 };
101
102
103 //= OControlPropertyHandlerFactory
104
106 {
107 mutable std::unique_ptr<XMLConstantsPropertyHandler> m_pTextAlignHandler;
108 mutable std::unique_ptr<OControlBorderHandler> m_pControlBorderStyleHandler;
109 mutable std::unique_ptr<OControlBorderHandler> m_pControlBorderColorHandler;
110 mutable std::unique_ptr<ORotationAngleHandler> m_pRotationAngleHandler;
111 mutable std::unique_ptr<OFontWidthHandler> m_pFontWidthHandler;
112 mutable std::unique_ptr<XMLConstantsPropertyHandler> m_pFontEmphasisHandler;
113 mutable std::unique_ptr<XMLConstantsPropertyHandler> m_pFontReliefHandler;
114 mutable std::unique_ptr<XMLNamedBoolPropertyHdl> m_pTextLineModeHandler;
115
116 public:
118
119 virtual const XMLPropertyHandler* GetPropertyHandler(sal_Int32 _nType) const override;
120 };
121
122
123} // namespace xmloff
124
125
126#endif // INCLUDED_XMLOFF_CONTROLPROPERTYHDL_HXX
127
128/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
the SvXMLTypeConverter converts values of various types from their internal representation to the tex...
Definition: xmluconv.hxx:83
Abstract base-class for different XML-types.
This class is a base-class to create XMLPropertyHandler.
Definition: prhdlfac.hxx:41
Abstract base-class for different XML-types.
Definition: xmlprhdl.hxx:36
std::unique_ptr< XMLConstantsPropertyHandler > m_pFontEmphasisHandler
std::unique_ptr< OControlBorderHandler > m_pControlBorderColorHandler
std::unique_ptr< XMLNamedBoolPropertyHdl > m_pTextLineModeHandler
std::unique_ptr< XMLConstantsPropertyHandler > m_pFontReliefHandler
std::unique_ptr< OFontWidthHandler > m_pFontWidthHandler
std::unique_ptr< XMLConstantsPropertyHandler > m_pTextAlignHandler
std::unique_ptr< OControlBorderHandler > m_pControlBorderStyleHandler
std::unique_ptr< ORotationAngleHandler > m_pRotationAngleHandler
virtual bool exportXML(OUString &_rStrExpValue, const css::uno::Any &_rValue, const SvXMLUnitConverter &_rUnitConverter) const override
Exports the given value according to the XML-data-type corresponding to the derived class.
virtual bool importXML(const OUString &_rStrImpValue, css::uno::Any &_rValue, const SvXMLUnitConverter &_rUnitConverter) const override
Imports the given value according to the XML-data-type corresponding to the derived class.
#define XMLOFF_DLLPUBLIC
Definition: dllapi.h:29
XMLOFF_DLLPUBLIC bool importXML(css::uno::Reference< css::xml::sax::XFastAttributeList > const &xAttrList, css::uno::Any &rValue, OUString &rStrName, SvXMLImport &rImport)
XMLOFF_DLLPUBLIC void exportXML(OUString const &rStrName, css::uno::Any const &rValue, SvXMLExport &rExport)
static const XMLPropertyHandler * GetPropertyHandler(sal_Int32 nType)
Definition: txtprhdl.cxx:1240