lok: vcl: fix multiple floatwin removal case more robustly.
[LibreOffice.git] / writerfilter / source / dmapper / WrapPolygonHandler.hxx
blobd1e274ca9304d33842eb64574ef189d48497c71a
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/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_WRITERFILTER_SOURCE_DMAPPER_WRAPPOLYGONHANDLER_HXX
21 #define INCLUDED_WRITERFILTER_SOURCE_DMAPPER_WRAPPOLYGONHANDLER_HXX
23 #include <deque>
24 #include <com/sun/star/drawing/PointSequenceSequence.hpp>
25 #include "LoggedResources.hxx"
26 #include <tools/fract.hxx>
27 #include <vector>
29 namespace writerfilter {
30 namespace dmapper {
32 class WrapPolygon final : public virtual SvRefBase
34 public:
35 typedef std::vector<css::awt::Point> Points_t;
36 typedef ::tools::SvRef<WrapPolygon> Pointer_t;
38 private:
39 Points_t mPoints;
41 public:
42 WrapPolygon();
43 ~WrapPolygon() override;
45 void addPoint(const css::awt::Point & rPoint);
47 Points_t::iterator begin();
48 Points_t::iterator end();
50 WrapPolygon::Pointer_t move(const css::awt::Point & rMove);
51 WrapPolygon::Pointer_t scale(const Fraction & rFractionX, const Fraction & rFractionY);
52 WrapPolygon::Pointer_t correctWordWrapPolygon(const css::awt::Size & rSrcSize);
53 WrapPolygon::Pointer_t correctWordWrapPolygonPixel(const css::awt::Size & rSrcSize);
54 css::drawing::PointSequenceSequence getPointSequenceSequence() const;
57 class WrapPolygonHandler : public LoggedProperties
59 public:
60 WrapPolygonHandler();
61 virtual ~WrapPolygonHandler() override;
63 const WrapPolygon::Pointer_t& getPolygon() { return mpPolygon;}
65 private:
66 WrapPolygon::Pointer_t mpPolygon;
68 sal_Int32 mnX;
69 sal_Int32 mnY;
71 // Properties
72 virtual void lcl_attribute(Id Name, Value & val) override;
73 virtual void lcl_sprm(Sprm & sprm) override;
79 #endif // INCLUDED_WRITERFILTER_SOURCE_DMAPPER_WRAPPOLYGONHANDLER_HXX
81 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */