bump product version to 4.1.6.2
[LibreOffice.git] / xmloff / source / chart / SchXMLSeries2Context.hxx
blob44819bb9a38b0b7826450c64db1855657a43eddd
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
19 #ifndef XMLOFF_SCHXMLSERIES2CONTEXT_HXX
20 #define XMLOFF_SCHXMLSERIES2CONTEXT_HXX
22 #include "transporttypes.hxx"
23 #include "SchXMLChartContext.hxx"
24 #include <xmloff/xmlictxt.hxx>
25 #include <xmloff/SchXMLImportHelper.hxx>
26 // header for class SvXMLStyleContext
27 #include <xmloff/xmlstyle.hxx>
29 #include <vector>
30 #include <list>
32 namespace com { namespace sun { namespace star {
33 namespace chart2 {
34 class XChartDocument;
35 class XDataSeries;
37 namespace awt {
38 struct Size;
40 }}}
42 // class for child contexts: series, data point and statistics objects
43 class SchXMLSeries2Context : public SvXMLImportContext
45 private:
46 SchXMLImportHelper& mrImportHelper;
47 ::com::sun::star::uno::Reference<
48 ::com::sun::star::chart2::XChartDocument > mxNewDoc;
49 ::std::vector< SchXMLAxis >& mrAxes;
50 ::std::list< DataRowPointStyle >& mrStyleList;
51 ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDataSeries > m_xSeries;
52 sal_Int32 mnSeriesIndex;
53 sal_Int32 mnDataPointIndex;
54 sal_Bool m_bStockHasVolume;
56 GlobalSeriesImportInfo& m_rGlobalSeriesImportInfo;
58 SchXMLAxis* mpAttachedAxis;
59 sal_Int32 mnAttachedAxis;
60 OUString msAutoStyleName;
61 ::std::vector< OUString > maDomainAddresses;
62 OUString maGlobalChartTypeName;
63 OUString maSeriesChartTypeName;
64 OUString m_aSeriesRange;
65 OUString m_aSeriesLabelRange;
66 bool m_bHasDomainContext;
67 tSchXMLLSequencesPerIndex & mrLSequencesPerIndex;
68 tSchXMLLSequencesPerIndex maPostponedSequences;
69 bool& mrGlobalChartTypeUsedBySeries;
70 bool mbSymbolSizeIsMissingInFile;
71 ::com::sun::star::awt::Size maChartSize;
73 public:
74 SchXMLSeries2Context( SchXMLImportHelper& rImpHelper,
75 SvXMLImport& rImport, const OUString& rLocalName,
76 const ::com::sun::star::uno::Reference<
77 ::com::sun::star::chart2::XChartDocument > & xNewDoc,
78 std::vector< SchXMLAxis >& rAxes,
79 ::std::list< DataRowPointStyle >& rStyleList,
80 sal_Int32 nSeriesIndex,
81 sal_Bool bStockHasVolume,
82 GlobalSeriesImportInfo& rGlobalSeriesImportInfo,
83 const OUString & aGlobalChartTypeName,
84 tSchXMLLSequencesPerIndex & rLSequencesPerIndex,
85 bool& rGlobalChartTypeUsedBySeries,
86 const ::com::sun::star::awt::Size & rChartSize );
87 virtual ~SchXMLSeries2Context();
89 virtual void StartElement( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList );
90 virtual SvXMLImportContext* CreateChildContext(
91 sal_uInt16 nPrefix,
92 const OUString& rLocalName,
93 const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList );
94 virtual void EndElement();
96 static void initSeriesPropertySets( SeriesDefaultsAndStyles& rSeriesDefaultsAndStyles
97 , const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xChartModel );
99 static void setDefaultsToSeries( SeriesDefaultsAndStyles& rSeriesDefaultsAndStyles );
101 static void setStylesToSeries( SeriesDefaultsAndStyles& rSeriesDefaultsAndStyles
102 , const SvXMLStylesContext* pStylesCtxt
103 , const SvXMLStyleContext*& rpStyle
104 , OUString& rCurrStyleName
105 , SchXMLImportHelper& rImportHelper
106 , const SvXMLImport& rImport
107 , bool bIsStockChart
108 , tSchXMLLSequencesPerIndex & rInOutLSequencesPerIndex );
110 static void setStylesToStatisticsObjects( SeriesDefaultsAndStyles& rSeriesDefaultsAndStyles
111 , const SvXMLStylesContext* pStylesCtxt
112 , const SvXMLStyleContext*& rpStyle
113 , OUString &rCurrStyleName );
115 static void setStylesToDataPoints( SeriesDefaultsAndStyles& rSeriesDefaultsAndStyles
116 , const SvXMLStylesContext* pStylesCtxt
117 , const SvXMLStyleContext*& rpStyle
118 , OUString& rCurrStyleName
119 , SchXMLImportHelper& rImportHelper
120 , const SvXMLImport& rImport
121 , bool bIsStockChart, bool bIsDonutChart, bool bSwitchOffLinesForScatter );
123 static void switchSeriesLinesOff( ::std::list< DataRowPointStyle >& rSeriesStyleList );
126 // XMLOFF_SCHXMLSERIES2CONTEXT_HXX
127 #endif
129 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */