Resolves: tdf#42873 videos in presenter console misplaced

Change-Id: Ib7559246f6f3173acea72268db0489b79df38ae3
Reviewed-on: https://gerrit.libreoffice.org/42892
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
Caolán McNamara 2017-09-28 10:28:44 +01:00
parent 6ddd8fcf5c
commit 69c8865488

View File

@ -50,15 +50,16 @@
#include <vcl/opengl/OpenGLContext.hxx>
#endif
#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/media/XManager.hpp>
#include <com/sun/star/media/XPlayer.hpp>
#include <com/sun/star/media/XPlayerWindow.hpp>
#include <com/sun/star/beans/XPropertySet.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/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 ) );
}