LibreOffice Module xmloff (master) 1
transporttypes.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 <com/sun/star/chart2/XDataSeries.hpp>
22#include <com/sun/star/chart2/data/XLabeledDataSequence.hpp>
23
24#include <utility>
25#include <vector>
26#include <map>
27#include <optional>
28
30{
35};
36
38{
39 OUString aString;
40 css::uno::Sequence< OUString > aComplexString;
41 double fValue;
43 OUString aRangeId;
44
46 {}
47};
48
50{
51 std::vector< std::vector< SchXMLCell > > aData;
52
53 sal_Int32 nRowIndex;
54 sal_Int32 nColumnIndex;
55 sal_Int32 nMaxColumnIndex;
56
58
61
63
64 ::std::vector< sal_Int32 > aHiddenColumns;
65
67
69 nColumnIndex( -1 ),
70 nMaxColumnIndex( -1 ),
72 bHasHeaderRow( false ),
73 bHasHeaderColumn( false ),
74 bProtected( false )
75 {}
76};
77
78typedef sal_Int32 tSchXMLIndex;
79#define SCH_XML_CATEGORIES_INDEX (static_cast<tSchXMLIndex>(-1))
81{
85};
86typedef ::std::pair< tSchXMLIndex, SchXMLLabeledSequencePart > tSchXMLIndexWithPart;
87typedef ::std::multimap< tSchXMLIndexWithPart,
88 css::uno::Reference< css::chart2::data::XLabeledDataSequence > >
90
91bool operator < ( const tSchXMLIndexWithPart & rFirst, const tSchXMLIndexWithPart & rSecond );
92
94{
99};
100
102{
104 sal_Int8 nAxisIndex;//0->primary axis; 1->secondary axis
105 OUString aName;
106 OUString aTitle;
108
110};
111
113{
114 explicit GlobalSeriesImportInfo( bool& rAllRangeAddressesAvailable )
115 : rbAllRangeAddressesAvailable( rAllRangeAddressesAvailable )
116 , nCurrentDataIndex( 0 )
119 {}
120
122
124
127
130};
131
133{
134 css::uno::Reference<
135 css::chart2::XDataSeries > m_xSeries;
136 css::uno::Reference<
137 css::beans::XPropertySet > m_xEquationProperties;
138
139 OUString msStyleName;
140
141 RegressionStyle(css::uno::Reference<
142 css::chart2::XDataSeries > xSeries,
143 OUString sStyleName) :
144 m_xSeries (std::move( xSeries )),
145 msStyleName (std::move( sStyleName ))
146 {}
147};
148
156{
158 ::std::vector<OUString> mLabels;
160 bool mbDataLabelsRange = false;
162 OUString msLabelGuid;
165};
166
168{
170 {
177 };
178
180 css::uno::Reference< css::chart2::XDataSeries > m_xSeries;
181
182 css::uno::Reference< css::beans::XPropertySet > m_xOldAPISeries;
183
184 css::uno::Reference< css::beans::XPropertySet > m_xErrorXProperties;
185
186 css::uno::Reference< css::beans::XPropertySet > m_xErrorYProperties;
187
188 sal_Int32 m_nPointIndex;
189 sal_Int32 m_nPointRepeat;
190 OUString msStyleName;
191 OUString msStyleNameOfParent; // e.g. target of line and fill styles of data-labels
193 double mCustomLabelPos[2] = { 0.0, 0.0 };
194 // for svg:x and svg:y attribute (in core unit), of element <chart:data-label>
195 std::optional<sal_Int32> mo_nLabelAbsolutePosX;
196 std::optional<sal_Int32> mo_nLabelAbsolutePosY;
198
199 sal_Int32 mnAttachedAxis;
201
203 , css::uno::Reference< css::chart2::XDataSeries > xSeries
204 , sal_Int32 nPointIndex
205 , sal_Int32 nPointRepeat
206 , OUString sStyleName
207 , sal_Int32 nAttachedAxis = 0 ) :
208 meType( eType ),
209 m_xSeries(std::move( xSeries )),
210 m_nPointIndex( nPointIndex ),
211 m_nPointRepeat( nPointRepeat ),
212 msStyleName(std::move( sStyleName )),
213 mnAttachedAxis( nAttachedAxis ),
215 {}
216
217 // ctor for use in import of <chart:data-label> as child of <chart:series>
218 DataRowPointStyle(StyleType eType, OUString sStyleName, sal_Int32 nAttachedAxis = 0)
219 : meType(eType)
220 , m_nPointIndex(0)
221 , m_nPointRepeat(0)
222 , msStyleName(std::move(sStyleName))
223 , mnAttachedAxis(nAttachedAxis)
225 {
226 }
227};
228
229typedef ::std::multimap< OUString, css::uno::Reference<
230 css::chart2::data::XDataSequence > > tSchXMLRangeSequenceMap;
231
232/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
DocumentType eType
Used to store text content of a data point custom-label's fields and also the helper members that ind...
bool mbDataLabelsRange
Are label's contents sourced from a cell[range] ?
OUString msLabelsCellRange
cell[range] from which label's contents are sourced.
::std::vector< OUString > mLabels
Text content of each field.
OUString msLabelGuid
GUID of the CELLRANGE field.
DataRowPointStyle(StyleType eType, css::uno::Reference< css::chart2::XDataSeries > xSeries, sal_Int32 nPointIndex, sal_Int32 nPointRepeat, OUString sStyleName, sal_Int32 nAttachedAxis=0)
bool mbSymbolSizeForSeriesIsMissingInFile
CustomLabelsInfo mCustomLabels
DataRowPointStyle(StyleType eType, OUString sStyleName, sal_Int32 nAttachedAxis=0)
css::uno::Reference< css::chart2::XDataSeries > m_xSeries
std::optional< sal_Int32 > mo_nLabelAbsolutePosX
std::optional< sal_Int32 > mo_nLabelAbsolutePosY
OUString msSeriesStyleNameForDonuts
css::uno::Reference< css::beans::XPropertySet > m_xOldAPISeries
css::uno::Reference< css::beans::XPropertySet > m_xErrorYProperties
OUString msStyleNameOfParent
css::uno::Reference< css::beans::XPropertySet > m_xErrorXProperties
GlobalSeriesImportInfo(bool &rAllRangeAddressesAvailable)
css::uno::Reference< css::chart2::XDataSeries > m_xSeries
RegressionStyle(css::uno::Reference< css::chart2::XDataSeries > xSeries, OUString sStyleName)
css::uno::Reference< css::beans::XPropertySet > m_xEquationProperties
OUString aName
sal_Int8 nAxisIndex
OUString aTitle
enum SchXMLAxisDimension eDimension
css::uno::Sequence< OUString > aComplexString
OUString aRangeId
SchXMLCellType eType
OUString aString
sal_Int32 nColumnIndex
reflects the index of the row currently parsed
sal_Int32 nMaxColumnIndex
reflects the index of the column currently parsed
sal_Int32 nNumberOfColsEstimate
the greatest number of columns detected
::std::vector< sal_Int32 > aHiddenColumns
the table name read at the table:table element
bool bHasHeaderRow
parsing column-elements may yield an estimate
sal_Int32 nRowIndex
an array of rows containing the table contents
std::vector< std::vector< SchXMLCell > > aData
OUString aTableNameOfFile
SchXMLLabeledSequencePart
@ SCH_XML_PART_VALUES
@ SCH_XML_PART_ERROR_BARS
@ SCH_XML_PART_LABEL
bool operator<(const tSchXMLIndexWithPart &rFirst, const tSchXMLIndexWithPart &rSecond)
::std::multimap< tSchXMLIndexWithPart, css::uno::Reference< css::chart2::data::XLabeledDataSequence > > tSchXMLLSequencesPerIndex
::std::pair< tSchXMLIndex, SchXMLLabeledSequencePart > tSchXMLIndexWithPart
SchXMLAxisDimension
@ SCH_XML_AXIS_Z
@ SCH_XML_AXIS_X
@ SCH_XML_AXIS_Y
@ SCH_XML_AXIS_UNDEF
sal_Int32 tSchXMLIndex
::std::multimap< OUString, css::uno::Reference< css::chart2::data::XDataSequence > > tSchXMLRangeSequenceMap
SchXMLCellType
@ SCH_CELL_TYPE_FLOAT
@ SCH_CELL_TYPE_UNKNOWN
@ SCH_CELL_TYPE_COMPLEX_STRING
@ SCH_CELL_TYPE_STRING
signed char sal_Int8