Resolves tdf#124206 - Default style not applied
TableStyle name set correctly
Preselected table style None to satisfy ui tests
Change-Id: I00be482a24aaf9efa480226d6d6df56a7366f94f
Reviewed-on: https://gerrit.libreoffice.org/76599
Tested-by: Jenkins
Reviewed-by: Jim Raykowski <raykowj@gmail.com>
diff --git a/sw/source/ui/table/instable.cxx b/sw/source/ui/table/instable.cxx
index f2d7f6f..4d1225a 100644
--- a/sw/source/ui/table/instable.cxx
+++ b/sw/source/ui/table/instable.cxx
@@ -147,7 +147,7 @@ void SwInsTableDlg::InitAutoTableFormat()
// Change this min variable if you add autotable manually.
minTableIndexInLb = 1;
maxTableIndexInLb = minTableIndexInLb + static_cast<sal_uInt8>(pTableTable->size());
lbIndex = 1;
lbIndex = 0;
m_xLbFormat->select( lbIndex );
tbIndex = lbIndexToTableIndex(lbIndex);
diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx
index 287006e..8b1e5e3 100644
--- a/sw/source/uibase/shells/basesh.cxx
+++ b/sw/source/uibase/shells/basesh.cxx
@@ -2742,7 +2742,6 @@ void SwBaseShell::InsertTable( SfxRequest& _rRequest )
rSh.GetTableFormat()->SetName( aTableName );
if( pTAFormat != nullptr && !aAutoName.isEmpty()
&& aAutoName != SwStyleNameMapper::GetUIName( RES_POOLTABSTYLE_DEFAULT, OUString() )
&& aAutoName != SwViewShell::GetShellRes()->aStrNone )
{
SwTableNode* pTableNode = const_cast<SwTableNode*>( rSh.IsCursorInTable() );