merged tag ooo/OOO330_m14
[LibreOffice.git] / chart2 / source / tools / RegressionEquation.hxx
blob35dbd828370d4be3da79eed0975d58436aef6a3c
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
27 #ifndef CHART2_REGRESSIONEQUATION_HXX
28 #define CHART2_REGRESSIONEQUATION_HXX
30 #include <com/sun/star/uno/XComponentContext.hpp>
31 #include <com/sun/star/util/XCloneable.hpp>
32 #include <com/sun/star/util/XModifyBroadcaster.hpp>
33 #include <com/sun/star/util/XModifyListener.hpp>
34 #include <com/sun/star/chart2/XTitle.hpp>
36 #include "MutexContainer.hxx"
37 #include "OPropertySet.hxx"
38 #include "ServiceMacros.hxx"
39 #include "ModifyListenerHelper.hxx"
41 #include <cppuhelper/implbase4.hxx>
42 #include <comphelper/uno3.hxx>
44 namespace chart
47 namespace impl
49 typedef ::cppu::WeakImplHelper4<
50 ::com::sun::star::util::XCloneable,
51 ::com::sun::star::util::XModifyBroadcaster,
52 ::com::sun::star::util::XModifyListener,
53 ::com::sun::star::chart2::XTitle >
54 RegressionEquation_Base;
57 class RegressionEquation :
58 public MutexContainer,
59 public impl::RegressionEquation_Base,
60 public ::property::OPropertySet
62 public:
63 explicit RegressionEquation(
64 const ::com::sun::star::uno::Reference<
65 ::com::sun::star::uno::XComponentContext > & xContext );
66 virtual ~RegressionEquation();
68 /// XServiceInfo declarations
69 APPHELPER_XSERVICEINFO_DECL()
70 /// merge XInterface implementations
71 DECLARE_XINTERFACE()
72 /// establish methods for factory instatiation
73 APPHELPER_SERVICE_FACTORY_HELPER( RegressionEquation )
75 protected:
76 explicit RegressionEquation( const RegressionEquation & rOther );
78 // ____ OPropertySet ____
79 virtual ::com::sun::star::uno::Any GetDefaultValue( sal_Int32 nHandle ) const
80 throw(::com::sun::star::beans::UnknownPropertyException);
82 virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper();
84 // ____ XPropertySet ____
85 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL
86 getPropertySetInfo()
87 throw (::com::sun::star::uno::RuntimeException);
90 // ____ XCloneable ____
91 virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable > SAL_CALL createClone()
92 throw (::com::sun::star::uno::RuntimeException);
94 // ____ XModifyBroadcaster ____
95 virtual void SAL_CALL addModifyListener(
96 const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener )
97 throw (::com::sun::star::uno::RuntimeException);
98 virtual void SAL_CALL removeModifyListener(
99 const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener )
100 throw (::com::sun::star::uno::RuntimeException);
102 // ____ XModifyListener ____
103 virtual void SAL_CALL modified(
104 const ::com::sun::star::lang::EventObject& aEvent )
105 throw (::com::sun::star::uno::RuntimeException);
107 // ____ XEventListener (base of XModifyListener) ____
108 virtual void SAL_CALL disposing(
109 const ::com::sun::star::lang::EventObject& Source )
110 throw (::com::sun::star::uno::RuntimeException);
112 // ____ XTitle ____
113 virtual ::com::sun::star::uno::Sequence<
114 ::com::sun::star::uno::Reference<
115 ::com::sun::star::chart2::XFormattedString > > SAL_CALL getText()
116 throw (::com::sun::star::uno::RuntimeException);
117 virtual void SAL_CALL setText( const ::com::sun::star::uno::Sequence<
118 ::com::sun::star::uno::Reference<
119 ::com::sun::star::chart2::XFormattedString > >& Strings )
120 throw (::com::sun::star::uno::RuntimeException);
122 using ::cppu::OPropertySetHelper::disposing;
124 // ____ OPropertySet ____
125 virtual void firePropertyChangeEvent();
127 void fireModifyEvent();
129 private:
130 ::com::sun::star::uno::Sequence<
131 ::com::sun::star::uno::Reference<
132 ::com::sun::star::chart2::XFormattedString > > m_aStrings;
134 ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener > m_xModifyEventForwarder;
135 ::com::sun::star::uno::Reference<
136 ::com::sun::star::uno::XComponentContext >
137 m_xContext;
140 } // namespace chart
142 // CHART2_REGRESSIONEQUATION_HXX
143 #endif