bump product version to 4.1.6.2
[LibreOffice.git] / xmloff / source / chart / transporttypes.hxx
blob92efcae36400a368e50c3d944d73f53a7588d517
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 SCH_XML_TRANSPORTTYPES_HXX_
20 #define SCH_XML_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 ::com::sun::star::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 ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XLabeledDataSequence > >
88 tSchXMLLSequencesPerIndex;
90 bool operator < ( const tSchXMLIndexWithPart & rFirst, const tSchXMLIndexWithPart & rSecond );
92 // ----------------------------------------
94 struct SchNumericCellRangeAddress
96 sal_Int32 nRow1, nRow2;
97 sal_Int32 nCol1, nCol2;
99 SchNumericCellRangeAddress() :
100 nRow1( -1 ), nRow2( -1 ),
101 nCol1( -1 ), nCol2( -1 )
104 SchNumericCellRangeAddress( const SchNumericCellRangeAddress& aOther )
106 nRow1 = aOther.nRow1; nRow2 = aOther.nRow2;
107 nCol1 = aOther.nCol1; nCol2 = aOther.nCol2;
111 // ----------------------------------------
113 enum SchXMLAxisDimension
115 SCH_XML_AXIS_X = 0,
116 SCH_XML_AXIS_Y,
117 SCH_XML_AXIS_Z,
118 SCH_XML_AXIS_UNDEF
121 struct SchXMLAxis
123 enum SchXMLAxisDimension eDimension;
124 sal_Int8 nAxisIndex;//0->primary axis; 1->secondary axis
125 OUString aName;
126 OUString aTitle;
127 bool bHasCategories;
129 SchXMLAxis() : eDimension( SCH_XML_AXIS_UNDEF ), nAxisIndex( 0 ), bHasCategories( false ) {}
132 // ----------------------------------------
134 struct GlobalSeriesImportInfo
136 GlobalSeriesImportInfo( sal_Bool& rAllRangeAddressesAvailable )
137 : rbAllRangeAddressesAvailable( rAllRangeAddressesAvailable )
138 , nCurrentDataIndex( 0 )
139 , nFirstFirstDomainIndex( -1 )
140 , nFirstSecondDomainIndex( -1 )
143 sal_Bool& rbAllRangeAddressesAvailable;
145 sal_Int32 nCurrentDataIndex;
147 OUString aFirstFirstDomainAddress;
148 sal_Int32 nFirstFirstDomainIndex;
150 OUString aFirstSecondDomainAddress;
151 sal_Int32 nFirstSecondDomainIndex;
154 struct DataRowPointStyle
156 enum StyleType
158 DATA_POINT,
159 DATA_SERIES,
160 MEAN_VALUE,
161 REGRESSION,
162 ERROR_INDICATOR
165 StyleType meType;
166 ::com::sun::star::uno::Reference<
167 ::com::sun::star::chart2::XDataSeries > m_xSeries;
168 ::com::sun::star::uno::Reference<
169 ::com::sun::star::beans::XPropertySet > m_xOldAPISeries;
170 com::sun::star::uno::Reference<
171 com::sun::star::beans::XPropertySet > m_xErrorXProperties;
172 com::sun::star::uno::Reference<
173 com::sun::star::beans::XPropertySet > m_xErrorYProperties;
174 ::com::sun::star::uno::Reference<
175 ::com::sun::star::beans::XPropertySet > m_xEquationProperties;
176 sal_Int32 m_nPointIndex;
177 sal_Int32 m_nPointRepeat;
178 OUString msStyleName;
179 OUString msSeriesStyleNameForDonuts;
180 sal_Int32 mnAttachedAxis;
181 bool mbSymbolSizeForSeriesIsMissingInFile;
183 DataRowPointStyle( StyleType eType
184 , const ::com::sun::star::uno::Reference<
185 ::com::sun::star::chart2::XDataSeries >& xSeries
186 , sal_Int32 nPointIndex
187 , sal_Int32 nPointRepeat
188 , OUString sStyleName
189 , sal_Int32 nAttachedAxis = 0 ) :
190 meType( eType ),
191 m_xSeries( xSeries ),
192 m_xOldAPISeries( 0 ),
193 m_nPointIndex( nPointIndex ),
194 m_nPointRepeat( nPointRepeat ),
195 msStyleName( sStyleName ),
196 mnAttachedAxis( nAttachedAxis ),
197 mbSymbolSizeForSeriesIsMissingInFile( false )
201 typedef ::std::multimap< OUString, ::com::sun::star::uno::Reference<
202 ::com::sun::star::chart2::data::XDataSequence > > tSchXMLRangeSequenceMap;
204 #endif // SCH_XML_TRANSPORTTYPES_HXX_
206 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */