merge the formfield patch from ooo-build
[ooovba.git] / chart2 / source / view / charttypes / BarChart.hxx
bloba4edc78c03c6c0085a7916a5b67d1a3ea9708613
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: BarChart.hxx,v $
10 * $Revision: 1.9 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _CHART2_BARCHART_HXX
32 #define _CHART2_BARCHART_HXX
34 #include "VSeriesPlotter.hxx"
36 //.............................................................................
37 namespace chart
39 //.............................................................................
40 class BarPositionHelper;
42 class BarChart : public VSeriesPlotter
44 //-------------------------------------------------------------------------
45 // public methods
46 //-------------------------------------------------------------------------
47 public:
48 BarChart( const ::com::sun::star::uno::Reference<
49 ::com::sun::star::chart2::XChartType >& xChartTypeModel
50 , sal_Int32 nDimensionCount );
51 virtual ~BarChart();
53 //-------------------------------------------------------------------------
54 // chart2::XPlotter
55 //-------------------------------------------------------------------------
57 virtual void SAL_CALL createShapes();
59 virtual ::rtl::OUString SAL_CALL getCoordinateSystemTypeID( ) throw (::com::sun::star::uno::RuntimeException);
60 virtual void SAL_CALL setScales( const ::com::sun::star::uno::Sequence< ::com::sun::star::chart2::ExplicitScaleData >& rScales ) throw (::com::sun::star::uno::RuntimeException);
61 virtual void SAL_CALL setTransformation( const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XTransformation >& xTransformationToLogicTarget, const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XTransformation >& xTransformationToFinalPage ) throw (::com::sun::star::uno::RuntimeException);
64 virtual void addSeries( VDataSeries* pSeries, sal_Int32 zSlot = -1, sal_Int32 xSlot = -1,sal_Int32 ySlot = -1 );
66 //-------------------
67 virtual ::com::sun::star::drawing::Direction3D getPreferredDiagramAspectRatio() const;
68 virtual bool keepAspectRatio() const;
70 //-------------------------------------------------------------------------
71 // MinimumAndMaximumSupplier
72 //-------------------------------------------------------------------------
73 virtual double getMinimumX();
74 virtual double getMaximumX();
76 //-------------------------------------------------------------------------
77 //-------------------------------------------------------------------------
78 //-------------------------------------------------------------------------
80 private: //methods
81 //no default constructor
82 BarChart();
84 ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >
85 createDataPoint3D_Bar(
86 const ::com::sun::star::uno::Reference<
87 ::com::sun::star::drawing::XShapes >& xTarget
88 , const ::com::sun::star::drawing::Position3D& rPosition
89 , const ::com::sun::star::drawing::Direction3D& rSize
90 , double fTopHeight, sal_Int32 nRotateZAngleHundredthDegree
91 , const ::com::sun::star::uno::Reference<
92 ::com::sun::star::beans::XPropertySet >& xObjectProperties
93 , sal_Int32 nGeometry3D );
95 ::com::sun::star::awt::Point getLabelScreenPositionAndAlignment(
96 LabelAlignment& rAlignment, sal_Int32 nLabelPlacement
97 , double fScaledX, double fScaledLowerYValue, double fScaledUpperYValue, double fScaledZ
98 , double fScaledLowerBarDepth, double fScaledUpperBarDepth, double fBaseValue
99 , BarPositionHelper* pPosHelper ) const;
101 virtual PlottingPositionHelper& getPlottingPositionHelper( sal_Int32 nAxisIndex ) const;//nAxisIndex indicates wether the position belongs to the main axis ( nAxisIndex==0 ) or secondary axis ( nAxisIndex==1 )
103 void adaptOverlapAndGapwidthForGroupBarsPerAxis();
105 private: //member
106 BarPositionHelper* m_pMainPosHelper;
107 ::com::sun::star::uno::Sequence< sal_Int32 > m_aOverlapSequence;
108 ::com::sun::star::uno::Sequence< sal_Int32 > m_aGapwidthSequence;
110 //.............................................................................
111 } //namespace chart
112 //.............................................................................
113 #endif