Bump for 3.6-28
[LibreOffice.git] / chart2 / source / inc / chartview / ExplicitValueProvider.hxx
blobcf20374b75aec264599f542f02e966f532411bea
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
28 #ifndef _CHART2_EXPLICITVALUEPROVIDER_HXX
29 #define _CHART2_EXPLICITVALUEPROVIDER_HXX
31 #include "ExplicitScaleValues.hxx"
33 #include <boost/shared_ptr.hpp>
34 #include <com/sun/star/chart2/XAxis.hpp>
35 #include <com/sun/star/chart2/XCoordinateSystem.hpp>
36 #include <com/sun/star/chart2/XDataSeries.hpp>
37 #include <com/sun/star/chart2/XDiagram.hpp>
38 #include <com/sun/star/awt/Rectangle.hpp>
39 #include <com/sun/star/frame/XModel.hpp>
40 #include <com/sun/star/drawing/XShape.hpp>
41 #include <com/sun/star/util/XNumberFormatsSupplier.hpp>
42 #include "chartviewdllapi.hxx"
44 //.............................................................................
45 namespace chart
47 //.............................................................................
49 //-----------------------------------------------------------------------------
50 /**
53 class DrawModelWrapper;
54 class OOO_DLLPUBLIC_CHARTVIEW ExplicitValueProvider
56 public:
57 /** Gives calculated scale and increment values for a given xAxis in the current view.
58 In contrast to the model data these explicit values are always complete as misssing auto properties are calculated.
59 If the given Axis could not be found or for another reason no correct output can be given false is returned.
61 virtual sal_Bool getExplicitValuesForAxis(
62 ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XAxis > xAxis
63 , ExplicitScaleData& rExplicitScale
64 , ExplicitIncrementData& rExplicitIncrement )=0;
66 /** for rotated objects the shape size and position differs from the visible rectangle
67 if bSnapRect is set to true you get the resulting visible position (left-top) and size
69 virtual ::com::sun::star::awt::Rectangle
70 getRectangleOfObject( const rtl::OUString& rObjectCID, bool bSnapRect=false )=0;
72 virtual ::com::sun::star::awt::Rectangle getDiagramRectangleExcludingAxes()=0;
74 virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >
75 getShapeForCID( const rtl::OUString& rObjectCID )=0;
77 virtual ::boost::shared_ptr< DrawModelWrapper > getDrawModelWrapper() = 0;
79 static const com::sun::star::uno::Sequence<sal_Int8>& getUnoTunnelId();
80 static ExplicitValueProvider* getExplicitValueProvider( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xChartView );
82 static ::com::sun::star::awt::Rectangle
83 addAxisTitleSizes(
84 const ::com::sun::star::uno::Reference<
85 ::com::sun::star::frame::XModel >& xChartModel
86 , const ::com::sun::star::uno::Reference<
87 ::com::sun::star::uno::XInterface >& xChartView
88 , const ::com::sun::star::awt::Rectangle& rExcludingPositionAndSize );
90 static ::com::sun::star::awt::Rectangle
91 substractAxisTitleSizes(
92 const ::com::sun::star::uno::Reference<
93 ::com::sun::star::frame::XModel >& xChartModel
94 , const ::com::sun::star::uno::Reference<
95 ::com::sun::star::uno::XInterface >& xChartView
96 , const ::com::sun::star::awt::Rectangle& rPositionAndSizeIncludingTitles );
98 static sal_Int32 getExplicitNumberFormatKeyForAxis(
99 const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XAxis >& xAxis
100 , const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XCoordinateSystem > & xCorrespondingCoordinateSystem
101 , const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatsSupplier >& xNumberFormatsSupplier );
103 static sal_Int32 getExplicitNumberFormatKeyForDataLabel(
104 const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xSeriesOrPointProp
105 , const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDataSeries >& xSeries
106 , sal_Int32 nPointIndex /*-1 for whole series*/
107 , const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDiagram >& xDiagram );
109 static sal_Int32 getExplicitPercentageNumberFormatKeyForDataLabel(
110 const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xSeriesOrPointProp
111 , const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatsSupplier >& xNumberFormatsSupplier );
113 protected:
114 ~ExplicitValueProvider() {}
117 //.............................................................................
118 } //namespace chart
119 //.............................................................................
120 #endif
122 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */