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 * 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
24 #include <com/sun/star/drawing/PointSequenceSequence.hpp>
25 #include "LoggedResources.hxx"
26 #include <tools/fract.hxx>
29 namespace writerfilter
{
32 class WrapPolygon final
: public virtual SvRefBase
35 typedef std::vector
<css::awt::Point
> Points_t
;
36 typedef ::tools::SvRef
<WrapPolygon
> Pointer_t
;
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
61 virtual ~WrapPolygonHandler() override
;
63 const WrapPolygon::Pointer_t
& getPolygon() { return mpPolygon
;}
66 WrapPolygon::Pointer_t mpPolygon
;
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: */