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 _SVX_FMGRIDIF_HXX
20 #define _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/util/XModeSelector.hpp>
41 #include <com/sun/star/util/XModifyListener.hpp>
42 #include <com/sun/star/util/XModifyBroadcaster.hpp>
44 #include <tools/wintypes.hxx>
45 #include <toolkit/controls/unocontrol.hxx>
46 #include <toolkit/awt/vclxwindow.hxx>
47 #include <comphelper/uno3.hxx>
48 #include <cppuhelper/implbase10.hxx>
50 #ifndef INCLUDED_COMPHELPER_IMPLBASE_VAR_HXX_19
51 #define INCLUDED_COMPHELPER_IMPLBASE_VAR_HXX_19
52 #define COMPHELPER_IMPLBASE_INTERFACE_NUMBER 19
53 #include <comphelper/implbase_var.hxx>
59 class OWeakSubObject
: public ::cppu::OWeakObject
62 ::cppu::OWeakObject
& m_rParent
;
65 OWeakSubObject(::cppu::OWeakObject
& rParent
) : m_rParent(rParent
) { }
67 virtual void SAL_CALL
acquire() throw() { m_rParent
.acquire(); }
68 virtual void SAL_CALL
release() throw() { m_rParent
.release(); }
71 //==================================================================
72 // FmXModifyMultiplexer
73 //==================================================================
74 class FmXModifyMultiplexer
:public OWeakSubObject
75 ,public ::cppu::OInterfaceContainerHelper
76 ,public ::com::sun::star::util::XModifyListener
79 FmXModifyMultiplexer( ::cppu::OWeakObject
& rSource
, ::osl::Mutex
& rMutex
);
80 DECLARE_UNO3_DEFAULTS(FmXModifyMultiplexer
,OWeakSubObject
);
81 virtual ::com::sun::star::uno::Any SAL_CALL
queryInterface(const ::com::sun::star::uno::Type
& _rType
) throw (::com::sun::star::uno::RuntimeException
);
83 // ::com::sun::star::lang::XEventListener
84 virtual void SAL_CALL
disposing(const ::com::sun::star::lang::EventObject
& Source
) throw(::com::sun::star::uno::RuntimeException
);
86 // ::com::sun::star::util::XModifyListener
87 virtual void SAL_CALL
modified(const ::com::sun::star::lang::EventObject
& Source
) throw(::com::sun::star::uno::RuntimeException
);
89 // resolve ambiguity : both OWeakObject and OInterfaceContainerHelper have these memory operators
90 void * SAL_CALL
operator new( size_t size
) throw() { return OWeakSubObject::operator new(size
); }
91 void SAL_CALL
operator delete( void * p
) throw() { OWeakSubObject::operator delete(p
); }
94 //==================================================================
95 // FmXUpdateMultiplexer
96 //==================================================================
97 class FmXUpdateMultiplexer
: public OWeakSubObject
,
98 public ::cppu::OInterfaceContainerHelper
,
99 public ::com::sun::star::form::XUpdateListener
102 FmXUpdateMultiplexer( ::cppu::OWeakObject
& rSource
, ::osl::Mutex
& rMutex
);
103 DECLARE_UNO3_DEFAULTS(FmXUpdateMultiplexer
,OWeakSubObject
);
105 virtual ::com::sun::star::uno::Any SAL_CALL
queryInterface(const ::com::sun::star::uno::Type
& _rType
) throw (::com::sun::star::uno::RuntimeException
);
107 // ::com::sun::star::lang::XEventListener
108 virtual void SAL_CALL
disposing(const ::com::sun::star::lang::EventObject
& Source
) throw(::com::sun::star::uno::RuntimeException
);
110 // ::com::sun::star::form::XUpdateListener
111 virtual sal_Bool SAL_CALL
approveUpdate(const ::com::sun::star::lang::EventObject
&) throw(::com::sun::star::uno::RuntimeException
);
112 virtual void SAL_CALL
updated(const ::com::sun::star::lang::EventObject
&) throw(::com::sun::star::uno::RuntimeException
);
114 // resolve ambiguity : both OWeakObject and OInterfaceContainerHelper have these memory operators
115 void * SAL_CALL
operator new( size_t size
) throw() { return OWeakSubObject::operator new(size
); }
116 void SAL_CALL
operator delete( void * p
) throw() { OWeakSubObject::operator delete(p
); }
119 //==================================================================
120 // FmXSelectionMultiplexer
121 //==================================================================
122 class FmXSelectionMultiplexer
:public OWeakSubObject
123 ,public ::cppu::OInterfaceContainerHelper
124 ,public ::com::sun::star::view::XSelectionChangeListener
127 FmXSelectionMultiplexer( ::cppu::OWeakObject
& rSource
, ::osl::Mutex
& rMutex
);
128 DECLARE_UNO3_DEFAULTS(FmXSelectionMultiplexer
, OWeakSubObject
);
130 virtual ::com::sun::star::uno::Any SAL_CALL
queryInterface(const ::com::sun::star::uno::Type
& _rType
) throw (::com::sun::star::uno::RuntimeException
);
132 // ::com::sun::star::lang::XEventListener
133 virtual void SAL_CALL
disposing(const ::com::sun::star::lang::EventObject
& Source
) throw(::com::sun::star::uno::RuntimeException
);
135 // ::com::sun::star::view::XSelectionChangeListener
136 virtual void SAL_CALL
selectionChanged( const ::com::sun::star::lang::EventObject
& aEvent
) throw (::com::sun::star::uno::RuntimeException
);
138 // resolve ambiguity : both OWeakObject and OInterfaceContainerHelper have these memory operators
139 void * SAL_CALL
operator new( size_t size
) throw() { return OWeakSubObject::operator new(size
); }
140 void SAL_CALL
operator delete( void * p
) throw() { OWeakSubObject::operator delete(p
); }
143 //==================================================================
144 // FmXGridControlMultiplexer
145 //==================================================================
146 class FmXGridControlMultiplexer
:public OWeakSubObject
147 ,public ::cppu::OInterfaceContainerHelper
148 ,public ::com::sun::star::form::XGridControlListener
151 FmXGridControlMultiplexer( ::cppu::OWeakObject
& rSource
, ::osl::Mutex
& rMutex
);
152 DECLARE_UNO3_DEFAULTS( FmXGridControlMultiplexer
, OWeakSubObject
);
154 virtual ::com::sun::star::uno::Any SAL_CALL
queryInterface(const ::com::sun::star::uno::Type
& _rType
) throw (::com::sun::star::uno::RuntimeException
);
156 // ::com::sun::star::lang::XEventListener
157 virtual void SAL_CALL
disposing(const ::com::sun::star::lang::EventObject
& Source
) throw(::com::sun::star::uno::RuntimeException
);
159 // ::com::sun::star::view::XSelectionChangeListener
160 virtual void SAL_CALL
columnChanged( const ::com::sun::star::lang::EventObject
& _event
) throw (::com::sun::star::uno::RuntimeException
);
162 // resolve ambiguity : both OWeakObject and OInterfaceContainerHelper have these memory operators
163 void * SAL_CALL
operator new( size_t size
) throw() { return OWeakSubObject::operator new(size
); }
164 void SAL_CALL
operator delete( void * p
) throw() { OWeakSubObject::operator delete(p
); }
167 //==================================================================
168 // FmXContainerMultiplexer
169 //==================================================================
170 class FmXContainerMultiplexer
: public OWeakSubObject
,
171 public ::cppu::OInterfaceContainerHelper
,
172 public ::com::sun::star::container::XContainerListener
175 FmXContainerMultiplexer( ::cppu::OWeakObject
& rSource
, ::osl::Mutex
& rMutex
);
176 DECLARE_UNO3_DEFAULTS(FmXContainerMultiplexer
,OWeakSubObject
);
177 virtual ::com::sun::star::uno::Any SAL_CALL
queryInterface(const ::com::sun::star::uno::Type
& _rType
) throw (::com::sun::star::uno::RuntimeException
);
179 // ::com::sun::star::lang::XEventListener
180 virtual void SAL_CALL
disposing(const ::com::sun::star::lang::EventObject
& Source
) throw(::com::sun::star::uno::RuntimeException
);
182 // ::com::sun::star::container::XContainerListener
183 virtual void SAL_CALL
elementInserted(const ::com::sun::star::container::ContainerEvent
& Event
) throw(::com::sun::star::uno::RuntimeException
);
184 virtual void SAL_CALL
elementRemoved(const ::com::sun::star::container::ContainerEvent
& Event
) throw(::com::sun::star::uno::RuntimeException
);
185 virtual void SAL_CALL
elementReplaced(const ::com::sun::star::container::ContainerEvent
& Event
) throw(::com::sun::star::uno::RuntimeException
);
187 // resolve ambiguity : both OWeakObject and OInterfaceContainerHelper have these memory operators
188 void * SAL_CALL
operator new( size_t size
) throw() { return OWeakSubObject::operator new(size
); }
189 void SAL_CALL
operator delete( void * p
) throw() { OWeakSubObject::operator delete(p
); }
192 //==================================================================
194 //==================================================================
195 typedef ::cppu::ImplHelper10
< ::com::sun::star::form::XBoundComponent
,
196 ::com::sun::star::form::XGridControl
,
197 ::com::sun::star::util::XModifyBroadcaster
,
198 ::com::sun::star::container::XIndexAccess
,
199 ::com::sun::star::container::XEnumerationAccess
,
200 ::com::sun::star::util::XModeSelector
,
201 ::com::sun::star::container::XContainer
,
202 ::com::sun::star::frame::XDispatchProvider
,
203 ::com::sun::star::frame::XDispatchProviderInterception
,
204 ::com::sun::star::view::XSelectionSupplier
205 > FmXGridControl_BASE
;
208 class SVX_DLLPUBLIC FmXGridControl
:public UnoControl
209 ,public FmXGridControl_BASE
211 FmXModifyMultiplexer m_aModifyListeners
;
212 FmXUpdateMultiplexer m_aUpdateListeners
;
213 FmXContainerMultiplexer m_aContainerListeners
;
214 FmXSelectionMultiplexer m_aSelectionListeners
;
215 FmXGridControlMultiplexer m_aGridControlListeners
;
218 sal_uInt16 m_nPeerCreationLevel
;
221 ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XComponentContext
> m_xContext
;
224 FmXGridControl(const ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XComponentContext
>&);
225 virtual ~FmXGridControl();
228 DECLARE_UNO3_AGG_DEFAULTS(FmXGridControl
, UnoControl
);
229 virtual ::com::sun::star::uno::Any SAL_CALL
queryAggregation(const ::com::sun::star::uno::Type
& _rType
) throw (::com::sun::star::uno::RuntimeException
);
232 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Type
> SAL_CALL
getTypes( ) throw(::com::sun::star::uno::RuntimeException
);
233 virtual ::com::sun::star::uno::Sequence
<sal_Int8
> SAL_CALL
getImplementationId( ) throw(::com::sun::star::uno::RuntimeException
);
235 // ::com::sun::star::lang::XComponent
236 virtual void SAL_CALL
dispose() throw(::com::sun::star::uno::RuntimeException
);
238 // ::com::sun::star::lang::XServiceInfo
239 virtual sal_Bool SAL_CALL
supportsService(const OUString
& ServiceName
) throw();
240 virtual OUString SAL_CALL
getImplementationName() throw();
241 virtual ::com::sun::star::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames() throw();
243 // ::com::sun::star::awt::XControl
244 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
);
245 virtual sal_Bool SAL_CALL
setModel(const ::com::sun::star::uno::Reference
< ::com::sun::star::awt::XControlModel
>& Model
) throw(::com::sun::star::uno::RuntimeException
);
246 virtual void SAL_CALL
setDesignMode(sal_Bool bOn
) throw(::com::sun::star::uno::RuntimeException
);
248 // ::com::sun::star::awt::XView
249 virtual void SAL_CALL
draw( sal_Int32 x
, sal_Int32 y
) throw(::com::sun::star::uno::RuntimeException
);
251 // ::com::sun::star::form::XBoundComponent
252 virtual void SAL_CALL
addUpdateListener(const ::com::sun::star::uno::Reference
< ::com::sun::star::form::XUpdateListener
>& l
) throw(::com::sun::star::uno::RuntimeException
);
253 virtual void SAL_CALL
removeUpdateListener(const ::com::sun::star::uno::Reference
< ::com::sun::star::form::XUpdateListener
>& l
) throw(::com::sun::star::uno::RuntimeException
);
254 virtual sal_Bool SAL_CALL
commit() throw(::com::sun::star::uno::RuntimeException
);
256 // ::com::sun::star::container::XElementAccess
257 virtual ::com::sun::star::uno::Type SAL_CALL
getElementType( ) throw(::com::sun::star::uno::RuntimeException
);
258 virtual sal_Bool SAL_CALL
hasElements( ) throw(::com::sun::star::uno::RuntimeException
);
260 // ::com::sun::star::container::XEnumerationAccess
261 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::container::XEnumeration
> SAL_CALL
createEnumeration() throw(::com::sun::star::uno::RuntimeException
);
263 // ::com::sun::star::container::XIndexAccess
264 virtual sal_Int32 SAL_CALL
getCount() throw(::com::sun::star::uno::RuntimeException
);
265 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
);
267 // ::com::sun::star::form::XGridControl
268 virtual void SAL_CALL
addGridControlListener( const ::com::sun::star::uno::Reference
< ::com::sun::star::form::XGridControlListener
>& _listener
) throw(::com::sun::star::uno::RuntimeException
);
269 virtual void SAL_CALL
removeGridControlListener( const ::com::sun::star::uno::Reference
< ::com::sun::star::form::XGridControlListener
>& _listener
) throw(::com::sun::star::uno::RuntimeException
);
271 // ::com::sun::star::form::XGrid (base of XGridControl)
272 virtual sal_Int16 SAL_CALL
getCurrentColumnPosition() throw(::com::sun::star::uno::RuntimeException
);
273 virtual void SAL_CALL
setCurrentColumnPosition(sal_Int16 nPos
) throw(::com::sun::star::uno::RuntimeException
);
275 // ::com::sun::star::form::XGridFieldDataSupplier (base of XGridControl)
276 virtual ::com::sun::star::uno::Sequence
< sal_Bool
> SAL_CALL
queryFieldDataType( const ::com::sun::star::uno::Type
& xType
) throw(::com::sun::star::uno::RuntimeException
);
277 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
);
280 virtual OUString
GetComponentServiceName();
282 // ::com::sun::star::util::XModifyBroadcaster
283 virtual void SAL_CALL
addModifyListener(const ::com::sun::star::uno::Reference
< ::com::sun::star::util::XModifyListener
>& l
) throw(::com::sun::star::uno::RuntimeException
);
284 virtual void SAL_CALL
removeModifyListener(const ::com::sun::star::uno::Reference
< ::com::sun::star::util::XModifyListener
>& l
) throw(::com::sun::star::uno::RuntimeException
);
286 // ::com::sun::star::util::XModeSelector
287 virtual void SAL_CALL
setMode(const OUString
& Mode
) throw(::com::sun::star::lang::NoSupportException
, ::com::sun::star::uno::RuntimeException
);
288 virtual OUString SAL_CALL
getMode() throw(::com::sun::star::uno::RuntimeException
);
289 virtual ::com::sun::star::uno::Sequence
< OUString
> SAL_CALL
getSupportedModes() throw(::com::sun::star::uno::RuntimeException
);
290 virtual sal_Bool SAL_CALL
supportsMode(const OUString
& Mode
) throw(::com::sun::star::uno::RuntimeException
);
292 // ::com::sun::star::container::XContainer
293 virtual void SAL_CALL
addContainerListener(const ::com::sun::star::uno::Reference
< ::com::sun::star::container::XContainerListener
>& l
) throw(::com::sun::star::uno::RuntimeException
);
294 virtual void SAL_CALL
removeContainerListener(const ::com::sun::star::uno::Reference
< ::com::sun::star::container::XContainerListener
>& l
) throw(::com::sun::star::uno::RuntimeException
);
296 // ::com::sun::star::frame::XDispatchProvider
297 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
);
298 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
);
300 // ::com::sun::star::frame::XDispatchProviderInterception
301 virtual void SAL_CALL
registerDispatchProviderInterceptor(const ::com::sun::star::uno::Reference
< ::com::sun::star::frame::XDispatchProviderInterceptor
>& xInterceptor
) throw(::com::sun::star::uno::RuntimeException
);
302 virtual void SAL_CALL
releaseDispatchProviderInterceptor(const ::com::sun::star::uno::Reference
< ::com::sun::star::frame::XDispatchProviderInterceptor
>& xInterceptor
) throw(::com::sun::star::uno::RuntimeException
);
304 // ::com::sun::star::view::XSelectionSupplier
305 virtual sal_Bool SAL_CALL
select( const ::com::sun::star::uno::Any
& aSelection
) throw (::com::sun::star::lang::IllegalArgumentException
, ::com::sun::star::uno::RuntimeException
);
306 virtual ::com::sun::star::uno::Any SAL_CALL
getSelection( ) throw (::com::sun::star::uno::RuntimeException
);
307 virtual void SAL_CALL
addSelectionChangeListener( const ::com::sun::star::uno::Reference
< ::com::sun::star::view::XSelectionChangeListener
>& xListener
) throw (::com::sun::star::uno::RuntimeException
);
308 virtual void SAL_CALL
removeSelectionChangeListener( const ::com::sun::star::uno::Reference
< ::com::sun::star::view::XSelectionChangeListener
>& xListener
) throw (::com::sun::star::uno::RuntimeException
);
311 virtual FmXGridPeer
* imp_CreatePeer(Window
* pParent
);
312 // ImplCreatePeer would be better, but doesn't work because it's not exported
316 //==================================================================
317 // FmXGridPeer -> Peer for the Gridcontrol
318 //==================================================================
319 typedef ::comphelper::ImplHelper19
< ::com::sun::star::form::XGridPeer
,
320 ::com::sun::star::form::XBoundComponent
,
321 ::com::sun::star::form::XGridControl
,
322 ::com::sun::star::sdb::XRowSetSupplier
,
323 ::com::sun::star::util::XModifyBroadcaster
,
324 ::com::sun::star::beans::XPropertyChangeListener
,
325 ::com::sun::star::container::XContainerListener
,
326 ::com::sun::star::sdbc::XRowSetListener
,
327 ::com::sun::star::form::XLoadListener
,
328 ::com::sun::star::view::XSelectionChangeListener
,
329 ::com::sun::star::container::XIndexAccess
,
330 ::com::sun::star::container::XEnumerationAccess
,
331 ::com::sun::star::util::XModeSelector
,
332 ::com::sun::star::container::XContainer
,
333 ::com::sun::star::frame::XStatusListener
,
334 ::com::sun::star::frame::XDispatchProvider
,
335 ::com::sun::star::frame::XDispatchProviderInterception
,
336 ::com::sun::star::form::XResetListener
,
337 ::com::sun::star::view::XSelectionSupplier
340 class SVX_DLLPUBLIC FmXGridPeer
:public VCLXWindow
341 ,public FmXGridPeer_BASE
343 ::com::sun::star::uno::Reference
< ::com::sun::star::container::XIndexContainer
> m_xColumns
;
344 ::com::sun::star::uno::Reference
< ::com::sun::star::sdbc::XRowSet
> m_xCursor
;
345 ::cppu::OInterfaceContainerHelper m_aModifyListeners
,
347 m_aContainerListeners
,
348 m_aSelectionListeners
,
349 m_aGridControlListeners
;
352 sal_Int32 m_nCursorListening
;
354 ::com::sun::star::uno::Reference
< ::com::sun::star::frame::XDispatchProviderInterceptor
> m_xFirstDispatchInterceptor
;
356 sal_Bool m_bInterceptingDispatch
;
358 sal_Bool
* m_pStateCache
;
359 // one bool for each supported url
360 ::com::sun::star::uno::Reference
< ::com::sun::star::frame::XDispatch
> * m_pDispatchers
;
361 // one dispatcher for each supported url
362 // (I would like to have a vector here but including the stl in an exported file seems
363 // very risky to me ....)
365 class GridListenerDelegator
;
366 friend class GridListenerDelegator
;
367 GridListenerDelegator
* m_pGridListener
;
370 ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XComponentContext
> m_xContext
;
371 ::osl::Mutex m_aMutex
;
374 FmXGridPeer(const ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XComponentContext
>&);
377 // spaeter Constructor, immer nach dem realen Constructor zu rufen !
378 void Create(Window
* pParent
, WinBits nStyle
);
381 DECLARE_UNO3_DEFAULTS(FmXGridPeer
, VCLXWindow
);
382 virtual ::com::sun::star::uno::Any SAL_CALL
queryInterface(const ::com::sun::star::uno::Type
& _rType
) throw (::com::sun::star::uno::RuntimeException
);
385 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Type
> SAL_CALL
getTypes( ) throw(::com::sun::star::uno::RuntimeException
);
386 virtual ::com::sun::star::uno::Sequence
<sal_Int8
> SAL_CALL
getImplementationId( ) throw(::com::sun::star::uno::RuntimeException
);
388 // ::com::sun::star::lang::XUnoTunnel
389 static const ::com::sun::star::uno::Sequence
< sal_Int8
>& getUnoTunnelImplementationId() throw();
390 static FmXGridPeer
* getImplementation( const ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XInterface
>& _rxIFace
) throw();
391 sal_Int64 SAL_CALL
getSomething( const ::com::sun::star::uno::Sequence
< sal_Int8
>& _rIdentifier
) throw(::com::sun::star::uno::RuntimeException
);
393 // ::com::sun::star::form::XGridPeer
394 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::container::XIndexContainer
> SAL_CALL
getColumns( ) throw(::com::sun::star::uno::RuntimeException
);
395 virtual void SAL_CALL
setColumns( const ::com::sun::star::uno::Reference
< ::com::sun::star::container::XIndexContainer
>& aColumns
) throw(::com::sun::star::uno::RuntimeException
);
397 // ::com::sun::star::lang::XComponent
398 virtual void SAL_CALL
dispose() throw(::com::sun::star::uno::RuntimeException
);
400 // ::com::sun::star::lang::XEventListener
401 virtual void SAL_CALL
disposing(const ::com::sun::star::lang::EventObject
& Source
) throw(::com::sun::star::uno::RuntimeException
);
403 // ::com::sun::star::form::XBoundComponent
404 virtual void SAL_CALL
addUpdateListener(const ::com::sun::star::uno::Reference
< ::com::sun::star::form::XUpdateListener
>& l
) throw(::com::sun::star::uno::RuntimeException
);
405 virtual void SAL_CALL
removeUpdateListener(const ::com::sun::star::uno::Reference
< ::com::sun::star::form::XUpdateListener
>& l
) throw(::com::sun::star::uno::RuntimeException
);
406 virtual sal_Bool SAL_CALL
commit() throw(::com::sun::star::uno::RuntimeException
);
408 // ::com::sun::star::container::XElementAccess
409 virtual ::com::sun::star::uno::Type SAL_CALL
getElementType( ) throw(::com::sun::star::uno::RuntimeException
);
410 virtual sal_Bool SAL_CALL
hasElements( ) throw(::com::sun::star::uno::RuntimeException
);
412 // ::com::sun::star::container::XEnumerationAccess
413 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::container::XEnumeration
> SAL_CALL
createEnumeration() throw(::com::sun::star::uno::RuntimeException
);
415 // ::com::sun::star::container::XIndexAccess
416 virtual sal_Int32 SAL_CALL
getCount() throw(::com::sun::star::uno::RuntimeException
);
417 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
);
419 // ::com::sun::star::beans::XPropertyChangeListener
420 virtual void SAL_CALL SAL_CALL
propertyChange(const ::com::sun::star::beans::PropertyChangeEvent
& evt
) throw(::com::sun::star::uno::RuntimeException
);
422 // ::com::sun::star::form::XLoadListener
423 virtual void SAL_CALL
loaded(const ::com::sun::star::lang::EventObject
& rEvent
) throw(::com::sun::star::uno::RuntimeException
);
424 virtual void SAL_CALL
unloaded(const ::com::sun::star::lang::EventObject
& rEvent
) throw(::com::sun::star::uno::RuntimeException
);
425 virtual void SAL_CALL
unloading(const ::com::sun::star::lang::EventObject
& aEvent
) throw(::com::sun::star::uno::RuntimeException
);
426 virtual void SAL_CALL
reloading(const ::com::sun::star::lang::EventObject
& aEvent
) throw(::com::sun::star::uno::RuntimeException
);
427 virtual void SAL_CALL
reloaded(const ::com::sun::star::lang::EventObject
& aEvent
) throw(::com::sun::star::uno::RuntimeException
);
429 // ::com::sun::star::sdbc::XRowSetListener
430 virtual void SAL_CALL
cursorMoved(const ::com::sun::star::lang::EventObject
& event
) throw(::com::sun::star::uno::RuntimeException
);
431 virtual void SAL_CALL
rowChanged(const ::com::sun::star::lang::EventObject
& event
) throw(::com::sun::star::uno::RuntimeException
);
432 virtual void SAL_CALL
rowSetChanged(const ::com::sun::star::lang::EventObject
& event
) throw(::com::sun::star::uno::RuntimeException
);
434 // ::com::sun::star::container::XContainerListener
435 virtual void SAL_CALL
elementInserted(const ::com::sun::star::container::ContainerEvent
& Event
) throw(::com::sun::star::uno::RuntimeException
);
436 virtual void SAL_CALL
elementRemoved(const ::com::sun::star::container::ContainerEvent
& Event
) throw(::com::sun::star::uno::RuntimeException
);
437 virtual void SAL_CALL
elementReplaced(const ::com::sun::star::container::ContainerEvent
& Event
) throw(::com::sun::star::uno::RuntimeException
);
440 virtual void SAL_CALL
setProperty( const OUString
& PropertyName
, const ::com::sun::star::uno::Any
& Value
) throw(::com::sun::star::uno::RuntimeException
);
441 virtual ::com::sun::star::uno::Any SAL_CALL
getProperty( const OUString
& PropertyName
) throw(::com::sun::star::uno::RuntimeException
);
442 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::accessibility::XAccessibleContext
>
443 CreateAccessibleContext();
445 // ::com::sun::star::form::XGridControl
446 virtual void SAL_CALL
addGridControlListener( const ::com::sun::star::uno::Reference
< ::com::sun::star::form::XGridControlListener
>& _listener
) throw(::com::sun::star::uno::RuntimeException
);
447 virtual void SAL_CALL
removeGridControlListener( const ::com::sun::star::uno::Reference
< ::com::sun::star::form::XGridControlListener
>& _listener
) throw(::com::sun::star::uno::RuntimeException
);
449 // ::com::sun::star::form::XGrid (base of XGridControl)
450 virtual sal_Int16 SAL_CALL
getCurrentColumnPosition() throw(::com::sun::star::uno::RuntimeException
);
451 virtual void SAL_CALL
setCurrentColumnPosition(sal_Int16 nPos
) throw(::com::sun::star::uno::RuntimeException
);
453 // ::com::sun::star::form::XGridFieldDataSupplier (base of XGridControl)
454 virtual ::com::sun::star::uno::Sequence
< sal_Bool
> SAL_CALL
queryFieldDataType( const ::com::sun::star::uno::Type
& xType
) throw(::com::sun::star::uno::RuntimeException
);
455 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
);
457 // ::com::sun::star::sdb::XRowSetSupplier
458 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::sdbc::XRowSet
> SAL_CALL
getRowSet() throw(::com::sun::star::uno::RuntimeException
);
459 virtual void SAL_CALL
setRowSet(const ::com::sun::star::uno::Reference
< ::com::sun::star::sdbc::XRowSet
>& xDataSource
) throw(::com::sun::star::uno::RuntimeException
);
461 // ::com::sun::star::util::XModifyBroadcaster
462 virtual void SAL_CALL
addModifyListener(const ::com::sun::star::uno::Reference
< ::com::sun::star::util::XModifyListener
>& l
) throw(::com::sun::star::uno::RuntimeException
);
463 virtual void SAL_CALL
removeModifyListener(const ::com::sun::star::uno::Reference
< ::com::sun::star::util::XModifyListener
>& l
) throw(::com::sun::star::uno::RuntimeException
);
466 virtual void SAL_CALL SAL_CALL
setDesignMode(sal_Bool bOn
) throw(::com::sun::star::uno::RuntimeException
);
467 virtual sal_Bool SAL_CALL
isDesignMode() throw(::com::sun::star::uno::RuntimeException
);
469 // ::com::sun::star::view::XSelectionChangeListener
470 virtual void SAL_CALL
selectionChanged(const ::com::sun::star::lang::EventObject
& aEvent
) throw(::com::sun::star::uno::RuntimeException
);
475 void updateGrid(const ::com::sun::star::uno::Reference
< ::com::sun::star::sdbc::XRowSet
>& _rDatabaseCursor
);
476 void startCursorListening();
477 void stopCursorListening();
479 // ::com::sun::star::util::XModeSelector
480 virtual void SAL_CALL
setMode(const OUString
& Mode
) throw(::com::sun::star::lang::NoSupportException
, ::com::sun::star::uno::RuntimeException
);
481 virtual OUString SAL_CALL
getMode() throw(::com::sun::star::uno::RuntimeException
);
482 virtual ::com::sun::star::uno::Sequence
< OUString
> SAL_CALL
getSupportedModes() throw(::com::sun::star::uno::RuntimeException
);
483 virtual sal_Bool SAL_CALL
supportsMode(const OUString
& Mode
) throw(::com::sun::star::uno::RuntimeException
);
485 // ::com::sun::star::container::XContainer
486 virtual void SAL_CALL
addContainerListener(const ::com::sun::star::uno::Reference
< ::com::sun::star::container::XContainerListener
>& l
) throw(::com::sun::star::uno::RuntimeException
);
487 virtual void SAL_CALL
removeContainerListener(const ::com::sun::star::uno::Reference
< ::com::sun::star::container::XContainerListener
>& l
) throw(::com::sun::star::uno::RuntimeException
);
489 void columnVisible(DbGridColumn
* pColumn
);
490 void columnHidden(DbGridColumn
* pColumn
);
492 // ::com::sun::star::awt::XView
493 virtual void SAL_CALL
draw( sal_Int32 x
, sal_Int32 y
) throw(::com::sun::star::uno::RuntimeException
);
495 // ::com::sun::star::frame::XDispatchProvider
496 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
);
497 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
);
499 // ::com::sun::star::frame::XDispatchProviderInterception
500 virtual void SAL_CALL
registerDispatchProviderInterceptor(const ::com::sun::star::uno::Reference
< ::com::sun::star::frame::XDispatchProviderInterceptor
>& xInterceptor
) throw(::com::sun::star::uno::RuntimeException
);
501 virtual void SAL_CALL
releaseDispatchProviderInterceptor(const ::com::sun::star::uno::Reference
< ::com::sun::star::frame::XDispatchProviderInterceptor
>& xInterceptor
) throw(::com::sun::star::uno::RuntimeException
);
503 // ::com::sun::star::frame::XStatusListener
504 virtual void SAL_CALL
statusChanged(const ::com::sun::star::frame::FeatureStateEvent
& Event
) throw(::com::sun::star::uno::RuntimeException
);
506 // ::com::sun::star::form::XResetListener
507 virtual sal_Bool SAL_CALL
approveReset(const ::com::sun::star::lang::EventObject
& rEvent
) throw(::com::sun::star::uno::RuntimeException
);
508 virtual void SAL_CALL
resetted(const ::com::sun::star::lang::EventObject
& rEvent
) throw(::com::sun::star::uno::RuntimeException
);
510 // ::com::sun::star::view::XSelectionSupplier
511 virtual sal_Bool SAL_CALL
select( const ::com::sun::star::uno::Any
& aSelection
) throw (::com::sun::star::lang::IllegalArgumentException
, ::com::sun::star::uno::RuntimeException
);
512 virtual ::com::sun::star::uno::Any SAL_CALL
getSelection( ) throw (::com::sun::star::uno::RuntimeException
);
513 virtual void SAL_CALL
addSelectionChangeListener( const ::com::sun::star::uno::Reference
< ::com::sun::star::view::XSelectionChangeListener
>& xListener
) throw (::com::sun::star::uno::RuntimeException
);
514 virtual void SAL_CALL
removeSelectionChangeListener( const ::com::sun::star::uno::Reference
< ::com::sun::star::view::XSelectionChangeListener
>& xListener
) throw (::com::sun::star::uno::RuntimeException
);
517 virtual FmGridControl
* imp_CreateControl(Window
* pParent
, WinBits nStyle
);
519 static ::com::sun::star::uno::Sequence
< ::com::sun::star::util::URL
>& getSupportedURLs();
520 static ::com::sun::star::uno::Sequence
<sal_uInt16
>& getSupportedGridSlots();
521 void ConnectToDispatcher();
522 void DisConnectFromDispatcher();
523 void UpdateDispatches(); // will connect if not already connected and just update else
525 /** If a derived class wants to listen at some column properties, it doesn't have
526 to overload all methods affecting columns (setColumns, elementInserted, elementRemoved ...)
527 Instead it may use addColumnListeners and removeColumnListeners which are called in all
530 virtual void addColumnListeners(const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySet
>& xCol
);
531 virtual void removeColumnListeners(const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySet
>& xCol
);
533 void selectionChanged();
534 void columnChanged();
536 DECL_LINK(OnQueryGridSlotState
, void*);
537 DECL_LINK(OnExecuteGridSlot
, void*);
542 #endif // _SVX_FMGRID_HXX
544 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */