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 CHART_PAGEBACKGROUND_HXX
20 : #define CHART_PAGEBACKGROUND_HXX
21 :
22 : #include <com/sun/star/uno/XComponentContext.hpp>
23 : #include <com/sun/star/util/XCloneable.hpp>
24 : #include "MutexContainer.hxx"
25 : #include "OPropertySet.hxx"
26 : #include <cppuhelper/implbase3.hxx>
27 :
28 : #include "ServiceMacros.hxx"
29 : #include "ModifyListenerHelper.hxx"
30 : #include <comphelper/uno3.hxx>
31 :
32 : namespace chart
33 : {
34 :
35 : namespace impl
36 : {
37 : typedef ::cppu::WeakImplHelper3<
38 : ::com::sun::star::util::XCloneable,
39 : ::com::sun::star::util::XModifyBroadcaster,
40 : ::com::sun::star::util::XModifyListener >
41 : PageBackground_Base;
42 : }
43 :
44 : class PageBackground :
45 : public MutexContainer,
46 : public impl::PageBackground_Base,
47 : public ::property::OPropertySet
48 : {
49 : public:
50 : PageBackground( const ::com::sun::star::uno::Reference<
51 : ::com::sun::star::uno::XComponentContext > & xContext );
52 : virtual ~PageBackground();
53 :
54 : /// establish methods for factory instatiation
55 0 : APPHELPER_SERVICE_FACTORY_HELPER( PageBackground )
56 :
57 : /// XServiceInfo declarations
58 : APPHELPER_XSERVICEINFO_DECL()
59 :
60 : /// merge XInterface implementations
61 : DECLARE_XINTERFACE()
62 :
63 : protected:
64 : explicit PageBackground( const PageBackground & rOther );
65 :
66 : // ____ OPropertySet ____
67 : virtual ::com::sun::star::uno::Any GetDefaultValue( sal_Int32 nHandle ) const
68 : throw(::com::sun::star::beans::UnknownPropertyException);
69 :
70 : // ____ OPropertySet ____
71 : virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper();
72 :
73 : // ____ XPropertySet ____
74 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL
75 : getPropertySetInfo()
76 : throw (::com::sun::star::uno::RuntimeException);
77 :
78 : // ____ XCloneable ____
79 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable > SAL_CALL createClone()
80 : throw (::com::sun::star::uno::RuntimeException);
81 :
82 : // ____ XModifyBroadcaster ____
83 : virtual void SAL_CALL addModifyListener(
84 : const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener )
85 : throw (::com::sun::star::uno::RuntimeException);
86 : virtual void SAL_CALL removeModifyListener(
87 : const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener )
88 : throw (::com::sun::star::uno::RuntimeException);
89 :
90 : // ____ XModifyListener ____
91 : virtual void SAL_CALL modified(
92 : const ::com::sun::star::lang::EventObject& aEvent )
93 : throw (::com::sun::star::uno::RuntimeException);
94 :
95 : // ____ XEventListener (base of XModifyListener) ____
96 : virtual void SAL_CALL disposing(
97 : const ::com::sun::star::lang::EventObject& Source )
98 : throw (::com::sun::star::uno::RuntimeException);
99 :
100 : // ____ OPropertySet ____
101 : virtual void firePropertyChangeEvent();
102 : using OPropertySet::disposing;
103 :
104 : void fireModifyEvent();
105 :
106 : private:
107 : ::com::sun::star::uno::Reference<
108 : ::com::sun::star::uno::XComponentContext >
109 : m_xContext;
110 :
111 : ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener > m_xModifyEventForwarder;
112 : };
113 :
114 : } // namespace chart
115 :
116 : // CHART_PAGEBACKGROUND_HXX
117 : #endif
118 :
119 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|