sw/source/ui/table/instable.cxx |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit e46314fa134c19a5e43f51e55e1fb06c86ac508f
Author:     Vladislav Tarakanov <[email protected]>
AuthorDate: Sat Jan 31 23:51:08 2026 +0400
Commit:     Ilmari Lauhakangas <[email protected]>
CommitDate: Sun Feb 1 09:24:43 2026 +0100

    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 <[email protected]>
    Tested-by: Jenkins

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];

Reply via email to