Version 5.2.6.1, tag libreoffice-5.2.6.1
[LibreOffice.git] / xmloff / source / chart / SchXMLAxisContext.hxx
blobbfc5c3e76dbec57286fcaa8ed1f815de3b61f0a8
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 INCLUDED_XMLOFF_SOURCE_CHART_SCHXMLAXISCONTEXT_HXX
20 #define INCLUDED_XMLOFF_SOURCE_CHART_SCHXMLAXISCONTEXT_HXX
22 #include "SchXMLImport.hxx"
23 #include "transporttypes.hxx"
25 class SchXMLAxisContext : public SvXMLImportContext
27 public:
28 SchXMLAxisContext( SchXMLImportHelper& rImpHelper,
29 SvXMLImport& rImport, const OUString& rLocalName,
30 css::uno::Reference< css::chart::XDiagram > xDiagram,
31 std::vector< SchXMLAxis >& aAxes,
32 OUString& rCategoriesAddress,
33 bool bAddMissingXAxisForNetCharts,
34 bool bAdaptWrongPercentScaleValues,
35 bool bAdaptXAxisOrientationForOld2DBarCharts,
36 bool& rbAxisPositionAttributeImported );
37 virtual ~SchXMLAxisContext();
39 virtual void StartElement( const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override;
40 virtual void EndElement() override;
41 virtual SvXMLImportContext* CreateChildContext(
42 sal_uInt16 nPrefix,
43 const OUString& rLocalName,
44 const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override;
46 static void CorrectAxisPositions( const css::uno::Reference< css::chart2::XChartDocument >& xNewDoc,
47 const OUString& rChartTypeServiceName,
48 const OUString& rODFVersionOfFile,
49 bool bAxisPositionAttributeImported );
51 private:
52 SchXMLImportHelper& m_rImportHelper;
53 css::uno::Reference< css::chart::XDiagram > m_xDiagram;
54 SchXMLAxis m_aCurrentAxis;
55 std::vector< SchXMLAxis >& m_rAxes;
56 css::uno::Reference< css::beans::XPropertySet > m_xAxisProps;
57 OUString m_aAutoStyleName;
58 OUString& m_rCategoriesAddress;
59 sal_Int32 m_nAxisType;//css::chart::ChartAxisType
60 bool m_bAxisTypeImported;
61 bool m_bDateScaleImported;
62 bool m_bAddMissingXAxisForNetCharts; //to correct errors from older versions
63 bool m_bAdaptWrongPercentScaleValues; //to correct errors from older versions
64 bool m_bAdaptXAxisOrientationForOld2DBarCharts; //to correct different behaviour from older versions
65 bool& m_rbAxisPositionAttributeImported;
67 css::uno::Reference< css::drawing::XShape > getTitleShape();
68 void CreateGrid( const OUString& sAutoStyleName, bool bIsMajor );
69 void CreateAxis();
70 void SetAxisTitle();
73 #endif // INCLUDED_XMLOFF_SOURCE_CHART_SCHXMLAXISCONTEXT_HXX
75 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */