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 <ilmari.lauhakangas@libreoffice.org> Tested-by: Jenkins
This commit is contained in:
committed by
Ilmari Lauhakangas
parent
c511c65434
commit
e46314fa13
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user