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_GRIDPROPERTIES_HXX
20 #define INCLUDED_CHART2_SOURCE_MODEL_MAIN_GRIDPROPERTIES_HXX
22 #include <osl/mutex.hxx>
23 #include <cppuhelper/implbase4.hxx>
24 #include <comphelper/uno3.hxx>
25 #include <com/sun/star/lang/XServiceInfo.hpp>
26 #include <com/sun/star/uno/XComponentContext.hpp>
27 #include <com/sun/star/util/XCloneable.hpp>
28 #include <com/sun/star/util/XModifyBroadcaster.hpp>
29 #include <com/sun/star/util/XModifyListener.hpp>
31 #include "OPropertySet.hxx"
32 #include "MutexContainer.hxx"
33 #include "ModifyListenerHelper.hxx"
40 typedef ::cppu::WeakImplHelper4
<
41 ::com::sun::star::lang::XServiceInfo
,
42 ::com::sun::star::util::XCloneable
,
43 ::com::sun::star::util::XModifyBroadcaster
,
44 ::com::sun::star::util::XModifyListener
>
48 class GridProperties
:
49 public MutexContainer
,
50 public impl::GridProperties_Base
,
51 public ::property::OPropertySet
54 GridProperties( ::com::sun::star::uno::Reference
<
55 ::com::sun::star::uno::XComponentContext
> const & xContext
);
56 explicit GridProperties();
57 virtual ~GridProperties();
59 /// establish methods for factory instatiation
60 static css::uno::Reference
< css::uno::XInterface
> SAL_CALL
create( css::uno::Reference
< css::uno::XComponentContext
> const & xContext
)
61 throw(css::uno::Exception
)
63 return (::cppu::OWeakObject
*)new GridProperties( xContext
);
66 /// XServiceInfo declarations
67 virtual OUString SAL_CALL
getImplementationName()
68 throw( css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
69 virtual sal_Bool SAL_CALL
supportsService( const OUString
& ServiceName
)
70 throw( css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
71 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames()
72 throw( css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
74 static OUString
getImplementationName_Static();
75 static css::uno::Sequence
< OUString
> getSupportedServiceNames_Static();
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
) SAL_OVERRIDE
;
89 virtual ::cppu::IPropertyArrayHelper
& SAL_CALL
getInfoHelper() SAL_OVERRIDE
;
91 // ____ XPropertySet ____
92 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySetInfo
> SAL_CALL
94 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
96 // ____ XCloneable ____
97 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::util::XCloneable
> SAL_CALL
createClone()
98 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
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
, std::exception
) SAL_OVERRIDE
;
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
, std::exception
) SAL_OVERRIDE
;
108 // ____ XModifyListener ____
109 virtual void SAL_CALL
modified(
110 const ::com::sun::star::lang::EventObject
& aEvent
)
111 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
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
, std::exception
) SAL_OVERRIDE
;
118 // ____ OPropertySet ____
119 virtual void firePropertyChangeEvent() SAL_OVERRIDE
;
120 using OPropertySet::disposing
;
122 void fireModifyEvent();
125 ::com::sun::star::uno::Reference
< ::com::sun::star::util::XModifyListener
> m_xModifyEventForwarder
;
130 // INCLUDED_CHART2_SOURCE_MODEL_MAIN_GRIDPROPERTIES_HXX
133 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */