diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2022-12-15 19:31:09 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-12-19 06:42:39 +0000 |
commit | d640bfe7767292c8a89de57d378dd752a8ec8342 (patch) | |
tree | e4db77faa9bf3d7da528cb1c051e9a3e878021cd /drawinglayer | |
parent | c57d113e9ef8608f5690e8707a97879cb4f6a185 (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')
-rw-r--r-- | drawinglayer/Library_drawinglayer.mk | 1 | ||||
-rw-r--r-- | drawinglayer/source/primitive2d/controlprimitive2d.cxx | 14 | ||||
-rw-r--r-- | drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx | 2 |
3 files changed, 6 insertions, 11 deletions
diff --git a/drawinglayer/Library_drawinglayer.mk b/drawinglayer/Library_drawinglayer.mk index 8945e1c462c8..5a3c80beec08 100644 --- a/drawinglayer/Library_drawinglayer.mk +++ b/drawinglayer/Library_drawinglayer.mk @@ -47,7 +47,6 @@ $(eval $(call gb_Library_use_libraries,drawinglayer,\ salhelper \ svl \ svt \ - tk \ tl \ vcl \ )) 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; } } diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx index 3b3f27ba302c..33257f48175a 100644 --- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx @@ -38,7 +38,7 @@ #include <vcl/graphictools.hxx> #include <vcl/metaact.hxx> #include <vcl/graph.hxx> // for PDFExtOutDevData Graphic support -#include <toolkit/helper/formpdfexport.hxx> // for PDFExtOutDevData Graphic support +#include <vcl/formpdfexport.hxx> // for PDFExtOutDevData Graphic support #include <drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx> #include <drawinglayer/primitive2d/textprimitive2d.hxx> #include <drawinglayer/primitive2d/PolygonHairlinePrimitive2D.hxx> |