INTEGRATION: CWS chart2mst3 (1.1.4); FILE MERGED
2007/02/24 10:38:07 iha 1.1.4.25: #i74648# also change attributed data points 2007/02/23 18:07:28 iha 1.1.4.24: #i74655# symbols lost when switching smooth lines 2007/02/09 12:29:20 bm 1.1.4.23: #i72841# move deleteSeries functionality here from source/controller/dialog/DialogModel.cxx 2006/08/02 11:16:26 bm 1.1.4.22: #i27352# implement quick help 2006/07/25 16:46:03 bm 1.1.4.21: #i64824# handle number formats in the data browser 2006/04/10 12:25:07 iha 1.1.4.20: api restructure axis, grids, scales and increments 2005/12/21 21:29:12 iha 1.1.4.19: remove identifiers from model objects and create an index based CID protocol instead for selection purposes 2005/11/02 19:18:55 iha 1.1.4.18: added helping method SetRole() 2005/11/01 13:07:42 iha 1.1.4.17: support sequence mapping 2005/10/27 17:43:25 iha 1.1.4.16: support autogenerated label 2005/10/13 17:38:49 iha 1.1.4.15: renamed BoundedCoordinateSystem to CoordinateSystem 2005/10/07 11:39:49 bm 1.1.4.14: RESYNC: (1.1-1.2); FILE MERGED 2005/07/22 11:16:07 bm 1.1.4.13: comment fixed 2005/07/22 11:14:13 bm 1.1.4.12: comment added 2005/05/09 09:51:02 bm 1.1.4.11: moved parts of API to data namespace 2005/05/03 16:51:04 bm 1.1.4.10: XDataProvider, XDataSequence: RangeIdentifiers removed 2004/09/17 10:52:49 bm 1.1.4.9: API simplification 2004/09/15 09:59:31 iha 1.1.4.8: removed unused code 2004/09/15 09:55:02 iha 1.1.4.7: implement api redesign 2004/09/15 09:49:40 bm 1.1.4.6: API simplification 2004/05/07 15:36:50 bm 1.1.4.5: legend-entries: use TextualDataSequence if available 2004/04/27 13:41:49 bm 1.1.4.4: +createUniqueSeriesId that calculates a yet unused id +getDataSeriesIdentifier convenience to get the Identifier property of a series 2004/03/29 13:28:45 bm 1.1.4.3: XDataSource: getSourceRangeRepresentation -> getSourceIdentifier 2004/03/19 14:32:51 bm 1.1.4.2: XDataSource now contains XLabeledDataSources 2004/02/13 16:51:22 bm 1.1.4.1: join from changes on branch bm_post_chart01
This commit is contained in:
parent
18467d5d9b
commit
479246d17e
1 changed files with 156 additions and 17 deletions
|
@ -4,9 +4,9 @@
|
|||
*
|
||||
* $RCSfile: DataSeriesHelper.hxx,v $
|
||||
*
|
||||
* $Revision: 1.2 $
|
||||
* $Revision: 1.3 $
|
||||
*
|
||||
* last change: $Author: rt $ $Date: 2005-09-08 00:39:11 $
|
||||
* last change: $Author: vg $ $Date: 2007-05-22 18:14:57 $
|
||||
*
|
||||
* The Contents of this file are made available subject to
|
||||
* the terms of GNU Lesser General Public License Version 2.1.
|
||||
|
@ -35,32 +35,171 @@
|
|||
#ifndef CHART2_DATASERIESHELPER_HXX
|
||||
#define CHART2_DATASERIESHELPER_HXX
|
||||
|
||||
#ifndef _COM_SUN_STAR_CHART2_XDATASEQUENCE_HPP_
|
||||
#include <com/sun/star/chart2/XDataSequence.hpp>
|
||||
#ifndef _COM_SUN_STAR_CHART2_DATA_XDATASEQUENCE_HPP_
|
||||
#include <com/sun/star/chart2/data/XDataSequence.hpp>
|
||||
#endif
|
||||
#ifndef _COM_SUN_STAR_CHART2_XDATASOURCE_HPP_
|
||||
#include <com/sun/star/chart2/XDataSource.hpp>
|
||||
#ifndef _COM_SUN_STAR_CHART2_DATA_XDATASOURCE_HPP_
|
||||
#include <com/sun/star/chart2/data/XDataSource.hpp>
|
||||
#endif
|
||||
#ifndef _COM_SUN_STAR_CHART2_XDATASERIES_HPP_
|
||||
#include <com/sun/star/chart2/XDataSeries.hpp>
|
||||
#endif
|
||||
#ifndef _COM_SUN_STAR_CHART2_XDIAGRAM_HPP_
|
||||
#include <com/sun/star/chart2/XDiagram.hpp>
|
||||
#endif
|
||||
#ifndef _COM_SUN_STAR_CHART2_XCOORDINATESYSTEM_HPP_
|
||||
#include <com/sun/star/chart2/XCoordinateSystem.hpp>
|
||||
#endif
|
||||
#ifndef _COM_SUN_STAR_CHART2_XCHARTTYPE_HPP_
|
||||
#include <com/sun/star/chart2/XChartType.hpp>
|
||||
#endif
|
||||
|
||||
#include "StackMode.hxx"
|
||||
|
||||
#include <vector>
|
||||
#include <functional>
|
||||
|
||||
namespace chart
|
||||
{
|
||||
|
||||
namespace DataSeriesHelper
|
||||
{
|
||||
/** Retrieves the data sequence in the given data source that matches the
|
||||
given role. If more than one sequences match the role, the first match
|
||||
is returned. If no sequence matches, an empty reference is returned.
|
||||
|
||||
@param aSource
|
||||
The data source containing all data sequences to be searched through.
|
||||
::rtl::OUString GetRole(
|
||||
const ::com::sun::star::uno::Reference<
|
||||
::com::sun::star::chart2::data::XLabeledDataSequence >& xLabeledDataSequence );
|
||||
|
||||
@param aRole
|
||||
The role that is to be filtered out.
|
||||
*/
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDataSequence >
|
||||
void SetRole(
|
||||
const ::com::sun::star::uno::Reference<
|
||||
::com::sun::star::chart2::data::XLabeledDataSequence >& xLabeledDataSequence,
|
||||
const ::rtl::OUString& rRole );
|
||||
|
||||
/** Retrieves the data sequence in the given data source that matches the
|
||||
given role. If more than one sequences match the role, the first match
|
||||
is returned. If no sequence matches, an empty reference is returned.
|
||||
|
||||
@param aSource
|
||||
The data source containing all data sequences to be searched through.
|
||||
|
||||
@param aRole
|
||||
The role that is to be filtered out.
|
||||
*/
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XLabeledDataSequence >
|
||||
getDataSequenceByRole( const ::com::sun::star::uno::Reference<
|
||||
::com::sun::star::chart2::XDataSource > & xSource,
|
||||
::rtl::OUString aRole );
|
||||
::com::sun::star::chart2::data::XDataSource > & xSource,
|
||||
::rtl::OUString aRole,
|
||||
bool bMatchPrefix = false );
|
||||
|
||||
/** Retrieves all data sequences in the given data source that match the given
|
||||
role.
|
||||
|
||||
@param aSource
|
||||
The data source containing all data sequences to be searched through.
|
||||
|
||||
@param aRole
|
||||
The role that is to be filtered out.
|
||||
*/
|
||||
::std::vector<
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XLabeledDataSequence > >
|
||||
getAllDataSequencesByRole( const ::com::sun::star::uno::Sequence<
|
||||
::com::sun::star::uno::Reference<
|
||||
::com::sun::star::chart2::data::XLabeledDataSequence > > & aDataSequences,
|
||||
::rtl::OUString aRole,
|
||||
bool bMatchPrefix = false );
|
||||
|
||||
/** Retrieves all data sequences found in the given data series and puts them
|
||||
into a data source. The order of sequences will match the order of the data
|
||||
series.
|
||||
*/
|
||||
::com::sun::star::uno::Reference<
|
||||
::com::sun::star::chart2::data::XDataSource >
|
||||
getDataSource( const ::com::sun::star::uno::Sequence<
|
||||
::com::sun::star::uno::Reference<
|
||||
::com::sun::star::chart2::XDataSeries > > & aSeries );
|
||||
|
||||
|
||||
/** Get the label of a series (e.g. for the legend)
|
||||
|
||||
@param rLabelSequenceRole
|
||||
The data sequence contained in xSeries that has this role will be used
|
||||
to take its label.
|
||||
*/
|
||||
::rtl::OUString getDataSeriesLabel(
|
||||
const ::com::sun::star::uno::Reference<
|
||||
::com::sun::star::chart2::XDataSeries > & xSeries,
|
||||
const ::rtl::OUString & rLabelSequenceRole );
|
||||
|
||||
/** Get the label of a labeled sequence including neccessary automatic generation
|
||||
*/
|
||||
::rtl::OUString getLabelForLabeledDataSequence(
|
||||
const ::com::sun::star::uno::Reference<
|
||||
::com::sun::star::chart2::data::XLabeledDataSequence > & xLabeledSeq );
|
||||
|
||||
/** Retrieves the stackmode of a DataSeries. If the series have differing stack
|
||||
modes, the StackMode StackMode_AMBIGUOUS is returned.
|
||||
|
||||
@param xCorrespondingCoordinateSystem
|
||||
The coordinate system in which the given data series are located. (This
|
||||
is needed for determining percent stacking. If omitted, the result will
|
||||
just indicate "not stacked", "stacked" or "ambiguous")
|
||||
*/
|
||||
StackMode getStackModeFromSeries(
|
||||
const ::com::sun::star::uno::Sequence<
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDataSeries > > & aSeries,
|
||||
const ::com::sun::star::uno::Reference<
|
||||
::com::sun::star::chart2::XCoordinateSystem > & xCorrespondingCoordinateSystem =
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::chart2::XCoordinateSystem >()
|
||||
);
|
||||
|
||||
void setStackModeAtSeries(
|
||||
const ::com::sun::star::uno::Sequence<
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDataSeries > > & aSeries,
|
||||
const ::com::sun::star::uno::Reference<
|
||||
::com::sun::star::chart2::XCoordinateSystem > & xCorrespondingCoordinateSystem,
|
||||
StackMode eStackMode );
|
||||
|
||||
sal_Int32 getAttachedAxisIndex(
|
||||
const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDataSeries > & xSeries );
|
||||
|
||||
/// @param nAxisIndex, if -1 it is determined by the given data series via getAttachedAxisIndex
|
||||
sal_Int32 getNumberFormatKeyFromAxis(
|
||||
const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDataSeries > & xSeries,
|
||||
const ::com::sun::star::uno::Reference<
|
||||
::com::sun::star::chart2::XCoordinateSystem > & xCorrespondingCoordinateSystem,
|
||||
sal_Int32 nDimensionIndex,
|
||||
sal_Int32 nAxisIndex = -1 );
|
||||
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::chart2::XCoordinateSystem >
|
||||
getCoordinateSystemOfSeries(
|
||||
const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDataSeries > & xSeries,
|
||||
const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDiagram > & xDiagram );
|
||||
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartType >
|
||||
getChartTypeOfSeries(
|
||||
const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDataSeries > & xSeries,
|
||||
const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDiagram > & xDiagram );
|
||||
|
||||
void deleteSeries(
|
||||
const ::com::sun::star::uno::Reference<
|
||||
::com::sun::star::chart2::XDataSeries > & xSeries,
|
||||
const ::com::sun::star::uno::Reference<
|
||||
::com::sun::star::chart2::XChartType > & xChartType );
|
||||
|
||||
void switchSymbolsOnOrOff(
|
||||
const ::com::sun::star::uno::Reference<
|
||||
::com::sun::star::beans::XPropertySet > & xSeriesProperties,
|
||||
bool bSymbolsOn, sal_Int32 nSeriesIndex );
|
||||
|
||||
void switchLinesOnOrOff(
|
||||
const ::com::sun::star::uno::Reference<
|
||||
::com::sun::star::beans::XPropertySet > & xSeriesProperties,
|
||||
bool bLinesOn );
|
||||
|
||||
void setPropertyAlsoToAllAttributedDataPoints(
|
||||
const ::com::sun::star::uno::Reference<
|
||||
::com::sun::star::chart2::XDataSeries >& xSeries,
|
||||
const ::rtl::OUString& rPropertyName,
|
||||
const ::com::sun::star::uno::Any& rPropertyValue );
|
||||
|
||||
} // namespace DataSeriesHelper
|
||||
} // namespace chart
|
||||
|
|
Loading…
Reference in a new issue