nss: upgrade to release 3.73
[LibreOffice.git] / chart2 / source / model / inc / BaseCoordinateSystem.hxx
blob5e00a442ccb0ae554ea3e9a996be78104921aa09
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 #pragma once
21 #include <OPropertySet.hxx>
22 #include <MutexContainer.hxx>
23 #include <cppuhelper/implbase.hxx>
24 #include <comphelper/uno3.hxx>
25 #include <com/sun/star/lang/XServiceInfo.hpp>
26 #include <com/sun/star/chart2/XCoordinateSystem.hpp>
27 #include <com/sun/star/chart2/XChartTypeContainer.hpp>
28 #include <com/sun/star/util/XCloneable.hpp>
29 #include <com/sun/star/util/XModifyBroadcaster.hpp>
30 #include <com/sun/star/util/XModifyListener.hpp>
32 #include <vector>
34 namespace chart
37 namespace impl
39 typedef ::cppu::WeakImplHelper
40 < css::lang::XServiceInfo,
41 css::chart2::XCoordinateSystem,
42 css::chart2::XChartTypeContainer,
43 css::util::XCloneable,
44 css::util::XModifyBroadcaster,
45 css::util::XModifyListener >
46 BaseCoordinateSystem_Base;
49 class BaseCoordinateSystem :
50 public impl::BaseCoordinateSystem_Base,
51 public MutexContainer,
52 public ::property::OPropertySet
54 public:
55 BaseCoordinateSystem( sal_Int32 nDimensionCount );
56 explicit BaseCoordinateSystem( const BaseCoordinateSystem & rSource );
57 virtual ~BaseCoordinateSystem() override;
59 // ____ OPropertySet ____
60 virtual css::uno::Any GetDefaultValue( sal_Int32 nHandle ) const override;
62 virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper() override;
64 // ____ XPropertySet ____
65 virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL
66 getPropertySetInfo() override;
68 /// merge XInterface implementations
69 DECLARE_XINTERFACE()
70 /// merge XTypeProvider implementations
71 DECLARE_XTYPEPROVIDER()
73 protected:
74 // ____ XCoordinateSystem ____
75 virtual ::sal_Int32 SAL_CALL getDimension() override;
76 virtual void SAL_CALL setAxisByDimension(
77 ::sal_Int32 nDimension,
78 const css::uno::Reference< css::chart2::XAxis >& xAxis,
79 ::sal_Int32 nIndex ) override;
80 virtual css::uno::Reference< css::chart2::XAxis > SAL_CALL getAxisByDimension(
81 ::sal_Int32 nDimension, ::sal_Int32 nIndex ) override;
82 virtual ::sal_Int32 SAL_CALL getMaximumAxisIndexByDimension( ::sal_Int32 nDimension ) override;
84 // ____ XChartTypeContainer ____
85 virtual void SAL_CALL addChartType(
86 const css::uno::Reference< css::chart2::XChartType >& aChartType ) override;
87 virtual void SAL_CALL removeChartType(
88 const css::uno::Reference< css::chart2::XChartType >& aChartType ) override;
89 virtual css::uno::Sequence< css::uno::Reference< css::chart2::XChartType > > SAL_CALL getChartTypes() override;
90 virtual void SAL_CALL setChartTypes(
91 const css::uno::Sequence< css::uno::Reference< css::chart2::XChartType > >& aChartTypes ) override;
93 // ____ XModifyBroadcaster ____
94 virtual void SAL_CALL addModifyListener(
95 const css::uno::Reference< css::util::XModifyListener >& aListener ) override;
96 virtual void SAL_CALL removeModifyListener(
97 const css::uno::Reference< css::util::XModifyListener >& aListener ) override;
99 // ____ XModifyListener ____
100 virtual void SAL_CALL modified(
101 const css::lang::EventObject& aEvent ) override;
103 // ____ XEventListener (base of XModifyListener) ____
104 virtual void SAL_CALL disposing(
105 const css::lang::EventObject& Source ) override;
107 // ____ OPropertySet ____
108 virtual void firePropertyChangeEvent() override;
109 using OPropertySet::disposing;
111 void fireModifyEvent();
113 protected:
114 css::uno::Reference< css::util::XModifyListener > m_xModifyEventForwarder;
116 private:
117 sal_Int32 m_nDimensionCount;
118 typedef std::vector< std::vector< css::uno::Reference< css::chart2::XAxis > > > tAxisVecVecType;
119 tAxisVecVecType m_aAllAxis; //outer sequence is the dimension; inner sequence is the axis index that indicates main or secondary axis
120 std::vector< css::uno::Reference< css::chart2::XChartType > > m_aChartTypes;
123 } // namespace chart
125 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */