sw/source/ui/table/instable.cxx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
New commits: commit a2b6ce5d21b7f5c84ced8485f5af279f1bf8135f Author: Jaume Pujantell <jaume.pujant...@collabora.com> AuthorDate: Wed May 29 12:00:27 2024 +0200 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Tue Jun 11 09:41:14 2024 +0200 lok: sw: do not add a table style on insert dialog This brings the default beahivour of the insert table dialog closer to the behaviour of the uno command, where a table is inserted without a table style and with visible borders. Change-Id: Ifcadbce78c0623aec91fd9320bf90a87efc16448 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168183 Reviewed-by: Miklos Vajna <vmik...@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> (cherry picked from commit a17e087e26774c4e33d371322fbef426cd387639) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168610 Tested-by: Jenkins diff --git a/sw/source/ui/table/instable.cxx b/sw/source/ui/table/instable.cxx index a5aa4cd83853..03cdadacc678 100644 --- a/sw/source/ui/table/instable.cxx +++ b/sw/source/ui/table/instable.cxx @@ -31,6 +31,8 @@ void SwInsTableDlg::GetValues( OUString& rName, sal_uInt16& rRow, sal_uInt16& rC std::unique_ptr<SwTableAutoFormat>& prTAFormat ) { SwInsertTableFlags nInsMode = SwInsertTableFlags::NONE; + if (comphelper::LibreOfficeKit::isActive()) + nInsMode = SwInsertTableFlags::DefaultBorder; rName = m_xNameEdit->get_text(); rRow = m_xRowSpinButton->get_value(); rCol = m_xColSpinButton->get_value(); @@ -43,7 +45,7 @@ void SwInsTableDlg::GetValues( OUString& rName, sal_uInt16& rRow, sal_uInt16& rC rInsTableOpts.mnRowsToRepeat = 0; if (!m_xDontSplitCB->get_active()) nInsMode |= SwInsertTableFlags::SplitLayout; - if( m_xTAutoFormat ) + if (m_xTAutoFormat && !comphelper::LibreOfficeKit::isActive()) { prTAFormat.reset(new SwTableAutoFormat( *m_xTAutoFormat )); rAutoName = prTAFormat->GetName(); @@ -151,8 +153,8 @@ void SwInsTableDlg::InitAutoTableFormat() // 1 means default table style // unfortunately when the table has a style sw/qa/uitest/writer_tests4/tdf115573.py fails // because tables that have pre-applied style resets the style of the elements in their cells - // when a new row is inserted and the ui test above relies on that. For now this is LOK only - m_lbIndex = comphelper::LibreOfficeKit::isActive() ? 1 : 0; + // when a new row is inserted and the ui test above relies on that. + m_lbIndex = 0; m_xLbFormat->select(m_lbIndex); m_tbIndex = lbIndexToTableIndex(m_lbIndex);