summaryrefslogtreecommitdiff
path: root/slideshow
diff options
context:
space:
mode:
authorKatarina Behrens <Katarina.Behrens@cib.de>2020-01-21 13:16:09 +0100
committerAdolfo Jayme Barrientos <fitojb@ubuntu.com>2020-01-26 14:35:01 +0100
commit59edd056643125978483e7292bfb4b7be707cf3d (patch)
tree6b58388cd5bfd22ecaa3d5b0817659dcc95aaa18 /slideshow
parent39f08d04047fba6fef9972f8b2ab4cd5658870ea (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> (cherry picked from commit d4561921dde7d350b3b4d5f793871bea8ba4546d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87258 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Diffstat (limited to 'slideshow')
-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 057b508437ae..c17b550372b1 100644
--- a/slideshow/source/engine/shapes/viewmediashape.cxx
+++ b/slideshow/source/engine/shapes/viewmediashape.cxx
@@ -244,8 +244,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() );