Files
libreoffice/chart2/source/inc/DataSeriesHelper.hxx

184 lines
7.2 KiB
C++
Raw Normal View History

/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: DataSeriesHelper.hxx,v $
2008-10-01 07:35:04 +00:00
* $Revision: 1.7.24.1 $
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#ifndef CHART2_DATASERIESHELPER_HXX
#define CHART2_DATASERIESHELPER_HXX
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
2007-05-22 17:14:57 +00:00
#include <com/sun/star/chart2/data/XDataSequence.hpp>
#include <com/sun/star/chart2/data/XDataSource.hpp>
#include <com/sun/star/chart2/XDataSeries.hpp>
#include <com/sun/star/chart2/XDiagram.hpp>
#include <com/sun/star/chart2/XCoordinateSystem.hpp>
#include <com/sun/star/chart2/XChartType.hpp>
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
2007-05-22 17:14:57 +00:00
#include "StackMode.hxx"
#include <vector>
#include <functional>
namespace chart
{
namespace DataSeriesHelper
{
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
2007-05-22 17:14:57 +00:00
::rtl::OUString GetRole(
const ::com::sun::star::uno::Reference<
::com::sun::star::chart2::data::XLabeledDataSequence >& xLabeledDataSequence );
/** 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<
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
2007-05-22 17:14:57 +00:00
::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 );
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 makeLinesThickOrThin( const ::com::sun::star::uno::Reference<
::com::sun::star::beans::XPropertySet > & xSeriesProperties, bool bThick );
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
2007-05-22 17:14:57 +00:00
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 );
bool hasAttributedDataPointDifferentValue(
const ::com::sun::star::uno::Reference<
::com::sun::star::chart2::XDataSeries >& xSeries,
const ::rtl::OUString& rPropertyName,
const ::com::sun::star::uno::Any& rPropertyValue );
2008-12-12 12:17:17 +00:00
bool areAllSeriesAttachedToSameAxis(
const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartType >& xChartType,
sal_Int32 & rOutAxisIndex );
} // namespace DataSeriesHelper
} // namespace chart
// CHART2_DATASERIESHELPER_HXX
#endif