1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: transporttypes.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef SCH_XML_TRANSPORTTYPES_HXX_
31 #define SCH_XML_TRANSPORTTYPES_HXX_
33 #include <com/sun/star/chart2/XDataSeries.hpp>
34 #include <com/sun/star/chart2/data/XLabeledDataSequence.hpp>
41 SCH_CELL_TYPE_UNKNOWN
,
48 rtl::OUString aString
;
51 rtl::OUString aRangeId
;
53 SchXMLCell() : fValue( 0.0 ), eType( SCH_CELL_TYPE_UNKNOWN
) {}
58 std::vector
< std::vector
< SchXMLCell
> > aData
; /// an array of rows containing the table contents
60 sal_Int32 nRowIndex
; /// reflects the index of the row currently parsed
61 sal_Int32 nColumnIndex
; /// reflects the index of the column currently parsed
62 sal_Int32 nMaxColumnIndex
; /// the greatest number of columns detected
64 sal_Int32 nNumberOfColsEstimate
; /// parsing column-elements may yield an estimate
67 bool bHasHeaderColumn
;
69 ::rtl::OUString aTableNameOfFile
; /// the table name read at the table:table element
71 ::std::vector
< sal_Int32
> aHiddenColumns
;
73 SchXMLTable() : nRowIndex( -1 ),
75 nMaxColumnIndex( -1 ),
76 nNumberOfColsEstimate( 0 ),
77 bHasHeaderRow( false ),
78 bHasHeaderColumn( false )
82 typedef sal_Int32 tSchXMLIndex
;
83 #define SCH_XML_CATEGORIES_INDEX (static_cast<tSchXMLIndex>(-1))
84 enum SchXMLLabeledSequencePart
88 SCH_XML_PART_ERROR_BARS
90 typedef ::std::pair
< tSchXMLIndex
, SchXMLLabeledSequencePart
> tSchXMLIndexWithPart
;
91 typedef ::std::multimap
< tSchXMLIndexWithPart
,
92 ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::data::XLabeledDataSequence
> >
93 tSchXMLLSequencesPerIndex
;
95 bool operator < ( const tSchXMLIndexWithPart
& rFirst
, const tSchXMLIndexWithPart
& rSecond
);
97 // ----------------------------------------
99 struct SchNumericCellRangeAddress
101 sal_Int32 nRow1
, nRow2
;
102 sal_Int32 nCol1
, nCol2
;
104 SchNumericCellRangeAddress() :
105 nRow1( -1 ), nRow2( -1 ),
106 nCol1( -1 ), nCol2( -1 )
109 SchNumericCellRangeAddress( const SchNumericCellRangeAddress
& aOther
)
111 nRow1
= aOther
.nRow1
; nRow2
= aOther
.nRow2
;
112 nCol1
= aOther
.nCol1
; nCol2
= aOther
.nCol2
;
116 // ----------------------------------------
128 enum SchXMLAxisClass eClass
;
129 sal_Int8 nIndexInCategory
;
131 rtl::OUString aTitle
;
134 SchXMLAxis() : eClass( SCH_XML_AXIS_UNDEF
), nIndexInCategory( 0 ), bHasCategories( false ) {}
137 // ----------------------------------------
139 struct GlobalSeriesImportInfo
141 GlobalSeriesImportInfo( sal_Bool
& rAllRangeAddressesAvailable
)
142 : rbAllRangeAddressesAvailable( rAllRangeAddressesAvailable
)
143 , nCurrentDataIndex( 0 )
144 , nFirstFirstDomainIndex( -1 )
145 , nFirstSecondDomainIndex( -1 )
148 sal_Bool
& rbAllRangeAddressesAvailable
;
150 sal_Int32 nCurrentDataIndex
;
152 ::rtl::OUString aFirstFirstDomainAddress
;
153 sal_Int32 nFirstFirstDomainIndex
;
155 ::rtl::OUString aFirstSecondDomainAddress
;
156 sal_Int32 nFirstSecondDomainIndex
;
159 struct DataRowPointStyle
171 ::com::sun::star::uno::Reference
<
172 ::com::sun::star::chart2::XDataSeries
> m_xSeries
;
173 ::com::sun::star::uno::Reference
<
174 ::com::sun::star::beans::XPropertySet
> m_xOldAPISeries
;
175 ::com::sun::star::uno::Reference
<
176 ::com::sun::star::beans::XPropertySet
> m_xEquationProperties
;
177 sal_Int32 m_nPointIndex
;
178 sal_Int32 m_nPointRepeat
;
179 ::rtl::OUString msStyleName
;
180 ::rtl::OUString msSeriesStyleNameForDonuts
;
181 sal_Int32 mnAttachedAxis
;
182 bool mbSymbolSizeForSeriesIsMissingInFile
;
184 DataRowPointStyle( StyleType eType
185 , const ::com::sun::star::uno::Reference
<
186 ::com::sun::star::chart2::XDataSeries
>& xSeries
187 , sal_Int32 nPointIndex
188 , sal_Int32 nPointRepeat
189 , ::rtl::OUString sStyleName
190 , sal_Int32 nAttachedAxis
= 0 ) :
192 m_xSeries( xSeries
),
193 m_xOldAPISeries( 0 ),
194 m_nPointIndex( nPointIndex
),
195 m_nPointRepeat( nPointRepeat
),
196 msStyleName( sStyleName
),
197 mnAttachedAxis( nAttachedAxis
),
198 mbSymbolSizeForSeriesIsMissingInFile( false )
202 typedef ::std::multimap
< ::rtl::OUString
, ::com::sun::star::uno::Reference
<
203 ::com::sun::star::chart2::data::XDataSequence
> > tSchXMLRangeSequenceMap
;
205 #endif // SCH_XML_TRANSPORTTYPES_HXX_