lok: vcl: fix multiple floatwin removal case more robustly.
[LibreOffice.git] / writerfilter / source / dmapper / TablePositionHandler.hxx
blob345a4a01fe7394565451e435c0e132ae893af138
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 "LoggedResources.hxx"
13 #include <memory>
15 namespace com
17 namespace sun
19 namespace star
21 namespace beans
23 struct PropertyValue;
29 namespace writerfilter
31 namespace dmapper
34 /// Handler for floating table positioning
35 class TablePositionHandler
36 : public LoggedProperties
38 OUString m_aVertAnchor;
39 OUString m_aYSpec;
40 OUString m_aHorzAnchor;
41 OUString m_aXSpec;
42 sal_Int32 m_nY = 0;
43 sal_Int32 m_nX = 0;
44 sal_Int32 m_nLeftFromText = 0;
45 sal_Int32 m_nRightFromText = 0;
46 sal_Int32 m_nTopFromText = 0;
47 sal_Int32 m_nBottomFromText = 0;
49 // Properties
50 void lcl_attribute(Id nId, Value& rVal) override;
51 void lcl_sprm(Sprm& sprm) override;
53 public:
54 sal_Int32 getY()
56 return m_nY;
58 sal_Int32 getX()
60 return m_nX;
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()
81 return m_aVertAnchor;
83 const OUString& getYSpec()
85 return m_aYSpec;
87 const OUString& getHorzAnchor()
89 return m_aHorzAnchor;
91 const OUString& getXSpec()
93 return m_aXSpec;
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
114 #endif
116 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */