LibreOffice Module chart2 (master) 1
DataSeriesHelper.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19#pragma once
20
21#include "StackMode.hxx"
22#include "charttoolsdllapi.hxx"
23#include <com/sun/star/uno/Reference.h>
24#include <rtl/ustring.hxx>
25#include <rtl/ref.hxx>
26
27#include <vector>
28
29namespace com::sun::star::beans { class XPropertySet; }
30namespace com::sun::star::chart2 { class XChartType; }
31namespace com::sun::star::chart2 { class XCoordinateSystem; }
32namespace com::sun::star::chart2 { class XDataSeries; }
33namespace com::sun::star::chart2 { class XDiagram; }
34namespace com::sun::star::chart2::data { class XDataSequence; }
35namespace com::sun::star::chart2::data { class XDataSource; }
36namespace com::sun::star::chart2::data { class XLabeledDataSequence; }
37namespace com::sun::star::uno { class Any; }
38namespace com::sun::star::uno { template <class E> class Sequence; }
39namespace chart { class BaseCoordinateSystem; }
40namespace chart { class ChartType; }
41namespace chart { class DataSource; }
42namespace chart { class Diagram; }
43namespace chart { class DataSeries; }
44namespace chart { class LabeledDataSequence; }
45
47{
48
50 getRole( const css::uno::Reference<css::chart2::data::XLabeledDataSequence>& xLabeledDataSequence );
51
62OOO_DLLPUBLIC_CHARTTOOLS css::uno::Reference< css::chart2::data::XLabeledDataSequence >
63 getDataSequenceByRole( const css::uno::Reference< css::chart2::data::XDataSource > & xSource,
64 const OUString& aRole,
65 bool bMatchPrefix = false );
66
76OOO_DLLPUBLIC_CHARTTOOLS std::vector<
77 css::uno::Reference< css::chart2::data::XLabeledDataSequence > >
78 getAllDataSequencesByRole( const css::uno::Sequence< css::uno::Reference< css::chart2::data::XLabeledDataSequence > > & aDataSequences,
79 const OUString& aRole );
80OOO_DLLPUBLIC_CHARTTOOLS std::vector<
81 css::uno::Reference< css::chart2::data::XLabeledDataSequence > >
82 getAllDataSequencesByRole( const std::vector< css::uno::Reference< css::chart2::data::XLabeledDataSequence > > & aDataSequences,
83 const OUString& aRole );
84
86std::vector< css::uno::Reference< css::chart2::data::XLabeledDataSequence > >
88 const std::vector<rtl::Reference<::chart::DataSeries> >& aSeries );
89
95 getDataSource( const std::vector< rtl::Reference< ::chart::DataSeries > > & aSeries );
96
98 const std::vector< rtl::Reference< ::chart::DataSeries > > & aSeries,
99 const rtl::Reference< ::chart::BaseCoordinateSystem > & xCorrespondingCoordinateSystem,
100 StackMode eStackMode );
101
104
108 const rtl::Reference< ::chart::BaseCoordinateSystem > & xCorrespondingCoordinateSystem,
109 sal_Int32 nDimensionIndex,
110 sal_Int32 nAxisIndex = -1 );
111
116 const rtl::Reference< ::chart::Diagram > & xDiagram );
117
122 const rtl::Reference< ::chart::Diagram > & xDiagram );
123
126 const rtl::Reference< ::chart::ChartType > & xChartType );
127
130 bool bSymbolsOn, sal_Int32 nSeriesIndex );
131
134 bool bLinesOn );
135
137void makeLinesThickOrThin( const rtl::Reference< ::chart::DataSeries > & xSeries, bool bThick );
138
141 const OUString& rPropertyName,
142 const css::uno::Any& rPropertyValue );
143
144
147 const OUString& rPropertyName,
148 const css::uno::Any& rPropertyValue );
149
151sal_Int32 translateIndexFromHiddenToFullSequence( sal_Int32 nClippedIndex, const css::uno::Reference<
152 css::chart2::data::XDataSequence >& xDataSequence, bool bTranslate );
153
155
157
159
161
162OOO_DLLPUBLIC_CHARTTOOLS void insertDataLabelToPoint( const css::uno::Reference< css::beans::XPropertySet >& xPointPropertySet );
163
165
166OOO_DLLPUBLIC_CHARTTOOLS void deleteDataLabelsFromPoint( const css::uno::Reference< css::beans::XPropertySet >& xPointPropertySet );
167
168} // namespace chart::DataSeriesHelper
169
170/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
#define OOO_DLLPUBLIC_CHARTTOOLS
OOO_DLLPUBLIC_CHARTTOOLS bool hasDataLabelAtPoint(const rtl::Reference< ::chart::DataSeries > &xSeries, sal_Int32 nPointIndex)
OOO_DLLPUBLIC_CHARTTOOLS rtl::Reference< ::chart::BaseCoordinateSystem > getCoordinateSystemOfSeries(const rtl::Reference< ::chart::DataSeries > &xSeries, const rtl::Reference< ::chart::Diagram > &xDiagram)
OOO_DLLPUBLIC_CHARTTOOLS void switchLinesOnOrOff(const rtl::Reference< ::chart::DataSeries > &xSeries, bool bLinesOn)
OOO_DLLPUBLIC_CHARTTOOLS std::vector< css::uno::Reference< css::chart2::data::XLabeledDataSequence > > getAllDataSequences(const std::vector< rtl::Reference<::chart::DataSeries > > &aSeries)
OOO_DLLPUBLIC_CHARTTOOLS void insertDataLabelToPoint(const css::uno::Reference< css::beans::XPropertySet > &xPointPropertySet)
OOO_DLLPUBLIC_CHARTTOOLS void setStackModeAtSeries(const std::vector< rtl::Reference< ::chart::DataSeries > > &aSeries, const rtl::Reference< ::chart::BaseCoordinateSystem > &xCorrespondingCoordinateSystem, StackMode eStackMode)
OOO_DLLPUBLIC_CHARTTOOLS bool hasDataLabelsAtSeries(const rtl::Reference< ::chart::DataSeries > &xSeries)
OOO_DLLPUBLIC_CHARTTOOLS void insertDataLabelsToSeriesAndAllPoints(const rtl::Reference< ::chart::DataSeries > &xSeries)
OOO_DLLPUBLIC_CHARTTOOLS void setPropertyAlsoToAllAttributedDataPoints(const rtl::Reference< ::chart::DataSeries > &xSeries, const OUString &rPropertyName, const css::uno::Any &rPropertyValue)
OOO_DLLPUBLIC_CHARTTOOLS sal_Int32 getNumberFormatKeyFromAxis(const rtl::Reference< ::chart::DataSeries > &xSeries, const rtl::Reference< ::chart::BaseCoordinateSystem > &xCorrespondingCoordinateSystem, sal_Int32 nDimensionIndex, sal_Int32 nAxisIndex=-1)
OOO_DLLPUBLIC_CHARTTOOLS void deleteSeries(const rtl::Reference< ::chart::DataSeries > &xSeries, const rtl::Reference< ::chart::ChartType > &xChartType)
OOO_DLLPUBLIC_CHARTTOOLS rtl::Reference< ::chart::DataSource > getDataSource(const std::vector< rtl::Reference< ::chart::DataSeries > > &aSeries)
Retrieves all data sequences found in the given data series and puts them into a data source.
OOO_DLLPUBLIC_CHARTTOOLS css::uno::Reference< css::chart2::data::XLabeledDataSequence > getDataSequenceByRole(const css::uno::Reference< css::chart2::data::XDataSource > &xSource, const OUString &aRole, bool bMatchPrefix=false)
Retrieves the data sequence in the given data source that matches the given role.
OOO_DLLPUBLIC_CHARTTOOLS void deleteDataLabelsFromSeriesAndAllPoints(const rtl::Reference< ::chart::DataSeries > &xSeries)
OOO_DLLPUBLIC_CHARTTOOLS sal_Int32 translateIndexFromHiddenToFullSequence(sal_Int32 nClippedIndex, const css::uno::Reference< css::chart2::data::XDataSequence > &xDataSequence, bool bTranslate)
OOO_DLLPUBLIC_CHARTTOOLS std::vector< css::uno::Reference< css::chart2::data::XLabeledDataSequence > > getAllDataSequencesByRole(const css::uno::Sequence< css::uno::Reference< css::chart2::data::XLabeledDataSequence > > &aDataSequences, const OUString &aRole)
Retrieves all data sequences in the given data source that match the given role prefix.
OOO_DLLPUBLIC_CHARTTOOLS OUString getRole(const css::uno::Reference< css::chart2::data::XLabeledDataSequence > &xLabeledDataSequence)
OOO_DLLPUBLIC_CHARTTOOLS rtl::Reference< ::chart::ChartType > getChartTypeOfSeries(const rtl::Reference< ::chart::DataSeries > &xSeries, const rtl::Reference< ::chart::Diagram > &xDiagram)
OOO_DLLPUBLIC_CHARTTOOLS bool hasAttributedDataPointDifferentValue(const rtl::Reference< ::chart::DataSeries > &xSeries, const OUString &rPropertyName, const css::uno::Any &rPropertyValue)
OOO_DLLPUBLIC_CHARTTOOLS sal_Int32 getAttachedAxisIndex(const rtl::Reference< ::chart::DataSeries > &xSeries)
OOO_DLLPUBLIC_CHARTTOOLS void makeLinesThickOrThin(const rtl::Reference< ::chart::DataSeries > &xSeries, bool bThick)
OOO_DLLPUBLIC_CHARTTOOLS void switchSymbolsOnOrOff(const rtl::Reference< ::chart::DataSeries > &xSeries, bool bSymbolsOn, sal_Int32 nSeriesIndex)
OOO_DLLPUBLIC_CHARTTOOLS bool hasDataLabelsAtPoints(const rtl::Reference< ::chart::DataSeries > &xSeries)
OOO_DLLPUBLIC_CHARTTOOLS void deleteDataLabelsFromPoint(const css::uno::Reference< css::beans::XPropertySet > &xPointPropertySet)
class SAL_NO_VTABLE XPropertySet