sc/source/ui/navipi/content.cxx |   19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

New commits:
commit 63c47a6e9a6884e34e5949499ae8ca1e4470d868
Author:     Banobe Pascal <[email protected]>
AuthorDate: Thu Oct 16 12:44:40 2025 +0300
Commit:     Szymon Kłos <[email protected]>
CommitDate: Mon Oct 20 17:18:21 2025 +0200

    Calc: Only trigger note edit for desktop mode
    
    -When a user selects a comment from the Navigator, Calc was automatically
     opening the Note widget in edit mode, even inside COOL.
     This change adds a simple check to make sure that behavior only happens
     on the desktop version.
    
    Signed-off-by: Banobe Pascal <[email protected]>
    Change-Id: Iff1c6129c794a2b4f30aa1d841c63989fc014e34
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192484
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Szymon Kłos <[email protected]>

diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx
index e7fdd060a444..526154f9f8c5 100644
--- a/sc/source/ui/navipi/content.cxx
+++ b/sc/source/ui/navipi/content.cxx
@@ -385,15 +385,18 @@ IMPL_LINK_NOARG(ScContentTree, ContentDoubleClickHdl, 
weld::TreeView&, bool)
                 pParentWindow->SetCurrentTable( aPos.Tab() );
                 pParentWindow->SetCurrentCell( aPos.Col(), aPos.Row() );
                 // Check whether the comment is currently visible and toggle 
its visibility
-                ScDocument* pSrcDoc = GetSourceDocument();
-                if (ScPostIt* pNote = pSrcDoc ? pSrcDoc->GetNote(aPos.Col(), 
aPos.Row(), aPos.Tab()) : nullptr)
+                if (!comphelper::LibreOfficeKit::isActive())
                 {
-                    bool bVisible = pNote->IsCaptionShown();
-                    // Effectivelly set the visibility of the comment
-                    GetManualOrCurrent()->GetDocFunc().ShowNote(aPos, 
!bVisible);
-                    // Put the note in edit mode
-                    ScTabViewShell* pScTabViewShell = 
ScNavigatorDlg::GetTabViewShell();
-                    pScTabViewShell->EditNote();
+                    ScDocument* pSrcDoc = GetSourceDocument();
+                    if (ScPostIt* pNote = pSrcDoc ? 
pSrcDoc->GetNote(aPos.Col(), aPos.Row(), aPos.Tab()) : nullptr)
+                    {
+                        bool bVisible = pNote->IsCaptionShown();
+                        // Effectivelly set the visibility of the comment
+                        GetManualOrCurrent()->GetDocFunc().ShowNote(aPos, 
!bVisible);
+                        // Put the note in edit mode
+                        ScTabViewShell* pScTabViewShell = 
ScNavigatorDlg::GetTabViewShell();
+                        pScTabViewShell->EditNote();
+                    }
                 }
             }
             break;

Reply via email to