nss: upgrade to release 3.73
[LibreOffice.git] / chart2 / source / view / axes / DateScaling.hxx
blob29b7a139ae3279d1b2ace315e41da0480959965b
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 #pragma once
21 #include <com/sun/star/chart2/XScaling.hpp>
22 #include <com/sun/star/lang/XServiceInfo.hpp>
23 #include <com/sun/star/lang/XServiceName.hpp>
24 #include <cppuhelper/implbase.hxx>
25 #include <tools/date.hxx>
27 namespace chart
30 class DateScaling :
31 public ::cppu::WeakImplHelper<
32 css::chart2::XScaling,
33 css::lang::XServiceName,
34 css::lang::XServiceInfo
37 public:
38 DateScaling( const Date& rNullDate, sal_Int32 nTimeUnit, bool bShifted );
39 virtual ~DateScaling() override;
41 /// declare XServiceInfo methods
42 virtual OUString SAL_CALL getImplementationName() override;
43 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
44 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
46 // ____ XScaling ____
47 virtual double SAL_CALL doScaling( double value ) override;
49 virtual css::uno::Reference<
50 css::chart2::XScaling > SAL_CALL
51 getInverseScaling() override;
53 // ____ XServiceName ____
54 virtual OUString SAL_CALL getServiceName() override;
56 private:
57 const Date m_aNullDate;
58 const sal_Int32 m_nTimeUnit;
59 const bool m_bShifted;
62 class InverseDateScaling :
63 public ::cppu::WeakImplHelper<
64 css::chart2::XScaling,
65 css::lang::XServiceName,
66 css::lang::XServiceInfo
69 public:
70 InverseDateScaling( const Date& rNullDate, sal_Int32 nTimeUnit, bool bShifted );
71 virtual ~InverseDateScaling() override;
73 /// declare XServiceInfo methods
74 virtual OUString SAL_CALL getImplementationName() override;
75 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
76 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
78 // ____ XScaling ____
79 virtual double SAL_CALL doScaling( double value ) override;
81 virtual css::uno::Reference< css::chart2::XScaling > SAL_CALL
82 getInverseScaling() override;
84 // ____ XServiceName ____
85 virtual OUString SAL_CALL getServiceName() override;
87 private:
88 const Date m_aNullDate;
89 const sal_Int32 m_nTimeUnit;
90 const bool m_bShifted;
93 } //namespace chart
95 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */