chart2/source/view/axes/Tickmarks.cxx       |   12 +++++-------
 chart2/source/view/axes/Tickmarks.hxx       |   22 ++++++++++------------
 chart2/source/view/axes/VAxisBase.hxx       |   11 ++++++++++-
 chart2/source/view/axes/VAxisProperties.cxx |    4 ----
 chart2/source/view/axes/VAxisProperties.hxx |   11 +++++------
 5 files changed, 30 insertions(+), 30 deletions(-)

New commits:
commit 70ed2c1c9651c53cae201bc965d9da79fe99061a
Author: Kohei Yoshida <kohei.yosh...@collabora.com>
Date:   Thu Oct 9 17:44:56 2014 -0400

    Clean this up a bit.
    
    Change-Id: Ief207c72a22eee6a745f885912ea929ade717321

diff --git a/chart2/source/view/axes/Tickmarks.cxx 
b/chart2/source/view/axes/Tickmarks.cxx
index 0ab95cb..39c1fae 100644
--- a/chart2/source/view/axes/Tickmarks.cxx
+++ b/chart2/source/view/axes/Tickmarks.cxx
@@ -23,15 +23,13 @@
 #include "ViewDefines.hxx"
 #include <rtl/math.hxx>
 
-namespace chart
-{
 using namespace ::com::sun::star;
-using namespace ::com::sun::star::chart2;
 using namespace ::rtl::math;
 using ::basegfx::B2DVector;
 
-TickInfo::TickInfo( const ::com::sun::star::uno::Reference<
-                    ::com::sun::star::chart2::XScaling >& xInverse )
+namespace chart {
+
+TickInfo::TickInfo( const uno::Reference<chart2::XScaling>& xInverse )
 : fScaledTickValue( 0.0 )
 , xInverseScaling( xInverse )
 , aTickScreenPosition(0.0,0.0)
@@ -115,7 +113,7 @@ TickFactory::~TickFactory()
 
 bool TickFactory::isDateAxis() const
 {
-    return m_rScale.AxisType == AxisType::DATE;
+    return m_rScale.AxisType == chart2::AxisType::DATE;
 }
 
 void TickFactory::getAllTicks( ::std::vector< ::std::vector< TickInfo > >& 
rAllTickInfos ) const
@@ -148,7 +146,7 @@ TickFactory2D::TickFactory2D(
           , m_fOffset_LogicToScreen(0.0)
 {
     double fWidthY = m_fScaledVisibleMax - m_fScaledVisibleMin;
-    if( AxisOrientation_MATHEMATICAL==m_rScale.Orientation )
+    if (chart2::AxisOrientation_MATHEMATICAL == m_rScale.Orientation)
     {
         m_fStrech_LogicToScreen = 1.0/fWidthY;
         m_fOffset_LogicToScreen = -m_fScaledVisibleMin;
diff --git a/chart2/source/view/axes/Tickmarks.hxx 
b/chart2/source/view/axes/Tickmarks.hxx
index 411b80f..e791b41 100644
--- a/chart2/source/view/axes/Tickmarks.hxx
+++ b/chart2/source/view/axes/Tickmarks.hxx
@@ -29,39 +29,36 @@
 
 #include <vector>
 
-namespace chart
-{
+namespace chart {
 
 struct TickInfo
 {
     double      fScaledTickValue;
-    ::com::sun::star::uno::Reference<
-                    ::com::sun::star::chart2::XScaling > xInverseScaling;
+    css::uno::Reference<css::chart2::XScaling> xInverseScaling;
 
     ::basegfx::B2DVector  aTickScreenPosition;
     bool        bPaintIt;
 
-    ::com::sun::star::uno::Reference<
-        ::com::sun::star::drawing::XShape > xTextShape;
+    css::uno::Reference<css::drawing::XShape> xTextShape;
 
     OUString aText;//used only for complex categories so far
     sal_Int32 nFactorForLimitedTextWidth;//categories in higher levels of 
complex categories can have more place than a single simple category
 
 //methods:
-    TickInfo( const ::com::sun::star::uno::Reference<
-                    ::com::sun::star::chart2::XScaling >& xInverseScaling );
+    TickInfo( const css::uno::Reference<css::chart2::XScaling>& xInverse );
 
     double getUnscaledTickValue() const;
     sal_Int32 getScreenDistanceBetweenTicks( const TickInfo& rOherTickInfo ) 
const;
 private:
     TickInfo();
 };
+
 class TickIter
 {
 public:
-    virtual ~TickIter(){};
-    virtual TickInfo* firstInfo()=0;
-    virtual TickInfo* nextInfo()=0;
+    virtual ~TickIter() {}
+    virtual TickInfo* firstInfo() = 0;
+    virtual TickInfo* nextInfo() = 0;
 };
 
 class PureTickIter : public TickIter
@@ -111,7 +108,7 @@ public:
         , const ExplicitIncrementData& rIncrement
         , const ::basegfx::B2DVector& rStartScreenPos, const 
::basegfx::B2DVector& rEndScreenPos
         , const ::basegfx::B2DVector& rAxisLineToLabelLineShift );
-        //, double fStrech_SceneToScreen, double fOffset_SceneToScreen );
+
     virtual ~TickFactory2D();
 
     static sal_Int32    getTickScreenDistance( TickIter& rIter );
@@ -146,6 +143,7 @@ private: //member
 };
 
 } //namespace chart
+
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit c51e9c1eaa47ba12140498a52de83e07bf5ad98a
Author: Kohei Yoshida <kohei.yosh...@collabora.com>
Date:   Thu Oct 9 17:37:38 2014 -0400

    Description for m_aAllTickInfos.
    
    Especially wrt why it is nested vectors.
    
    Change-Id: I143785778ef62abbdc047a2d18c713f43a6522d9

diff --git a/chart2/source/view/axes/VAxisBase.hxx 
b/chart2/source/view/axes/VAxisBase.hxx
index b27c604..a53341a 100644
--- a/chart2/source/view/axes/VAxisBase.hxx
+++ b/chart2/source/view/axes/VAxisBase.hxx
@@ -87,7 +87,16 @@ protected: //member
     ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes > 
m_xGroupShape_Shapes;
     ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes > 
m_xTextTarget;
 
-    ::std::vector< ::std::vector< TickInfo > >                                 
         m_aAllTickInfos;
+    /**
+     * This typically consists of 2 TickInfo vectors (i.e. the outer vector
+     * has 2 child vector elements) for normal axis.  The first vector
+     * corresponds with the major ticks while the second corresponds with the
+     * minor ticks.
+     *
+     * It may have more than 2 TickInfo vectors for complex category axis
+     * which has multi-level axis labels.
+     */
+    std::vector< std::vector<TickInfo> > m_aAllTickInfos;
     bool m_bReCreateAllTickInfos;
 
     bool m_bRecordMaximumTextSize;
commit ba310537e3ddbf58842327516dee22d9d42413bd
Author: Kohei Yoshida <kohei.yosh...@collabora.com>
Date:   Thu Oct 9 17:05:41 2014 -0400

    Make AxisProperties non-virtual; nobody derives from it.
    
    Change-Id: I1cb5203374b6d13a914c335d73a7db6d8a47c4bb

diff --git a/chart2/source/view/axes/VAxisProperties.cxx 
b/chart2/source/view/axes/VAxisProperties.cxx
index ec63826..da04616 100644
--- a/chart2/source/view/axes/VAxisProperties.cxx
+++ b/chart2/source/view/axes/VAxisProperties.cxx
@@ -205,10 +205,6 @@ AxisProperties::AxisProperties( const AxisProperties& 
rAxisProperties )
         
m_pfExrtaLinePositionAtOtherAxis.reset(*rAxisProperties.m_pfExrtaLinePositionAtOtherAxis);
 }
 
-AxisProperties::~AxisProperties()
-{
-}
-
 LabelAlignment lcl_getLabelAlignmentForZAxis( const AxisProperties& 
rAxisProperties )
 {
     LabelAlignment aRet( LABEL_ALIGN_RIGHT );
diff --git a/chart2/source/view/axes/VAxisProperties.hxx 
b/chart2/source/view/axes/VAxisProperties.hxx
index 6ad35c5..b43f97b 100644
--- a/chart2/source/view/axes/VAxisProperties.hxx
+++ b/chart2/source/view/axes/VAxisProperties.hxx
@@ -57,7 +57,7 @@ enum AxisLabelStaggering
     , STAGGER_AUTO
 };
 
-struct AxisLabelProperties
+struct AxisLabelProperties SAL_FINAL
 {
     AxisLabelProperties();
 
@@ -84,7 +84,7 @@ struct AxisLabelProperties
     bool getIsStaggered() const;
 };
 
-struct AxisProperties
+struct AxisProperties SAL_FINAL
 {
     css::uno::Reference<css::chart2::XAxis> m_xAxisModel;
 
@@ -133,8 +133,8 @@ struct AxisProperties
     AxisProperties( const ::com::sun::star::uno::Reference< 
::com::sun::star::chart2::XAxis >& xAxisModel
                   , ExplicitCategoriesProvider* pExplicitCategoriesProvider );
     AxisProperties( const AxisProperties& rAxisProperties );
-    virtual ~AxisProperties();
-    virtual void init(bool bCartesian=false);//init from model data 
(m_xAxisModel)
+
+    void init(bool bCartesian=false);//init from model data (m_xAxisModel)
 
     void initAxisPositioning( const ::com::sun::star::uno::Reference< 
::com::sun::star::beans::XPropertySet >& xAxisProp );
 
@@ -144,8 +144,7 @@ struct AxisProperties
 private:
     AxisProperties();
 
-protected:
-    virtual TickmarkProperties  makeTickmarkProperties( sal_Int32 nDepth ) 
const;
+    TickmarkProperties  makeTickmarkProperties( sal_Int32 nDepth ) const;
     //@todo get this from somewhere; maybe for each subincrement
     //so far the model does not offer different settings for each tick depth
     VLineProperties      makeLinePropertiesForDepth( sal_Int32 /*nDepth*/ ) 
const { return m_aLineProperties; }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to