Bump version to 4.3-4
[LibreOffice.git] / writerfilter / source / dmapper / TablePositionHandler.hxx
blobbabb1809d2a8c5b5e376c1b481b30c8f4a93e2f9
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/.
8 */
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
18 namespace dmapper
21 /// Handler for floating table positioning
22 class TablePositionHandler
23 : public LoggedProperties
25 OUString m_aVertAnchor;
26 OUString m_aYSpec;
27 OUString m_aHorzAnchor;
28 OUString m_aXSpec;
29 sal_Int32 m_nY;
30 sal_Int32 m_nX;
31 sal_Int32 m_nLeftFromText;
32 sal_Int32 m_nRightFromText;
33 sal_Int32 m_nTopFromText;
34 sal_Int32 m_nBottomFromText;
36 // Properties
37 virtual void lcl_attribute(Id Name, Value& val) SAL_OVERRIDE;
38 virtual void lcl_sprm(Sprm& sprm) SAL_OVERRIDE;
40 public:
41 sal_Int32 getY()
43 return m_nY;
45 sal_Int32 getX()
47 return m_nX;
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()
68 return m_aVertAnchor;
70 OUString getYSpec()
72 return m_aYSpec;
74 OUString getHorzAnchor()
76 return m_aHorzAnchor;
78 OUString getXSpec()
80 return m_aXSpec;
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
101 #endif
103 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */