diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2024-12-04 18:10:11 +0100 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2024-12-04 20:47:14 +0100 |
commit | 3d780e72b93773a25f796feb488b0fd878c490b5 (patch) | |
tree | 7031e08095a5dc6ebc296bd71c99ebe382af2c43 /include/toolkit/helper/vclunohelper.hxx | |
parent | 2449571a3ed5f0f5daeb60db6e740a5d830afa4a (diff) |
Move helpers for css::awt/VCL point/rect/size to vcl::unohelper
Move helpers to convert between the Rectangle, Point and Size
classes in vcl and in css::awt from VCLUnoHelper (in the toolkit module)
to vcl::unohelper (in the vcl module), for reuse in vcl in upcoming
commits.
Change-Id: I7b11c8a6b8c843a01ce25b1e4c0fb1869ad1e6ee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177816
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'include/toolkit/helper/vclunohelper.hxx')
-rw-r--r-- | include/toolkit/helper/vclunohelper.hxx | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/include/toolkit/helper/vclunohelper.hxx b/include/toolkit/helper/vclunohelper.hxx index 16616119e1aa..4c364963b36b 100644 --- a/include/toolkit/helper/vclunohelper.hxx +++ b/include/toolkit/helper/vclunohelper.hxx @@ -24,9 +24,7 @@ #include <com/sun/star/uno/Reference.h> #include <com/sun/star/awt/MouseEvent.hpp> -#include <com/sun/star/awt/Point.hpp> #include <com/sun/star/awt/Rectangle.hpp> -#include <com/sun/star/awt/Size.hpp> #include <vcl/bitmapex.hxx> #include <vcl/font.hxx> @@ -125,38 +123,6 @@ public: /// @throws css::lang::IllegalArgumentException static MapUnit /* MapModeUnit */ ConvertToMapModeUnit(sal_Int16 /* com.sun.star.util.MeasureUnit.* */ _nMeasureUnit); - static inline ::Size ConvertToVCLSize(const css::awt::Size& rAWTSize) - { - return ::Size(rAWTSize.Width, rAWTSize.Height); - } - - static inline css::awt::Size ConvertToAWTSize(const Size& rVCLSize) - { - return css::awt::Size(rVCLSize.Width(), rVCLSize.Height()); - } - - static inline ::Point ConvertToVCLPoint(const css::awt::Point& rAWTPoint) - { - return ::Point(rAWTPoint.X, rAWTPoint.Y); - } - - static inline css::awt::Point ConvertToAWTPoint(const PointTemplateBase& rVCLPoint) - { - return css::awt::Point(rVCLPoint.X(), rVCLPoint.Y()); - } - - static inline ::tools::Rectangle ConvertToVCLRect(const css::awt::Rectangle& rAWTRect) - { - return ::tools::Rectangle(::Point(rAWTRect.X, rAWTRect.Y), - ::Size(rAWTRect.Width, rAWTRect.Height)); - } - - static inline css::awt::Rectangle ConvertToAWTRect(const RectangleTemplateBase& rVCLRect) - { - return css::awt::Rectangle(rVCLRect.Left(), rVCLRect.Top(), rVCLRect.GetWidth(), - rVCLRect.GetHeight()); - } - static css::awt::MouseEvent createMouseEvent( const ::MouseEvent& _rVclEvent, |