LibreOffice Module chart2 (master) 1
DataSourceHelper.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
20#pragma once
21
22#include "charttoolsdllapi.hxx"
23#include <com/sun/star/uno/Reference.h>
24#include <com/sun/star/uno/Sequence.h>
25#include <rtl/ref.hxx>
26
27namespace chart { class ChartModel; }
28namespace com::sun::star::beans { struct PropertyValue; }
29namespace com::sun::star::chart2 { class XChartDocument; }
30namespace com::sun::star::chart2 { class XDiagram; }
31namespace com::sun::star::chart2::data { class XDataSequence; }
32namespace com::sun::star::chart2::data { class XDataSource; }
33namespace com::sun::star::chart2::data { class XLabeledDataSequence; }
34namespace com::sun::star::frame { class XModel; }
35
36namespace chart
37{
38class DataSource;
39class Diagram;
40class LabeledDataSequence;
41
43{
44public:
45 static css::uno::Reference< css::chart2::data::XDataSequence >
46 createCachedDataSequence();
47
48 static css::uno::Reference< css::chart2::data::XDataSequence >
49 createCachedDataSequence( const OUString & rSingleText );
50
53 const css::uno::Reference< css::chart2::data::XDataSequence >& xValues ,
54 const css::uno::Reference< css::chart2::data::XDataSequence >& xLabels );
55
58 const css::uno::Reference< css::chart2::data::XDataSequence >& xValues );
59
61 createLabeledDataSequence();
62
63 static css::uno::Sequence< css::beans::PropertyValue >
64 createArguments(
65 bool bUseColumns, bool bFirstCellAsLabel, bool bHasCategories );
66
67 static css::uno::Sequence<
68 css::beans::PropertyValue > createArguments(
69 const OUString & rRangeRepresentation,
70 const css::uno::Sequence< sal_Int32 >& rSequenceMapping,
71 bool bUseColumns, bool bFirstCellAsLabel, bool bHasCategories );
72
73 SAL_DLLPRIVATE static void readArguments( const css::uno::Sequence< css::beans::PropertyValue >& rArguments
74 , OUString & rRangeRepresentation, css::uno::Sequence< sal_Int32 >& rSequenceMapping
75 , bool& bUseColumns, bool& bFirstCellAsLabel, bool& bHasCategories );
76
78 pressUsedDataIntoRectangularFormat( const rtl::Reference< ::chart::ChartModel >& xChartDoc );
79
80 SAL_DLLPRIVATE static css::uno::Sequence< OUString > getUsedDataRanges(
81 const rtl::Reference< ::chart::Diagram > & xDiagram );
82
83 static css::uno::Sequence< OUString > getUsedDataRanges(
84 const rtl::Reference<::chart::ChartModel> & xChartModel );
85
87 ChartModel& rModel );
88
89 static bool detectRangeSegmentation(
91 , OUString& rOutRangeString
92 , css::uno::Sequence< sal_Int32 >& rSequenceMapping
93 , bool& rOutUseColumns
94 , bool& rOutFirstCellAsLabel
95 , bool& rOutHasCategories );
96
97 static void setRangeSegmentation(
99 , const css::uno::Sequence< sal_Int32 >& rSequenceMapping
100 , bool bUseColumns
101 , bool bFirstCellAsLabel
102 , bool bUseCategories );
103
111 static bool allArgumentsForRectRangeDetected(
112 const rtl::Reference<::chart::ChartModel>& xChartDocument );
113
114 SAL_DLLPRIVATE static css::uno::Sequence< OUString > getRangesFromLabeledDataSequence(
115 const css::uno::Reference< css::chart2::data::XLabeledDataSequence > & xLSeq );
116
117 SAL_DLLPRIVATE static OUString getRangeFromValues(
118 const css::uno::Reference< css::chart2::data::XLabeledDataSequence > & xLSeq );
119
120 SAL_DLLPRIVATE static css::uno::Sequence< OUString > getRangesFromDataSource(
121 const css::uno::Reference< css::chart2::data::XDataSource > & xSource );
122};
123
124} //namespace chart
125
126/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
#define OOO_DLLPUBLIC_CHARTTOOLS
static SAL_DLLPRIVATE css::uno::Sequence< OUString > getUsedDataRanges(const rtl::Reference< ::chart::Diagram > &xDiagram)
static rtl::Reference< LabeledDataSequence > createLabeledDataSequence(const css::uno::Reference< css::chart2::data::XDataSequence > &xValues, const css::uno::Reference< css::chart2::data::XDataSequence > &xLabels)
static rtl::Reference< LabeledDataSequence > createLabeledDataSequence(const css::uno::Reference< css::chart2::data::XDataSequence > &xValues)
static css::uno::Sequence< css::beans::PropertyValue > createArguments(const OUString &rRangeRepresentation, const css::uno::Sequence< sal_Int32 > &rSequenceMapping, bool bUseColumns, bool bFirstCellAsLabel, bool bHasCategories)