1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 #ifndef _XMLOFF_SCH_XML_SERIESHELPER_HXX
24 #define _XMLOFF_SCH_XML_SERIESHELPER_HXX
25 
26 #include <com/sun/star/chart2/data/XDataSequence.hpp>
27 #include <com/sun/star/chart2/data/XDataSource.hpp>
28 #include <com/sun/star/chart2/XDataSeries.hpp>
29 #include <com/sun/star/chart2/XDiagram.hpp>
30 #include <com/sun/star/frame/XModel.hpp>
31 
32 #include <vector>
33 #include <map>
34 
35 class SchXMLSeriesHelper
36 {
37 public:
38     static ::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDataSeries > >
39             getDataSeriesFromDiagram(
40                 const ::com::sun::star::uno::Reference<
41                     ::com::sun::star::chart2::XDiagram > & xDiagram );
42     static ::std::map< ::com::sun::star::uno::Reference<
43                 ::com::sun::star::chart2::XDataSeries >, sal_Int32 >
44             getDataSeriesIndexMapFromDiagram(
45                 const ::com::sun::star::uno::Reference<
46                     ::com::sun::star::chart2::XDiagram > & xDiagram );
47 
48     static bool isCandleStickSeries(
49                   const ::com::sun::star::uno::Reference<
50                     ::com::sun::star::chart2::XDataSeries >& xSeries
51                 , const ::com::sun::star::uno::Reference<
52                     ::com::sun::star::frame::XModel >& xChartModel  );
53 
54     static ::com::sun::star::uno::Reference<
55                 ::com::sun::star::chart2::XDataSeries > getFirstCandleStickSeries(
56                     const ::com::sun::star::uno::Reference<
57                         ::com::sun::star::chart2::XDiagram > & xDiagram  );
58 
59     static ::com::sun::star::uno::Reference<
60                 ::com::sun::star::beans::XPropertySet > createOldAPISeriesPropertySet(
61                     const ::com::sun::star::uno::Reference<
62                         ::com::sun::star::chart2::XDataSeries >& xSeries
63                     , const ::com::sun::star::uno::Reference<
64                         ::com::sun::star::frame::XModel >& xChartModel );
65 
66     static ::com::sun::star::uno::Reference<
67                 ::com::sun::star::beans::XPropertySet > createOldAPIDataPointPropertySet(
68                     const ::com::sun::star::uno::Reference<
69                         ::com::sun::star::chart2::XDataSeries >& xSeries
70                     , sal_Int32 nPointIndex
71                     , const ::com::sun::star::uno::Reference<
72                         ::com::sun::star::frame::XModel >& xChartModel );
73 };
74 
75 // _XMLOFF_SCH_XML_SERIESHELPER_HXX
76 #endif
77