sw/source/ui/table/instable.cxx |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

New commits:
commit a4e7cc2a12ca3ea90ec21de96aa038f2447b40f8
Author:     Mert Tumer <[email protected]>
AuthorDate: Fri Mar 25 17:56:30 2022 +0300
Commit:     Gökay ŞATIR <[email protected]>
CommitDate: Fri Mar 25 19:39:10 2022 +0100

    make default selected table style to Default Table Style for only online
    
    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
    
    Signed-off-by: Mert Tumer <[email protected]>
    Change-Id: I2f60376fc2d929498aef45259a5ef291922ccdcd
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132124
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Gökay ŞATIR <[email protected]>

diff --git a/sw/source/ui/table/instable.cxx b/sw/source/ui/table/instable.cxx
index 94e29d28665d..1a3bafb14dc2 100644
--- a/sw/source/ui/table/instable.cxx
+++ b/sw/source/ui/table/instable.cxx
@@ -149,8 +149,13 @@ void SwInsTableDlg::InitAutoTableFormat()
     // Change this min variable if you add autotable manually.
     minTableIndexInLb = 1;
     maxTableIndexInLb = minTableIndexInLb + 
static_cast<sal_uInt8>(pTableTable->size());
-    m_xLbFormat->select( minTableIndexInLb );
-    tbIndex = lbIndexToTableIndex( minTableIndexInLb );
+    // 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
+    lbIndex = comphelper::LibreOfficeKit::isActive() ? 1 : 0;
+    m_xLbFormat->select( lbIndex );
+    tbIndex = lbIndexToTableIndex(lbIndex);
 
     SelFormatHdl( *m_xLbFormat );
 }

Reply via email to