sd/source/ui/dlg/navigatr.cxx | 3 +++ sw/source/uibase/utlui/content.cxx | 3 +++ vcl/jsdialog/enabled.cxx | 2 ++ vcl/jsdialog/jsdialogbuilder.cxx | 8 ++++++-- 4 files changed, 14 insertions(+), 2 deletions(-)
New commits: commit 4173ba09966eaf39853ccecc042f5486dd9faaf0 Author: Miklos Vajna <[email protected]> AuthorDate: Thu Nov 13 08:42:21 2025 +0100 Commit: Szymon Kłos <[email protected]> CommitDate: Fri Nov 14 10:33:47 2025 +0100 vcl: fix crash in JSTreeView::render_entry() Crashreport signature: #0 SvTreeListEntry::GetUserData (this=0x0) at /home/collabora/online-buildscripts/staging/builddir/libreoffice/include/vcl/toolkit/treelistentry.hxx:109 #1 SalInstanceTreeView::CustomRenderHdl (payload=..., this=0x32ad68f0) at /home/collabora/online-buildscripts/staging/builddir/libreoffice/vcl/source/app/salvtables.cxx:5168 #2 SalInstanceTreeView::LinkStubCustomRenderHdl (instance=0x32ad68f0, data=std::tuple containing = {...}) at /home/collabora/online-buildscripts/staging/builddir/libreoffice/vcl/source/app/salvtables.cxx:5163 #3 0x00007f3dfddaba0c in Link<std::tuple<OutputDevice&, tools::Rectangle const&, SvTreeListEntry const&>, void>::Call (data=..., this=<optimized out>) at /home/collabora/online-buildscripts/staging/builddir/libreoffice/include/tools/link.hxx:111 #4 SvTreeListBox::DrawCustomEntry (this=<optimized out>, rRenderContext=..., rRect=..., rEntry=...) at /home/collabora/online-buildscripts/staging/builddir/libreoffice/vcl/source/treelist/treelistbox.cxx:2881 #5 0x00007f3dfe0d7d83 in JSTreeView::render_entry (this=0x32ad68f0, pos=74, dpix=<optimized out>, dpiy=<optimized out>) at /home/collabora/online-buildscripts/staging/builddir/libreoffice/vcl/jsdialog/jsdialogbuilder.cxx:1887 And gdb on the coredump days rEntry is nullptr. SvImpLBox::ScrollToAbsPos() checks for the GetEntryAtAbsPos() return value already, do the same here. Change-Id: I48c5b59a5e5b5d7e4e15b67264836927c45dd7f5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193939 (cherry picked from commit 4a75ae2e2c7405a5f3f431e38b0245974970adf7) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193999 Tested-by: Jenkins Reviewed-by: Szymon Kłos <[email protected]> diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx index d4b85759028c..8499f1697629 100644 --- a/vcl/jsdialog/jsdialogbuilder.cxx +++ b/vcl/jsdialog/jsdialogbuilder.cxx @@ -1861,11 +1861,15 @@ void JSTreeView::render_entry(int pos, int dpix, int dpiy) pDevice->SetDPIX(96.0 * dpix / 100); pDevice->SetDPIY(96.0 * dpiy / 100); - SvTreeListEntry* rEntry = m_xTreeView->GetEntryAtAbsPos(pos); + SvTreeListEntry* pEntry = m_xTreeView->GetEntryAtAbsPos(pos); + if (!pEntry) + { + return; + } Size aRenderSize = signal_custom_get_size(*pDevice, get_id(pos)); pDevice->SetOutputSize(aRenderSize); - m_xTreeView->DrawCustomEntry(*pDevice, tools::Rectangle(Point(0, 0), aRenderSize), *rEntry); + m_xTreeView->DrawCustomEntry(*pDevice, tools::Rectangle(Point(0, 0), aRenderSize), *pEntry); Bitmap aImage = pDevice->GetBitmap(Point(0, 0), aRenderSize); commit 06de198df7ed205edd4ce4d734a1a9b800fbbdb0 Author: Szymon Kłos <[email protected]> AuthorDate: Fri Jul 4 13:27:40 2025 +0000 Commit: Szymon Kłos <[email protected]> CommitDate: Fri Nov 14 10:33:33 2025 +0100 jsdialog: disable right click menu in sd & sw navigator The menu wasn't available in the LOK case due to missing JSDialog enablement and doesn't seems to be useful yet. It might cause problems: non-async dialog is opened in the core but not visible and user cannot type anything Change-Id: Ic92f0a38df615bec8ce553f6fad78eb0a0e459bb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187400 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Caolán McNamara <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194002 Reviewed-by: Szymon Kłos <[email protected]> Tested-by: Jenkins diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx index dd736988bf56..e7d97d19ac88 100644 --- a/sd/source/ui/dlg/navigatr.cxx +++ b/sd/source/ui/dlg/navigatr.cxx @@ -256,6 +256,9 @@ IMPL_STATIC_LINK_NOARG(SdNavigatorWin, MouseReleaseHdl, const MouseEvent&, bool) IMPL_LINK(SdNavigatorWin, CommandHdl, const CommandEvent&, rCEvt, bool) { + if (comphelper::LibreOfficeKit::isActive()) + return false; + if (NavDocInfo* pInfo = GetDocInfo(); !pInfo || !pInfo->IsActive()) return false; if (rCEvt.GetCommand() != CommandEventId::ContextMenu) diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index 550fe43266ca..e24ee42d2dc1 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -1645,6 +1645,9 @@ IMPL_LINK(SwContentTree, CommandHdl, const CommandEvent&, rCEvt, bool) if (rCEvt.GetCommand() != CommandEventId::ContextMenu) return false; + if (comphelper::LibreOfficeKit::isActive()) + return false; + grab_focus(); // select clicked entry or limit selection to root entry if needed diff --git a/vcl/jsdialog/enabled.cxx b/vcl/jsdialog/enabled.cxx index a7806e04aa65..1daca8b7ee5f 100644 --- a/vcl/jsdialog/enabled.cxx +++ b/vcl/jsdialog/enabled.cxx @@ -32,6 +32,8 @@ constexpr auto IgnoredList { u"svt/ui/tabbuttons.ui" }, { u"svx/ui/toolbarpopover.ui" }, { u"modules/scalc/ui/dropmenu.ui"}, // Calc -> Navigator -> right click + { u"modules/sdraw/ui/navigatorcontextmenu.ui" }, // Impress -> Navigator -> right click + { u"modules/swriter/ui/navigatorcontextmenu.ui" }, // Writer -> Navigator -> right click }); // ========== MOBILE DIALOGS ================================================= //
