1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
28 #ifndef SCH_XML_TRANSPORTTYPES_HXX_
29 #define SCH_XML_TRANSPORTTYPES_HXX_
31 #include <com/sun/star/chart2/XDataSeries.hpp>
32 #include <com/sun/star/chart2/data/XLabeledDataSequence.hpp>
39 SCH_CELL_TYPE_UNKNOWN
,
42 SCH_CELL_TYPE_COMPLEX_STRING
47 rtl::OUString aString
;
48 ::com::sun::star::uno::Sequence
< rtl::OUString
> aComplexString
;
51 rtl::OUString aRangeId
;
53 SchXMLCell(): fValue( 0.0 ), eType( SCH_CELL_TYPE_UNKNOWN
)
59 std::vector
< std::vector
< SchXMLCell
> > aData
; /// an array of rows containing the table contents
61 sal_Int32 nRowIndex
; /// reflects the index of the row currently parsed
62 sal_Int32 nColumnIndex
; /// reflects the index of the column currently parsed
63 sal_Int32 nMaxColumnIndex
; /// the greatest number of columns detected
65 sal_Int32 nNumberOfColsEstimate
; /// parsing column-elements may yield an estimate
68 bool bHasHeaderColumn
;
70 ::rtl::OUString aTableNameOfFile
; /// the table name read at the table:table element
72 ::std::vector
< sal_Int32
> aHiddenColumns
;
76 SchXMLTable() : nRowIndex( -1 ),
78 nMaxColumnIndex( -1 ),
79 nNumberOfColsEstimate( 0 ),
80 bHasHeaderRow( false ),
81 bHasHeaderColumn( false ),
86 typedef sal_Int32 tSchXMLIndex
;
87 #define SCH_XML_CATEGORIES_INDEX (static_cast<tSchXMLIndex>(-1))
88 enum SchXMLLabeledSequencePart
92 SCH_XML_PART_ERROR_BARS
94 typedef ::std::pair
< tSchXMLIndex
, SchXMLLabeledSequencePart
> tSchXMLIndexWithPart
;
95 typedef ::std::multimap
< tSchXMLIndexWithPart
,
96 ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::data::XLabeledDataSequence
> >
97 tSchXMLLSequencesPerIndex
;
99 bool operator < ( const tSchXMLIndexWithPart
& rFirst
, const tSchXMLIndexWithPart
& rSecond
);
101 // ----------------------------------------
103 struct SchNumericCellRangeAddress
105 sal_Int32 nRow1
, nRow2
;
106 sal_Int32 nCol1
, nCol2
;
108 SchNumericCellRangeAddress() :
109 nRow1( -1 ), nRow2( -1 ),
110 nCol1( -1 ), nCol2( -1 )
113 SchNumericCellRangeAddress( const SchNumericCellRangeAddress
& aOther
)
115 nRow1
= aOther
.nRow1
; nRow2
= aOther
.nRow2
;
116 nCol1
= aOther
.nCol1
; nCol2
= aOther
.nCol2
;
120 // ----------------------------------------
122 enum SchXMLAxisDimension
132 enum SchXMLAxisDimension eDimension
;
133 sal_Int8 nAxisIndex
;//0->primary axis; 1->secondary axis
135 rtl::OUString aTitle
;
138 SchXMLAxis() : eDimension( SCH_XML_AXIS_UNDEF
), nAxisIndex( 0 ), bHasCategories( false ) {}
141 // ----------------------------------------
143 struct GlobalSeriesImportInfo
145 GlobalSeriesImportInfo( sal_Bool
& rAllRangeAddressesAvailable
)
146 : rbAllRangeAddressesAvailable( rAllRangeAddressesAvailable
)
147 , nCurrentDataIndex( 0 )
148 , nFirstFirstDomainIndex( -1 )
149 , nFirstSecondDomainIndex( -1 )
152 sal_Bool
& rbAllRangeAddressesAvailable
;
154 sal_Int32 nCurrentDataIndex
;
156 ::rtl::OUString aFirstFirstDomainAddress
;
157 sal_Int32 nFirstFirstDomainIndex
;
159 ::rtl::OUString aFirstSecondDomainAddress
;
160 sal_Int32 nFirstSecondDomainIndex
;
163 struct DataRowPointStyle
175 ::com::sun::star::uno::Reference
<
176 ::com::sun::star::chart2::XDataSeries
> m_xSeries
;
177 ::com::sun::star::uno::Reference
<
178 ::com::sun::star::beans::XPropertySet
> m_xOldAPISeries
;
179 com::sun::star::uno::Reference
<
180 com::sun::star::beans::XPropertySet
> m_xErrorXProperties
;
181 com::sun::star::uno::Reference
<
182 com::sun::star::beans::XPropertySet
> m_xErrorYProperties
;
183 ::com::sun::star::uno::Reference
<
184 ::com::sun::star::beans::XPropertySet
> m_xEquationProperties
;
185 sal_Int32 m_nPointIndex
;
186 sal_Int32 m_nPointRepeat
;
187 ::rtl::OUString msStyleName
;
188 ::rtl::OUString msSeriesStyleNameForDonuts
;
189 sal_Int32 mnAttachedAxis
;
190 bool mbSymbolSizeForSeriesIsMissingInFile
;
192 DataRowPointStyle( StyleType eType
193 , const ::com::sun::star::uno::Reference
<
194 ::com::sun::star::chart2::XDataSeries
>& xSeries
195 , sal_Int32 nPointIndex
196 , sal_Int32 nPointRepeat
197 , ::rtl::OUString sStyleName
198 , sal_Int32 nAttachedAxis
= 0 ) :
200 m_xSeries( xSeries
),
201 m_xOldAPISeries( 0 ),
202 m_nPointIndex( nPointIndex
),
203 m_nPointRepeat( nPointRepeat
),
204 msStyleName( sStyleName
),
205 mnAttachedAxis( nAttachedAxis
),
206 mbSymbolSizeForSeriesIsMissingInFile( false )
210 typedef ::std::multimap
< ::rtl::OUString
, ::com::sun::star::uno::Reference
<
211 ::com::sun::star::chart2::data::XDataSequence
> > tSchXMLRangeSequenceMap
;
213 #endif // SCH_XML_TRANSPORTTYPES_HXX_
215 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */