officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu | 2 sc/source/ui/sidebar/ScPanelFactory.cxx | 1 sc/source/ui/view/gridwin.cxx | 4 sc/source/ui/view/tableshell.cxx | 2 sc/source/ui/view/tabview3.cxx | 5 sc/uiconfig/scalc/ui/sidebardatabase.ui | 227 +++++------ 6 files changed, 129 insertions(+), 112 deletions(-)
New commits: commit bf33cf3d38f9a1b7b5d59806e8da95d92c1b1c87 Author: Balazs Varga <[email protected]> AuthorDate: Thu Oct 30 21:11:18 2025 +0100 Commit: Balazs Varga <[email protected]> CommitDate: Fri Oct 31 16:29:25 2025 +0100 Table Styles: fix some ui problems on the sidebar Fix scrollbar problem. Bit nicer sidebar UI and change the name of the panel to Table Style Options. Change-Id: If94062419c1b7462e5039129724a1f06090b5dc4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193228 Tested-by: Balazs Varga <[email protected]> Reviewed-by: Balazs Varga <[email protected]> diff --git a/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu b/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu index deaa2f0aca44..3e1c0a9e0852 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu @@ -1529,7 +1529,7 @@ <node oor:name="ScDatabasePropertyPanel" oor:op="replace"> <prop oor:name="Title" oor:type="xs:string"> - <value xml:lang="en-US">Database Range</value> + <value xml:lang="en-US">Table Style Options</value> </prop> <prop oor:name="Id" oor:type="xs:string"> <value>ScDatabasePropertyPanel</value> diff --git a/sc/source/ui/sidebar/ScPanelFactory.cxx b/sc/source/ui/sidebar/ScPanelFactory.cxx index e78e9bd68f52..424cca43e932 100644 --- a/sc/source/ui/sidebar/ScPanelFactory.cxx +++ b/sc/source/ui/sidebar/ScPanelFactory.cxx @@ -98,7 +98,6 @@ Reference<ui::XUIElement> SAL_CALL ScPanelFactory::createUIElement ( else if (rsResourceURL.endsWith("/DatabasePropertyPanel")) { xPanel = ScDatabasePropertyPanel::Create( pParent, xFrame, pBindings ); - nMinimumSize = 0; } if (xPanel) diff --git a/sc/uiconfig/scalc/ui/sidebardatabase.ui b/sc/uiconfig/scalc/ui/sidebardatabase.ui index 52a8c15760a0..b8d085b42ef7 100644 --- a/sc/uiconfig/scalc/ui/sidebardatabase.ui +++ b/sc/uiconfig/scalc/ui/sidebardatabase.ui @@ -2,123 +2,138 @@ <!-- Generated with glade 3.40.0 --> <interface domain="sc"> <requires lib="gtk+" version="3.24"/> - <!-- n-columns=2 n-rows=5 --> + <!-- n-columns=1 n-rows=1 --> <object class="GtkGrid" id="DatabasePropertyPanel"> <property name="visible">True</property> <property name="can-focus">False</property> + <property name="margin-top">2</property> + <property name="margin-bottom">2</property> <child> - <object class="GtkCheckButton" id="chk_header_row"> - <property name="label" translatable="yes" context="sidebardatabase|show_header_row_checkbox">Show Header Row</property> - <property name="visible">True</property> - <property name="can-focus">True</property> - <property name="receives-default">False</property> - <property name="draw-indicator">True</property> - </object> - <packing> - <property name="left-attach">0</property> - <property name="top-attach">0</property> - </packing> - </child> - <child> - <object class="GtkCheckButton" id="chk_first_column"> - <property name="label" translatable="yes" context="sidebardatabase|first_column_formatting_checkbox">First Column</property> - <property name="visible">True</property> - <property name="can-focus">True</property> - <property name="receives-default">False</property> - <property name="draw-indicator">True</property> - </object> - <packing> - <property name="left-attach">0</property> - <property name="top-attach">4</property> - </packing> - </child> - <child> - <object class="GtkCheckButton" id="chk_last_column"> - <property name="label" translatable="yes" context="sidebardatabase|last_column_formatting_checkbox">Last Column</property> - <property name="visible">True</property> - <property name="can-focus">True</property> - <property name="receives-default">False</property> - <property name="draw-indicator">True</property> - </object> - <packing> - <property name="left-attach">1</property> - <property name="top-attach">4</property> - </packing> - </child> - <child> - <object class="GtkCheckButton" id="chk_banded_cols"> - <property name="label" translatable="yes" context="sidebardatabase|banded_columns_formatting_checkbox">Banded Columns</property> - <property name="visible">True</property> - <property name="can-focus">True</property> - <property name="receives-default">False</property> - <property name="draw-indicator">True</property> - </object> - <packing> - <property name="left-attach">1</property> - <property name="top-attach">3</property> - </packing> - </child> - <child> - <object class="GtkCheckButton" id="chk_banded_rows"> - <property name="label" translatable="yes" context="sidebardatabase|banded_rows_formatting_checkbox">Banded Rows</property> - <property name="visible">True</property> - <property name="can-focus">True</property> - <property name="receives-default">False</property> - <property name="draw-indicator">True</property> - </object> - <packing> - <property name="left-attach">0</property> - <property name="top-attach">3</property> - </packing> - </child> - <child> - <object class="GtkSeparator"> - <property name="visible">True</property> - <property name="can-focus">False</property> - </object> - <packing> - <property name="left-attach">0</property> - <property name="top-attach">2</property> - </packing> - </child> - <child> - <object class="GtkSeparator"> + <!-- n-columns=2 n-rows=5 --> + <object class="GtkGrid" id="grid1"> <property name="visible">True</property> <property name="can-focus">False</property> - </object> - <packing> - <property name="left-attach">1</property> - <property name="top-attach">2</property> - </packing> - </child> - <child> - <object class="GtkCheckButton" id="chk_filter_buttons"> - <property name="label" translatable="yes" context="sidebardatabase|show_filter_buttons_checkbox">Show Filter Buttons</property> - <property name="visible">True</property> - <property name="can-focus">True</property> - <property name="receives-default">False</property> - <property name="draw-indicator">True</property> + <property name="row-spacing">2</property> + <property name="column-spacing">2</property> + <child> + <object class="GtkCheckButton" id="chk_header_row"> + <property name="label" translatable="yes" context="sidebardatabase|show_header_row_checkbox">Show Header Row</property> + <property name="visible">True</property> + <property name="can-focus">True</property> + <property name="receives-default">False</property> + <property name="draw-indicator">True</property> + </object> + <packing> + <property name="left-attach">0</property> + <property name="top-attach">0</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="chk_total_row"> + <property name="label" translatable="yes" context="sidebardatabase|show_total_row_checkbox">Show Total Row</property> + <property name="visible">True</property> + <property name="can-focus">True</property> + <property name="receives-default">False</property> + <property name="draw-indicator">True</property> + </object> + <packing> + <property name="left-attach">1</property> + <property name="top-attach">0</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="chk_filter_buttons"> + <property name="label" translatable="yes" context="sidebardatabase|show_filter_buttons_checkbox">Show Filter Buttons</property> + <property name="visible">True</property> + <property name="can-focus">True</property> + <property name="receives-default">False</property> + <property name="draw-indicator">True</property> + </object> + <packing> + <property name="left-attach">0</property> + <property name="top-attach">1</property> + </packing> + </child> + <child> + <object class="GtkSeparator"> + <property name="visible">True</property> + <property name="can-focus">False</property> + </object> + <packing> + <property name="left-attach">0</property> + <property name="top-attach">2</property> + </packing> + </child> + <child> + <object class="GtkSeparator"> + <property name="visible">True</property> + <property name="can-focus">False</property> + </object> + <packing> + <property name="left-attach">1</property> + <property name="top-attach">2</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="chk_banded_rows"> + <property name="label" translatable="yes" context="sidebardatabase|banded_rows_formatting_checkbox">Banded Rows</property> + <property name="visible">True</property> + <property name="can-focus">True</property> + <property name="receives-default">False</property> + <property name="draw-indicator">True</property> + </object> + <packing> + <property name="left-attach">0</property> + <property name="top-attach">3</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="chk_banded_cols"> + <property name="label" translatable="yes" context="sidebardatabase|banded_columns_formatting_checkbox">Banded Columns</property> + <property name="visible">True</property> + <property name="can-focus">True</property> + <property name="receives-default">False</property> + <property name="draw-indicator">True</property> + </object> + <packing> + <property name="left-attach">1</property> + <property name="top-attach">3</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="chk_first_column"> + <property name="label" translatable="yes" context="sidebardatabase|first_column_formatting_checkbox">First Column</property> + <property name="visible">True</property> + <property name="can-focus">True</property> + <property name="receives-default">False</property> + <property name="draw-indicator">True</property> + </object> + <packing> + <property name="left-attach">0</property> + <property name="top-attach">4</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="chk_last_column"> + <property name="label" translatable="yes" context="sidebardatabase|last_column_formatting_checkbox">Last Column</property> + <property name="visible">True</property> + <property name="can-focus">True</property> + <property name="receives-default">False</property> + <property name="draw-indicator">True</property> + </object> + <packing> + <property name="left-attach">1</property> + <property name="top-attach">4</property> + </packing> + </child> + <child> + <placeholder/> + </child> </object> <packing> <property name="left-attach">0</property> - <property name="top-attach">1</property> - </packing> - </child> - <child> - <object class="GtkCheckButton" id="chk_total_row"> - <property name="label" translatable="yes" context="sidebardatabase|show_total_row_checkbox">Show Total Row</property> - <property name="visible">True</property> - <property name="can-focus">True</property> - <property name="receives-default">False</property> - <property name="draw-indicator">True</property> - </object> - <packing> - <property name="left-attach">1</property> <property name="top-attach">0</property> </packing> </child> - <child> - <placeholder/> - </child> </object> </interface> commit ff188c7058ff924dc200b7a17b2705886b602265 Author: Balazs Varga <[email protected]> AuthorDate: Thu Oct 30 18:33:37 2025 +0100 Commit: Balazs Varga <[email protected]> CommitDate: Fri Oct 31 16:29:11 2025 +0100 Calc Table style: limit UI and functionality only for ranges with table styles. Do not allow for simple DbRanges. Change-Id: I03ddc5760eff95f1284c08e0904f711309dbdef9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193227 Tested-by: Balazs Varga <[email protected]> Reviewed-by: Balazs Varga <[email protected]> diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index 4a464545d69a..691e8665f1f0 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -6975,7 +6975,9 @@ void ScGridWindow::UpdateDatabaseOverlay() ScAddress aCurrentAddress = mrViewData.GetCurPos(); std::vector<basegfx::B2DRange> aRanges; ScRange aCurrRange; - if (ScDBData* pDBData = rDocument.GetDBAtCursor(aCurrentAddress.Col(), aCurrentAddress.Row(), aCurrentAddress.Tab(), ScDBDataPortion::AREA)) + ScDBData* pDBData = rDocument.GetDBAtCursor(aCurrentAddress.Col(), aCurrentAddress.Row(), + aCurrentAddress.Tab(), ScDBDataPortion::AREA); + if (pDBData && pDBData->GetTableStyleInfo()) { pDBData->GetArea(aCurrRange); Point aStart = mrViewData.GetScrPos(aCurrRange.aStart.Col(), diff --git a/sc/source/ui/view/tableshell.cxx b/sc/source/ui/view/tableshell.cxx index edbadacfa26b..058b93142dd4 100644 --- a/sc/source/ui/view/tableshell.cxx +++ b/sc/source/ui/view/tableshell.cxx @@ -76,7 +76,7 @@ void ScTableShell::ExecuteDatabaseSettings(SfxRequest& rReq) const ScDatabaseSettingItem* pDBItem = static_cast<const ScDatabaseSettingItem*>(pItem); const ScDBData* pDBData = GetDBDataAtCursor(); - if (pDBData) + if (pDBData && pDBData->GetTableStyleInfo()) { ScDBData aNewDBData(*pDBData); aNewDBData.SetAutoFilter(pDBItem->HasShowFilters()); diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx index df844997db69..845c4c38c2b6 100644 --- a/sc/source/ui/view/tabview3.cxx +++ b/sc/source/ui/view/tabview3.cxx @@ -671,8 +671,9 @@ void ScTabView::CursorPosChanged() aViewData.GetViewShell()->SetSparklineShell(bSparkline); if (!bSparkline) { - bool bHasDBTable = rDocument.GetDBAtCursor(rAddr.Col(), rAddr.Row(), rAddr.Tab(), ScDBDataPortion::AREA) != nullptr; - aViewData.GetViewShell()->SetTableShell(bHasDBTable); + const ScDBData* pDbData = rDocument.GetDBAtCursor(rAddr.Col(), rAddr.Row(), rAddr.Tab(), ScDBDataPortion::AREA); + bool bHasDBTableStyle = pDbData && pDbData->GetTableStyleInfo(); + aViewData.GetViewShell()->SetTableShell(bHasDBTableStyle); } }
