21#include <com/sun/star/uno/RuntimeException.hpp>
32constexpr OUStringLiteral lcl_aServiceName_Logarithmic =
u"com.sun.star.chart2.LogarithmicScaling";
33constexpr OUStringLiteral lcl_aServiceName_Exponential =
u"com.sun.star.chart2.ExponentialScaling";
34constexpr OUStringLiteral lcl_aServiceName_Linear =
u"com.sun.star.chart2.LinearScaling";
35constexpr OUStringLiteral lcl_aServiceName_Power =
u"com.sun.star.chart2.PowerScaling";
46 m_fLogOfBase(
log( 10.0 ) )
52 m_fLogOfBase(
log( fBase ) )
62 if( std::isnan(
value ) || std::isinf(
value ) )
63 return std::numeric_limits<double>::quiet_NaN();
74 return lcl_aServiceName_Logarithmic;
79 return lcl_aServiceName_Logarithmic;
89 return { lcl_aServiceName_Logarithmic };
108 if( std::isnan(
value ) || std::isinf(
value ) )
109 return std::numeric_limits<double>::quiet_NaN();
120 return lcl_aServiceName_Exponential;
125 return lcl_aServiceName_Exponential;
135 return { lcl_aServiceName_Exponential };
153 if( std::isnan(
value ) || std::isinf(
value ) )
154 return std::numeric_limits<double>::quiet_NaN();
163 throw uno::RuntimeException(
"Divide by zero exception");
170 return lcl_aServiceName_Linear;
175 return lcl_aServiceName_Linear ;
185 return { lcl_aServiceName_Linear };
193 m_fExponent( fExponent )
201 if( std::isnan(
value ) || std::isinf(
value ) )
202 return std::numeric_limits<double>::quiet_NaN();
211 throw uno::RuntimeException(
"Divide by zero exception");
219 return lcl_aServiceName_Power;
224 return lcl_aServiceName_Power;
234 return { lcl_aServiceName_Power };
239extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface *
241 css::uno::Sequence<css::uno::Any>
const &)
246extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface *
248 css::uno::Sequence<css::uno::Any>
const &)
253extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface *
255 css::uno::Sequence<css::uno::Any>
const &)
260extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface *
262 css::uno::Sequence<css::uno::Any>
const &)
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * com_sun_star_chart2_LinearScaling_get_implementation(css::uno::XComponentContext *, css::uno::Sequence< css::uno::Any > const &)
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * com_sun_star_chart2_LogarithmicScaling_get_implementation(css::uno::XComponentContext *, css::uno::Sequence< css::uno::Any > const &)
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * com_sun_star_chart2_ExponentialScaling_get_implementation(css::uno::XComponentContext *, css::uno::Sequence< css::uno::Any > const &)
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * com_sun_star_chart2_PowerScaling_get_implementation(css::uno::XComponentContext *, css::uno::Sequence< css::uno::Any > const &)
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
virtual css::uno::Reference< css::chart2::XScaling > SAL_CALL getInverseScaling() override
virtual OUString SAL_CALL getImplementationName() override
declare XServiceInfo methods
virtual double SAL_CALL doScaling(double value) override
virtual ~ExponentialScaling() override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual OUString SAL_CALL getServiceName() override
ExponentialScaling()
base is 10.0
virtual OUString SAL_CALL getImplementationName() override
declare XServiceInfo methods
virtual double SAL_CALL doScaling(double value) override
virtual ~LinearScaling() override
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual css::uno::Reference< css::chart2::XScaling > SAL_CALL getInverseScaling() override
virtual OUString SAL_CALL getServiceName() override
const double m_fLogOfBase
virtual css::uno::Reference< css::chart2::XScaling > SAL_CALL getInverseScaling() override
LogarithmicScaling()
base is 10.0
virtual ~LogarithmicScaling() override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual double SAL_CALL doScaling(double value) override
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
virtual OUString SAL_CALL getImplementationName() override
declare XServiceInfo methods
virtual OUString SAL_CALL getServiceName() override
PowerScaling()
exponent 10.0
virtual ~PowerScaling() override
virtual css::uno::Reference< css::chart2::XScaling > SAL_CALL getInverseScaling() override
virtual OUString SAL_CALL getImplementationName() override
declare XServiceInfo methods
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
virtual OUString SAL_CALL getServiceName() override
virtual double SAL_CALL doScaling(double value) override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)