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 <vector>
25 #include <map>
26 #include <optional>
27 
29 {
34 };
35 
36 struct SchXMLCell
37 {
38  OUString aString;
39  css::uno::Sequence< OUString > aComplexString;
40  double fValue;
42  OUString aRangeId;
43 
44  SchXMLCell(): fValue( 0.0 ), eType( SCH_CELL_TYPE_UNKNOWN )
45  {}
46 };
47 
49 {
50  std::vector< std::vector< SchXMLCell > > aData;
51 
52  sal_Int32 nRowIndex;
53  sal_Int32 nColumnIndex;
54  sal_Int32 nMaxColumnIndex;
55 
57 
60 
61  OUString aTableNameOfFile;
62 
63  ::std::vector< sal_Int32 > aHiddenColumns;
64 
65  bool bProtected;
66 
67  SchXMLTable() : nRowIndex( -1 ),
68  nColumnIndex( -1 ),
69  nMaxColumnIndex( -1 ),
70  nNumberOfColsEstimate( 0 ),
71  bHasHeaderRow( false ),
72  bHasHeaderColumn( false ),
73  bProtected( false )
74  {}
75 };
76 
77 typedef sal_Int32 tSchXMLIndex;
78 #define SCH_XML_CATEGORIES_INDEX (static_cast<tSchXMLIndex>(-1))
80 {
84 };
85 typedef ::std::pair< tSchXMLIndex, SchXMLLabeledSequencePart > tSchXMLIndexWithPart;
86 typedef ::std::multimap< tSchXMLIndexWithPart,
87  css::uno::Reference< css::chart2::data::XLabeledDataSequence > >
89 
90 bool operator < ( const tSchXMLIndexWithPart & rFirst, const tSchXMLIndexWithPart & rSecond );
91 
93 {
98 };
99 
101 {
103  sal_Int8 nAxisIndex;//0->primary axis; 1->secondary axis
104  OUString aName;
105  OUString aTitle;
107 
108  SchXMLAxis() : eDimension( SCH_XML_AXIS_UNDEF ), nAxisIndex( 0 ), bHasCategories( false ) {}
109 };
110 
112 {
113  explicit GlobalSeriesImportInfo( bool& rAllRangeAddressesAvailable )
114  : rbAllRangeAddressesAvailable( rAllRangeAddressesAvailable )
115  , nCurrentDataIndex( 0 )
116  , nFirstFirstDomainIndex( -1 )
118  {}
119 
121 
122  sal_Int32 nCurrentDataIndex;
123 
126 
129 };
130 
132 {
133  css::uno::Reference<
134  css::chart2::XDataSeries > m_xSeries;
135  css::uno::Reference<
136  css::beans::XPropertySet > m_xEquationProperties;
137 
138  OUString msStyleName;
139 
140  RegressionStyle(const css::uno::Reference<
141  css::chart2::XDataSeries >& xSeries,
142  const OUString& sStyleName) :
143  m_xSeries ( xSeries ),
144  msStyleName ( sStyleName )
145  {}
146 };
147 
149 {
151  {
158  };
159 
161  css::uno::Reference< css::chart2::XDataSeries > m_xSeries;
162 
163  css::uno::Reference< css::beans::XPropertySet > m_xOldAPISeries;
164 
165  css::uno::Reference< css::beans::XPropertySet > m_xErrorXProperties;
166 
167  css::uno::Reference< css::beans::XPropertySet > m_xErrorYProperties;
168 
169  sal_Int32 m_nPointIndex;
170  sal_Int32 m_nPointRepeat;
171  OUString msStyleName;
172  OUString msStyleNameOfParent; // e.g. target of line and fill styles of data-labels
173  ::std::vector<OUString> mCustomLabels;
174  double mCustomLabelPos[2] = { 0.0, 0.0 };
175  // for svg:x and svg:y attribute (in core unit), of element <chart:data-label>
176  std::optional<sal_Int32> mo_nLabelAbsolutePosX;
177  std::optional<sal_Int32> mo_nLabelAbsolutePosY;
179 
180  sal_Int32 mnAttachedAxis;
182 
184  , const css::uno::Reference< css::chart2::XDataSeries >& xSeries
185  , sal_Int32 nPointIndex
186  , sal_Int32 nPointRepeat
187  , const OUString& sStyleName
188  , sal_Int32 nAttachedAxis = 0 ) :
189  meType( eType ),
190  m_xSeries( xSeries ),
191  m_nPointIndex( nPointIndex ),
192  m_nPointRepeat( nPointRepeat ),
193  msStyleName( sStyleName ),
194  mnAttachedAxis( nAttachedAxis ),
195  mbSymbolSizeForSeriesIsMissingInFile( false )
196  {}
197 
198  // ctor for use in import of <chart:data-label> as child of <chart:series>
199  DataRowPointStyle(StyleType eType, const OUString& sStyleName, sal_Int32 nAttachedAxis = 0)
200  : meType(eType)
201  , m_nPointIndex(0)
202  , m_nPointRepeat(0)
203  , msStyleName(sStyleName)
204  , mnAttachedAxis(nAttachedAxis)
205  , mbSymbolSizeForSeriesIsMissingInFile(false)
206  {
207  }
208 };
209 
210 typedef ::std::multimap< OUString, css::uno::Reference<
211  css::chart2::data::XDataSequence > > tSchXMLRangeSequenceMap;
212 
213 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SchXMLCellType
css::uno::Reference< css::chart2::XDataSeries > m_xSeries
std::optional< sal_Int32 > mo_nLabelAbsolutePosX
sal_Int32 tSchXMLIndex
OUString aString
signed char sal_Int8
sal_Int8 nAxisIndex
SchXMLAxisDimension
css::uno::Reference< css::beans::XPropertySet > m_xEquationProperties
css::uno::Sequence< OUString > aComplexString
OUString msSeriesStyleNameForDonuts
GlobalSeriesImportInfo(bool &rAllRangeAddressesAvailable)
RegressionStyle(const css::uno::Reference< css::chart2::XDataSeries > &xSeries, const OUString &sStyleName)
OUString aTitle
::std::pair< tSchXMLIndex, SchXMLLabeledSequencePart > tSchXMLIndexWithPart
sal_Int32 nNumberOfColsEstimate
the greatest number of columns detected
css::uno::Reference< css::chart2::XDataSeries > m_xSeries
OUString aRangeId
enum SchXMLAxisDimension eDimension
css::uno::Reference< css::beans::XPropertySet > m_xErrorXProperties
sal_Int32 nColumnIndex
reflects the index of the row currently parsed
std::vector< std::vector< SchXMLCell > > aData
OUString aName
OUString msStyleNameOfParent
bool mbSymbolSizeForSeriesIsMissingInFile
::std::multimap< OUString, css::uno::Reference< css::chart2::data::XDataSequence > > tSchXMLRangeSequenceMap
bool bHasHeaderRow
parsing column-elements may yield an estimate
OUString aTableNameOfFile
SchXMLLabeledSequencePart
DataRowPointStyle(StyleType eType, const OUString &sStyleName, sal_Int32 nAttachedAxis=0)
bool operator<(const tSchXMLIndexWithPart &rFirst, const tSchXMLIndexWithPart &rSecond)
sal_Int32 nMaxColumnIndex
reflects the index of the column currently parsed
DataRowPointStyle(StyleType eType, const css::uno::Reference< css::chart2::XDataSeries > &xSeries, sal_Int32 nPointIndex, sal_Int32 nPointRepeat, const OUString &sStyleName, sal_Int32 nAttachedAxis=0)
SchXMLCellType eType
::std::vector< OUString > mCustomLabels
::std::vector< sal_Int32 > aHiddenColumns
the table name read at the table:table element
css::uno::Reference< css::beans::XPropertySet > m_xErrorYProperties
::std::multimap< tSchXMLIndexWithPart, css::uno::Reference< css::chart2::data::XLabeledDataSequence > > tSchXMLLSequencesPerIndex
std::optional< sal_Int32 > mo_nLabelAbsolutePosY
css::uno::Reference< css::beans::XPropertySet > m_xOldAPISeries
sal_Int32 nRowIndex
an array of rows containing the table contents