1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: RegressionEquation.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef CHART2_REGRESSIONEQUATION_HXX
31 #define CHART2_REGRESSIONEQUATION_HXX
33 #include <com/sun/star/uno/XComponentContext.hpp>
34 #include <com/sun/star/util/XCloneable.hpp>
35 #include <com/sun/star/util/XModifyBroadcaster.hpp>
36 #include <com/sun/star/util/XModifyListener.hpp>
37 #include <com/sun/star/chart2/XTitle.hpp>
39 #include "MutexContainer.hxx"
40 #include "OPropertySet.hxx"
41 #include "ServiceMacros.hxx"
42 #include "ModifyListenerHelper.hxx"
44 #include <cppuhelper/implbase4.hxx>
45 #include <comphelper/uno3.hxx>
52 typedef ::cppu::WeakImplHelper4
<
53 ::com::sun::star::util::XCloneable
,
54 ::com::sun::star::util::XModifyBroadcaster
,
55 ::com::sun::star::util::XModifyListener
,
56 ::com::sun::star::chart2::XTitle
>
57 RegressionEquation_Base
;
60 class RegressionEquation
:
61 public MutexContainer
,
62 public impl::RegressionEquation_Base
,
63 public ::property::OPropertySet
66 explicit RegressionEquation(
67 const ::com::sun::star::uno::Reference
<
68 ::com::sun::star::uno::XComponentContext
> & xContext
);
69 virtual ~RegressionEquation();
71 /// XServiceInfo declarations
72 APPHELPER_XSERVICEINFO_DECL()
73 /// merge XInterface implementations
75 /// establish methods for factory instatiation
76 APPHELPER_SERVICE_FACTORY_HELPER( RegressionEquation
)
79 explicit RegressionEquation( const RegressionEquation
& rOther
);
81 // ____ OPropertySet ____
82 virtual ::com::sun::star::uno::Any
GetDefaultValue( sal_Int32 nHandle
) const
83 throw(::com::sun::star::beans::UnknownPropertyException
);
85 virtual ::cppu::IPropertyArrayHelper
& SAL_CALL
getInfoHelper();
87 // ____ XPropertySet ____
88 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySetInfo
> SAL_CALL
90 throw (::com::sun::star::uno::RuntimeException
);
93 // ____ XCloneable ____
94 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::util::XCloneable
> SAL_CALL
createClone()
95 throw (::com::sun::star::uno::RuntimeException
);
97 // ____ XModifyBroadcaster ____
98 virtual void SAL_CALL
addModifyListener(
99 const ::com::sun::star::uno::Reference
< ::com::sun::star::util::XModifyListener
>& aListener
)
100 throw (::com::sun::star::uno::RuntimeException
);
101 virtual void SAL_CALL
removeModifyListener(
102 const ::com::sun::star::uno::Reference
< ::com::sun::star::util::XModifyListener
>& aListener
)
103 throw (::com::sun::star::uno::RuntimeException
);
105 // ____ XModifyListener ____
106 virtual void SAL_CALL
modified(
107 const ::com::sun::star::lang::EventObject
& aEvent
)
108 throw (::com::sun::star::uno::RuntimeException
);
110 // ____ XEventListener (base of XModifyListener) ____
111 virtual void SAL_CALL
disposing(
112 const ::com::sun::star::lang::EventObject
& Source
)
113 throw (::com::sun::star::uno::RuntimeException
);
116 virtual ::com::sun::star::uno::Sequence
<
117 ::com::sun::star::uno::Reference
<
118 ::com::sun::star::chart2::XFormattedString
> > SAL_CALL
getText()
119 throw (::com::sun::star::uno::RuntimeException
);
120 virtual void SAL_CALL
setText( const ::com::sun::star::uno::Sequence
<
121 ::com::sun::star::uno::Reference
<
122 ::com::sun::star::chart2::XFormattedString
> >& Strings
)
123 throw (::com::sun::star::uno::RuntimeException
);
125 using ::cppu::OPropertySetHelper::disposing
;
127 // ____ OPropertySet ____
128 virtual void firePropertyChangeEvent();
130 void fireModifyEvent();
133 ::com::sun::star::uno::Sequence
<
134 ::com::sun::star::uno::Reference
<
135 ::com::sun::star::chart2::XFormattedString
> > m_aStrings
;
137 ::com::sun::star::uno::Reference
< ::com::sun::star::util::XModifyListener
> m_xModifyEventForwarder
;
138 ::com::sun::star::uno::Reference
<
139 ::com::sun::star::uno::XComponentContext
>
145 // CHART2_REGRESSIONEQUATION_HXX