1*cdf0e10cSrcweir /*************************************************************************
2*cdf0e10cSrcweir  *
3*cdf0e10cSrcweir  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir  *
5*cdf0e10cSrcweir  * Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir  *
7*cdf0e10cSrcweir  * OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir  *
9*cdf0e10cSrcweir  * This file is part of OpenOffice.org.
10*cdf0e10cSrcweir  *
11*cdf0e10cSrcweir  * OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir  * it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir  * only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir  *
15*cdf0e10cSrcweir  * OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir  * GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir  * (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir  *
21*cdf0e10cSrcweir  * You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir  * version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir  * <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir  * for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir  *
26*cdf0e10cSrcweir  ************************************************************************/
27*cdf0e10cSrcweir 
28*cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
29*cdf0e10cSrcweir #include "precompiled_chart2.hxx"
30*cdf0e10cSrcweir 
31*cdf0e10cSrcweir #include "StockDataInterpreter.hxx"
32*cdf0e10cSrcweir #include "DataSeries.hxx"
33*cdf0e10cSrcweir #include "macros.hxx"
34*cdf0e10cSrcweir #include "DataSeriesHelper.hxx"
35*cdf0e10cSrcweir #include "CommonConverters.hxx"
36*cdf0e10cSrcweir #include "ContainerHelper.hxx"
37*cdf0e10cSrcweir #include <com/sun/star/beans/XPropertySet.hpp>
38*cdf0e10cSrcweir #include <com/sun/star/chart2/data/XDataSink.hpp>
39*cdf0e10cSrcweir 
40*cdf0e10cSrcweir // #include <deque>
41*cdf0e10cSrcweir 
42*cdf0e10cSrcweir #include <vector>
43*cdf0e10cSrcweir #include <algorithm>
44*cdf0e10cSrcweir #include <iterator>
45*cdf0e10cSrcweir 
46*cdf0e10cSrcweir using namespace ::com::sun::star;
47*cdf0e10cSrcweir using namespace ::com::sun::star::chart2;
48*cdf0e10cSrcweir using namespace ::std;
49*cdf0e10cSrcweir 
50*cdf0e10cSrcweir using ::com::sun::star::uno::Reference;
51*cdf0e10cSrcweir using ::com::sun::star::uno::Sequence;
52*cdf0e10cSrcweir using ::rtl::OUString;
53*cdf0e10cSrcweir using namespace ::chart::ContainerHelper;
54*cdf0e10cSrcweir 
55*cdf0e10cSrcweir namespace chart
56*cdf0e10cSrcweir {
57*cdf0e10cSrcweir 
58*cdf0e10cSrcweir // explicit
59*cdf0e10cSrcweir StockDataInterpreter::StockDataInterpreter(
60*cdf0e10cSrcweir     StockChartTypeTemplate::StockVariant eVariant,
61*cdf0e10cSrcweir     const Reference< uno::XComponentContext > & xContext ) :
62*cdf0e10cSrcweir         DataInterpreter( xContext ),
63*cdf0e10cSrcweir         m_eStockVariant( eVariant )
64*cdf0e10cSrcweir {}
65*cdf0e10cSrcweir 
66*cdf0e10cSrcweir StockDataInterpreter::~StockDataInterpreter()
67*cdf0e10cSrcweir {}
68*cdf0e10cSrcweir 
69*cdf0e10cSrcweir StockChartTypeTemplate::StockVariant StockDataInterpreter::GetStockVariant() const
70*cdf0e10cSrcweir {
71*cdf0e10cSrcweir     return m_eStockVariant;
72*cdf0e10cSrcweir }
73*cdf0e10cSrcweir 
74*cdf0e10cSrcweir // ____ XDataInterpreter ____
75*cdf0e10cSrcweir InterpretedData SAL_CALL StockDataInterpreter::interpretDataSource(
76*cdf0e10cSrcweir     const Reference< data::XDataSource >& xSource,
77*cdf0e10cSrcweir     const Sequence< beans::PropertyValue >& rArguments,
78*cdf0e10cSrcweir     const Sequence< Reference< XDataSeries > >& rSeriesToReUse )
79*cdf0e10cSrcweir     throw (uno::RuntimeException)
80*cdf0e10cSrcweir {
81*cdf0e10cSrcweir     if( ! xSource.is())
82*cdf0e10cSrcweir         return InterpretedData();
83*cdf0e10cSrcweir 
84*cdf0e10cSrcweir     Reference< data::XLabeledDataSequence > xCategories;
85*cdf0e10cSrcweir     Sequence< Reference< data::XLabeledDataSequence > > aData( xSource->getDataSequences() );
86*cdf0e10cSrcweir     const sal_Int32 nDataCount( aData.getLength());
87*cdf0e10cSrcweir 
88*cdf0e10cSrcweir     // sub-type properties
89*cdf0e10cSrcweir     const StockChartTypeTemplate::StockVariant eVar( GetStockVariant());
90*cdf0e10cSrcweir     const bool bHasOpenValues (( eVar == StockChartTypeTemplate::OPEN_LOW_HI_CLOSE ) ||
91*cdf0e10cSrcweir                                ( eVar == StockChartTypeTemplate::VOL_OPEN_LOW_HI_CLOSE ));
92*cdf0e10cSrcweir     const bool bHasVolume (( eVar == StockChartTypeTemplate::VOL_LOW_HI_CLOSE ) ||
93*cdf0e10cSrcweir                            ( eVar == StockChartTypeTemplate::VOL_OPEN_LOW_HI_CLOSE ));
94*cdf0e10cSrcweir     const bool bHasCategories( HasCategories( rArguments, aData ));
95*cdf0e10cSrcweir 
96*cdf0e10cSrcweir     // necessary roles for "full series"
97*cdf0e10cSrcweir     // low/high/close
98*cdf0e10cSrcweir     sal_Int32 nNumberOfNecessarySequences( 3 );
99*cdf0e10cSrcweir     if( bHasOpenValues )
100*cdf0e10cSrcweir         ++nNumberOfNecessarySequences;
101*cdf0e10cSrcweir     if( bHasVolume )
102*cdf0e10cSrcweir         ++nNumberOfNecessarySequences;
103*cdf0e10cSrcweir 
104*cdf0e10cSrcweir     // calculate number of full series (nNumOfFullSeries) and the number of remaining
105*cdf0e10cSrcweir     // sequences used for additional "incomplete series" (nRemaining)
106*cdf0e10cSrcweir     sal_Int32 nNumOfFullSeries( 0 );
107*cdf0e10cSrcweir     sal_Int32 nRemaining( 0 );
108*cdf0e10cSrcweir     {
109*cdf0e10cSrcweir         sal_Int32 nAvailableSequences( nDataCount );
110*cdf0e10cSrcweir         if( bHasCategories )
111*cdf0e10cSrcweir             --nAvailableSequences;
112*cdf0e10cSrcweir         nNumOfFullSeries = nAvailableSequences / nNumberOfNecessarySequences;
113*cdf0e10cSrcweir         nRemaining = nAvailableSequences % nNumberOfNecessarySequences;
114*cdf0e10cSrcweir     }
115*cdf0e10cSrcweir     sal_Int32 nCandleStickSeries = nNumOfFullSeries;
116*cdf0e10cSrcweir     sal_Int32 nVolumeSeries = nNumOfFullSeries;
117*cdf0e10cSrcweir 
118*cdf0e10cSrcweir     sal_Int32 nNumberOfGroups( bHasVolume ? 2 : 1 );
119*cdf0e10cSrcweir     // sequences of data::XLabeledDataSequence per series per group
120*cdf0e10cSrcweir     Sequence< Sequence< Sequence< Reference< data::XLabeledDataSequence > > > > aSequences( nNumberOfGroups );
121*cdf0e10cSrcweir     sal_Int32 nBarGroupIndex( 0 );
122*cdf0e10cSrcweir     sal_Int32 nCandleStickGroupIndex( nNumberOfGroups - 1 );
123*cdf0e10cSrcweir 
124*cdf0e10cSrcweir     // allocate space for labeled sequences
125*cdf0e10cSrcweir     if( nRemaining > 0  )
126*cdf0e10cSrcweir         ++nCandleStickSeries;
127*cdf0e10cSrcweir     aSequences[nCandleStickGroupIndex].realloc( nCandleStickSeries );
128*cdf0e10cSrcweir     if( bHasVolume )
129*cdf0e10cSrcweir     {
130*cdf0e10cSrcweir         // if there are remaining sequences, the first one is taken for
131*cdf0e10cSrcweir         // additional close values, the second one is taken as volume, if volume
132*cdf0e10cSrcweir         // is used
133*cdf0e10cSrcweir         if( nRemaining > 1 )
134*cdf0e10cSrcweir             ++nVolumeSeries;
135*cdf0e10cSrcweir         aSequences[nBarGroupIndex].realloc( nVolumeSeries );
136*cdf0e10cSrcweir     }
137*cdf0e10cSrcweir 
138*cdf0e10cSrcweir 
139*cdf0e10cSrcweir     // create data
140*cdf0e10cSrcweir     sal_Int32 nSourceIndex = 0;   // index into aData sequence
141*cdf0e10cSrcweir 
142*cdf0e10cSrcweir     // 1. categories
143*cdf0e10cSrcweir     if( bHasCategories )
144*cdf0e10cSrcweir     {
145*cdf0e10cSrcweir         xCategories.set( aData[nSourceIndex] );
146*cdf0e10cSrcweir         ++nSourceIndex;
147*cdf0e10cSrcweir     }
148*cdf0e10cSrcweir 
149*cdf0e10cSrcweir     // 2. create "full" series
150*cdf0e10cSrcweir     for( sal_Int32 nLabeledSeqIdx=0; nLabeledSeqIdx<nNumOfFullSeries; ++nLabeledSeqIdx )
151*cdf0e10cSrcweir     {
152*cdf0e10cSrcweir         // bar
153*cdf0e10cSrcweir         if( bHasVolume )
154*cdf0e10cSrcweir         {
155*cdf0e10cSrcweir             aSequences[nBarGroupIndex][nLabeledSeqIdx].realloc( 1 );
156*cdf0e10cSrcweir             aSequences[nBarGroupIndex][nLabeledSeqIdx][0].set( aData[nSourceIndex] );
157*cdf0e10cSrcweir             if( aData[nSourceIndex].is())
158*cdf0e10cSrcweir                 SetRole( aData[nSourceIndex]->getValues(), C2U("values-y"));
159*cdf0e10cSrcweir             ++nSourceIndex;
160*cdf0e10cSrcweir         }
161*cdf0e10cSrcweir 
162*cdf0e10cSrcweir         sal_Int32 nSeqIdx = 0;
163*cdf0e10cSrcweir         if( bHasOpenValues )
164*cdf0e10cSrcweir         {
165*cdf0e10cSrcweir             aSequences[nCandleStickGroupIndex][nLabeledSeqIdx].realloc( 4 );
166*cdf0e10cSrcweir             aSequences[nCandleStickGroupIndex][nLabeledSeqIdx][nSeqIdx].set( aData[nSourceIndex] );
167*cdf0e10cSrcweir             if( aData[nSourceIndex].is())
168*cdf0e10cSrcweir                 SetRole( aData[nSourceIndex]->getValues(), C2U("values-first"));
169*cdf0e10cSrcweir             ++nSourceIndex, ++nSeqIdx;
170*cdf0e10cSrcweir         }
171*cdf0e10cSrcweir         else
172*cdf0e10cSrcweir             aSequences[nCandleStickGroupIndex][nLabeledSeqIdx].realloc( 3 );
173*cdf0e10cSrcweir 
174*cdf0e10cSrcweir         aSequences[nCandleStickGroupIndex][nLabeledSeqIdx][nSeqIdx].set( aData[nSourceIndex] );
175*cdf0e10cSrcweir         if( aData[nSourceIndex].is())
176*cdf0e10cSrcweir             SetRole( aData[nSourceIndex]->getValues(), C2U("values-min"));
177*cdf0e10cSrcweir         ++nSourceIndex, ++nSeqIdx;
178*cdf0e10cSrcweir 
179*cdf0e10cSrcweir         aSequences[nCandleStickGroupIndex][nLabeledSeqIdx][nSeqIdx].set( aData[nSourceIndex] );
180*cdf0e10cSrcweir         if( aData[nSourceIndex].is())
181*cdf0e10cSrcweir             SetRole( aData[nSourceIndex]->getValues(), C2U("values-max"));
182*cdf0e10cSrcweir         ++nSourceIndex, ++nSeqIdx;
183*cdf0e10cSrcweir 
184*cdf0e10cSrcweir         aSequences[nCandleStickGroupIndex][nLabeledSeqIdx][nSeqIdx].set( aData[nSourceIndex] );
185*cdf0e10cSrcweir         if( aData[nSourceIndex].is())
186*cdf0e10cSrcweir             SetRole( aData[nSourceIndex]->getValues(), C2U("values-last"));
187*cdf0e10cSrcweir         ++nSourceIndex, ++nSeqIdx;
188*cdf0e10cSrcweir     }
189*cdf0e10cSrcweir 
190*cdf0e10cSrcweir     // 3. create series with remaining sequences
191*cdf0e10cSrcweir     if( bHasVolume && nRemaining > 1 )
192*cdf0e10cSrcweir     {
193*cdf0e10cSrcweir         OSL_ASSERT( nVolumeSeries > nNumOfFullSeries );
194*cdf0e10cSrcweir         aSequences[nBarGroupIndex][nVolumeSeries - 1].realloc( 1 );
195*cdf0e10cSrcweir         OSL_ASSERT( nDataCount > nSourceIndex );
196*cdf0e10cSrcweir         if( aData[nSourceIndex].is())
197*cdf0e10cSrcweir             SetRole( aData[nSourceIndex]->getValues(), C2U("values-y"));
198*cdf0e10cSrcweir         aSequences[nBarGroupIndex][nVolumeSeries - 1][0].set( aData[nSourceIndex] );
199*cdf0e10cSrcweir         ++nSourceIndex;
200*cdf0e10cSrcweir         --nRemaining;
201*cdf0e10cSrcweir         OSL_ENSURE( nRemaining, "additional bar should only be used if there is at least one more sequence for a candle stick" );
202*cdf0e10cSrcweir     }
203*cdf0e10cSrcweir 
204*cdf0e10cSrcweir     // candle-stick
205*cdf0e10cSrcweir     if( nRemaining > 0 )
206*cdf0e10cSrcweir     {
207*cdf0e10cSrcweir         OSL_ASSERT( nCandleStickSeries > nNumOfFullSeries );
208*cdf0e10cSrcweir         const sal_Int32 nSeriesIndex = nCandleStickSeries - 1;
209*cdf0e10cSrcweir         aSequences[nCandleStickGroupIndex][nSeriesIndex].realloc( nRemaining );
210*cdf0e10cSrcweir         OSL_ASSERT( nDataCount > nSourceIndex );
211*cdf0e10cSrcweir 
212*cdf0e10cSrcweir         // 1. low
213*cdf0e10cSrcweir         sal_Int32 nSeqIdx( 0 );
214*cdf0e10cSrcweir         aSequences[nCandleStickGroupIndex][nSeriesIndex][nSeqIdx].set( aData[nSourceIndex] );
215*cdf0e10cSrcweir         if( aData[nSourceIndex].is())
216*cdf0e10cSrcweir             SetRole( aData[nSourceIndex]->getValues(), C2U("values-min"));
217*cdf0e10cSrcweir         ++nSourceIndex, ++nSeqIdx;
218*cdf0e10cSrcweir 
219*cdf0e10cSrcweir         // 2. high
220*cdf0e10cSrcweir         if( nSeqIdx < nRemaining )
221*cdf0e10cSrcweir         {
222*cdf0e10cSrcweir             aSequences[nCandleStickGroupIndex][nSeriesIndex][nSeqIdx].set( aData[nSourceIndex] );
223*cdf0e10cSrcweir             if( aData[nSourceIndex].is())
224*cdf0e10cSrcweir                 SetRole( aData[nSourceIndex]->getValues(), C2U("values-max"));
225*cdf0e10cSrcweir             ++nSourceIndex, ++nSeqIdx;
226*cdf0e10cSrcweir         }
227*cdf0e10cSrcweir 
228*cdf0e10cSrcweir         // 3. close
229*cdf0e10cSrcweir         OSL_ENSURE( bHasOpenValues || nSeqIdx >= nRemaining, "could have created full series" );
230*cdf0e10cSrcweir         if( nSeqIdx < nRemaining )
231*cdf0e10cSrcweir         {
232*cdf0e10cSrcweir             aSequences[nCandleStickGroupIndex][nSeriesIndex][nSeqIdx].set( aData[nSourceIndex] );
233*cdf0e10cSrcweir             if( aData[nSourceIndex].is())
234*cdf0e10cSrcweir                 SetRole( aData[nSourceIndex]->getValues(), C2U("values-last"));
235*cdf0e10cSrcweir             ++nSourceIndex, ++nSeqIdx;
236*cdf0e10cSrcweir         }
237*cdf0e10cSrcweir 
238*cdf0e10cSrcweir         // 4. open
239*cdf0e10cSrcweir         OSL_ENSURE( nSeqIdx >= nRemaining, "could have created full series" );
240*cdf0e10cSrcweir     }
241*cdf0e10cSrcweir 
242*cdf0e10cSrcweir     // create DataSeries
243*cdf0e10cSrcweir     Sequence< Sequence< Reference< XDataSeries > > > aResultSeries( nNumberOfGroups );
244*cdf0e10cSrcweir     sal_Int32 nGroupIndex, nReUsedSeriesIdx = 0;
245*cdf0e10cSrcweir     for( nGroupIndex=0; nGroupIndex<nNumberOfGroups; ++nGroupIndex )
246*cdf0e10cSrcweir     {
247*cdf0e10cSrcweir         const sal_Int32 nNumSeriesData = aSequences[nGroupIndex].getLength();
248*cdf0e10cSrcweir         aResultSeries[nGroupIndex].realloc( nNumSeriesData );
249*cdf0e10cSrcweir         for( sal_Int32 nSeriesIdx = 0; nSeriesIdx < nNumSeriesData; ++nSeriesIdx, ++nReUsedSeriesIdx )
250*cdf0e10cSrcweir         {
251*cdf0e10cSrcweir             try
252*cdf0e10cSrcweir             {
253*cdf0e10cSrcweir                 Reference< XDataSeries > xSeries;
254*cdf0e10cSrcweir                 if( nReUsedSeriesIdx < rSeriesToReUse.getLength())
255*cdf0e10cSrcweir                     xSeries.set( rSeriesToReUse[nReUsedSeriesIdx] );
256*cdf0e10cSrcweir                 else
257*cdf0e10cSrcweir                     xSeries.set( new DataSeries( GetComponentContext() ) );
258*cdf0e10cSrcweir                 OSL_ASSERT( xSeries.is() );
259*cdf0e10cSrcweir                 Reference< data::XDataSink > xSink( xSeries, uno::UNO_QUERY_THROW );
260*cdf0e10cSrcweir                 OSL_ASSERT( xSink.is() );
261*cdf0e10cSrcweir                 xSink->setData( aSequences[nGroupIndex][nSeriesIdx] );
262*cdf0e10cSrcweir                 aResultSeries[nGroupIndex][nSeriesIdx].set( xSeries );
263*cdf0e10cSrcweir             }
264*cdf0e10cSrcweir             catch( uno::Exception & ex )
265*cdf0e10cSrcweir             {
266*cdf0e10cSrcweir                 ASSERT_EXCEPTION( ex );
267*cdf0e10cSrcweir             }
268*cdf0e10cSrcweir         }
269*cdf0e10cSrcweir     }
270*cdf0e10cSrcweir 
271*cdf0e10cSrcweir     return InterpretedData( aResultSeries, xCategories );
272*cdf0e10cSrcweir }
273*cdf0e10cSrcweir 
274*cdf0e10cSrcweir // criterion: there must be two groups for stock-charts with volume and all
275*cdf0e10cSrcweir // series must have the correct number of data::XLabeledDataSequences
276*cdf0e10cSrcweir 
277*cdf0e10cSrcweir // todo: skip first criterion? (to allow easy switch from stock-chart without
278*cdf0e10cSrcweir // volume to one with volume)
279*cdf0e10cSrcweir sal_Bool SAL_CALL StockDataInterpreter::isDataCompatible(
280*cdf0e10cSrcweir     const InterpretedData& aInterpretedData )
281*cdf0e10cSrcweir     throw (uno::RuntimeException)
282*cdf0e10cSrcweir {
283*cdf0e10cSrcweir     // high/low/close
284*cdf0e10cSrcweir     sal_Int32 nNumberOfNecessarySequences = 3;
285*cdf0e10cSrcweir     // open
286*cdf0e10cSrcweir     StockChartTypeTemplate::StockVariant eVar( GetStockVariant());
287*cdf0e10cSrcweir     if( ( eVar == StockChartTypeTemplate::OPEN_LOW_HI_CLOSE ) ||
288*cdf0e10cSrcweir         ( eVar == StockChartTypeTemplate::VOL_OPEN_LOW_HI_CLOSE ))
289*cdf0e10cSrcweir         ++nNumberOfNecessarySequences;
290*cdf0e10cSrcweir     // volume
291*cdf0e10cSrcweir     bool bHasVolume = (( eVar == StockChartTypeTemplate::VOL_LOW_HI_CLOSE ) ||
292*cdf0e10cSrcweir                        ( eVar == StockChartTypeTemplate::VOL_OPEN_LOW_HI_CLOSE ));
293*cdf0e10cSrcweir 
294*cdf0e10cSrcweir     // 1. correct number of sub-types
295*cdf0e10cSrcweir     if( aInterpretedData.Series.getLength() < (bHasVolume ? 2 : 1 ))
296*cdf0e10cSrcweir         return sal_False;
297*cdf0e10cSrcweir 
298*cdf0e10cSrcweir     // 2. a. volume -- use default check
299*cdf0e10cSrcweir     if( bHasVolume )
300*cdf0e10cSrcweir     {
301*cdf0e10cSrcweir         if( ! DataInterpreter::isDataCompatible(
302*cdf0e10cSrcweir                 InterpretedData( Sequence< Sequence< Reference< XDataSeries > > >(
303*cdf0e10cSrcweir                                      aInterpretedData.Series.getConstArray(), 1 ),
304*cdf0e10cSrcweir                                  aInterpretedData.Categories )))
305*cdf0e10cSrcweir             return sal_False;
306*cdf0e10cSrcweir     }
307*cdf0e10cSrcweir 
308*cdf0e10cSrcweir     // 2. b. candlestick
309*cdf0e10cSrcweir     {
310*cdf0e10cSrcweir         OSL_ASSERT( aInterpretedData.Series.getLength() > (bHasVolume ? 1 : 0));
311*cdf0e10cSrcweir         Sequence< Reference< XDataSeries > > aSeries( aInterpretedData.Series[(bHasVolume ? 1 : 0)] );
312*cdf0e10cSrcweir         if(!aSeries.getLength())
313*cdf0e10cSrcweir             return sal_False;
314*cdf0e10cSrcweir         for( sal_Int32 i=0; i<aSeries.getLength(); ++i )
315*cdf0e10cSrcweir         {
316*cdf0e10cSrcweir             try
317*cdf0e10cSrcweir             {
318*cdf0e10cSrcweir                 Reference< data::XDataSource > xSrc( aSeries[i], uno::UNO_QUERY_THROW );
319*cdf0e10cSrcweir                 Sequence< Reference< data::XLabeledDataSequence > > aSeq( xSrc->getDataSequences());
320*cdf0e10cSrcweir                 if( aSeq.getLength() != nNumberOfNecessarySequences )
321*cdf0e10cSrcweir                     return sal_False;
322*cdf0e10cSrcweir             }
323*cdf0e10cSrcweir             catch( uno::Exception & ex )
324*cdf0e10cSrcweir             {
325*cdf0e10cSrcweir                 ASSERT_EXCEPTION( ex );
326*cdf0e10cSrcweir             }
327*cdf0e10cSrcweir         }
328*cdf0e10cSrcweir     }
329*cdf0e10cSrcweir 
330*cdf0e10cSrcweir     // 2. c. additional series
331*cdf0e10cSrcweir     // ignore
332*cdf0e10cSrcweir 
333*cdf0e10cSrcweir     return sal_True;
334*cdf0e10cSrcweir }
335*cdf0e10cSrcweir 
336*cdf0e10cSrcweir InterpretedData SAL_CALL StockDataInterpreter::reinterpretDataSeries(
337*cdf0e10cSrcweir     const InterpretedData& aInterpretedData )
338*cdf0e10cSrcweir     throw (uno::RuntimeException)
339*cdf0e10cSrcweir {
340*cdf0e10cSrcweir     // prerequisite: StockDataInterpreter::isDataCompatible() returned true
341*cdf0e10cSrcweir     return aInterpretedData;
342*cdf0e10cSrcweir }
343*cdf0e10cSrcweir 
344*cdf0e10cSrcweir } // namespace chart
345