From e46314fa134c19a5e43f51e55e1fb06c86ac508f Mon Sep 17 00:00:00 2001 From: Vladislav Tarakanov Date: Sat, 31 Jan 2026 23:51:08 +0400 Subject: [PATCH] tdf#170554 Do not call SetTableStyle for None style SwFEShell::SetTableStyle should not be called if "None" was selected, which is not a real table style. Change-Id: I8a5cd4fd0ee111e4fcf657edf32918e66af69056 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198468 Reviewed-by: Ilmari Lauhakangas Tested-by: Jenkins --- sw/source/ui/table/instable.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sw/source/ui/table/instable.cxx b/sw/source/ui/table/instable.cxx index ba51edfef707..dacf98496d1b 100644 --- a/sw/source/ui/table/instable.cxx +++ b/sw/source/ui/table/instable.cxx @@ -162,7 +162,9 @@ IMPL_LINK_NOARG(SwInsTableDlg, OKHdl, weld::Button&, void) { int styleIdx = m_xLbFormat->get_selected_index(); assert(styleIdx != -1 && "nothing selected"); - m_pShell->SetTableStyle((*m_xTableTable)[styleIdx]); + // The value 0 is used for the "None" style + if (styleIdx > 0) + m_pShell->SetTableStyle((*m_xTableTable)[styleIdx]); if( m_xTAutoFormat ) *m_xTAutoFormat = (*m_xTableTable)[styleIdx];