tdf#154285 Check upper bound of arguments in SbRtl_Minute function
[LibreOffice.git] / cppcanvas / source / wrapper / implcanvas.hxx
blobcc49c819eeefd713abafb92d4abb88802b106945
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 #pragma once
22 #include <com/sun/star/uno/Reference.hxx>
23 #include <com/sun/star/rendering/ViewState.hpp>
24 #include <cppcanvas/canvas.hxx>
26 #include <optional>
27 #include <basegfx/polygon/b2dpolypolygon.hxx>
30 namespace basegfx
32 class B2DHomMatrix;
33 class B2DPolyPolygon;
36 namespace com::sun::star::rendering
38 class XCanvas;
42 /* Definition of ImplCanvas */
44 namespace cppcanvas::internal
47 class ImplCanvas : public virtual Canvas
49 public:
50 explicit ImplCanvas( css::uno::Reference< css::rendering::XCanvas > xCanvas );
51 virtual ~ImplCanvas() override;
53 ImplCanvas(ImplCanvas const &) = default;
54 ImplCanvas(ImplCanvas &&) = default;
55 ImplCanvas & operator =(ImplCanvas const &) = delete; // due to const mxCanvas
56 ImplCanvas & operator =(ImplCanvas &&) = delete; // due to const mxCanvas
58 virtual void setTransformation( const ::basegfx::B2DHomMatrix& rMatrix ) override;
59 virtual ::basegfx::B2DHomMatrix getTransformation() const override;
61 virtual void setClip( const ::basegfx::B2DPolyPolygon& rClipPoly ) override;
62 virtual void setClip() override;
63 virtual ::basegfx::B2DPolyPolygon const* getClip() const override;
65 virtual CanvasSharedPtr clone() const override;
67 virtual void clear() const override;
69 virtual css::uno::Reference<
70 css::rendering::XCanvas > getUNOCanvas() const override;
72 virtual css::rendering::ViewState getViewState() const override;
74 private:
75 mutable css::rendering::ViewState maViewState;
76 std::optional<basegfx::B2DPolyPolygon> maClipPolyPolygon;
77 const css::uno::Reference< css::rendering::XCanvas > mxCanvas;
82 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */