[Libreoffice-commits] core.git: 2 commits - solenv/gbuild svx/source

David Tardon dtardon at redhat.com
Thu Jun 13 05:48:45 PDT 2013


 solenv/gbuild/UIConfig.mk            |    2 -
 svx/source/table/tablecontroller.cxx |   42 +++++++++++++++++++++++++++++++++++
 2 files changed, 43 insertions(+), 1 deletion(-)

New commits:
commit 14c139e3705c537556f493657f9cb01818d1f80d
Author: David Tardon <dtardon at redhat.com>
Date:   Thu Jun 13 14:47:50 2013 +0200

    fdo#62224 set spacing to content too
    
    Change-Id: Idafcd96ff8b01139dfc22cf3d0d2f5e98759488e

diff --git a/svx/source/table/tablecontroller.cxx b/svx/source/table/tablecontroller.cxx
index b01839c..d4aba09 100644
--- a/svx/source/table/tablecontroller.cxx
+++ b/svx/source/table/tablecontroller.cxx
@@ -2596,11 +2596,14 @@ struct LinesState
     LinesState(SvxBoxItem& rBoxItem_, SvxBoxInfoItem& rBoxInfoItem_)
         : rBoxItem(rBoxItem_)
         , rBoxInfoItem(rBoxInfoItem_)
+        , bDistanceIndeterminate(false)
     {
         std::fill_n(aBorderSet, 4, false);
         std::fill_n(aInnerLineSet, 2, false);
         std::fill_n(aBorderIndeterminate, 4, false);
         std::fill_n(aInnerLineIndeterminate, 2, false);
+        std::fill_n(aDistanceSet, 4, false);
+        std::fill_n(aDistance, 4, 0);
     }
 
     SvxBoxItem& rBoxItem;
@@ -2609,6 +2612,9 @@ struct LinesState
     bool aInnerLineSet[2];
     bool aBorderIndeterminate[4];
     bool aInnerLineIndeterminate[2];
+    bool aDistanceSet[4];
+    sal_uInt16 aDistance[4];
+    bool bDistanceIndeterminate;
 };
 
 class BoxItemWrapper
@@ -2694,6 +2700,21 @@ void lcl_MergeBorderOrInnerLine(
     }
 }
 
+void lcl_MergeDistance(
+        LinesState& rLinesState, const sal_uInt16 nIndex, const sal_uInt16 nDistance)
+{
+    if (rLinesState.aDistanceSet[nIndex])
+    {
+        if (!rLinesState.bDistanceIndeterminate)
+            rLinesState.bDistanceIndeterminate = nDistance != rLinesState.aDistance[nIndex];
+    }
+    else
+    {
+        rLinesState.aDistance[nIndex] = nDistance;
+        rLinesState.aDistanceSet[nIndex] = true;
+    }
+}
+
 void lcl_MergeCommonBorderAttr(LinesState& rLinesState, const SvxBoxItem& rCellBoxItem, const sal_Int32 nCellFlags)
 {
     if( (nCellFlags & (CELL_BEFORE|CELL_AFTER|CELL_UPPER|CELL_LOWER)) != 0 )
@@ -2714,6 +2735,9 @@ void lcl_MergeCommonBorderAttr(LinesState& rLinesState, const SvxBoxItem& rCellB
             else if( nCellFlags & CELL_AFTER )
                 lcl_MergeBorderLine(rLinesState, rCellBoxItem.GetLeft(), BOX_LINE_RIGHT, VALID_RIGHT);
         }
+
+        // NOTE: inner distances for cells outside the selected range
+        // are not relevant -> we ignore them.
     }
     else
     {
@@ -2723,6 +2747,11 @@ void lcl_MergeCommonBorderAttr(LinesState& rLinesState, const SvxBoxItem& rCellB
         lcl_MergeBorderOrInnerLine(rLinesState, rCellBoxItem.GetBottom(), BOX_LINE_BOTTOM, VALID_BOTTOM, nCellFlags & CELL_BOTTOM);
         lcl_MergeBorderOrInnerLine(rLinesState, rCellBoxItem.GetLeft(), BOX_LINE_LEFT, VALID_LEFT, nCellFlags & CELL_LEFT);
         lcl_MergeBorderOrInnerLine(rLinesState, rCellBoxItem.GetRight(), BOX_LINE_RIGHT, VALID_RIGHT, nCellFlags & CELL_RIGHT);
+
+        lcl_MergeDistance(rLinesState, BOX_LINE_TOP, rCellBoxItem.GetDistance(BOX_LINE_TOP));
+        lcl_MergeDistance(rLinesState, BOX_LINE_BOTTOM, rCellBoxItem.GetDistance(BOX_LINE_BOTTOM));
+        lcl_MergeDistance(rLinesState, BOX_LINE_LEFT, rCellBoxItem.GetDistance(BOX_LINE_LEFT));
+        lcl_MergeDistance(rLinesState, BOX_LINE_RIGHT, rCellBoxItem.GetDistance(BOX_LINE_RIGHT));
     }
 }
 
@@ -2794,6 +2823,19 @@ void SvxTableController::FillCommonBorderAttrFromSelectedCells( SvxBoxItem& rBox
                 aLinesState.rBoxInfoItem.SetValid(VALID_HORI);
             if (!aLinesState.aInnerLineIndeterminate[BOXINFO_LINE_VERT])
                 aLinesState.rBoxInfoItem.SetValid(VALID_VERT);
+
+            if (!aLinesState.bDistanceIndeterminate)
+            {
+                if (aLinesState.aDistanceSet[BOX_LINE_TOP])
+                    aLinesState.rBoxItem.SetDistance(aLinesState.aDistance[BOX_LINE_TOP], BOX_LINE_TOP);
+                if (aLinesState.aDistanceSet[BOX_LINE_BOTTOM])
+                    aLinesState.rBoxItem.SetDistance(aLinesState.aDistance[BOX_LINE_BOTTOM], BOX_LINE_BOTTOM);
+                if (aLinesState.aDistanceSet[BOX_LINE_LEFT])
+                    aLinesState.rBoxItem.SetDistance(aLinesState.aDistance[BOX_LINE_LEFT], BOX_LINE_LEFT);
+                if (aLinesState.aDistanceSet[BOX_LINE_RIGHT])
+                    aLinesState.rBoxItem.SetDistance(aLinesState.aDistance[BOX_LINE_RIGHT], BOX_LINE_RIGHT);
+                aLinesState.rBoxInfoItem.SetValid(VALID_DISTANCE);
+            }
         }
     }
 }
commit 118141cb83b6f8771f47dd4d685529f81a32eac3
Author: David Tardon <dtardon at redhat.com>
Date:   Thu Jun 13 10:36:05 2013 +0200

    gbuild: fix output
    
    Change-Id: Ifbe4a0b6b93c5be6dfd64b6c77ef7172d3f1c425

diff --git a/solenv/gbuild/UIConfig.mk b/solenv/gbuild/UIConfig.mk
index 82ff5a7..d76d5dd 100644
--- a/solenv/gbuild/UIConfig.mk
+++ b/solenv/gbuild/UIConfig.mk
@@ -140,7 +140,7 @@ $(call gb_UIImageListTarget_get_target,%) : $(gb_UIImageListTarget_DEPS) $(gb_UI
 
 .PHONY : $(call gb_UIImageListTarget_get_clean_target,%)
 $(call gb_UIImageListTarget_get_clean_target,%) :
-	$(call gb_Output_announce,$(2),$(false),UIL,1)
+	$(call gb_Output_announce,$*,$(false),UIL,1)
 	rm -f $(call gb_UIImageListTarget_get_target,$*)
 
 # Extract list of images referenced in a .ui file.


More information about the Libreoffice-commits mailing list