1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
28 #ifndef CHART_CHARTTYPE_HXX
29 #define CHART_CHARTTYPE_HXX
31 #include "MutexContainer.hxx"
32 #include "OPropertySet.hxx"
33 #include <cppuhelper/implbase5.hxx>
34 #include <comphelper/uno3.hxx>
35 #include "ServiceMacros.hxx"
36 #include "ModifyListenerHelper.hxx"
37 #include <com/sun/star/lang/XServiceInfo.hpp>
38 #include <com/sun/star/chart2/XChartType.hpp>
39 #include <com/sun/star/uno/XComponentContext.hpp>
40 #include <com/sun/star/chart2/XDataSeriesContainer.hpp>
41 #include <com/sun/star/util/XCloneable.hpp>
50 typedef ::cppu::WeakImplHelper5
<
51 ::com::sun::star::chart2::XChartType
,
52 ::com::sun::star::chart2::XDataSeriesContainer
,
53 ::com::sun::star::util::XCloneable
,
54 ::com::sun::star::util::XModifyBroadcaster
,
55 ::com::sun::star::util::XModifyListener
>
60 public MutexContainer
,
61 public impl::ChartType_Base
,
62 public ::property::OPropertySet
66 ::com::sun::star::uno::Reference
<
67 ::com::sun::star::uno::XComponentContext
> const & xContext
);
71 explicit ChartType( const ChartType
& rOther
);
73 ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XComponentContext
>
74 GetComponentContext() const;
76 // ____ XChartType ____
77 // still abstract ! implement !
78 virtual ::rtl::OUString SAL_CALL
getChartType()
79 throw (::com::sun::star::uno::RuntimeException
) = 0;
80 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::XCoordinateSystem
> SAL_CALL
81 createCoordinateSystem( ::sal_Int32 DimensionCount
)
82 throw (::com::sun::star::lang::IllegalArgumentException
,
83 ::com::sun::star::uno::RuntimeException
);
84 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
> SAL_CALL
85 getSupportedMandatoryRoles()
86 throw (::com::sun::star::uno::RuntimeException
);
87 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
> SAL_CALL
88 getSupportedOptionalRoles()
89 throw (::com::sun::star::uno::RuntimeException
);
90 virtual ::rtl::OUString SAL_CALL
getRoleOfSequenceForSeriesLabel()
91 throw (::com::sun::star::uno::RuntimeException
);
93 // ____ XDataSeriesContainer ____
94 virtual void SAL_CALL
addDataSeries(
95 const ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::XDataSeries
>& aDataSeries
)
96 throw (::com::sun::star::lang::IllegalArgumentException
,
97 ::com::sun::star::uno::RuntimeException
);
98 virtual void SAL_CALL
removeDataSeries(
99 const ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::XDataSeries
>& aDataSeries
)
100 throw (::com::sun::star::container::NoSuchElementException
,
101 ::com::sun::star::uno::RuntimeException
);
102 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::XDataSeries
> > SAL_CALL
getDataSeries()
103 throw (::com::sun::star::uno::RuntimeException
);
104 virtual void SAL_CALL
setDataSeries(
105 const ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::XDataSeries
> >& aDataSeries
)
106 throw (::com::sun::star::lang::IllegalArgumentException
,
107 ::com::sun::star::uno::RuntimeException
);
109 // ____ XModifyBroadcaster ____
110 virtual void SAL_CALL
addModifyListener(
111 const ::com::sun::star::uno::Reference
< ::com::sun::star::util::XModifyListener
>& aListener
)
112 throw (::com::sun::star::uno::RuntimeException
);
113 virtual void SAL_CALL
removeModifyListener(
114 const ::com::sun::star::uno::Reference
< ::com::sun::star::util::XModifyListener
>& aListener
)
115 throw (::com::sun::star::uno::RuntimeException
);
117 // ____ XModifyListener ____
118 virtual void SAL_CALL
modified(
119 const ::com::sun::star::lang::EventObject
& aEvent
)
120 throw (::com::sun::star::uno::RuntimeException
);
122 // ____ XEventListener (base of XModifyListener) ____
123 virtual void SAL_CALL
disposing(
124 const ::com::sun::star::lang::EventObject
& Source
)
125 throw (::com::sun::star::uno::RuntimeException
);
127 void fireModifyEvent();
129 // ____ OPropertySet ____
130 virtual ::com::sun::star::uno::Any
GetDefaultValue( sal_Int32 nHandle
) const
131 throw(::com::sun::star::beans::UnknownPropertyException
);
132 virtual ::cppu::IPropertyArrayHelper
& SAL_CALL
getInfoHelper();
134 virtual void firePropertyChangeEvent();
135 using OPropertySet::disposing
;
137 // ____ XPropertySet ____
138 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySetInfo
> SAL_CALL
140 throw (::com::sun::star::uno::RuntimeException
);
142 /// merge XInterface implementations
144 /// merge XTypeProvider implementations
145 DECLARE_XTYPEPROVIDER()
148 ::com::sun::star::uno::Reference
< ::com::sun::star::util::XModifyListener
> m_xModifyEventForwarder
;
151 void impl_addDataSeriesWithoutNotification(
152 const ::com::sun::star::uno::Reference
<
153 ::com::sun::star::chart2::XDataSeries
>& aDataSeries
);
156 ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XComponentContext
>
160 ::std::vector
< ::com::sun::star::uno::Reference
<
161 ::com::sun::star::chart2::XDataSeries
> >
162 tDataSeriesContainerType
;
164 tDataSeriesContainerType m_aDataSeries
;
166 bool m_bNotifyChanges
;
171 // CHART_CHARTTYPE_HXX
174 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */