From 69c88654881a4aa0db05df9fb94e3d9e7dfbfa30 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Thu, 28 Sep 2017 10:28:44 +0100 Subject: Resolves: tdf#42873 videos in presenter console misplaced MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ib7559246f6f3173acea72268db0489b79df38ae3 Reviewed-on: https://gerrit.libreoffice.org/42892 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- slideshow/source/engine/shapes/viewmediashape.cxx | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'slideshow') diff --git a/slideshow/source/engine/shapes/viewmediashape.cxx b/slideshow/source/engine/shapes/viewmediashape.cxx index a518fdae5780..9059b218cdf4 100644 --- a/slideshow/source/engine/shapes/viewmediashape.cxx +++ b/slideshow/source/engine/shapes/viewmediashape.cxx @@ -50,15 +50,16 @@ #include #endif -#include -#include -#include +#include #include +#include #include #include -#include +#include +#include +#include +#include #include -#include #include "viewmediashape.hxx" #include "mediashape.hxx" @@ -460,6 +461,13 @@ namespace slideshow { mpMediaWindow.disposeAndClear(); mpMediaWindow = VclPtr::Create( pWindow, WB_CLIPCHILDREN ); + UnoViewSharedPtr xUnoView(std::dynamic_pointer_cast(mpViewLayer)); + if (xUnoView) + { + awt::Rectangle aCanvasArea = xUnoView->getUnoView()->getCanvasArea(); + aAWTRect.X += aCanvasArea.X; + aAWTRect.Y += aCanvasArea.Y; + } mpMediaWindow->SetPosSizePixel( Point( aAWTRect.X, aAWTRect.Y ), Size( aAWTRect.Width, aAWTRect.Height ) ); } -- cgit