summaryrefslogtreecommitdiff
path: root/drawinglayer/source/primitive2d
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2022-12-15 19:31:09 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-12-19 06:42:39 +0000
commitd640bfe7767292c8a89de57d378dd752a8ec8342 (patch)
treee4db77faa9bf3d7da528cb1c051e9a3e878021cd /drawinglayer/source/primitive2d
parentc57d113e9ef8608f5690e8707a97879cb4f6a185 (diff)
remove dependency from drawinglayer to framework
to try and untangle the dependency mess a little. This means (*) tunneling a piece of information from VCLXWindow via the XWindowPeer::getProperty method, so we do not need to directly call VCLXWindow. (*) moving some formpdf code from framework "down" to vcl, where the drawinglayer code can use it Change-Id: I2c1ff3e34941b3147e66cf0a2d0fdb13293e3aa2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144341 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'drawinglayer/source/primitive2d')
-rw-r--r--drawinglayer/source/primitive2d/controlprimitive2d.cxx14
1 files changed, 5 insertions, 9 deletions
diff --git a/drawinglayer/source/primitive2d/controlprimitive2d.cxx b/drawinglayer/source/primitive2d/controlprimitive2d.cxx
index c776319e86f5..6fe6e57c10d1 100644
--- a/drawinglayer/source/primitive2d/controlprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/controlprimitive2d.cxx
@@ -19,6 +19,7 @@
#include <drawinglayer/primitive2d/controlprimitive2d.hxx>
#include <com/sun/star/awt/XWindow.hpp>
+#include <com/sun/star/awt/XVclWindowPeer.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <comphelper/processfactory.hxx>
#include <com/sun/star/awt/XControl.hpp>
@@ -145,16 +146,11 @@ namespace drawinglayer::primitive2d
if(xControl.is())
{
uno::Reference<awt::XWindowPeer> xWindowPeer(xControl->getPeer());
-
- VclPtr<vcl::Window> pWindow = VCLUnoHelper::GetWindow(xWindowPeer);
- if (pWindow)
+ if (xWindowPeer)
{
- pWindow = pWindow->GetParent();
-
- if(pWindow && MapUnit::Map100thMM == pWindow->GetMapMode().GetMapUnit())
- {
- bUserIs100thmm = true;
- }
+ uno::Reference<awt::XVclWindowPeer> xPeerProps(xWindowPeer, uno::UNO_QUERY_THROW);
+ uno::Any aAny = xPeerProps->getProperty("ParentIs100thmm"); // see VCLXWindow::getProperty
+ aAny >>= bUserIs100thmm;
}
}