sc/source/filter/inc/tablebuffer.hxx | 8 +++---- sc/source/filter/oox/tablebuffer.cxx | 35 +++++++++++++------------------- sc/uiconfig/scalc/ui/sidebardatabase.ui | 6 ++--- sc/uiconfig/scalc/ui/tablestylesbox.ui | 6 ++--- 4 files changed, 25 insertions(+), 30 deletions(-)
New commits: commit 449b113198f6ef203fba5f6b2a3286b2b27ad2c4 Author: Balazs Varga <[email protected]> AuthorDate: Mon Dec 8 11:48:52 2025 +0100 Commit: Balazs Varga <[email protected]> CommitDate: Thu Jan 29 09:34:08 2026 +0100 Table Styles: some small UI file cosmetics Remove 'Show' text from Tables Styles Options labels Change-Id: I0208d97637dfffcc7aff69cb440b89fc2c151a2a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195219 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Pedro Silva <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196778 Tested-by: Balazs Varga <[email protected]> Reviewed-by: Balazs Varga <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198004 Tested-by: Jenkins diff --git a/sc/uiconfig/scalc/ui/sidebardatabase.ui b/sc/uiconfig/scalc/ui/sidebardatabase.ui index ad68788b5837..d8b5448a18e9 100644 --- a/sc/uiconfig/scalc/ui/sidebardatabase.ui +++ b/sc/uiconfig/scalc/ui/sidebardatabase.ui @@ -19,7 +19,7 @@ <property name="column-spacing">2</property> <child> <object class="GtkCheckButton" id="chk_header_row"> - <property name="label" translatable="yes" context="sidebardatabase|chk_header_row">Show Header Row</property> + <property name="label" translatable="yes" context="sidebardatabase|chk_header_row">Header Row</property> <property name="visible">True</property> <property name="can-focus">True</property> <property name="receives-default">False</property> @@ -33,7 +33,7 @@ </child> <child> <object class="GtkCheckButton" id="chk_total_row"> - <property name="label" translatable="yes" context="sidebardatabase|chk_total_row">Show Total Row</property> + <property name="label" translatable="yes" context="sidebardatabase|chk_total_row">Total Row</property> <property name="visible">True</property> <property name="can-focus">True</property> <property name="receives-default">False</property> @@ -47,7 +47,7 @@ </child> <child> <object class="GtkCheckButton" id="chk_filter_buttons"> - <property name="label" translatable="yes" context="sidebardatabase|chk_filter_buttons">Show Filter Buttons</property> + <property name="label" translatable="yes" context="sidebardatabase|chk_filter_buttons">Filter Buttons</property> <property name="visible">True</property> <property name="can-focus">True</property> <property name="receives-default">False</property> diff --git a/sc/uiconfig/scalc/ui/tablestylesbox.ui b/sc/uiconfig/scalc/ui/tablestylesbox.ui index 68fa8cbdca92..41dd813e9aa2 100644 --- a/sc/uiconfig/scalc/ui/tablestylesbox.ui +++ b/sc/uiconfig/scalc/ui/tablestylesbox.ui @@ -16,7 +16,7 @@ <property name="column-spacing">4</property> <child> <object class="GtkCheckButton" id="chk_header_row2"> - <property name="label" translatable="yes" context="tablestylebox|chk_header_row">Show Header Row</property> + <property name="label" translatable="yes" context="tablestylebox|chk_header_row">Header Row</property> <property name="visible">True</property> <property name="can-focus">True</property> <property name="receives-default">False</property> @@ -30,7 +30,7 @@ </child> <child> <object class="GtkCheckButton" id="chk_total_row2"> - <property name="label" translatable="yes" context="tablestylebox|chk_total_row">Show Total Row</property> + <property name="label" translatable="yes" context="tablestylebox|chk_total_row">Total Row</property> <property name="visible">True</property> <property name="can-focus">True</property> <property name="receives-default">False</property> @@ -44,7 +44,7 @@ </child> <child> <object class="GtkCheckButton" id="chk_filter_buttons2"> - <property name="label" translatable="yes" context="tablestylebox|chk_filter_buttons">Show Filter Buttons</property> + <property name="label" translatable="yes" context="tablestylebox|chk_filter_buttons">Filter Buttons</property> <property name="visible">True</property> <property name="can-focus">True</property> <property name="receives-default">False</property> commit 658d00e0f48d6a49023561b75ce76f20a9bf5842 Author: Balazs Varga <[email protected]> AuthorDate: Tue Dec 23 20:12:39 2025 +0100 Commit: Balazs Varga <[email protected]> CommitDate: Thu Jan 29 09:33:58 2026 +0100 Table Style: import table area with empty style even if XML_TableStyleInfo is not present in the ooxml file. Change-Id: If3045d5eedd1ec21f69230e641bdf6f7b7aa88d5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196174 Reviewed-by: Balazs Varga <[email protected]> Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196777 Tested-by: Balazs Varga <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198003 Tested-by: Jenkins diff --git a/sc/source/filter/inc/tablebuffer.hxx b/sc/source/filter/inc/tablebuffer.hxx index bf995393000c..886ed2bac664 100644 --- a/sc/source/filter/inc/tablebuffer.hxx +++ b/sc/source/filter/inc/tablebuffer.hxx @@ -28,7 +28,7 @@ namespace oox::xls { struct TableStyleInfo { - std::optional<OUString> maStyleName; + OUString maStyleName; bool mbShowFirstColumn; bool mbShowLastColumn; bool mbShowRowStripes; @@ -63,8 +63,8 @@ public: AutoFilter& createAutoFilter() { return maAutoFilters.createAutoFilter(); } /** Creates a new tableColumns handler and stores it internally. */ TableColumns& createTableColumns() { return maTableColumns.createTableColumns(); } - - void importTableStyleInfo(const AttributeList& rAttribs); + /** Imports the table style info attributes. */ + void importTableStyleInfo( const AttributeList& rAttribs ); /** Creates a database range from this tables. */ void finalizeImport(); @@ -93,7 +93,7 @@ public: private: TableModel maModel; - std::optional<TableStyleInfo> maStyleInfo; + TableStyleInfo maStyleInfo; /// Table style information. AutoFilterBuffer maAutoFilters; /// Filter settings for this table. TableColumnsBuffer maTableColumns; /// Column names of this table. OUString maDBRangeName; /// Name of the database range in the Calc document. diff --git a/sc/source/filter/oox/tablebuffer.cxx b/sc/source/filter/oox/tablebuffer.cxx index 9fcd6a32f252..a3d3d7627eab 100644 --- a/sc/source/filter/oox/tablebuffer.cxx +++ b/sc/source/filter/oox/tablebuffer.cxx @@ -40,11 +40,12 @@ using namespace ::com::sun::star::sheet; using namespace ::com::sun::star::uno; TableStyleInfo::TableStyleInfo(): - mbShowFirstColumn(true), - mbShowLastColumn(true), - mbShowRowStripes(true), - mbShowColStripes(true) + mbShowFirstColumn( false ), + mbShowLastColumn( false ), + mbShowRowStripes( false ), + mbShowColStripes( false ) { + maStyleName = u"none"_ustr; } TableModel::TableModel() : @@ -95,14 +96,11 @@ void Table::importTable( SequenceInputStream& rStrm, sal_Int16 nSheet ) void Table::importTableStyleInfo(const AttributeList& rAttribs) { - TableStyleInfo aInfo; - aInfo.maStyleName = rAttribs.getString(XML_name, u"none"_ustr); - aInfo.mbShowFirstColumn = rAttribs.getBool(XML_showFirstColumn, true); - aInfo.mbShowLastColumn = rAttribs.getBool(XML_showLastColumn, true); - aInfo.mbShowRowStripes = rAttribs.getBool(XML_showRowStripes, true); - aInfo.mbShowColStripes = rAttribs.getBool(XML_showColumnStripes, true); - - maStyleInfo = aInfo; + maStyleInfo.maStyleName = rAttribs.getString(XML_name, u"none"_ustr); + maStyleInfo.mbShowFirstColumn = rAttribs.getBool(XML_showFirstColumn, false); + maStyleInfo.mbShowLastColumn = rAttribs.getBool(XML_showLastColumn, false); + maStyleInfo.mbShowRowStripes = rAttribs.getBool(XML_showRowStripes, false); + maStyleInfo.mbShowColStripes = rAttribs.getBool(XML_showColumnStripes, false); } void Table::finalizeImport() @@ -164,14 +162,11 @@ void Table::finalizeImport() if( !(xDatabaseRange->getPropertyValue(u"TokenIndex"_ustr) >>= mnTokenIndex)) mnTokenIndex = -1; - if(maStyleInfo && maStyleInfo->maStyleName) - { - xDatabaseRange->setPropertyValue( u"TableStyleName"_ustr, css::uno::Any(*maStyleInfo->maStyleName)); - xDatabaseRange->setPropertyValue( u"UseRowStripes"_ustr, css::uno::Any(maStyleInfo->mbShowRowStripes)); - xDatabaseRange->setPropertyValue( u"UseColStripes"_ustr, css::uno::Any(maStyleInfo->mbShowColStripes)); - xDatabaseRange->setPropertyValue( u"UseFirstColumnFormatting"_ustr, css::uno::Any(maStyleInfo->mbShowFirstColumn)); - xDatabaseRange->setPropertyValue( u"UseLastColumnFormatting"_ustr, css::uno::Any(maStyleInfo->mbShowLastColumn)); - } + xDatabaseRange->setPropertyValue( u"TableStyleName"_ustr, css::uno::Any(maStyleInfo.maStyleName)); + xDatabaseRange->setPropertyValue( u"UseRowStripes"_ustr, css::uno::Any(maStyleInfo.mbShowRowStripes)); + xDatabaseRange->setPropertyValue( u"UseColStripes"_ustr, css::uno::Any(maStyleInfo.mbShowColStripes)); + xDatabaseRange->setPropertyValue( u"UseFirstColumnFormatting"_ustr, css::uno::Any(maStyleInfo.mbShowFirstColumn)); + xDatabaseRange->setPropertyValue( u"UseLastColumnFormatting"_ustr, css::uno::Any(maStyleInfo.mbShowLastColumn)); } catch( Exception& ) {
