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 3c287ee8b30e060b16fb10d842ebc15baeab384c
Author:     Balazs Varga <[email protected]>
AuthorDate: Thu Oct 30 21:11:18 2025 +0100
Commit:     Andras Timar <[email protected]>
CommitDate: Mon Nov 17 19:04:15 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]>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193685
    Tested-by: Andras Timar <[email protected]>
    Reviewed-by: Andras Timar <[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 c375f7e30dec..f8586457936d 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 c68311106249..92f7ece12c21 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 f52e876ff0846ea7f4bd358ccb99477a24fae8a1
Author:     Balazs Varga <[email protected]>
AuthorDate: Thu Oct 30 18:33:37 2025 +0100
Commit:     Andras Timar <[email protected]>
CommitDate: Mon Nov 17 19:04:02 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]>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193684
    Reviewed-by: Andras Timar <[email protected]>
    Tested-by: Andras Timar <[email protected]>

diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index acd21fb6d928..7a388c04df86 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -6992,7 +6992,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 6436073b9b10..52744dd972bb 100644
--- a/sc/source/ui/view/tableshell.cxx
+++ b/sc/source/ui/view/tableshell.cxx
@@ -77,7 +77,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 acfbfb0673f3..2d83d9a2f6cf 100644
--- a/sc/source/ui/view/tabview3.cxx
+++ b/sc/source/ui/view/tabview3.cxx
@@ -666,8 +666,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);
         }
     }
 

Reply via email to