fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / chart2 / source / inc / chartview / ExplicitValueProvider.hxx
blob934f22fcc481f0d0104e2e9130e981c11f8cd825
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 #ifndef INCLUDED_CHART2_SOURCE_INC_CHARTVIEW_EXPLICITVALUEPROVIDER_HXX
20 #define INCLUDED_CHART2_SOURCE_INC_CHARTVIEW_EXPLICITVALUEPROVIDER_HXX
22 #include "ExplicitScaleValues.hxx"
24 #include <boost/shared_ptr.hpp>
25 #include <com/sun/star/chart2/XAxis.hpp>
26 #include <com/sun/star/chart2/XCoordinateSystem.hpp>
27 #include <com/sun/star/chart2/XDataSeries.hpp>
28 #include <com/sun/star/chart2/XDiagram.hpp>
29 #include <com/sun/star/awt/Rectangle.hpp>
30 #include <com/sun/star/frame/XModel.hpp>
31 #include <com/sun/star/drawing/XShape.hpp>
32 #include <com/sun/star/util/XNumberFormatsSupplier.hpp>
33 #include "chartviewdllapi.hxx"
35 #include "ChartModel.hxx"
37 namespace chart
40 /**
43 class DrawModelWrapper;
44 class OOO_DLLPUBLIC_CHARTVIEW ExplicitValueProvider
46 public:
47 /** Gives calculated scale and increment values for a given xAxis in the current view.
48 In contrast to the model data these explicit values are always complete as misssing auto properties are calculated.
49 If the given Axis could not be found or for another reason no correct output can be given false is returned.
51 virtual bool getExplicitValuesForAxis(
52 ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XAxis > xAxis
53 , ExplicitScaleData& rExplicitScale
54 , ExplicitIncrementData& rExplicitIncrement )=0;
56 /** for rotated objects the shape size and position differs from the visible rectangle
57 if bSnapRect is set to true you get the resulting visible position (left-top) and size
59 virtual ::com::sun::star::awt::Rectangle
60 getRectangleOfObject( const OUString& rObjectCID, bool bSnapRect=false )=0;
62 virtual ::com::sun::star::awt::Rectangle getDiagramRectangleExcludingAxes()=0;
64 virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >
65 getShapeForCID( const OUString& rObjectCID )=0;
67 virtual ::boost::shared_ptr< DrawModelWrapper > getDrawModelWrapper() = 0;
69 static const com::sun::star::uno::Sequence<sal_Int8>& getUnoTunnelId();
70 static ExplicitValueProvider* getExplicitValueProvider( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xChartView );
72 static ::com::sun::star::awt::Rectangle
73 addAxisTitleSizes(
74 ChartModel& rModel
75 , const ::com::sun::star::uno::Reference<
76 ::com::sun::star::uno::XInterface >& xChartView
77 , const ::com::sun::star::awt::Rectangle& rExcludingPositionAndSize );
79 static ::com::sun::star::awt::Rectangle
80 substractAxisTitleSizes(
81 ChartModel& rModel
82 , const ::com::sun::star::uno::Reference<
83 ::com::sun::star::uno::XInterface >& xChartView
84 , const ::com::sun::star::awt::Rectangle& rPositionAndSizeIncludingTitles );
86 static sal_Int32 getExplicitNumberFormatKeyForAxis(
87 const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XAxis >& xAxis
88 , const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XCoordinateSystem > & xCorrespondingCoordinateSystem
89 , const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartDocument>& xChartDoc);
91 static sal_Int32 getExplicitNumberFormatKeyForDataLabel(
92 const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xSeriesOrPointProp
93 , const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDataSeries >& xSeries
94 , sal_Int32 nPointIndex /*-1 for whole series*/
95 , const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDiagram >& xDiagram );
97 static sal_Int32 getExplicitPercentageNumberFormatKeyForDataLabel(
98 const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xSeriesOrPointProp
99 , const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatsSupplier >& xNumberFormatsSupplier );
101 protected:
102 ~ExplicitValueProvider() {}
105 } //namespace chart
106 #endif
108 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */