merge the formfield patch from ooo-build
[ooovba.git] / chart2 / source / model / main / Title.hxx
blob1c8968eb9ce795032858507d9c8037439699d5df
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: Title.hxx,v $
10 * $Revision: 1.7 $
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 CHART_TITLE_HXX
31 #define CHART_TITLE_HXX
33 #include "ServiceMacros.hxx"
34 #include "ModifyListenerHelper.hxx"
35 #include "OPropertySet.hxx"
36 #include "MutexContainer.hxx"
37 #include <cppuhelper/implbase5.hxx>
38 #include <comphelper/uno3.hxx>
39 #include <com/sun/star/chart2/XTitle.hpp>
40 #include <com/sun/star/lang/XServiceInfo.hpp>
41 #include <com/sun/star/uno/XComponentContext.hpp>
42 #include <com/sun/star/util/XCloneable.hpp>
44 namespace chart
47 namespace impl
49 typedef ::cppu::WeakImplHelper5<
50 ::com::sun::star::chart2::XTitle,
51 ::com::sun::star::lang::XServiceInfo,
52 ::com::sun::star::util::XCloneable,
53 ::com::sun::star::util::XModifyBroadcaster,
54 ::com::sun::star::util::XModifyListener >
55 Title_Base;
58 class Title :
59 public MutexContainer,
60 public impl::Title_Base,
61 public ::property::OPropertySet
63 public:
64 Title( ::com::sun::star::uno::Reference<
65 ::com::sun::star::uno::XComponentContext > const & xContext );
66 virtual ~Title();
68 /// establish methods for factory instatiation
69 APPHELPER_SERVICE_FACTORY_HELPER( Title )
71 /// XServiceInfo declarations
72 APPHELPER_XSERVICEINFO_DECL()
74 /// merge XInterface implementations
75 DECLARE_XINTERFACE()
76 /// merge XTypeProvider implementations
77 DECLARE_XTYPEPROVIDER()
79 protected:
80 explicit Title( const Title & rOther );
82 // ____ OPropertySet ____
83 virtual ::com::sun::star::uno::Any GetDefaultValue( sal_Int32 nHandle ) const
84 throw(::com::sun::star::beans::UnknownPropertyException);
86 // ____ OPropertySet ____
87 virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper();
89 // ____ XPropertySet ____
90 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL
91 getPropertySetInfo()
92 throw (::com::sun::star::uno::RuntimeException);
94 // virtual sal_Bool SAL_CALL convertFastPropertyValue
95 // ( ::com::sun::star::uno::Any & rConvertedValue,
96 // ::com::sun::star::uno::Any & rOldValue,
97 // sal_Int32 nHandle,
98 // const ::com::sun::star::uno::Any& rValue )
99 // throw (::com::sun::star::lang::IllegalArgumentException);
101 // ____ XTitle ____
102 virtual ::com::sun::star::uno::Sequence<
103 ::com::sun::star::uno::Reference<
104 ::com::sun::star::chart2::XFormattedString > > SAL_CALL getText()
105 throw (::com::sun::star::uno::RuntimeException);
106 virtual void SAL_CALL setText( const ::com::sun::star::uno::Sequence<
107 ::com::sun::star::uno::Reference<
108 ::com::sun::star::chart2::XFormattedString > >& Strings )
109 throw (::com::sun::star::uno::RuntimeException);
111 // ____ XCloneable ____
112 virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable > SAL_CALL createClone()
113 throw (::com::sun::star::uno::RuntimeException);
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);
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);
123 // ____ XModifyListener ____
124 virtual void SAL_CALL modified(
125 const ::com::sun::star::lang::EventObject& aEvent )
126 throw (::com::sun::star::uno::RuntimeException);
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);
133 // ____ OPropertySet ____
134 virtual void firePropertyChangeEvent();
135 using OPropertySet::disposing;
137 void fireModifyEvent();
139 private:
140 ::com::sun::star::uno::Sequence<
141 ::com::sun::star::uno::Reference<
142 ::com::sun::star::chart2::XFormattedString > > m_aStrings;
144 ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener > m_xModifyEventForwarder;
147 } // namespace chart
149 // CHART_TITLE_HXX
150 #endif