summaryrefslogtreecommitdiff
path: root/slideshow/source
diff options
context:
space:
mode:
authorKatarina Behrens <Katarina.Behrens@cib.de>2020-01-21 13:16:09 +0100
committerKatarina Behrens <Katarina.Behrens@cib.de>2020-01-23 10:17:44 +0100
commitd4561921dde7d350b3b4d5f793871bea8ba4546d (patch)
tree4da0e53d81801a4ba2f0a081a1a35f2a3d7e30cf /slideshow/source
parentddfe8011df9a35a140e3c53c9efd71f5dd63ecb8 (diff)
tdf#126459: Consider translated origin of the view also on resize
use-case is the presenter console on 2nd screen, media shape must be placed relative to the window w/ slide preview, not relative to the main window Change-Id: I120f86e399563d2aafc31d88d0a7f9d357f4840c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87135 Tested-by: Jenkins Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
Diffstat (limited to 'slideshow/source')
-rw-r--r--slideshow/source/engine/shapes/viewmediashape.cxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/slideshow/source/engine/shapes/viewmediashape.cxx b/slideshow/source/engine/shapes/viewmediashape.cxx
index e68cdf2b543a..3e8056fa8539 100644
--- a/slideshow/source/engine/shapes/viewmediashape.cxx
+++ b/slideshow/source/engine/shapes/viewmediashape.cxx
@@ -227,8 +227,13 @@ namespace slideshow
if( rRangePix.isEmpty() )
return true;
- const Point aPosPixel( rRangePix.getMinX() + maWindowOffset.X,
- rRangePix.getMinY() + maWindowOffset.Y );
+ awt::Rectangle aCanvasArea;
+ UnoViewSharedPtr xUnoView(std::dynamic_pointer_cast<UnoView>(mpViewLayer));
+ if (xUnoView)
+ aCanvasArea = xUnoView->getUnoView()->getCanvasArea();
+
+ const Point aPosPixel( rRangePix.getMinX() + maWindowOffset.X + aCanvasArea.X,
+ rRangePix.getMinY() + maWindowOffset.Y + aCanvasArea.Y );
const Size aSizePixel( rRangePix.getMaxX() - rRangePix.getMinX(),
rRangePix.getMaxY() - rRangePix.getMinY() );