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 #ifndef INCLUDED_WRITERFILTER_SOURCE_DMAPPER_TABLEPOSITIONHANDLER_HXX
10 #define INCLUDED_WRITERFILTER_SOURCE_DMAPPER_TABLEPOSITIONHANDLER_HXX
12 #include "LoggedResources.hxx"
29 namespace writerfilter
34 /// Handler for floating table positioning
35 class TablePositionHandler
36 : public LoggedProperties
38 OUString m_aVertAnchor
;
40 OUString m_aHorzAnchor
;
44 sal_Int32 m_nLeftFromText
= 0;
45 sal_Int32 m_nRightFromText
= 0;
46 sal_Int32 m_nTopFromText
= 0;
47 sal_Int32 m_nBottomFromText
= 0;
50 void lcl_attribute(Id nId
, Value
& rVal
) override
;
51 void lcl_sprm(Sprm
& sprm
) override
;
62 sal_Int32
getLeftFromText()
64 return m_nLeftFromText
;
66 sal_Int32
getRightFromText()
68 return m_nRightFromText
;
70 sal_Int32
getTopFromText()
72 return m_nTopFromText
;
74 sal_Int32
getBottomFromText()
76 return m_nBottomFromText
;
79 const OUString
& getVertAnchor()
83 const OUString
& getYSpec()
87 const OUString
& getHorzAnchor()
91 const OUString
& getXSpec()
96 TablePositionHandler();
97 ~TablePositionHandler() override
;
99 /** Compute the UNO properties for the frame containing the table based
100 on the received tokens.
102 Note that the properties will need to be adjusted with the table
103 properties before actually using them.
105 css::uno::Sequence
<css::beans::PropertyValue
> getTablePosition() const;
107 bool operator== (const TablePositionHandler
& rHandler
) const;
110 using TablePositionHandlerPtr
= tools::SvRef
<TablePositionHandler
>;
111 } // namespace dmapper
112 } // namespace writerfilter
116 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */