1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef INCLUDED_CHART2_SOURCE_VIEW_AXES_DATESCALING_HXX
20 #define INCLUDED_CHART2_SOURCE_VIEW_AXES_DATESCALING_HXX
22 #include <com/sun/star/chart2/XScaling.hpp>
23 #include <com/sun/star/lang/XServiceInfo.hpp>
24 #include <com/sun/star/lang/XServiceName.hpp>
25 #include <com/sun/star/uno/XComponentContext.hpp>
26 #include <cppuhelper/implbase.hxx>
27 #include <tools/date.hxx>
33 public ::cppu::WeakImplHelper
<
34 css::chart2::XScaling
,
35 css::lang::XServiceName
,
36 css::lang::XServiceInfo
40 DateScaling( const Date
& rNullDate
, sal_Int32 nTimeUnit
, bool bShifted
);
41 virtual ~DateScaling() override
;
43 /// declare XServiceInfo methods
44 virtual OUString SAL_CALL
getImplementationName() override
;
45 virtual sal_Bool SAL_CALL
supportsService( const OUString
& ServiceName
) override
;
46 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames() override
;
49 virtual double SAL_CALL
doScaling( double value
) override
;
51 virtual css::uno::Reference
<
52 css::chart2::XScaling
> SAL_CALL
53 getInverseScaling() override
;
55 // ____ XServiceName ____
56 virtual OUString SAL_CALL
getServiceName() override
;
59 const Date m_aNullDate
;
60 const sal_Int32 m_nTimeUnit
;
61 const bool m_bShifted
;
64 class InverseDateScaling
:
65 public ::cppu::WeakImplHelper
<
66 css::chart2::XScaling
,
67 css::lang::XServiceName
,
68 css::lang::XServiceInfo
72 InverseDateScaling( const Date
& rNullDate
, sal_Int32 nTimeUnit
, bool bShifted
);
73 virtual ~InverseDateScaling() override
;
75 /// declare XServiceInfo methods
76 virtual OUString SAL_CALL
getImplementationName() override
;
77 virtual sal_Bool SAL_CALL
supportsService( const OUString
& ServiceName
) override
;
78 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames() override
;
81 virtual double SAL_CALL
doScaling( double value
) override
;
83 virtual css::uno::Reference
< css::chart2::XScaling
> SAL_CALL
84 getInverseScaling() override
;
86 // ____ XServiceName ____
87 virtual OUString SAL_CALL
getServiceName() override
;
90 const Date m_aNullDate
;
91 const sal_Int32 m_nTimeUnit
;
92 const bool m_bShifted
;
98 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */