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 CHART_GRIDPROPERTIES_HXX
20 #define CHART_GRIDPROPERTIES_HXX
22 #include "ServiceMacros.hxx"
23 #include <osl/mutex.hxx>
24 #include <cppuhelper/implbase4.hxx>
25 #include <comphelper/uno3.hxx>
26 #include <com/sun/star/lang/XServiceInfo.hpp>
27 #include <com/sun/star/uno/XComponentContext.hpp>
28 #include <com/sun/star/util/XCloneable.hpp>
29 #include <com/sun/star/util/XModifyBroadcaster.hpp>
30 #include <com/sun/star/util/XModifyListener.hpp>
32 #include "OPropertySet.hxx"
33 #include "MutexContainer.hxx"
34 #include "ModifyListenerHelper.hxx"
41 typedef ::cppu::WeakImplHelper4
<
42 ::com::sun::star::lang::XServiceInfo
,
43 ::com::sun::star::util::XCloneable
,
44 ::com::sun::star::util::XModifyBroadcaster
,
45 ::com::sun::star::util::XModifyListener
>
49 class GridProperties
:
50 public MutexContainer
,
51 public impl::GridProperties_Base
,
52 public ::property::OPropertySet
55 GridProperties( ::com::sun::star::uno::Reference
<
56 ::com::sun::star::uno::XComponentContext
> const & xContext
);
57 explicit GridProperties();
58 virtual ~GridProperties();
60 /// establish methods for factory instatiation
61 APPHELPER_SERVICE_FACTORY_HELPER( GridProperties
)
63 /// XServiceInfo declarations
64 APPHELPER_XSERVICEINFO_DECL()
66 /// merge XInterface implementations
68 /// merge XTypeProvider implementations
69 DECLARE_XTYPEPROVIDER()
72 explicit GridProperties( const GridProperties
& rOther
);
74 // ____ OPropertySet ____
75 virtual ::com::sun::star::uno::Any
GetDefaultValue( sal_Int32 nHandle
) const
76 throw(::com::sun::star::beans::UnknownPropertyException
);
78 virtual ::cppu::IPropertyArrayHelper
& SAL_CALL
getInfoHelper();
80 // ____ XPropertySet ____
81 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySetInfo
> SAL_CALL
83 throw (::com::sun::star::uno::RuntimeException
);
85 // ____ XCloneable ____
86 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::util::XCloneable
> SAL_CALL
createClone()
87 throw (::com::sun::star::uno::RuntimeException
);
89 // ____ XModifyBroadcaster ____
90 virtual void SAL_CALL
addModifyListener(
91 const ::com::sun::star::uno::Reference
< ::com::sun::star::util::XModifyListener
>& aListener
)
92 throw (::com::sun::star::uno::RuntimeException
);
93 virtual void SAL_CALL
removeModifyListener(
94 const ::com::sun::star::uno::Reference
< ::com::sun::star::util::XModifyListener
>& aListener
)
95 throw (::com::sun::star::uno::RuntimeException
);
97 // ____ XModifyListener ____
98 virtual void SAL_CALL
modified(
99 const ::com::sun::star::lang::EventObject
& aEvent
)
100 throw (::com::sun::star::uno::RuntimeException
);
102 // ____ XEventListener (base of XModifyListener) ____
103 virtual void SAL_CALL
disposing(
104 const ::com::sun::star::lang::EventObject
& Source
)
105 throw (::com::sun::star::uno::RuntimeException
);
107 // ____ OPropertySet ____
108 virtual void firePropertyChangeEvent();
109 using OPropertySet::disposing
;
111 void fireModifyEvent();
114 ::com::sun::star::uno::Reference
< ::com::sun::star::util::XModifyListener
> m_xModifyEventForwarder
;
119 // CHART_GRIDPROPERTIES_HXX
122 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */