tdf#154285 Check upper bound of arguments in SbRtl_Minute function
[LibreOffice.git] / sd / source / ui / inc / AccessibleViewForwarder.hxx
blobc791921e6f175c9a210b036e3ea87c9198d02c09
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 <svx/IAccessibleViewForwarder.hxx>
24 class SdrPaintView;
25 class OutputDevice;
27 namespace accessibility
29 /** <p>This class provides the means to transform between internal coordinates
30 and screen coordinates without giving direct access to the underlying
31 view. It represents a certain window. A call to
32 <method>GetVisArea</method> returns the corresponding visible
33 rectangle.</p>
35 @attention
36 Note, that modifications of the underlying view that lead to
37 different transformations between internal and screen coordinates or
38 change the validity of the forwarder have to be signaled separately.
40 class AccessibleViewForwarder final : public IAccessibleViewForwarder
42 public:
43 //===== internal ========================================================
45 AccessibleViewForwarder(SdrPaintView* pView, const OutputDevice& rDevice);
47 virtual ~AccessibleViewForwarder() override;
49 //===== IAccessibleViewforwarder ========================================
51 /** Returns the area of the underlying document that is visible in the
52 * corresponding window.
54 @return
55 The rectangle of the visible part of the document.
57 virtual ::tools::Rectangle GetVisibleArea() const override;
59 /** Transform the specified point from internal coordinates to an
60 absolute screen position.
62 @param rPoint
63 Point in internal coordinates.
65 @return
66 The same point but in screen coordinates relative to the upper
67 left corner of the (current) screen.
69 virtual Point LogicToPixel(const Point& rPoint) const override;
71 /** Transform the specified size from internal coordinates to a screen
72 * position.
74 @param rSize
75 Size in internal coordinates.
77 @return
78 The same size but in screen coordinates.
80 virtual Size LogicToPixel(const Size& rSize) const override;
82 private:
83 SdrPaintView* mpView;
84 sal_uInt16 mnWindowId;
86 AccessibleViewForwarder(AccessibleViewForwarder const&) = delete;
87 AccessibleViewForwarder& operator=(AccessibleViewForwarder const&) = delete;
90 } // end of namespace accessibility
92 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */