Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
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/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
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 .
18 : */
19 : #ifndef CHART2_REGRESSIONEQUATION_HXX
20 : #define CHART2_REGRESSIONEQUATION_HXX
21 :
22 : #include <com/sun/star/uno/XComponentContext.hpp>
23 : #include <com/sun/star/util/XCloneable.hpp>
24 : #include <com/sun/star/util/XModifyBroadcaster.hpp>
25 : #include <com/sun/star/util/XModifyListener.hpp>
26 : #include <com/sun/star/chart2/XTitle.hpp>
27 :
28 : #include "MutexContainer.hxx"
29 : #include "OPropertySet.hxx"
30 : #include "ServiceMacros.hxx"
31 : #include "ModifyListenerHelper.hxx"
32 :
33 : #include <cppuhelper/implbase4.hxx>
34 : #include <comphelper/uno3.hxx>
35 :
36 : namespace chart
37 : {
38 :
39 : namespace impl
40 : {
41 : typedef ::cppu::WeakImplHelper4<
42 : ::com::sun::star::util::XCloneable,
43 : ::com::sun::star::util::XModifyBroadcaster,
44 : ::com::sun::star::util::XModifyListener,
45 : ::com::sun::star::chart2::XTitle >
46 : RegressionEquation_Base;
47 : }
48 :
49 : class RegressionEquation :
50 : public MutexContainer,
51 : public impl::RegressionEquation_Base,
52 : public ::property::OPropertySet
53 : {
54 : public:
55 : explicit RegressionEquation(
56 : const ::com::sun::star::uno::Reference<
57 : ::com::sun::star::uno::XComponentContext > & xContext );
58 : virtual ~RegressionEquation();
59 :
60 : /// XServiceInfo declarations
61 : APPHELPER_XSERVICEINFO_DECL()
62 : /// merge XInterface implementations
63 : DECLARE_XINTERFACE()
64 : /// establish methods for factory instatiation
65 0 : APPHELPER_SERVICE_FACTORY_HELPER( RegressionEquation )
66 :
67 : protected:
68 : explicit RegressionEquation( const RegressionEquation & rOther );
69 :
70 : // ____ OPropertySet ____
71 : virtual ::com::sun::star::uno::Any GetDefaultValue( sal_Int32 nHandle ) const
72 : throw(::com::sun::star::beans::UnknownPropertyException);
73 :
74 : virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper();
75 :
76 : // ____ XPropertySet ____
77 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL
78 : getPropertySetInfo()
79 : throw (::com::sun::star::uno::RuntimeException);
80 :
81 :
82 : // ____ XCloneable ____
83 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable > SAL_CALL createClone()
84 : throw (::com::sun::star::uno::RuntimeException);
85 :
86 : // ____ XModifyBroadcaster ____
87 : virtual void SAL_CALL addModifyListener(
88 : const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener )
89 : throw (::com::sun::star::uno::RuntimeException);
90 : virtual void SAL_CALL removeModifyListener(
91 : const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener )
92 : throw (::com::sun::star::uno::RuntimeException);
93 :
94 : // ____ XModifyListener ____
95 : virtual void SAL_CALL modified(
96 : const ::com::sun::star::lang::EventObject& aEvent )
97 : throw (::com::sun::star::uno::RuntimeException);
98 :
99 : // ____ XEventListener (base of XModifyListener) ____
100 : virtual void SAL_CALL disposing(
101 : const ::com::sun::star::lang::EventObject& Source )
102 : throw (::com::sun::star::uno::RuntimeException);
103 :
104 : // ____ XTitle ____
105 : virtual ::com::sun::star::uno::Sequence<
106 : ::com::sun::star::uno::Reference<
107 : ::com::sun::star::chart2::XFormattedString > > SAL_CALL getText()
108 : throw (::com::sun::star::uno::RuntimeException);
109 : virtual void SAL_CALL setText( const ::com::sun::star::uno::Sequence<
110 : ::com::sun::star::uno::Reference<
111 : ::com::sun::star::chart2::XFormattedString > >& Strings )
112 : throw (::com::sun::star::uno::RuntimeException);
113 :
114 : using ::cppu::OPropertySetHelper::disposing;
115 :
116 : // ____ OPropertySet ____
117 : virtual void firePropertyChangeEvent();
118 :
119 : void fireModifyEvent();
120 :
121 : private:
122 : ::com::sun::star::uno::Sequence<
123 : ::com::sun::star::uno::Reference<
124 : ::com::sun::star::chart2::XFormattedString > > m_aStrings;
125 :
126 : ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener > m_xModifyEventForwarder;
127 : ::com::sun::star::uno::Reference<
128 : ::com::sun::star::uno::XComponentContext >
129 : m_xContext;
130 : };
131 :
132 : } // namespace chart
133 :
134 : // CHART2_REGRESSIONEQUATION_HXX
135 : #endif
136 :
137 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|