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: PageBackground.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 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>
48 typedef ::cppu::WeakImplHelper3
<
49 ::com::sun::star::util::XCloneable
,
50 ::com::sun::star::util::XModifyBroadcaster
,
51 ::com::sun::star::util::XModifyListener
>
55 class PageBackground
:
56 public MutexContainer
,
57 public impl::PageBackground_Base
,
58 public ::property::OPropertySet
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
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
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,
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();
125 ::com::sun::star::uno::Reference
<
126 ::com::sun::star::uno::XComponentContext
>
129 ::com::sun::star::uno::Reference
< ::com::sun::star::util::XModifyListener
> m_xModifyEventForwarder
;
134 // CHART_PAGEBACKGROUND_HXX