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"
28 namespace writerfilter
33 /// Handler for floating table positioning
34 class TablePositionHandler
35 : public LoggedProperties
37 OUString m_aVertAnchor
;
39 OUString m_aHorzAnchor
;
43 sal_Int32 m_nLeftFromText
= 0;
44 sal_Int32 m_nRightFromText
= 0;
45 sal_Int32 m_nTopFromText
= 0;
46 sal_Int32 m_nBottomFromText
= 0;
49 void lcl_attribute(Id nId
, Value
& rVal
) override
;
50 void lcl_sprm(Sprm
& sprm
) override
;
53 sal_Int32
getY() const
57 sal_Int32
getX() const
61 sal_Int32
getLeftFromText() const
63 return m_nLeftFromText
;
65 sal_Int32
getRightFromText() const
67 return m_nRightFromText
;
69 sal_Int32
getTopFromText() const
71 return m_nTopFromText
;
73 sal_Int32
getBottomFromText() const
75 return m_nBottomFromText
;
78 const OUString
& getVertAnchor() const
82 const OUString
& getYSpec() const
86 const OUString
& getHorzAnchor() const
90 const OUString
& getXSpec() const
95 TablePositionHandler();
96 ~TablePositionHandler() override
;
98 /** Compute the UNO properties for the frame containing the table based
99 on the received tokens.
101 Note that the properties will need to be adjusted with the table
102 properties before actually using them.
104 css::uno::Sequence
<css::beans::PropertyValue
> getTablePosition() const;
106 bool operator== (const TablePositionHandler
& rHandler
) const;
109 using TablePositionHandlerPtr
= tools::SvRef
<TablePositionHandler
>;
110 } // namespace dmapper
111 } // namespace writerfilter
115 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */