Kaydet (Commit) e776418c authored tarafından Kohei Yoshida's avatar Kohei Yoshida

Clean this up a bit.

Change-Id: Ief207c72a22eee6a745f885912ea929ade717321
üst 5aa51c08
...@@ -23,15 +23,13 @@ ...@@ -23,15 +23,13 @@
#include "ViewDefines.hxx" #include "ViewDefines.hxx"
#include <rtl/math.hxx> #include <rtl/math.hxx>
namespace chart
{
using namespace ::com::sun::star; using namespace ::com::sun::star;
using namespace ::com::sun::star::chart2;
using namespace ::rtl::math; using namespace ::rtl::math;
using ::basegfx::B2DVector; using ::basegfx::B2DVector;
TickInfo::TickInfo( const ::com::sun::star::uno::Reference< namespace chart {
::com::sun::star::chart2::XScaling >& xInverse )
TickInfo::TickInfo( const uno::Reference<chart2::XScaling>& xInverse )
: fScaledTickValue( 0.0 ) : fScaledTickValue( 0.0 )
, xInverseScaling( xInverse ) , xInverseScaling( xInverse )
, aTickScreenPosition(0.0,0.0) , aTickScreenPosition(0.0,0.0)
...@@ -115,7 +113,7 @@ TickFactory::~TickFactory() ...@@ -115,7 +113,7 @@ TickFactory::~TickFactory()
bool TickFactory::isDateAxis() const 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 void TickFactory::getAllTicks( ::std::vector< ::std::vector< TickInfo > >& rAllTickInfos ) const
...@@ -148,7 +146,7 @@ TickFactory2D::TickFactory2D( ...@@ -148,7 +146,7 @@ TickFactory2D::TickFactory2D(
, m_fOffset_LogicToScreen(0.0) , m_fOffset_LogicToScreen(0.0)
{ {
double fWidthY = m_fScaledVisibleMax - m_fScaledVisibleMin; 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_fStrech_LogicToScreen = 1.0/fWidthY;
m_fOffset_LogicToScreen = -m_fScaledVisibleMin; m_fOffset_LogicToScreen = -m_fScaledVisibleMin;
......
...@@ -29,39 +29,36 @@ ...@@ -29,39 +29,36 @@
#include <vector> #include <vector>
namespace chart namespace chart {
{
struct TickInfo struct TickInfo
{ {
double fScaledTickValue; double fScaledTickValue;
::com::sun::star::uno::Reference< css::uno::Reference<css::chart2::XScaling> xInverseScaling;
::com::sun::star::chart2::XScaling > xInverseScaling;
::basegfx::B2DVector aTickScreenPosition; ::basegfx::B2DVector aTickScreenPosition;
bool bPaintIt; bool bPaintIt;
::com::sun::star::uno::Reference< css::uno::Reference<css::drawing::XShape> xTextShape;
::com::sun::star::drawing::XShape > xTextShape;
OUString aText;//used only for complex categories so far 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 sal_Int32 nFactorForLimitedTextWidth;//categories in higher levels of complex categories can have more place than a single simple category
//methods: //methods:
TickInfo( const ::com::sun::star::uno::Reference< TickInfo( const css::uno::Reference<css::chart2::XScaling>& xInverse );
::com::sun::star::chart2::XScaling >& xInverseScaling );
double getUnscaledTickValue() const; double getUnscaledTickValue() const;
sal_Int32 getScreenDistanceBetweenTicks( const TickInfo& rOherTickInfo ) const; sal_Int32 getScreenDistanceBetweenTicks( const TickInfo& rOherTickInfo ) const;
private: private:
TickInfo(); TickInfo();
}; };
class TickIter class TickIter
{ {
public: public:
virtual ~TickIter(){}; virtual ~TickIter() {}
virtual TickInfo* firstInfo()=0; virtual TickInfo* firstInfo() = 0;
virtual TickInfo* nextInfo()=0; virtual TickInfo* nextInfo() = 0;
}; };
class PureTickIter : public TickIter class PureTickIter : public TickIter
...@@ -111,7 +108,7 @@ public: ...@@ -111,7 +108,7 @@ public:
, const ExplicitIncrementData& rIncrement , const ExplicitIncrementData& rIncrement
, const ::basegfx::B2DVector& rStartScreenPos, const ::basegfx::B2DVector& rEndScreenPos , const ::basegfx::B2DVector& rStartScreenPos, const ::basegfx::B2DVector& rEndScreenPos
, const ::basegfx::B2DVector& rAxisLineToLabelLineShift ); , const ::basegfx::B2DVector& rAxisLineToLabelLineShift );
//, double fStrech_SceneToScreen, double fOffset_SceneToScreen );
virtual ~TickFactory2D(); virtual ~TickFactory2D();
static sal_Int32 getTickScreenDistance( TickIter& rIter ); static sal_Int32 getTickScreenDistance( TickIter& rIter );
...@@ -146,6 +143,7 @@ private: //member ...@@ -146,6 +143,7 @@ private: //member
}; };
} //namespace chart } //namespace chart
#endif #endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment