Version 5.2.6.1, tag libreoffice-5.2.6.1
[LibreOffice.git] / xmloff / source / chart / transporttypes.hxx
blobb1657a82dd3725897c1c166e6f381b3900496b79
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
19 #ifndef INCLUDED_XMLOFF_SOURCE_CHART_TRANSPORTTYPES_HXX
20 #define INCLUDED_XMLOFF_SOURCE_CHART_TRANSPORTTYPES_HXX
22 #include <com/sun/star/chart2/XDataSeries.hpp>
23 #include <com/sun/star/chart2/data/XLabeledDataSequence.hpp>
25 #include <vector>
26 #include <map>
28 enum SchXMLCellType
30 SCH_CELL_TYPE_UNKNOWN,
31 SCH_CELL_TYPE_FLOAT,
32 SCH_CELL_TYPE_STRING,
33 SCH_CELL_TYPE_COMPLEX_STRING
36 struct SchXMLCell
38 OUString aString;
39 css::uno::Sequence< OUString > aComplexString;
40 double fValue;
41 SchXMLCellType eType;
42 OUString aRangeId;
44 SchXMLCell(): fValue( 0.0 ), eType( SCH_CELL_TYPE_UNKNOWN )
48 struct SchXMLTable
50 std::vector< std::vector< SchXMLCell > > aData; /// an array of rows containing the table contents
52 sal_Int32 nRowIndex; /// reflects the index of the row currently parsed
53 sal_Int32 nColumnIndex; /// reflects the index of the column currently parsed
54 sal_Int32 nMaxColumnIndex; /// the greatest number of columns detected
56 sal_Int32 nNumberOfColsEstimate; /// parsing column-elements may yield an estimate
58 bool bHasHeaderRow;
59 bool bHasHeaderColumn;
61 OUString aTableNameOfFile; /// the table name read at the table:table element
63 ::std::vector< sal_Int32 > aHiddenColumns;
65 bool bProtected;
67 SchXMLTable() : nRowIndex( -1 ),
68 nColumnIndex( -1 ),
69 nMaxColumnIndex( -1 ),
70 nNumberOfColsEstimate( 0 ),
71 bHasHeaderRow( false ),
72 bHasHeaderColumn( false ),
73 bProtected( false )
77 typedef sal_Int32 tSchXMLIndex;
78 #define SCH_XML_CATEGORIES_INDEX (static_cast<tSchXMLIndex>(-1))
79 enum SchXMLLabeledSequencePart
81 SCH_XML_PART_LABEL,
82 SCH_XML_PART_VALUES,
83 SCH_XML_PART_ERROR_BARS
85 typedef ::std::pair< tSchXMLIndex, SchXMLLabeledSequencePart > tSchXMLIndexWithPart;
86 typedef ::std::multimap< tSchXMLIndexWithPart,
87 css::uno::Reference< css::chart2::data::XLabeledDataSequence > >
88 tSchXMLLSequencesPerIndex;
90 bool operator < ( const tSchXMLIndexWithPart & rFirst, const tSchXMLIndexWithPart & rSecond );
92 enum SchXMLAxisDimension
94 SCH_XML_AXIS_X = 0,
95 SCH_XML_AXIS_Y,
96 SCH_XML_AXIS_Z,
97 SCH_XML_AXIS_UNDEF
100 struct SchXMLAxis
102 enum SchXMLAxisDimension eDimension;
103 sal_Int8 nAxisIndex;//0->primary axis; 1->secondary axis
104 OUString aName;
105 OUString aTitle;
106 bool bHasCategories;
108 SchXMLAxis() : eDimension( SCH_XML_AXIS_UNDEF ), nAxisIndex( 0 ), bHasCategories( false ) {}
111 struct GlobalSeriesImportInfo
113 explicit GlobalSeriesImportInfo( bool& rAllRangeAddressesAvailable )
114 : rbAllRangeAddressesAvailable( rAllRangeAddressesAvailable )
115 , nCurrentDataIndex( 0 )
116 , nFirstFirstDomainIndex( -1 )
117 , nFirstSecondDomainIndex( -1 )
120 bool& rbAllRangeAddressesAvailable;
122 sal_Int32 nCurrentDataIndex;
124 OUString aFirstFirstDomainAddress;
125 sal_Int32 nFirstFirstDomainIndex;
127 OUString aFirstSecondDomainAddress;
128 sal_Int32 nFirstSecondDomainIndex;
131 struct RegressionStyle
133 css::uno::Reference<
134 css::chart2::XDataSeries > m_xSeries;
135 css::uno::Reference<
136 css::beans::XPropertySet > m_xEquationProperties;
138 OUString msStyleName;
140 RegressionStyle(const css::uno::Reference<
141 css::chart2::XDataSeries >& xSeries,
142 const OUString& sStyleName) :
143 m_xSeries ( xSeries ),
144 msStyleName ( sStyleName )
148 struct DataRowPointStyle
150 enum StyleType
152 DATA_POINT,
153 DATA_SERIES,
154 MEAN_VALUE,
155 ERROR_INDICATOR
158 StyleType meType;
159 css::uno::Reference< css::chart2::XDataSeries > m_xSeries;
161 css::uno::Reference< css::beans::XPropertySet > m_xOldAPISeries;
163 css::uno::Reference< css::beans::XPropertySet > m_xErrorXProperties;
165 css::uno::Reference< css::beans::XPropertySet > m_xErrorYProperties;
167 sal_Int32 m_nPointIndex;
168 sal_Int32 m_nPointRepeat;
169 OUString msStyleName;
170 OUString msSeriesStyleNameForDonuts;
171 sal_Int32 mnAttachedAxis;
172 bool mbSymbolSizeForSeriesIsMissingInFile;
174 DataRowPointStyle( StyleType eType
175 , const css::uno::Reference< css::chart2::XDataSeries >& xSeries
176 , sal_Int32 nPointIndex
177 , sal_Int32 nPointRepeat
178 , const OUString& sStyleName
179 , sal_Int32 nAttachedAxis = 0 ) :
180 meType( eType ),
181 m_xSeries( xSeries ),
182 m_xOldAPISeries( nullptr ),
183 m_nPointIndex( nPointIndex ),
184 m_nPointRepeat( nPointRepeat ),
185 msStyleName( sStyleName ),
186 mnAttachedAxis( nAttachedAxis ),
187 mbSymbolSizeForSeriesIsMissingInFile( false )
191 typedef ::std::multimap< OUString, css::uno::Reference<
192 css::chart2::data::XDataSequence > > tSchXMLRangeSequenceMap;
194 #endif // INCLUDED_XMLOFF_SOURCE_CHART_TRANSPORTTYPES_HXX
196 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */