[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - slideshow/source

Katarina Behrens (via logerrit) logerrit at kemper.freedesktop.org
Sun Jan 26 13:35:29 UTC 2020


 slideshow/source/engine/shapes/viewmediashape.cxx |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

New commits:
commit 59edd056643125978483e7292bfb4b7be707cf3d
Author:     Katarina Behrens <Katarina.Behrens at cib.de>
AuthorDate: Tue Jan 21 13:16:09 2020 +0100
Commit:     Adolfo Jayme Barrientos <fitojb at ubuntu.com>
CommitDate: Sun Jan 26 14:35:01 2020 +0100

    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 at cib.de>
    (cherry picked from commit d4561921dde7d350b3b4d5f793871bea8ba4546d)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87258
    Reviewed-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>

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


More information about the Libreoffice-commits mailing list