1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
19 #ifndef INCLUDED_CHART2_SOURCE_MODEL_MAIN_PAGEBACKGROUND_HXX
20 #define INCLUDED_CHART2_SOURCE_MODEL_MAIN_PAGEBACKGROUND_HXX
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>
29 #include "ModifyListenerHelper.hxx"
30 #include <comphelper/uno3.hxx>
37 typedef ::cppu::WeakImplHelper4
<
38 ::com::sun::star::util::XCloneable
,
39 ::com::sun::star::util::XModifyBroadcaster
,
40 ::com::sun::star::util::XModifyListener
,
41 ::com::sun::star::lang::XServiceInfo
>
45 class PageBackground
:
46 public MutexContainer
,
47 public impl::PageBackground_Base
,
48 public ::property::OPropertySet
51 PageBackground( const ::com::sun::star::uno::Reference
<
52 ::com::sun::star::uno::XComponentContext
> & xContext
);
53 virtual ~PageBackground();
55 /// establish methods for factory instatiation
56 static css::uno::Reference
< css::uno::XInterface
> SAL_CALL
create( css::uno::Reference
< css::uno::XComponentContext
> const & xContext
)
57 throw(css::uno::Exception
)
59 return (::cppu::OWeakObject
*)new PageBackground( xContext
);
62 /// XServiceInfo declarations
63 virtual OUString SAL_CALL
getImplementationName()
64 throw( css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
65 virtual sal_Bool SAL_CALL
supportsService( const OUString
& ServiceName
)
66 throw( css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
67 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames()
68 throw( css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
70 static OUString
getImplementationName_Static();
71 static css::uno::Sequence
< OUString
> getSupportedServiceNames_Static();
73 /// merge XInterface implementations
77 explicit PageBackground( const PageBackground
& rOther
);
79 // ____ OPropertySet ____
80 virtual ::com::sun::star::uno::Any
GetDefaultValue( sal_Int32 nHandle
) const
81 throw(::com::sun::star::beans::UnknownPropertyException
) SAL_OVERRIDE
;
83 // ____ OPropertySet ____
84 virtual ::cppu::IPropertyArrayHelper
& SAL_CALL
getInfoHelper() SAL_OVERRIDE
;
86 // ____ XPropertySet ____
87 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySetInfo
> SAL_CALL
89 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
91 // ____ XCloneable ____
92 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::util::XCloneable
> SAL_CALL
createClone()
93 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
95 // ____ XModifyBroadcaster ____
96 virtual void SAL_CALL
addModifyListener(
97 const ::com::sun::star::uno::Reference
< ::com::sun::star::util::XModifyListener
>& aListener
)
98 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
99 virtual void SAL_CALL
removeModifyListener(
100 const ::com::sun::star::uno::Reference
< ::com::sun::star::util::XModifyListener
>& aListener
)
101 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
103 // ____ XModifyListener ____
104 virtual void SAL_CALL
modified(
105 const ::com::sun::star::lang::EventObject
& aEvent
)
106 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
108 // ____ XEventListener (base of XModifyListener) ____
109 virtual void SAL_CALL
disposing(
110 const ::com::sun::star::lang::EventObject
& Source
)
111 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
113 // ____ OPropertySet ____
114 virtual void firePropertyChangeEvent() SAL_OVERRIDE
;
115 using OPropertySet::disposing
;
117 void fireModifyEvent();
120 ::com::sun::star::uno::Reference
<
121 ::com::sun::star::uno::XComponentContext
>
124 ::com::sun::star::uno::Reference
< ::com::sun::star::util::XModifyListener
> m_xModifyEventForwarder
;
129 // INCLUDED_CHART2_SOURCE_MODEL_MAIN_PAGEBACKGROUND_HXX
132 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */