[Libreoffice-commits] core.git: 2 commits - sw/uiconfig vcl/source

Caolán McNamara caolanm at redhat.com
Tue Jul 9 04:13:04 PDT 2013


 sw/uiconfig/swriter/ui/opttablepage.ui |    3 +--
 vcl/source/window/layout.cxx           |    8 ++++++--
 2 files changed, 7 insertions(+), 4 deletions(-)

New commits:
commit 95e394a62e0fe0c780850367c83d0b54e89239d1
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Jul 9 12:11:04 2013 +0100

    we don't really want homogeneous spin fields and labels
    
    Change-Id: Ic97254e338cdac63fd08ee59daf401e92f656f1b

diff --git a/sw/uiconfig/swriter/ui/opttablepage.ui b/sw/uiconfig/swriter/ui/opttablepage.ui
index de5db4a..48a7f3c 100644
--- a/sw/uiconfig/swriter/ui/opttablepage.ui
+++ b/sw/uiconfig/swriter/ui/opttablepage.ui
@@ -389,6 +389,7 @@
                     <property name="can_focus">False</property>
                     <property name="hexpand">True</property>
                     <property name="spacing">12</property>
+                    <property name="homogeneous">True</property>
                     <child>
                       <object class="GtkGrid" id="grid4">
                         <property name="visible">True</property>
@@ -398,7 +399,6 @@
                         <property name="orientation">vertical</property>
                         <property name="row_spacing">6</property>
                         <property name="column_spacing">12</property>
-                        <property name="column_homogeneous">True</property>
                         <child>
                           <object class="GtkLabel" id="label4">
                             <property name="visible">True</property>
@@ -495,7 +495,6 @@
                         <property name="orientation">vertical</property>
                         <property name="row_spacing">6</property>
                         <property name="column_spacing">12</property>
-                        <property name="column_homogeneous">True</property>
                         <child>
                           <object class="GtkSpinButton" id="rowinsert:0.00cm">
                             <property name="visible">True</property>
commit c01780b84939c5bdaee84a6b5b4628d515b4f364
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Jul 9 12:10:41 2013 +0100

    counting fence posts not fence sections
    
    Change-Id: Ic97a766efdbd5e169923b9e7875b16b8ebd88deb

diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index 0cdf84c..2f1d404 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -1041,7 +1041,9 @@ void VclGrid::setAllocation(const Size& rAllocation)
         calcMaxs(A, aWidths, aHeights);
     }
 
-    long nAvailableWidth = rAllocation.Width() - (get_column_spacing() * nMaxX);
+    long nAvailableWidth = rAllocation.Width();
+    if (nMaxX)
+        nAvailableWidth -= get_column_spacing() * (nMaxX - 1);
     if (get_column_homogeneous())
     {
         for (sal_Int32 x = 0; x < nMaxX; ++x)
@@ -1071,7 +1073,9 @@ void VclGrid::setAllocation(const Size& rAllocation)
         }
     }
 
-    long nAvailableHeight = rAllocation.Height() - (get_row_spacing() * nMaxY);
+    long nAvailableHeight = rAllocation.Height();
+    if (nMaxY)
+        nAvailableHeight -= get_row_spacing() * (nMaxY - 1);
     if (get_row_homogeneous())
     {
         for (sal_Int32 y = 0; y < nMaxY; ++y)


More information about the Libreoffice-commits mailing list