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_SVX_FMGRIDIF_HXX
20 #define INCLUDED_SVX_FMGRIDIF_HXX
22 #include <svx/svxdllapi.h>
24 #include <com/sun/star/view/XSelectionSupplier.hpp>
25 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
26 #include <com/sun/star/container/XEnumerationAccess.hpp>
27 #include <com/sun/star/container/XContainer.hpp>
28 #include <com/sun/star/container/XContainerListener.hpp>
29 #include <com/sun/star/sdbc/XRowSetListener.hpp>
30 #include <com/sun/star/sdb/XRowSetSupplier.hpp>
31 #include <com/sun/star/form/XReset.hpp>
32 #include <com/sun/star/form/XBoundComponent.hpp>
33 #include <com/sun/star/form/XLoadListener.hpp>
34 #include <com/sun/star/form/XGridControl.hpp>
35 #include <com/sun/star/form/XGridPeer.hpp>
36 #include <com/sun/star/frame/XDispatchProvider.hpp>
37 #include <com/sun/star/frame/XStatusListener.hpp>
38 #include <com/sun/star/frame/XDispatchProviderInterception.hpp>
39 #include <com/sun/star/view/XSelectionChangeListener.hpp>
40 #include <com/sun/star/uno/XComponentContext.hpp>
41 #include <com/sun/star/util/XModeSelector.hpp>
42 #include <com/sun/star/util/XModifyListener.hpp>
43 #include <com/sun/star/util/XModifyBroadcaster.hpp>
45 #include <tools/wintypes.hxx>
46 #include <toolkit/controls/unocontrol.hxx>
47 #include <toolkit/awt/vclxwindow.hxx>
48 #include <comphelper/uno3.hxx>
49 #include <cppuhelper/implbase10.hxx>
51 #ifndef INCLUDED_COMPHELPER_IMPLBASE_VAR_HXX_19
52 #define INCLUDED_COMPHELPER_IMPLBASE_VAR_HXX_19
53 #define COMPHELPER_IMPLBASE_INTERFACE_NUMBER 19
54 #include <comphelper/implbase_var.hxx>
60 class OWeakSubObject
: public ::cppu::OWeakObject
63 ::cppu::OWeakObject
& m_rParent
;
66 OWeakSubObject(::cppu::OWeakObject
& rParent
) : m_rParent(rParent
) { }
68 virtual void SAL_CALL
acquire() throw() { m_rParent
.acquire(); }
69 virtual void SAL_CALL
release() throw() { m_rParent
.release(); }
72 //==================================================================
73 // FmXModifyMultiplexer
74 //==================================================================
75 class FmXModifyMultiplexer
:public OWeakSubObject
76 ,public ::cppu::OInterfaceContainerHelper
77 ,public ::com::sun::star::util::XModifyListener
80 FmXModifyMultiplexer( ::cppu::OWeakObject
& rSource
, ::osl::Mutex
& rMutex
);
81 DECLARE_UNO3_DEFAULTS(FmXModifyMultiplexer
,OWeakSubObject
);
82 virtual ::com::sun::star::uno::Any SAL_CALL
queryInterface(const ::com::sun::star::uno::Type
& _rType
) throw (::com::sun::star::uno::RuntimeException
);
84 // ::com::sun::star::lang::XEventListener
85 virtual void SAL_CALL
disposing(const ::com::sun::star::lang::EventObject
& Source
) throw(::com::sun::star::uno::RuntimeException
);
87 // ::com::sun::star::util::XModifyListener
88 virtual void SAL_CALL
modified(const ::com::sun::star::lang::EventObject
& Source
) throw(::com::sun::star::uno::RuntimeException
);
90 // resolve ambiguity : both OWeakObject and OInterfaceContainerHelper have these memory operators
91 void * SAL_CALL
operator new( size_t size
) throw() { return OWeakSubObject::operator new(size
); }
92 void SAL_CALL
operator delete( void * p
) throw() { OWeakSubObject::operator delete(p
); }
95 //==================================================================
96 // FmXUpdateMultiplexer
97 //==================================================================
98 class FmXUpdateMultiplexer
: public OWeakSubObject
,
99 public ::cppu::OInterfaceContainerHelper
,
100 public ::com::sun::star::form::XUpdateListener
103 FmXUpdateMultiplexer( ::cppu::OWeakObject
& rSource
, ::osl::Mutex
& rMutex
);
104 DECLARE_UNO3_DEFAULTS(FmXUpdateMultiplexer
,OWeakSubObject
);
106 virtual ::com::sun::star::uno::Any SAL_CALL
queryInterface(const ::com::sun::star::uno::Type
& _rType
) throw (::com::sun::star::uno::RuntimeException
);
108 // ::com::sun::star::lang::XEventListener
109 virtual void SAL_CALL
disposing(const ::com::sun::star::lang::EventObject
& Source
) throw(::com::sun::star::uno::RuntimeException
);
111 // ::com::sun::star::form::XUpdateListener
112 virtual sal_Bool SAL_CALL
approveUpdate(const ::com::sun::star::lang::EventObject
&) throw(::com::sun::star::uno::RuntimeException
);
113 virtual void SAL_CALL
updated(const ::com::sun::star::lang::EventObject
&) throw(::com::sun::star::uno::RuntimeException
);
115 // resolve ambiguity : both OWeakObject and OInterfaceContainerHelper have these memory operators
116 void * SAL_CALL
operator new( size_t size
) throw() { return OWeakSubObject::operator new(size
); }
117 void SAL_CALL
operator delete( void * p
) throw() { OWeakSubObject::operator delete(p
); }
120 //==================================================================
121 // FmXSelectionMultiplexer
122 //==================================================================
123 class FmXSelectionMultiplexer
:public OWeakSubObject
124 ,public ::cppu::OInterfaceContainerHelper
125 ,public ::com::sun::star::view::XSelectionChangeListener
128 FmXSelectionMultiplexer( ::cppu::OWeakObject
& rSource
, ::osl::Mutex
& rMutex
);
129 DECLARE_UNO3_DEFAULTS(FmXSelectionMultiplexer
, OWeakSubObject
);
131 virtual ::com::sun::star::uno::Any SAL_CALL
queryInterface(const ::com::sun::star::uno::Type
& _rType
) throw (::com::sun::star::uno::RuntimeException
);
133 // ::com::sun::star::lang::XEventListener
134 virtual void SAL_CALL
disposing(const ::com::sun::star::lang::EventObject
& Source
) throw(::com::sun::star::uno::RuntimeException
);
136 // ::com::sun::star::view::XSelectionChangeListener
137 virtual void SAL_CALL
selectionChanged( const ::com::sun::star::lang::EventObject
& aEvent
) throw (::com::sun::star::uno::RuntimeException
);
139 // resolve ambiguity : both OWeakObject and OInterfaceContainerHelper have these memory operators
140 void * SAL_CALL
operator new( size_t size
) throw() { return OWeakSubObject::operator new(size
); }
141 void SAL_CALL
operator delete( void * p
) throw() { OWeakSubObject::operator delete(p
); }
144 //==================================================================
145 // FmXGridControlMultiplexer
146 //==================================================================
147 class FmXGridControlMultiplexer
:public OWeakSubObject
148 ,public ::cppu::OInterfaceContainerHelper
149 ,public ::com::sun::star::form::XGridControlListener
152 FmXGridControlMultiplexer( ::cppu::OWeakObject
& rSource
, ::osl::Mutex
& rMutex
);
153 DECLARE_UNO3_DEFAULTS( FmXGridControlMultiplexer
, OWeakSubObject
);
155 virtual ::com::sun::star::uno::Any SAL_CALL
queryInterface(const ::com::sun::star::uno::Type
& _rType
) throw (::com::sun::star::uno::RuntimeException
);
157 // ::com::sun::star::lang::XEventListener
158 virtual void SAL_CALL
disposing(const ::com::sun::star::lang::EventObject
& Source
) throw(::com::sun::star::uno::RuntimeException
);
160 // ::com::sun::star::view::XSelectionChangeListener
161 virtual void SAL_CALL
columnChanged( const ::com::sun::star::lang::EventObject
& _event
) throw (::com::sun::star::uno::RuntimeException
);
163 // resolve ambiguity : both OWeakObject and OInterfaceContainerHelper have these memory operators
164 void * SAL_CALL
operator new( size_t size
) throw() { return OWeakSubObject::operator new(size
); }
165 void SAL_CALL
operator delete( void * p
) throw() { OWeakSubObject::operator delete(p
); }
168 //==================================================================
169 // FmXContainerMultiplexer
170 //==================================================================
171 class FmXContainerMultiplexer
: public OWeakSubObject
,
172 public ::cppu::OInterfaceContainerHelper
,
173 public ::com::sun::star::container::XContainerListener
176 FmXContainerMultiplexer( ::cppu::OWeakObject
& rSource
, ::osl::Mutex
& rMutex
);
177 DECLARE_UNO3_DEFAULTS(FmXContainerMultiplexer
,OWeakSubObject
);
178 virtual ::com::sun::star::uno::Any SAL_CALL
queryInterface(const ::com::sun::star::uno::Type
& _rType
) throw (::com::sun::star::uno::RuntimeException
);
180 // ::com::sun::star::lang::XEventListener
181 virtual void SAL_CALL
disposing(const ::com::sun::star::lang::EventObject
& Source
) throw(::com::sun::star::uno::RuntimeException
);
183 // ::com::sun::star::container::XContainerListener
184 virtual void SAL_CALL
elementInserted(const ::com::sun::star::container::ContainerEvent
& Event
) throw(::com::sun::star::uno::RuntimeException
);
185 virtual void SAL_CALL
elementRemoved(const ::com::sun::star::container::ContainerEvent
& Event
) throw(::com::sun::star::uno::RuntimeException
);
186 virtual void SAL_CALL
elementReplaced(const ::com::sun::star::container::ContainerEvent
& Event
) throw(::com::sun::star::uno::RuntimeException
);
188 // resolve ambiguity : both OWeakObject and OInterfaceContainerHelper have these memory operators
189 void * SAL_CALL
operator new( size_t size
) throw() { return OWeakSubObject::operator new(size
); }
190 void SAL_CALL
operator delete( void * p
) throw() { OWeakSubObject::operator delete(p
); }
193 //==================================================================
195 //==================================================================
196 typedef ::cppu::ImplHelper10
< ::com::sun::star::form::XBoundComponent
,
197 ::com::sun::star::form::XGridControl
,
198 ::com::sun::star::util::XModifyBroadcaster
,
199 ::com::sun::star::container::XIndexAccess
,
200 ::com::sun::star::container::XEnumerationAccess
,
201 ::com::sun::star::util::XModeSelector
,
202 ::com::sun::star::container::XContainer
,
203 ::com::sun::star::frame::XDispatchProvider
,
204 ::com::sun::star::frame::XDispatchProviderInterception
,
205 ::com::sun::star::view::XSelectionSupplier
206 > FmXGridControl_BASE
;
209 class SVX_DLLPUBLIC FmXGridControl
:public UnoControl
210 ,public FmXGridControl_BASE
212 FmXModifyMultiplexer m_aModifyListeners
;
213 FmXUpdateMultiplexer m_aUpdateListeners
;
214 FmXContainerMultiplexer m_aContainerListeners
;
215 FmXSelectionMultiplexer m_aSelectionListeners
;
216 FmXGridControlMultiplexer m_aGridControlListeners
;
219 sal_uInt16 m_nPeerCreationLevel
;
222 ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XComponentContext
> m_xContext
;
225 FmXGridControl(const ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XComponentContext
>&);
226 virtual ~FmXGridControl();
229 DECLARE_UNO3_AGG_DEFAULTS(FmXGridControl
, UnoControl
);
230 virtual ::com::sun::star::uno::Any SAL_CALL
queryAggregation(const ::com::sun::star::uno::Type
& _rType
) throw (::com::sun::star::uno::RuntimeException
);
233 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Type
> SAL_CALL
getTypes( ) throw(::com::sun::star::uno::RuntimeException
);
234 virtual ::com::sun::star::uno::Sequence
<sal_Int8
> SAL_CALL
getImplementationId( ) throw(::com::sun::star::uno::RuntimeException
);
236 // ::com::sun::star::lang::XComponent
237 virtual void SAL_CALL
dispose() throw(::com::sun::star::uno::RuntimeException
);
239 // ::com::sun::star::lang::XServiceInfo
240 virtual sal_Bool SAL_CALL
supportsService(const OUString
& ServiceName
) throw();
241 virtual OUString SAL_CALL
getImplementationName() throw();
242 virtual ::com::sun::star::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames() throw();
244 // ::com::sun::star::awt::XControl
245 virtual void SAL_CALL
createPeer(const ::com::sun::star::uno::Reference
< ::com::sun::star::awt::XToolkit
>& _rToolkit
, const ::com::sun::star::uno::Reference
< ::com::sun::star::awt::XWindowPeer
>& Parent
) throw(::com::sun::star::uno::RuntimeException
);
246 virtual sal_Bool SAL_CALL
setModel(const ::com::sun::star::uno::Reference
< ::com::sun::star::awt::XControlModel
>& Model
) throw(::com::sun::star::uno::RuntimeException
);
247 virtual void SAL_CALL
setDesignMode(sal_Bool bOn
) throw(::com::sun::star::uno::RuntimeException
);
249 // ::com::sun::star::awt::XView
250 virtual void SAL_CALL
draw( sal_Int32 x
, sal_Int32 y
) throw(::com::sun::star::uno::RuntimeException
);
252 // ::com::sun::star::form::XBoundComponent
253 virtual void SAL_CALL
addUpdateListener(const ::com::sun::star::uno::Reference
< ::com::sun::star::form::XUpdateListener
>& l
) throw(::com::sun::star::uno::RuntimeException
);
254 virtual void SAL_CALL
removeUpdateListener(const ::com::sun::star::uno::Reference
< ::com::sun::star::form::XUpdateListener
>& l
) throw(::com::sun::star::uno::RuntimeException
);
255 virtual sal_Bool SAL_CALL
commit() throw(::com::sun::star::uno::RuntimeException
);
257 // ::com::sun::star::container::XElementAccess
258 virtual ::com::sun::star::uno::Type SAL_CALL
getElementType( ) throw(::com::sun::star::uno::RuntimeException
);
259 virtual sal_Bool SAL_CALL
hasElements( ) throw(::com::sun::star::uno::RuntimeException
);
261 // ::com::sun::star::container::XEnumerationAccess
262 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::container::XEnumeration
> SAL_CALL
createEnumeration() throw(::com::sun::star::uno::RuntimeException
);
264 // ::com::sun::star::container::XIndexAccess
265 virtual sal_Int32 SAL_CALL
getCount() throw(::com::sun::star::uno::RuntimeException
);
266 virtual ::com::sun::star::uno::Any SAL_CALL
getByIndex(sal_Int32 _rIndex
) throw(::com::sun::star::lang::IndexOutOfBoundsException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
268 // ::com::sun::star::form::XGridControl
269 virtual void SAL_CALL
addGridControlListener( const ::com::sun::star::uno::Reference
< ::com::sun::star::form::XGridControlListener
>& _listener
) throw(::com::sun::star::uno::RuntimeException
);
270 virtual void SAL_CALL
removeGridControlListener( const ::com::sun::star::uno::Reference
< ::com::sun::star::form::XGridControlListener
>& _listener
) throw(::com::sun::star::uno::RuntimeException
);
272 // ::com::sun::star::form::XGrid (base of XGridControl)
273 virtual sal_Int16 SAL_CALL
getCurrentColumnPosition() throw(::com::sun::star::uno::RuntimeException
);
274 virtual void SAL_CALL
setCurrentColumnPosition(sal_Int16 nPos
) throw(::com::sun::star::uno::RuntimeException
);
276 // ::com::sun::star::form::XGridFieldDataSupplier (base of XGridControl)
277 virtual ::com::sun::star::uno::Sequence
< sal_Bool
> SAL_CALL
queryFieldDataType( const ::com::sun::star::uno::Type
& xType
) throw(::com::sun::star::uno::RuntimeException
);
278 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Any
> SAL_CALL
queryFieldData( sal_Int32 nRow
, const ::com::sun::star::uno::Type
& xType
) throw(::com::sun::star::uno::RuntimeException
);
281 virtual OUString
GetComponentServiceName();
283 // ::com::sun::star::util::XModifyBroadcaster
284 virtual void SAL_CALL
addModifyListener(const ::com::sun::star::uno::Reference
< ::com::sun::star::util::XModifyListener
>& l
) throw(::com::sun::star::uno::RuntimeException
);
285 virtual void SAL_CALL
removeModifyListener(const ::com::sun::star::uno::Reference
< ::com::sun::star::util::XModifyListener
>& l
) throw(::com::sun::star::uno::RuntimeException
);
287 // ::com::sun::star::util::XModeSelector
288 virtual void SAL_CALL
setMode(const OUString
& Mode
) throw(::com::sun::star::lang::NoSupportException
, ::com::sun::star::uno::RuntimeException
);
289 virtual OUString SAL_CALL
getMode() throw(::com::sun::star::uno::RuntimeException
);
290 virtual ::com::sun::star::uno::Sequence
< OUString
> SAL_CALL
getSupportedModes() throw(::com::sun::star::uno::RuntimeException
);
291 virtual sal_Bool SAL_CALL
supportsMode(const OUString
& Mode
) throw(::com::sun::star::uno::RuntimeException
);
293 // ::com::sun::star::container::XContainer
294 virtual void SAL_CALL
addContainerListener(const ::com::sun::star::uno::Reference
< ::com::sun::star::container::XContainerListener
>& l
) throw(::com::sun::star::uno::RuntimeException
);
295 virtual void SAL_CALL
removeContainerListener(const ::com::sun::star::uno::Reference
< ::com::sun::star::container::XContainerListener
>& l
) throw(::com::sun::star::uno::RuntimeException
);
297 // ::com::sun::star::frame::XDispatchProvider
298 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::frame::XDispatch
> SAL_CALL
queryDispatch(const ::com::sun::star::util::URL
& aURL
, const OUString
& aTargetFrameName
, sal_Int32 nSearchFlags
) throw(::com::sun::star::uno::RuntimeException
);
299 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Reference
< ::com::sun::star::frame::XDispatch
> > SAL_CALL
queryDispatches(const ::com::sun::star::uno::Sequence
< ::com::sun::star::frame::DispatchDescriptor
>& aDescripts
) throw(::com::sun::star::uno::RuntimeException
);
301 // ::com::sun::star::frame::XDispatchProviderInterception
302 virtual void SAL_CALL
registerDispatchProviderInterceptor(const ::com::sun::star::uno::Reference
< ::com::sun::star::frame::XDispatchProviderInterceptor
>& xInterceptor
) throw(::com::sun::star::uno::RuntimeException
);
303 virtual void SAL_CALL
releaseDispatchProviderInterceptor(const ::com::sun::star::uno::Reference
< ::com::sun::star::frame::XDispatchProviderInterceptor
>& xInterceptor
) throw(::com::sun::star::uno::RuntimeException
);
305 // ::com::sun::star::view::XSelectionSupplier
306 virtual sal_Bool SAL_CALL
select( const ::com::sun::star::uno::Any
& aSelection
) throw (::com::sun::star::lang::IllegalArgumentException
, ::com::sun::star::uno::RuntimeException
);
307 virtual ::com::sun::star::uno::Any SAL_CALL
getSelection( ) throw (::com::sun::star::uno::RuntimeException
);
308 virtual void SAL_CALL
addSelectionChangeListener( const ::com::sun::star::uno::Reference
< ::com::sun::star::view::XSelectionChangeListener
>& xListener
) throw (::com::sun::star::uno::RuntimeException
);
309 virtual void SAL_CALL
removeSelectionChangeListener( const ::com::sun::star::uno::Reference
< ::com::sun::star::view::XSelectionChangeListener
>& xListener
) throw (::com::sun::star::uno::RuntimeException
);
312 virtual FmXGridPeer
* imp_CreatePeer(Window
* pParent
);
313 // ImplCreatePeer would be better, but doesn't work because it's not exported
317 //==================================================================
318 // FmXGridPeer -> Peer for the Gridcontrol
319 //==================================================================
320 typedef ::comphelper::ImplHelper19
< ::com::sun::star::form::XGridPeer
,
321 ::com::sun::star::form::XBoundComponent
,
322 ::com::sun::star::form::XGridControl
,
323 ::com::sun::star::sdb::XRowSetSupplier
,
324 ::com::sun::star::util::XModifyBroadcaster
,
325 ::com::sun::star::beans::XPropertyChangeListener
,
326 ::com::sun::star::container::XContainerListener
,
327 ::com::sun::star::sdbc::XRowSetListener
,
328 ::com::sun::star::form::XLoadListener
,
329 ::com::sun::star::view::XSelectionChangeListener
,
330 ::com::sun::star::container::XIndexAccess
,
331 ::com::sun::star::container::XEnumerationAccess
,
332 ::com::sun::star::util::XModeSelector
,
333 ::com::sun::star::container::XContainer
,
334 ::com::sun::star::frame::XStatusListener
,
335 ::com::sun::star::frame::XDispatchProvider
,
336 ::com::sun::star::frame::XDispatchProviderInterception
,
337 ::com::sun::star::form::XResetListener
,
338 ::com::sun::star::view::XSelectionSupplier
341 class SVX_DLLPUBLIC FmXGridPeer
:public VCLXWindow
342 ,public FmXGridPeer_BASE
344 ::com::sun::star::uno::Reference
< ::com::sun::star::container::XIndexContainer
> m_xColumns
;
345 ::com::sun::star::uno::Reference
< ::com::sun::star::sdbc::XRowSet
> m_xCursor
;
346 ::cppu::OInterfaceContainerHelper m_aModifyListeners
,
348 m_aContainerListeners
,
349 m_aSelectionListeners
,
350 m_aGridControlListeners
;
353 sal_Int32 m_nCursorListening
;
355 ::com::sun::star::uno::Reference
< ::com::sun::star::frame::XDispatchProviderInterceptor
> m_xFirstDispatchInterceptor
;
357 sal_Bool m_bInterceptingDispatch
;
359 sal_Bool
* m_pStateCache
;
360 // one bool for each supported url
361 ::com::sun::star::uno::Reference
< ::com::sun::star::frame::XDispatch
> * m_pDispatchers
;
362 // one dispatcher for each supported url
363 // (I would like to have a vector here but including the stl in an exported file seems
364 // very risky to me ....)
366 class GridListenerDelegator
;
367 friend class GridListenerDelegator
;
368 GridListenerDelegator
* m_pGridListener
;
371 ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XComponentContext
> m_xContext
;
372 ::osl::Mutex m_aMutex
;
375 FmXGridPeer(const ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XComponentContext
>&);
378 // spaeter Constructor, immer nach dem realen Constructor zu rufen !
379 void Create(Window
* pParent
, WinBits nStyle
);
382 DECLARE_UNO3_DEFAULTS(FmXGridPeer
, VCLXWindow
);
383 virtual ::com::sun::star::uno::Any SAL_CALL
queryInterface(const ::com::sun::star::uno::Type
& _rType
) throw (::com::sun::star::uno::RuntimeException
);
386 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Type
> SAL_CALL
getTypes( ) throw(::com::sun::star::uno::RuntimeException
);
387 virtual ::com::sun::star::uno::Sequence
<sal_Int8
> SAL_CALL
getImplementationId( ) throw(::com::sun::star::uno::RuntimeException
);
389 // ::com::sun::star::lang::XUnoTunnel
390 static const ::com::sun::star::uno::Sequence
< sal_Int8
>& getUnoTunnelImplementationId() throw();
391 static FmXGridPeer
* getImplementation( const ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XInterface
>& _rxIFace
) throw();
392 sal_Int64 SAL_CALL
getSomething( const ::com::sun::star::uno::Sequence
< sal_Int8
>& _rIdentifier
) throw(::com::sun::star::uno::RuntimeException
);
394 // ::com::sun::star::form::XGridPeer
395 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::container::XIndexContainer
> SAL_CALL
getColumns( ) throw(::com::sun::star::uno::RuntimeException
);
396 virtual void SAL_CALL
setColumns( const ::com::sun::star::uno::Reference
< ::com::sun::star::container::XIndexContainer
>& aColumns
) throw(::com::sun::star::uno::RuntimeException
);
398 // ::com::sun::star::lang::XComponent
399 virtual void SAL_CALL
dispose() throw(::com::sun::star::uno::RuntimeException
);
401 // ::com::sun::star::lang::XEventListener
402 virtual void SAL_CALL
disposing(const ::com::sun::star::lang::EventObject
& Source
) throw(::com::sun::star::uno::RuntimeException
);
404 // ::com::sun::star::form::XBoundComponent
405 virtual void SAL_CALL
addUpdateListener(const ::com::sun::star::uno::Reference
< ::com::sun::star::form::XUpdateListener
>& l
) throw(::com::sun::star::uno::RuntimeException
);
406 virtual void SAL_CALL
removeUpdateListener(const ::com::sun::star::uno::Reference
< ::com::sun::star::form::XUpdateListener
>& l
) throw(::com::sun::star::uno::RuntimeException
);
407 virtual sal_Bool SAL_CALL
commit() throw(::com::sun::star::uno::RuntimeException
);
409 // ::com::sun::star::container::XElementAccess
410 virtual ::com::sun::star::uno::Type SAL_CALL
getElementType( ) throw(::com::sun::star::uno::RuntimeException
);
411 virtual sal_Bool SAL_CALL
hasElements( ) throw(::com::sun::star::uno::RuntimeException
);
413 // ::com::sun::star::container::XEnumerationAccess
414 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::container::XEnumeration
> SAL_CALL
createEnumeration() throw(::com::sun::star::uno::RuntimeException
);
416 // ::com::sun::star::container::XIndexAccess
417 virtual sal_Int32 SAL_CALL
getCount() throw(::com::sun::star::uno::RuntimeException
);
418 virtual ::com::sun::star::uno::Any SAL_CALL
getByIndex(sal_Int32 _rIndex
) throw(::com::sun::star::lang::IndexOutOfBoundsException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
420 // ::com::sun::star::beans::XPropertyChangeListener
421 virtual void SAL_CALL SAL_CALL
propertyChange(const ::com::sun::star::beans::PropertyChangeEvent
& evt
) throw(::com::sun::star::uno::RuntimeException
);
423 // ::com::sun::star::form::XLoadListener
424 virtual void SAL_CALL
loaded(const ::com::sun::star::lang::EventObject
& rEvent
) throw(::com::sun::star::uno::RuntimeException
);
425 virtual void SAL_CALL
unloaded(const ::com::sun::star::lang::EventObject
& rEvent
) throw(::com::sun::star::uno::RuntimeException
);
426 virtual void SAL_CALL
unloading(const ::com::sun::star::lang::EventObject
& aEvent
) throw(::com::sun::star::uno::RuntimeException
);
427 virtual void SAL_CALL
reloading(const ::com::sun::star::lang::EventObject
& aEvent
) throw(::com::sun::star::uno::RuntimeException
);
428 virtual void SAL_CALL
reloaded(const ::com::sun::star::lang::EventObject
& aEvent
) throw(::com::sun::star::uno::RuntimeException
);
430 // ::com::sun::star::sdbc::XRowSetListener
431 virtual void SAL_CALL
cursorMoved(const ::com::sun::star::lang::EventObject
& event
) throw(::com::sun::star::uno::RuntimeException
);
432 virtual void SAL_CALL
rowChanged(const ::com::sun::star::lang::EventObject
& event
) throw(::com::sun::star::uno::RuntimeException
);
433 virtual void SAL_CALL
rowSetChanged(const ::com::sun::star::lang::EventObject
& event
) throw(::com::sun::star::uno::RuntimeException
);
435 // ::com::sun::star::container::XContainerListener
436 virtual void SAL_CALL
elementInserted(const ::com::sun::star::container::ContainerEvent
& Event
) throw(::com::sun::star::uno::RuntimeException
);
437 virtual void SAL_CALL
elementRemoved(const ::com::sun::star::container::ContainerEvent
& Event
) throw(::com::sun::star::uno::RuntimeException
);
438 virtual void SAL_CALL
elementReplaced(const ::com::sun::star::container::ContainerEvent
& Event
) throw(::com::sun::star::uno::RuntimeException
);
441 virtual void SAL_CALL
setProperty( const OUString
& PropertyName
, const ::com::sun::star::uno::Any
& Value
) throw(::com::sun::star::uno::RuntimeException
);
442 virtual ::com::sun::star::uno::Any SAL_CALL
getProperty( const OUString
& PropertyName
) throw(::com::sun::star::uno::RuntimeException
);
443 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::accessibility::XAccessibleContext
>
444 CreateAccessibleContext();
446 // ::com::sun::star::form::XGridControl
447 virtual void SAL_CALL
addGridControlListener( const ::com::sun::star::uno::Reference
< ::com::sun::star::form::XGridControlListener
>& _listener
) throw(::com::sun::star::uno::RuntimeException
);
448 virtual void SAL_CALL
removeGridControlListener( const ::com::sun::star::uno::Reference
< ::com::sun::star::form::XGridControlListener
>& _listener
) throw(::com::sun::star::uno::RuntimeException
);
450 // ::com::sun::star::form::XGrid (base of XGridControl)
451 virtual sal_Int16 SAL_CALL
getCurrentColumnPosition() throw(::com::sun::star::uno::RuntimeException
);
452 virtual void SAL_CALL
setCurrentColumnPosition(sal_Int16 nPos
) throw(::com::sun::star::uno::RuntimeException
);
454 // ::com::sun::star::form::XGridFieldDataSupplier (base of XGridControl)
455 virtual ::com::sun::star::uno::Sequence
< sal_Bool
> SAL_CALL
queryFieldDataType( const ::com::sun::star::uno::Type
& xType
) throw(::com::sun::star::uno::RuntimeException
);
456 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Any
> SAL_CALL
queryFieldData( sal_Int32 nRow
, const ::com::sun::star::uno::Type
& xType
) throw(::com::sun::star::uno::RuntimeException
);
458 // ::com::sun::star::sdb::XRowSetSupplier
459 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::sdbc::XRowSet
> SAL_CALL
getRowSet() throw(::com::sun::star::uno::RuntimeException
);
460 virtual void SAL_CALL
setRowSet(const ::com::sun::star::uno::Reference
< ::com::sun::star::sdbc::XRowSet
>& xDataSource
) throw(::com::sun::star::uno::RuntimeException
);
462 // ::com::sun::star::util::XModifyBroadcaster
463 virtual void SAL_CALL
addModifyListener(const ::com::sun::star::uno::Reference
< ::com::sun::star::util::XModifyListener
>& l
) throw(::com::sun::star::uno::RuntimeException
);
464 virtual void SAL_CALL
removeModifyListener(const ::com::sun::star::uno::Reference
< ::com::sun::star::util::XModifyListener
>& l
) throw(::com::sun::star::uno::RuntimeException
);
467 virtual void SAL_CALL SAL_CALL
setDesignMode(sal_Bool bOn
) throw(::com::sun::star::uno::RuntimeException
);
468 virtual sal_Bool SAL_CALL
isDesignMode() throw(::com::sun::star::uno::RuntimeException
);
470 // ::com::sun::star::view::XSelectionChangeListener
471 virtual void SAL_CALL
selectionChanged(const ::com::sun::star::lang::EventObject
& aEvent
) throw(::com::sun::star::uno::RuntimeException
);
476 void updateGrid(const ::com::sun::star::uno::Reference
< ::com::sun::star::sdbc::XRowSet
>& _rDatabaseCursor
);
477 void startCursorListening();
478 void stopCursorListening();
480 // ::com::sun::star::util::XModeSelector
481 virtual void SAL_CALL
setMode(const OUString
& Mode
) throw(::com::sun::star::lang::NoSupportException
, ::com::sun::star::uno::RuntimeException
);
482 virtual OUString SAL_CALL
getMode() throw(::com::sun::star::uno::RuntimeException
);
483 virtual ::com::sun::star::uno::Sequence
< OUString
> SAL_CALL
getSupportedModes() throw(::com::sun::star::uno::RuntimeException
);
484 virtual sal_Bool SAL_CALL
supportsMode(const OUString
& Mode
) throw(::com::sun::star::uno::RuntimeException
);
486 // ::com::sun::star::container::XContainer
487 virtual void SAL_CALL
addContainerListener(const ::com::sun::star::uno::Reference
< ::com::sun::star::container::XContainerListener
>& l
) throw(::com::sun::star::uno::RuntimeException
);
488 virtual void SAL_CALL
removeContainerListener(const ::com::sun::star::uno::Reference
< ::com::sun::star::container::XContainerListener
>& l
) throw(::com::sun::star::uno::RuntimeException
);
490 void columnVisible(DbGridColumn
* pColumn
);
491 void columnHidden(DbGridColumn
* pColumn
);
493 // ::com::sun::star::awt::XView
494 virtual void SAL_CALL
draw( sal_Int32 x
, sal_Int32 y
) throw(::com::sun::star::uno::RuntimeException
);
496 // ::com::sun::star::frame::XDispatchProvider
497 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::frame::XDispatch
> SAL_CALL
queryDispatch(const ::com::sun::star::util::URL
& aURL
, const OUString
& aTargetFrameName
, sal_Int32 nSearchFlags
) throw(::com::sun::star::uno::RuntimeException
);
498 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Reference
< ::com::sun::star::frame::XDispatch
> > SAL_CALL
queryDispatches(const ::com::sun::star::uno::Sequence
< ::com::sun::star::frame::DispatchDescriptor
>& aDescripts
) throw(::com::sun::star::uno::RuntimeException
);
500 // ::com::sun::star::frame::XDispatchProviderInterception
501 virtual void SAL_CALL
registerDispatchProviderInterceptor(const ::com::sun::star::uno::Reference
< ::com::sun::star::frame::XDispatchProviderInterceptor
>& xInterceptor
) throw(::com::sun::star::uno::RuntimeException
);
502 virtual void SAL_CALL
releaseDispatchProviderInterceptor(const ::com::sun::star::uno::Reference
< ::com::sun::star::frame::XDispatchProviderInterceptor
>& xInterceptor
) throw(::com::sun::star::uno::RuntimeException
);
504 // ::com::sun::star::frame::XStatusListener
505 virtual void SAL_CALL
statusChanged(const ::com::sun::star::frame::FeatureStateEvent
& Event
) throw(::com::sun::star::uno::RuntimeException
);
507 // ::com::sun::star::form::XResetListener
508 virtual sal_Bool SAL_CALL
approveReset(const ::com::sun::star::lang::EventObject
& rEvent
) throw(::com::sun::star::uno::RuntimeException
);
509 virtual void SAL_CALL
resetted(const ::com::sun::star::lang::EventObject
& rEvent
) throw(::com::sun::star::uno::RuntimeException
);
511 // ::com::sun::star::view::XSelectionSupplier
512 virtual sal_Bool SAL_CALL
select( const ::com::sun::star::uno::Any
& aSelection
) throw (::com::sun::star::lang::IllegalArgumentException
, ::com::sun::star::uno::RuntimeException
);
513 virtual ::com::sun::star::uno::Any SAL_CALL
getSelection( ) throw (::com::sun::star::uno::RuntimeException
);
514 virtual void SAL_CALL
addSelectionChangeListener( const ::com::sun::star::uno::Reference
< ::com::sun::star::view::XSelectionChangeListener
>& xListener
) throw (::com::sun::star::uno::RuntimeException
);
515 virtual void SAL_CALL
removeSelectionChangeListener( const ::com::sun::star::uno::Reference
< ::com::sun::star::view::XSelectionChangeListener
>& xListener
) throw (::com::sun::star::uno::RuntimeException
);
518 virtual FmGridControl
* imp_CreateControl(Window
* pParent
, WinBits nStyle
);
520 static ::com::sun::star::uno::Sequence
< ::com::sun::star::util::URL
>& getSupportedURLs();
521 static ::com::sun::star::uno::Sequence
<sal_uInt16
>& getSupportedGridSlots();
522 void ConnectToDispatcher();
523 void DisConnectFromDispatcher();
524 void UpdateDispatches(); // will connect if not already connected and just update else
526 /** If a derived class wants to listen at some column properties, it doesn't have
527 to overload all methods affecting columns (setColumns, elementInserted, elementRemoved ...)
528 Instead it may use addColumnListeners and removeColumnListeners which are called in all
531 virtual void addColumnListeners(const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySet
>& xCol
);
532 virtual void removeColumnListeners(const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySet
>& xCol
);
534 void selectionChanged();
535 void columnChanged();
537 DECL_LINK(OnQueryGridSlotState
, void*);
538 DECL_LINK(OnExecuteGridSlot
, void*);
543 #endif // _SVX_FMGRID_HXX
545 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */