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 ) ); }