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