1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 .
21 #include <xmloff/xmlictxt.hxx>
22 #include <com/sun/star/drawing/XShape.hpp>
23 #include <com/sun/star/chart/ChartDataRowSource.hpp>
24 #include <com/sun/star/awt/Size.hpp>
26 #include "transporttypes.hxx"
30 class SchXMLImportHelper
;
32 namespace com::sun::star
{
35 struct ChartSeriesAddress
;
45 struct SeriesDefaultsAndStyles
47 //default values for series:
48 css::uno::Any maSymbolTypeDefault
;
49 css::uno::Any maDataCaptionDefault
;
51 css::uno::Any maErrorIndicatorDefault
;
52 css::uno::Any maErrorCategoryDefault
;
53 css::uno::Any maConstantErrorLowDefault
;
54 css::uno::Any maConstantErrorHighDefault
;
55 css::uno::Any maPercentageErrorDefault
;
56 css::uno::Any maErrorMarginDefault
;
58 css::uno::Any maMeanValueDefault
;
59 css::uno::Any maRegressionCurvesDefault
;
61 css::uno::Any maStackedDefault
;
62 css::uno::Any maPercentDefault
;
63 css::uno::Any maDeepDefault
;
64 css::uno::Any maStackedBarsConnectedDefault
;
66 //additional information
67 css::uno::Any maLinesOnProperty
;
69 //styles for series and datapoints
70 ::std::vector
< DataRowPointStyle
> maSeriesStyleVector
;
71 ::std::vector
< RegressionStyle
> maRegressionStyleVector
;
74 class SchXMLChartContext
: public SvXMLImportContext
77 SchXMLChartContext( SchXMLImportHelper
& rImpHelper
,
78 SvXMLImport
& rImport
);
79 virtual ~SchXMLChartContext() override
;
81 virtual void SAL_CALL
startFastElement( sal_Int32 nElement
,
82 const css::uno::Reference
< css::xml::sax::XFastAttributeList
>& xAttrList
) override
;
83 virtual void SAL_CALL
endFastElement(sal_Int32 nElement
) override
;
84 virtual css::uno::Reference
< css::xml::sax::XFastContextHandler
> SAL_CALL
createFastChildContext(
86 const css::uno::Reference
< css::xml::sax::XFastAttributeList
>& AttrList
) override
;
90 SchXMLImportHelper
& mrImportHelper
;
92 OUString maMainTitle
, maSubTitle
;
93 OUString m_aXLinkHRefAttributeToIndicateDataProvider
;
94 bool m_bHasRangeAtPlotArea
;
95 bool m_bHasTableElement
;
96 bool mbAllRangeAddressesAvailable
;
99 css::chart::ChartDataRowSource meDataRowSource
;
102 OUString msCategoriesAddress
;
103 OUString msChartAddress
;
105 OUString msDataPilotSource
;
107 SeriesDefaultsAndStyles maSeriesDefaultsAndStyles
;
108 tSchXMLLSequencesPerIndex maLSequencesPerIndex
;
110 css::uno::Reference
< css::drawing::XShapes
> mxDrawPage
;
113 OUString maChartTypeServiceName
;
115 css::awt::Size maChartSize
;
117 /** @descr This method bundles some settings to the chart model and executes them with
118 a locked controller. This includes setting the chart type.
119 @param aServiceName The name of the service the diagram is initialized with.
121 void InitChart (const OUString
& rChartTypeServiceName
);
123 void MergeSeriesForStockChart();
126 class SchXMLTitleContext
: public SvXMLImportContext
129 SchXMLImportHelper
& mrImportHelper
;
131 css::uno::Reference
< css::drawing::XShape
> mxTitleShape
;
132 OUString msAutoStyleName
;
135 SchXMLTitleContext( SchXMLImportHelper
& rImpHelper
,
136 SvXMLImport
& rImport
,
138 css::uno::Reference
< css::drawing::XShape
> xTitleShape
);
139 virtual ~SchXMLTitleContext() override
;
141 virtual void SAL_CALL
startFastElement( sal_Int32 nElement
,
142 const css::uno::Reference
< css::xml::sax::XFastAttributeList
>& xAttrList
) override
;
143 virtual css::uno::Reference
< css::xml::sax::XFastContextHandler
> SAL_CALL
createFastChildContext(
145 const css::uno::Reference
< css::xml::sax::XFastAttributeList
>& AttrList
) override
;
148 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */