[Libreoffice-commits] core.git: Branch 'feature/perfwork4' - 2 commits - chart2/source

Kohei Yoshida kohei.yoshida at collabora.com
Tue Oct 21 12:49:12 PDT 2014


 chart2/source/view/axes/VCartesianAxis.cxx |   20 +++++++++-----------
 chart2/source/view/axes/VCartesianAxis.hxx |   16 ++++++++++++++++
 2 files changed, 25 insertions(+), 11 deletions(-)

New commits:
commit 074f0ef2f503dd3378481c2c66f32db10cbe5677
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Tue Oct 21 15:48:17 2014 -0400

    More method descriptions.
    
    Change-Id: I465e991c83cd5b711d73afd9407596ef1df70f27

diff --git a/chart2/source/view/axes/VCartesianAxis.hxx b/chart2/source/view/axes/VCartesianAxis.hxx
index 574bc2f..2492bb0 100644
--- a/chart2/source/view/axes/VCartesianAxis.hxx
+++ b/chart2/source/view/axes/VCartesianAxis.hxx
@@ -102,6 +102,16 @@ public:
 
 protected: //methods
     /**
+     * Go through all tick label positions and decide which labels to display
+     * based on the text shape geometry, overlap setting, tick interval,
+     * auto-stagger setting etc.
+     *
+     * When the auto-stagger setting is on, try to avoid overlaps by
+     * staggering labels or set the labels at an angle.  This method may
+     * change the axis label properties especially when the auto staggering is
+     * performed.  But the screen label positions will not be shifted in this
+     * method; it will be done in the doStaggeringOfLabels method.
+     *
      * @return true if the text shapes have been successfully created,
      *         otherwise false.  Returning false means the AxisLabelProperties
      *         have changed during the call, and the caller needs to call this
@@ -119,6 +129,12 @@ protected: //methods
     TickFactory2D* createTickFactory2D();
     void hideIdenticalScreenValues( TickInfoArraysType& rTickInfos ) const;
 
+    /**
+     * Shift the screen positions of the tick labels according to the stagger
+     * settings.  Stagger setting is finalized during the createTextShapes
+     * call, but this method does the physical shifting of the label
+     * positions.
+     */
     void    doStaggeringOfLabels( const AxisLabelProperties& rAxisLabelProperties
                             , TickFactory2D* pTickFactory2D );
     bool isAutoStaggeringOfLabelsAllowed(
commit 0e0c22adc1830a8840b5c002799f5d46b1df714a
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Tue Oct 21 15:20:20 2014 -0400

    Standard way of writing class description.
    
    Change-Id: I5572f4417a05132e46a4560088f519cdadfdaec1

diff --git a/chart2/source/view/axes/VCartesianAxis.cxx b/chart2/source/view/axes/VCartesianAxis.cxx
index a8a8a18..d095af5 100644
--- a/chart2/source/view/axes/VCartesianAxis.cxx
+++ b/chart2/source/view/axes/VCartesianAxis.cxx
@@ -188,19 +188,17 @@ void removeShapesAtWrongRhythm( TickIter& rIter
     }
 }
 
+/**
+ * If the labels are staggered and bInnerLine is true we iterate through
+ * only those labels that are closer to the diagram.
+ *
+ * If the labels are staggered and bInnerLine is false we iterate through
+ * only those that are farther from the diagram.
+ *
+ * If the labels are not staggered we iterate through all labels.
+ */
 class LabelIterator : public TickIter
 {
-    //this Iterator iterates over existing text labels
-
-    //if the labels are staggered and bInnerLine is true
-    //we iterate only through the labels which are lying more inside the diagram
-
-    //if the labels are staggered and bInnerLine is false
-    //we iterate only through the labels which are lying more outside the diagram
-
-    //if the labels are not staggered
-    //we iterate through all labels
-
 public:
     LabelIterator( TickInfoArrayType& rTickInfoVector
             , const AxisLabelStaggering eAxisLabelStaggering


More information about the Libreoffice-commits mailing list