22#include <rtl/math.hxx>
23#include <osl/diagnose.h>
25#include <com/sun/star/chart/TimeUnit.hpp>
32using namespace ::rtl::math;
33using ::com::sun::star::chart::TimeUnit::DAY;
34using ::com::sun::star::chart::TimeUnit::MONTH;
35using ::com::sun::star::chart::TimeUnit::YEAR;
39 : m_aScale(
std::move( aScale ))
40 , m_aIncrement(
std::move( aIncrement ))
47 OSL_ENSURE(
m_xInverseScaling.is(),
"each Scaling needs to return an inverse Scaling" );
57 rAllTickInfos.resize(2);
73 xInverseScaling = xScaling->getInverseScaling();
77 while( aDate<= aMaxDate )
79 if( bShifted && aDate==aMaxDate )
84 if( xInverseScaling.is() )
86 rMajorTicks.push_back( aNewTick );
108 aDate = aNull +
static_cast<sal_Int32
>(::rtl::math::approxFloor(
m_aScale.
Minimum));
109 while( aDate<= aMaxDate )
111 if( bShifted && aDate==aMaxDate )
115 if( xInverseScaling.is() )
117 rMinorTicks.push_back( aNewTick );
void AddDays(sal_Int32 nAddDays)
static Date GetDateSomeYearsAway(const Date &rD, sal_Int32 nYearDistance)
static Date GetDateSomeMonthsAway(const Date &rD, sal_Int32 nMonthDistance)
void getAllTicks(TickInfoArraysType &rAllTickInfos) const
DateTickFactory(ExplicitScaleData aScale, ExplicitIncrementData aIncrement)
void getAllTicksShifted(TickInfoArraysType &rAllTickInfos) const
css::uno::Reference< css::chart2::XScaling > m_xInverseScaling
ExplicitIncrementData m_aIncrement
ExplicitScaleData m_aScale
std::vector< TickInfoArrayType > TickInfoArraysType
std::vector< TickInfo > TickInfoArrayType
describes how tickmarks are positioned on the scale of an axis.
css::chart::TimeInterval MajorTimeInterval
the following two members are only for date-time axis
css::chart::TimeInterval MinorTimeInterval
This structure contains the explicit values for a scale like Minimum and Maximum.
css::uno::Reference< css::chart2::XScaling > Scaling