fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / chart2 / source / model / inc / BaseCoordinateSystem.hxx
blobec6441ebca80e55a4e1e7510bef74fe4bce108f8
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_CHART2_SOURCE_MODEL_INC_BASECOORDINATESYSTEM_HXX
20 #define INCLUDED_CHART2_SOURCE_MODEL_INC_BASECOORDINATESYSTEM_HXX
22 #include "OPropertySet.hxx"
23 #include "MutexContainer.hxx"
24 #include <cppuhelper/implbase6.hxx>
25 #include <comphelper/uno3.hxx>
26 #include <com/sun/star/lang/XServiceInfo.hpp>
27 #include <com/sun/star/uno/XComponentContext.hpp>
28 #include <com/sun/star/chart2/XCoordinateSystem.hpp>
29 #include <com/sun/star/chart2/XChartTypeContainer.hpp>
30 #include <com/sun/star/util/XCloneable.hpp>
31 #include <com/sun/star/util/XModifyBroadcaster.hpp>
32 #include <com/sun/star/util/XModifyListener.hpp>
34 #include <vector>
36 namespace chart
39 namespace impl
41 typedef ::cppu::WeakImplHelper6
42 < ::com::sun::star::lang::XServiceInfo,
43 ::com::sun::star::chart2::XCoordinateSystem,
44 ::com::sun::star::chart2::XChartTypeContainer,
45 ::com::sun::star::util::XCloneable,
46 ::com::sun::star::util::XModifyBroadcaster,
47 ::com::sun::star::util::XModifyListener >
48 BaseCoordinateSystem_Base;
51 class BaseCoordinateSystem :
52 public impl::BaseCoordinateSystem_Base,
53 public MutexContainer,
54 public ::property::OPropertySet
56 public:
57 BaseCoordinateSystem(
58 const ::com::sun::star::uno::Reference<
59 ::com::sun::star::uno::XComponentContext > & xContext,
60 sal_Int32 nDimensionCount = 2,
61 bool bSwapXAndYAxis = false );
62 explicit BaseCoordinateSystem( const BaseCoordinateSystem & rSource );
63 virtual ~BaseCoordinateSystem();
65 // ____ OPropertySet ____
66 virtual ::com::sun::star::uno::Any GetDefaultValue( sal_Int32 nHandle ) const
67 throw(::com::sun::star::beans::UnknownPropertyException) SAL_OVERRIDE;
69 virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper() SAL_OVERRIDE;
71 // ____ XPropertySet ____
72 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL
73 getPropertySetInfo()
74 throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
76 /// merge XInterface implementations
77 DECLARE_XINTERFACE()
78 /// merge XTypeProvider implementations
79 DECLARE_XTYPEPROVIDER()
81 protected:
82 // ____ XCoordinateSystem ____
83 virtual ::sal_Int32 SAL_CALL getDimension()
84 throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
85 virtual void SAL_CALL setAxisByDimension(
86 ::sal_Int32 nDimension,
87 const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XAxis >& xAxis,
88 ::sal_Int32 nIndex )
89 throw (::com::sun::star::lang::IndexOutOfBoundsException,
90 ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
91 virtual ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XAxis > SAL_CALL getAxisByDimension(
92 ::sal_Int32 nDimension, ::sal_Int32 nIndex )
93 throw (::com::sun::star::lang::IndexOutOfBoundsException,
94 ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
95 virtual ::sal_Int32 SAL_CALL getMaximumAxisIndexByDimension( ::sal_Int32 nDimension )
96 throw (::com::sun::star::lang::IndexOutOfBoundsException,
97 ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
99 // ____ XChartTypeContainer ____
100 virtual void SAL_CALL addChartType(
101 const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartType >& aChartType )
102 throw (::com::sun::star::lang::IllegalArgumentException,
103 ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
104 virtual void SAL_CALL removeChartType(
105 const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartType >& aChartType )
106 throw (::com::sun::star::container::NoSuchElementException,
107 ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
108 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartType > > SAL_CALL getChartTypes()
109 throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
110 virtual void SAL_CALL setChartTypes(
111 const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartType > >& aChartTypes )
112 throw (::com::sun::star::lang::IllegalArgumentException,
113 ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
115 // ____ XModifyBroadcaster ____
116 virtual void SAL_CALL addModifyListener(
117 const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener )
118 throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
119 virtual void SAL_CALL removeModifyListener(
120 const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener )
121 throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
123 // ____ XModifyListener ____
124 virtual void SAL_CALL modified(
125 const ::com::sun::star::lang::EventObject& aEvent )
126 throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
128 // ____ XEventListener (base of XModifyListener) ____
129 virtual void SAL_CALL disposing(
130 const ::com::sun::star::lang::EventObject& Source )
131 throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
133 // ____ OPropertySet ____
134 virtual void firePropertyChangeEvent() SAL_OVERRIDE;
135 using OPropertySet::disposing;
137 void fireModifyEvent();
139 protected:
140 ::com::sun::star::uno::Reference<
141 ::com::sun::star::uno::XComponentContext > m_xContext;
143 ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener > m_xModifyEventForwarder;
145 private:
146 sal_Int32 m_nDimensionCount;
147 typedef ::std::vector< ::std::vector< ::com::sun::star::uno::Reference<
148 ::com::sun::star::chart2::XAxis > > > tAxisVecVecType;
149 tAxisVecVecType m_aAllAxis; //outer sequence is the dimension; inner sequence is the axis index that indicates main or secondary axis
150 ::com::sun::star::uno::Sequence<
151 ::com::sun::star::uno::Any > m_aOrigin;
152 ::std::vector< ::com::sun::star::uno::Reference<
153 ::com::sun::star::chart2::XChartType > > m_aChartTypes;
156 } // namespace chart
158 // INCLUDED_CHART2_SOURCE_MODEL_INC_BASECOORDINATESYSTEM_HXX
159 #endif
161 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */