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: GridProperties.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_GRIDPROPERTIES_HXX
31 #define CHART_GRIDPROPERTIES_HXX
33 #include "ServiceMacros.hxx"
34 #include <osl/mutex.hxx>
35 #include <cppuhelper/implbase4.hxx>
36 #include <comphelper/uno3.hxx>
37 #include <com/sun/star/lang/XServiceInfo.hpp>
38 #include <com/sun/star/uno/XComponentContext.hpp>
39 #include <com/sun/star/util/XCloneable.hpp>
40 #include <com/sun/star/util/XModifyBroadcaster.hpp>
41 #include <com/sun/star/util/XModifyListener.hpp>
43 #include "OPropertySet.hxx"
44 #include "MutexContainer.hxx"
45 #include "ModifyListenerHelper.hxx"
52 typedef ::cppu::WeakImplHelper4
<
53 ::com::sun::star::lang::XServiceInfo
,
54 ::com::sun::star::util::XCloneable
,
55 ::com::sun::star::util::XModifyBroadcaster
,
56 ::com::sun::star::util::XModifyListener
>
60 class GridProperties
:
61 public MutexContainer
,
62 public impl::GridProperties_Base
,
63 public ::property::OPropertySet
66 GridProperties( ::com::sun::star::uno::Reference
<
67 ::com::sun::star::uno::XComponentContext
> const & xContext
);
68 explicit GridProperties();
69 virtual ~GridProperties();
71 /// establish methods for factory instatiation
72 APPHELPER_SERVICE_FACTORY_HELPER( GridProperties
)
74 /// XServiceInfo declarations
75 APPHELPER_XSERVICEINFO_DECL()
77 /// merge XInterface implementations
79 /// merge XTypeProvider implementations
80 DECLARE_XTYPEPROVIDER()
83 explicit GridProperties( const GridProperties
& rOther
);
85 // ____ OPropertySet ____
86 virtual ::com::sun::star::uno::Any
GetDefaultValue( sal_Int32 nHandle
) const
87 throw(::com::sun::star::beans::UnknownPropertyException
);
89 virtual ::cppu::IPropertyArrayHelper
& SAL_CALL
getInfoHelper();
91 // ____ XPropertySet ____
92 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySetInfo
> SAL_CALL
94 throw (::com::sun::star::uno::RuntimeException
);
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
< ::com::sun::star::util::XModifyListener
> m_xModifyEventForwarder
;
130 // CHART_GRIDPROPERTIES_HXX