diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-10-09 17:44:56 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-10-09 17:48:32 -0400 |
commit | e776418ce41191a8b10e7ff62cd676a19e3e06ba (patch) | |
tree | 0fb4f7f9daab8ce96f626da216cdbcc882040dbe /chart2 | |
parent | 5aa51c08cd697ed22b16903926b3b43d5a978514 (diff) |
Clean this up a bit.
Change-Id: Ief207c72a22eee6a745f885912ea929ade717321
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/source/view/axes/Tickmarks.cxx | 12 | ||||
-rw-r--r-- | chart2/source/view/axes/Tickmarks.hxx | 22 |
2 files changed, 15 insertions, 19 deletions
diff --git a/chart2/source/view/axes/Tickmarks.cxx b/chart2/source/view/axes/Tickmarks.cxx index 0ab95cbc5cbf..39c1faea0d41 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 411b80f89f77..e791b4103230 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: */ |