sd/source/ui/func/fusel.cxx |   11 +++++++++++
 1 file changed, 11 insertions(+)

New commits:
commit 439a943c0eba5569c513cb634ea7b548ff883205
Author:     Mohit Marathe <[email protected]>
AuthorDate: Wed Nov 12 17:43:18 2025 +0530
Commit:     Mohit Marathe <[email protected]>
CommitDate: Thu Nov 13 10:30:54 2025 +0100

    sd: switch to corresponding page on double clicking page preview
    
    Signed-off-by: Mohit Marathe <[email protected]>
    Change-Id: I99f120fd0504d5925188cb9a4578ada49436c544
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193861
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Michael Stahl <[email protected]>

diff --git a/sd/source/ui/func/fusel.cxx b/sd/source/ui/func/fusel.cxx
index bb6abf7dd8a3..a3ff55634ec8 100644
--- a/sd/source/ui/func/fusel.cxx
+++ b/sd/source/ui/func/fusel.cxx
@@ -20,6 +20,7 @@
 #include <fusel.hxx>
 #include <svx/svddrgmt.hxx>
 #include <svx/svdpagv.hxx>
+#include <svx/svdopage.hxx>
 #include <svx/svdogrp.hxx>
 #include <svx/scene3d.hxx>
 #include <vcl/imapobj.hxx>
@@ -351,6 +352,16 @@ bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
                                 bReturn = pPV->EnterGroup(pObj);
                         }
                     }
+                    else if (pObj->GetObjIdentifier() == SdrObjKind::Page)
+                    {
+                        if (rMEvt.GetClicks() == 2)
+                        {
+                            SdrPageObj* pPageObj = 
static_cast<SdrPageObj*>(pObj);
+                            sal_uInt16 nPageNum = 
(pPageObj->GetReferencedPage()->GetPageNum() - 1) / 2;
+                            DrawViewShell* pDrawViewShell = 
dynamic_cast<DrawViewShell*>(mpViewShell);
+                            pDrawViewShell->SwitchPage(nPageNum);
+                        }
+                    }
                 }
 
                 // #i71727# replaced else here with two possibilities, once 
the original else (!pObj)

Reply via email to