[Libreoffice-commits] core.git: drawinglayer/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Thu Mar 11 19:28:10 UTC 2021
drawinglayer/source/primitive2d/controlprimitive2d.cxx | 23 +++++------------
1 file changed, 7 insertions(+), 16 deletions(-)
New commits:
commit 204a70f568cef3d9c685112d1c32f053a91469ca
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Mar 11 14:30:29 2021 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu Mar 11 20:27:26 2021 +0100
use VCLUnoHelper::GetWindow
instead of directly using VCLXWindow
Change-Id: I886525169834d24b6c060fb4722e1afda23dbc26
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112346
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/drawinglayer/source/primitive2d/controlprimitive2d.cxx b/drawinglayer/source/primitive2d/controlprimitive2d.cxx
index 3f20baa1351f..7ccc9660c78c 100644
--- a/drawinglayer/source/primitive2d/controlprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/controlprimitive2d.cxx
@@ -18,6 +18,7 @@
*/
#include <drawinglayer/primitive2d/controlprimitive2d.hxx>
+#include <com/sun/star/awt/XWindow.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <comphelper/processfactory.hxx>
#include <com/sun/star/awt/XControl.hpp>
@@ -34,7 +35,6 @@
#include <drawinglayer/primitive2d/polygonprimitive2d.hxx>
#include <drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx>
#include <svtools/optionsdrawinglayer.hxx>
-#include <toolkit/awt/vclxwindow.hxx>
#include <vcl/window.hxx>
#include <basegfx/matrix/b2dhommatrixtools.hxx>
#include <toolkit/helper/vclunohelper.hxx>
@@ -144,25 +144,16 @@ namespace drawinglayer::primitive2d
if(xControl.is())
{
- uno::Reference< awt::XWindowPeer > xWindowPeer(xControl->getPeer());
+ uno::Reference<awt::XWindowPeer> xWindowPeer(xControl->getPeer());
- if(xWindowPeer.is())
+ VclPtr<vcl::Window> pWindow = VCLUnoHelper::GetWindow(xWindowPeer);
+ if (pWindow)
{
- VCLXWindow* pVCLXWindow = comphelper::getUnoTunnelImplementation<VCLXWindow>(xWindowPeer);
+ pWindow = pWindow->GetParent();
- if(pVCLXWindow)
+ if(pWindow && MapUnit::Map100thMM == pWindow->GetMapMode().GetMapUnit())
{
- VclPtr<vcl::Window> pWindow = pVCLXWindow->GetWindow();
-
- if(pWindow)
- {
- pWindow = pWindow->GetParent();
-
- if(pWindow && MapUnit::Map100thMM == pWindow->GetMapMode().GetMapUnit())
- {
- bUserIs100thmm = true;
- }
- }
+ bUserIs100thmm = true;
}
}
}
More information about the Libreoffice-commits
mailing list