Update ooo320-m1
[ooovba.git] / chart2 / source / model / main / PageBackground.hxx
bloba617df92085cf20dae5a421c0f8eecbfef9ea730
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: PageBackground.hxx,v $
10 * $Revision: 1.5 $
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_PAGEBACKGROUND_HXX
31 #define CHART_PAGEBACKGROUND_HXX
33 #include <com/sun/star/uno/XComponentContext.hpp>
34 #include <com/sun/star/util/XCloneable.hpp>
35 #include "MutexContainer.hxx"
36 #include "OPropertySet.hxx"
37 #include <cppuhelper/implbase3.hxx>
39 #include "ServiceMacros.hxx"
40 #include "ModifyListenerHelper.hxx"
41 #include <comphelper/uno3.hxx>
43 namespace chart
46 namespace impl
48 typedef ::cppu::WeakImplHelper3<
49 ::com::sun::star::util::XCloneable,
50 ::com::sun::star::util::XModifyBroadcaster,
51 ::com::sun::star::util::XModifyListener >
52 PageBackground_Base;
55 class PageBackground :
56 public MutexContainer,
57 public impl::PageBackground_Base,
58 public ::property::OPropertySet
60 public:
61 PageBackground( const ::com::sun::star::uno::Reference<
62 ::com::sun::star::uno::XComponentContext > & xContext );
63 virtual ~PageBackground();
65 /// establish methods for factory instatiation
66 APPHELPER_SERVICE_FACTORY_HELPER( PageBackground )
68 /// XServiceInfo declarations
69 APPHELPER_XSERVICEINFO_DECL()
71 /// merge XInterface implementations
72 DECLARE_XINTERFACE()
74 protected:
75 explicit PageBackground( const PageBackground & rOther );
77 // ____ OPropertySet ____
78 virtual ::com::sun::star::uno::Any GetDefaultValue( sal_Int32 nHandle ) const
79 throw(::com::sun::star::beans::UnknownPropertyException);
81 // ____ OPropertySet ____
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);
89 // virtual sal_Bool SAL_CALL convertFastPropertyValue
90 // ( ::com::sun::star::uno::Any & rConvertedValue,
91 // ::com::sun::star::uno::Any & rOldValue,
92 // sal_Int32 nHandle,
93 // const ::com::sun::star::uno::Any& rValue )
94 // throw (::com::sun::star::lang::IllegalArgumentException);
96 // ____ XCloneable ____
97 virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable > SAL_CALL createClone()
98 throw (::com::sun::star::uno::RuntimeException);
100 // ____ XModifyBroadcaster ____
101 virtual void SAL_CALL addModifyListener(
102 const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener )
103 throw (::com::sun::star::uno::RuntimeException);
104 virtual void SAL_CALL removeModifyListener(
105 const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener )
106 throw (::com::sun::star::uno::RuntimeException);
108 // ____ XModifyListener ____
109 virtual void SAL_CALL modified(
110 const ::com::sun::star::lang::EventObject& aEvent )
111 throw (::com::sun::star::uno::RuntimeException);
113 // ____ XEventListener (base of XModifyListener) ____
114 virtual void SAL_CALL disposing(
115 const ::com::sun::star::lang::EventObject& Source )
116 throw (::com::sun::star::uno::RuntimeException);
118 // ____ OPropertySet ____
119 virtual void firePropertyChangeEvent();
120 using OPropertySet::disposing;
122 void fireModifyEvent();
124 private:
125 ::com::sun::star::uno::Reference<
126 ::com::sun::star::uno::XComponentContext >
127 m_xContext;
129 ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener > m_xModifyEventForwarder;
132 } // namespace chart
134 // CHART_PAGEBACKGROUND_HXX
135 #endif