1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: BarChart.hxx,v $
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 //.............................................................................
39 //.............................................................................
40 class BarPositionHelper
;
42 class BarChart
: public VSeriesPlotter
44 //-------------------------------------------------------------------------
46 //-------------------------------------------------------------------------
48 BarChart( const ::com::sun::star::uno::Reference
<
49 ::com::sun::star::chart2::XChartType
>& xChartTypeModel
50 , sal_Int32 nDimensionCount
);
53 //-------------------------------------------------------------------------
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 );
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 //-------------------------------------------------------------------------
81 //no default constructor
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();
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 //.............................................................................
112 //.............................................................................