[Libreoffice-commits] core.git: slideshow/source

Caolán McNamara caolanm at redhat.com
Thu Sep 28 19:21:33 UTC 2017


 slideshow/source/engine/shapes/viewmediashape.cxx |   18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)

New commits:
commit 69c88654881a4aa0db05df9fb94e3d9e7dfbfa30
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Sep 28 10:28:44 2017 +0100

    Resolves: tdf#42873 videos in presenter console misplaced
    
    Change-Id: Ib7559246f6f3173acea72268db0489b79df38ae3
    Reviewed-on: https://gerrit.libreoffice.org/42892
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

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 <vcl/opengl/OpenGLContext.hxx>
 #endif
 
-#include <com/sun/star/media/XManager.hpp>
-#include <com/sun/star/media/XPlayer.hpp>
-#include <com/sun/star/media/XPlayerWindow.hpp>
+#include <com/sun/star/awt/XWindow.hpp>
 #include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/lang/XComponent.hpp>
 #include <com/sun/star/lang/XMultiComponentFactory.hpp>
 #include <com/sun/star/lang/NoSupportException.hpp>
-#include <com/sun/star/awt/XWindow.hpp>
+#include <com/sun/star/media/XManager.hpp>
+#include <com/sun/star/media/XPlayer.hpp>
+#include <com/sun/star/media/XPlayerWindow.hpp>
+#include <com/sun/star/presentation/XSlideShowView.hpp>
 #include <com/sun/star/rendering/XCanvas.hpp>
-#include <com/sun/star/lang/XComponent.hpp>
 
 #include "viewmediashape.hxx"
 #include "mediashape.hxx"
@@ -460,6 +461,13 @@ namespace slideshow
                             {
                                 mpMediaWindow.disposeAndClear();
                                 mpMediaWindow = VclPtr<SystemChildWindow>::Create( pWindow, WB_CLIPCHILDREN );
+                                UnoViewSharedPtr xUnoView(std::dynamic_pointer_cast<UnoView>(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 ) );
                             }


More information about the Libreoffice-commits mailing list