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 <resourcemodel/LoggedResources.hxx>
13 #include <boost/shared_ptr.hpp>
14 #include <com/sun/star/beans/PropertyValue.hpp>
16 namespace writerfilter
21 /// Handler for floating table positioning
22 class TablePositionHandler
23 : public LoggedProperties
25 OUString m_aVertAnchor
;
27 OUString m_aHorzAnchor
;
31 sal_Int32 m_nLeftFromText
;
32 sal_Int32 m_nRightFromText
;
33 sal_Int32 m_nTopFromText
;
34 sal_Int32 m_nBottomFromText
;
37 virtual void lcl_attribute(Id Name
, Value
& val
) SAL_OVERRIDE
;
38 virtual void lcl_sprm(Sprm
& sprm
) SAL_OVERRIDE
;
49 sal_Int32
getLeftFromText()
51 return m_nLeftFromText
;
53 sal_Int32
getRightFromText()
55 return m_nRightFromText
;
57 sal_Int32
getTopFromText()
59 return m_nTopFromText
;
61 sal_Int32
getBottomFromText()
63 return m_nBottomFromText
;
66 OUString
getVertAnchor()
74 OUString
getHorzAnchor()
83 TablePositionHandler();
84 virtual ~TablePositionHandler();
86 /** Compute the UNO properties for the frame containing the table based
87 on the received tokens.
89 Note that the properties will need to be adjusted with the table
90 properties before actually using them.
92 com::sun::star::uno::Sequence
<com::sun::star::beans::PropertyValue
> getTablePosition() const;
94 bool operator== (const TablePositionHandler
& rHandler
) const;
97 typedef boost::shared_ptr
<TablePositionHandler
> TablePositionHandlerPtr
;
98 } // namespace dmapper
99 } // namespace writerfilter
103 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */