summaryrefslogtreecommitdiff
path: root/toolkit/source/awt/vclxdevice.cxx
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2024-12-04 18:10:11 +0100
committerMichael Weghorn <m.weghorn@posteo.de>2024-12-04 20:47:14 +0100
commit3d780e72b93773a25f796feb488b0fd878c490b5 (patch)
tree7031e08095a5dc6ebc296bd71c99ebe382af2c43 /toolkit/source/awt/vclxdevice.cxx
parent2449571a3ed5f0f5daeb60db6e740a5d830afa4a (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 'toolkit/source/awt/vclxdevice.cxx')
-rw-r--r--toolkit/source/awt/vclxdevice.cxx17
1 files changed, 9 insertions, 8 deletions
diff --git a/toolkit/source/awt/vclxdevice.cxx b/toolkit/source/awt/vclxdevice.cxx
index 13acc4d270ec..96f2967b4a1e 100644
--- a/toolkit/source/awt/vclxdevice.cxx
+++ b/toolkit/source/awt/vclxdevice.cxx
@@ -32,6 +32,7 @@
#include <vcl/virdev.hxx>
#include <vcl/bitmapex.hxx>
#include <vcl/metric.hxx>
+#include <vcl/unohelp.hxx>
VCLXDevice::VCLXDevice()
@@ -169,9 +170,9 @@ css::awt::Point SAL_CALL VCLXDevice::convertPointToLogic( const css::awt::Point&
if( mpOutputDevice )
{
MapMode aMode(VCLUnoHelper::ConvertToMapModeUnit(TargetUnit));
- ::Point aVCLPoint = VCLUnoHelper::ConvertToVCLPoint(aPoint);
+ ::Point aVCLPoint = vcl::unohelper::ConvertToVCLPoint(aPoint);
::Point aDevPoint = mpOutputDevice->PixelToLogic(aVCLPoint, aMode );
- aAWTPoint = VCLUnoHelper::ConvertToAWTPoint(aDevPoint);
+ aAWTPoint = vcl::unohelper::ConvertToAWTPoint(aDevPoint);
}
return aAWTPoint;
@@ -193,9 +194,9 @@ css::awt::Point SAL_CALL VCLXDevice::convertPointToPixel( const css::awt::Point&
if( mpOutputDevice )
{
MapMode aMode(VCLUnoHelper::ConvertToMapModeUnit(SourceUnit));
- ::Point aVCLPoint = VCLUnoHelper::ConvertToVCLPoint(aPoint);
+ ::Point aVCLPoint = vcl::unohelper::ConvertToVCLPoint(aPoint);
::Point aDevPoint = mpOutputDevice->LogicToPixel(aVCLPoint, aMode );
- aAWTPoint = VCLUnoHelper::ConvertToAWTPoint(aDevPoint);
+ aAWTPoint = vcl::unohelper::ConvertToAWTPoint(aDevPoint);
}
return aAWTPoint;
@@ -217,9 +218,9 @@ css::awt::Size SAL_CALL VCLXDevice::convertSizeToLogic( const css::awt::Size& aS
if( mpOutputDevice )
{
MapMode aMode(VCLUnoHelper::ConvertToMapModeUnit(TargetUnit));
- ::Size aVCLSize = VCLUnoHelper::ConvertToVCLSize(aSize);
+ ::Size aVCLSize = vcl::unohelper::ConvertToVCLSize(aSize);
::Size aDevSz = mpOutputDevice->PixelToLogic(aVCLSize, aMode );
- aAWTSize = VCLUnoHelper::ConvertToAWTSize(aDevSz);
+ aAWTSize = vcl::unohelper::ConvertToAWTSize(aDevSz);
}
return aAWTSize;
@@ -240,9 +241,9 @@ css::awt::Size SAL_CALL VCLXDevice::convertSizeToPixel( const css::awt::Size& aS
if( mpOutputDevice )
{
MapMode aMode(VCLUnoHelper::ConvertToMapModeUnit(SourceUnit));
- ::Size aVCLSize = VCLUnoHelper::ConvertToVCLSize(aSize);
+ ::Size aVCLSize = vcl::unohelper::ConvertToVCLSize(aSize);
::Size aDevSz = mpOutputDevice->LogicToPixel(aVCLSize, aMode );
- aAWTSize = VCLUnoHelper::ConvertToAWTSize(aDevSz);
+ aAWTSize = vcl::unohelper::ConvertToAWTSize(aDevSz);
}
return aAWTSize;