LibreOffice Module chart2 (master) 1
MinimumAndMaximumSupplier.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#pragma once
21
22#include <sal/types.h>
23#include <tools/date.hxx>
24#include <tools/long.hxx>
25#include <set>
26
27namespace chart
28{
29
31{
32public:
33 virtual double getMinimumX() = 0;
34 virtual double getMaximumX() = 0;
35
36 //problem y maybe not is always the second border to ask for
37 virtual double getMinimumYInRange( double fMinimumX, double fMaximumX, sal_Int32 nAxisIndex ) = 0;
38 virtual double getMaximumYInRange( double fMinimumX, double fMaximumX, sal_Int32 nAxisIndex ) = 0;
39
40 //problem: z maybe not independent in future
41 virtual double getMinimumZ() = 0;
42 virtual double getMaximumZ() = 0;
43
44 virtual bool isExpandBorderToIncrementRhythm( sal_Int32 nDimensionIndex ) = 0;
45 virtual bool isExpandIfValuesCloseToBorder( sal_Int32 nDimensionIndex ) = 0;
46 virtual bool isExpandWideValuesToZero( sal_Int32 nDimensionIndex ) = 0;
47 virtual bool isExpandNarrowValuesTowardZero( sal_Int32 nDimensionIndex ) = 0;
48 virtual bool isSeparateStackingForDifferentSigns( sal_Int32 nDimensionIndex ) = 0;
49
50 //return a constant out of css::chart::TimeUnit that allows to display the smallest distance between occurring dates
52 virtual void setTimeResolutionOnXAxis( tools::Long nTimeResolution, const Date& rNullDate ) = 0;
53
54protected:
56};
57
59{
60public:
63
64 void addMinimumAndMaximumSupplier( MinimumAndMaximumSupplier* pMinimumAndMaximumSupplier );
65 bool hasMinimumAndMaximumSupplier( MinimumAndMaximumSupplier* pMinimumAndMaximumSupplier );
67
68 //--MinimumAndMaximumSupplier
69 virtual double getMinimumX() override;
70 virtual double getMaximumX() override;
71 virtual double getMinimumYInRange( double fMinimumX, double fMaximumX, sal_Int32 nAxisIndex ) override;
72 virtual double getMaximumYInRange( double fMinimumX, double fMaximumX, sal_Int32 nAxisIndex ) override;
73 virtual double getMinimumZ() override;
74 virtual double getMaximumZ() override;
75
76 virtual bool isExpandBorderToIncrementRhythm( sal_Int32 nDimensionIndex ) override;
77 virtual bool isExpandIfValuesCloseToBorder( sal_Int32 nDimensionIndex ) override;
78 virtual bool isExpandWideValuesToZero( sal_Int32 nDimensionIndex ) override;
79 virtual bool isExpandNarrowValuesTowardZero( sal_Int32 nDimensionIndex ) override;
80 virtual bool isSeparateStackingForDifferentSigns( sal_Int32 nDimensionIndex ) override;
81
83 virtual void setTimeResolutionOnXAxis( tools::Long nTimeResolution, const Date& rNullDate ) override;
84
85private:
86 typedef std::set< MinimumAndMaximumSupplier* > MinimumAndMaximumSupplierSet;
88};
89
90} //namespace chart
91
92/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual double getMaximumYInRange(double fMinimumX, double fMaximumX, sal_Int32 nAxisIndex) override
MinimumAndMaximumSupplierSet m_aMinimumAndMaximumSupplierList
bool hasMinimumAndMaximumSupplier(MinimumAndMaximumSupplier *pMinimumAndMaximumSupplier)
void addMinimumAndMaximumSupplier(MinimumAndMaximumSupplier *pMinimumAndMaximumSupplier)
virtual bool isExpandIfValuesCloseToBorder(sal_Int32 nDimensionIndex) override
virtual double getMinimumYInRange(double fMinimumX, double fMaximumX, sal_Int32 nAxisIndex) override
virtual bool isSeparateStackingForDifferentSigns(sal_Int32 nDimensionIndex) override
virtual bool isExpandBorderToIncrementRhythm(sal_Int32 nDimensionIndex) override
std::set< MinimumAndMaximumSupplier * > MinimumAndMaximumSupplierSet
virtual tools::Long calculateTimeResolutionOnXAxis() override
virtual void setTimeResolutionOnXAxis(tools::Long nTimeResolution, const Date &rNullDate) override
virtual bool isExpandNarrowValuesTowardZero(sal_Int32 nDimensionIndex) override
virtual bool isExpandWideValuesToZero(sal_Int32 nDimensionIndex) override
virtual tools::Long calculateTimeResolutionOnXAxis()=0
virtual bool isSeparateStackingForDifferentSigns(sal_Int32 nDimensionIndex)=0
virtual bool isExpandWideValuesToZero(sal_Int32 nDimensionIndex)=0
virtual bool isExpandIfValuesCloseToBorder(sal_Int32 nDimensionIndex)=0
virtual double getMaximumZ()=0
virtual double getMinimumZ()=0
virtual bool isExpandBorderToIncrementRhythm(sal_Int32 nDimensionIndex)=0
virtual double getMinimumX()=0
virtual double getMinimumYInRange(double fMinimumX, double fMaximumX, sal_Int32 nAxisIndex)=0
virtual double getMaximumYInRange(double fMinimumX, double fMaximumX, sal_Int32 nAxisIndex)=0
virtual double getMaximumX()=0
virtual void setTimeResolutionOnXAxis(tools::Long nTimeResolution, const Date &rNullDate)=0
virtual bool isExpandNarrowValuesTowardZero(sal_Int32 nDimensionIndex)=0
long Long