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/beans/XPropertyChangeListener.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/XResetListener.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 <vcl/wintypes.hxx>
45 #include <toolkit/controls/unocontrol.hxx>
46 #include <toolkit/awt/vclxwindow.hxx>
47 #include <comphelper/interfacecontainer4.hxx>
48 #include <comphelper/servicehelper.hxx>
49 #include <comphelper/uno3.hxx>
50 #include <cppuhelper/implbase.hxx>
51 #include <cppuhelper/implbase10.hxx>
54 namespace com::sun::star::beans
{ class XPropertySet
; }
55 namespace com::sun::star::uno
{ class XComponentContext
; }
58 enum class DbGridControlNavigationBarState
;
60 class SAL_WARN_UNUSED OWeakSubObject
: public ::cppu::OWeakObject
63 ::cppu::OWeakObject
& m_rParent
;
66 OWeakSubObject(::cppu::OWeakObject
& rParent
) : m_rParent(rParent
) { }
68 virtual void SAL_CALL
acquire() noexcept override
{ m_rParent
.acquire(); }
69 virtual void SAL_CALL
release() noexcept override
{ m_rParent
.release(); }
73 // FmXModifyMultiplexer
75 class SAL_WARN_UNUSED FmXModifyMultiplexer final
: public OWeakSubObject
76 ,public ::comphelper::OInterfaceContainerHelper3
<css::util::XModifyListener
>
77 ,public css::util::XModifyListener
80 FmXModifyMultiplexer( ::cppu::OWeakObject
& rSource
, ::osl::Mutex
& rMutex
);
81 DECLARE_UNO3_DEFAULTS(FmXModifyMultiplexer
,OWeakSubObject
)
82 virtual css::uno::Any SAL_CALL
queryInterface(const css::uno::Type
& _rType
) override
;
84 // css::lang::XEventListener
85 virtual void SAL_CALL
disposing(const css::lang::EventObject
& Source
) override
;
87 // css::util::XModifyListener
88 virtual void SAL_CALL
modified(const css::lang::EventObject
& Source
) override
;
90 // resolve ambiguity : both OWeakObject and OInterfaceContainerHelper2 have these memory operators
91 using OWeakSubObject::operator new;
92 using OWeakSubObject::operator delete;
96 // FmXUpdateMultiplexer
98 class SAL_WARN_UNUSED FmXUpdateMultiplexer final
: public OWeakSubObject
,
99 public ::comphelper::OInterfaceContainerHelper3
<css::form::XUpdateListener
>,
100 public css::form::XUpdateListener
103 FmXUpdateMultiplexer( ::cppu::OWeakObject
& rSource
, ::osl::Mutex
& rMutex
);
104 DECLARE_UNO3_DEFAULTS(FmXUpdateMultiplexer
,OWeakSubObject
)
106 virtual css::uno::Any SAL_CALL
queryInterface(const css::uno::Type
& _rType
) override
;
108 // css::lang::XEventListener
109 virtual void SAL_CALL
disposing(const css::lang::EventObject
& Source
) override
;
111 // css::form::XUpdateListener
112 virtual sal_Bool SAL_CALL
approveUpdate(const css::lang::EventObject
&) override
;
113 virtual void SAL_CALL
updated(const css::lang::EventObject
&) override
;
115 // resolve ambiguity : both OWeakObject and OInterfaceContainerHelper2 have these memory operators
116 using OWeakSubObject::operator new;
117 using OWeakSubObject::operator delete;
121 // FmXSelectionMultiplexer
123 class SAL_WARN_UNUSED FmXSelectionMultiplexer final
: public OWeakSubObject
124 ,public ::comphelper::OInterfaceContainerHelper3
<css::view::XSelectionChangeListener
>
125 ,public css::view::XSelectionChangeListener
128 FmXSelectionMultiplexer( ::cppu::OWeakObject
& rSource
, ::osl::Mutex
& rMutex
);
129 DECLARE_UNO3_DEFAULTS(FmXSelectionMultiplexer
, OWeakSubObject
)
131 virtual css::uno::Any SAL_CALL
queryInterface(const css::uno::Type
& _rType
) override
;
133 // css::lang::XEventListener
134 virtual void SAL_CALL
disposing(const css::lang::EventObject
& Source
) override
;
136 // css::view::XSelectionChangeListener
137 virtual void SAL_CALL
selectionChanged( const css::lang::EventObject
& aEvent
) override
;
139 // resolve ambiguity : both OWeakObject and OInterfaceContainerHelper2 have these memory operators
140 using OWeakSubObject::operator new;
141 using OWeakSubObject::operator delete;
145 // FmXGridControlMultiplexer
147 class SAL_WARN_UNUSED FmXGridControlMultiplexer final
: public OWeakSubObject
148 ,public ::comphelper::OInterfaceContainerHelper3
<css::form::XGridControlListener
>
149 ,public css::form::XGridControlListener
152 FmXGridControlMultiplexer( ::cppu::OWeakObject
& rSource
, ::osl::Mutex
& rMutex
);
153 DECLARE_UNO3_DEFAULTS( FmXGridControlMultiplexer
, OWeakSubObject
)
155 virtual css::uno::Any SAL_CALL
queryInterface(const css::uno::Type
& _rType
) override
;
157 // css::lang::XEventListener
158 virtual void SAL_CALL
disposing(const css::lang::EventObject
& Source
) override
;
160 // css::view::XSelectionChangeListener
161 virtual void SAL_CALL
columnChanged( const css::lang::EventObject
& _event
) override
;
163 // resolve ambiguity : both OWeakObject and OInterfaceContainerHelper2 have these memory operators
164 using OWeakSubObject::operator new;
165 using OWeakSubObject::operator delete;
169 // FmXContainerMultiplexer
171 class SAL_WARN_UNUSED FmXContainerMultiplexer final
: public OWeakSubObject
,
172 public ::comphelper::OInterfaceContainerHelper3
<css::container::XContainerListener
>,
173 public css::container::XContainerListener
176 FmXContainerMultiplexer( ::cppu::OWeakObject
& rSource
, ::osl::Mutex
& rMutex
);
177 DECLARE_UNO3_DEFAULTS(FmXContainerMultiplexer
,OWeakSubObject
)
178 virtual css::uno::Any SAL_CALL
queryInterface(const css::uno::Type
& _rType
) override
;
180 // css::lang::XEventListener
181 virtual void SAL_CALL
disposing(const css::lang::EventObject
& Source
) override
;
183 // css::container::XContainerListener
184 virtual void SAL_CALL
elementInserted(const css::container::ContainerEvent
& Event
) override
;
185 virtual void SAL_CALL
elementRemoved(const css::container::ContainerEvent
& Event
) override
;
186 virtual void SAL_CALL
elementReplaced(const css::container::ContainerEvent
& Event
) override
;
188 // resolve ambiguity : both OWeakObject and OInterfaceContainerHelper2 have these memory operators
189 using OWeakSubObject::operator new;
190 using OWeakSubObject::operator delete;
196 typedef ::cppu::ImplHelper10
< css::form::XBoundComponent
,
197 css::form::XGridControl
,
198 css::util::XModifyBroadcaster
,
199 css::container::XIndexAccess
,
200 css::container::XEnumerationAccess
,
201 css::util::XModeSelector
,
202 css::container::XContainer
,
203 css::frame::XDispatchProvider
,
204 css::frame::XDispatchProviderInterception
,
205 css::view::XSelectionSupplier
206 > FmXGridControl_BASE
;
209 class SAL_WARN_UNUSED SVXCORE_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
;
221 css::uno::Reference
< css::uno::XComponentContext
> m_xContext
;
224 FmXGridControl(const css::uno::Reference
< css::uno::XComponentContext
>&);
225 virtual ~FmXGridControl() override
;
228 DECLARE_UNO3_AGG_DEFAULTS(FmXGridControl
, UnoControl
)
229 virtual css::uno::Any SAL_CALL
queryAggregation(const css::uno::Type
& _rType
) override
;
232 virtual css::uno::Sequence
< css::uno::Type
> SAL_CALL
getTypes( ) override
;
233 virtual css::uno::Sequence
<sal_Int8
> SAL_CALL
getImplementationId( ) override
;
235 // css::lang::XComponent
236 virtual void SAL_CALL
dispose() override
;
238 // css::lang::XServiceInfo
239 virtual sal_Bool SAL_CALL
supportsService(const OUString
& ServiceName
) override
;
240 virtual OUString SAL_CALL
getImplementationName() override
;
241 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames() override
;
243 // css::awt::XControl
244 virtual void SAL_CALL
createPeer(const css::uno::Reference
< css::awt::XToolkit
>& _rToolkit
, const css::uno::Reference
< css::awt::XWindowPeer
>& Parent
) override
;
245 virtual sal_Bool SAL_CALL
setModel(const css::uno::Reference
< css::awt::XControlModel
>& Model
) override
;
246 virtual void SAL_CALL
setDesignMode(sal_Bool bOn
) override
;
249 virtual void SAL_CALL
draw( sal_Int32 x
, sal_Int32 y
) override
;
251 // css::form::XBoundComponent
252 virtual void SAL_CALL
addUpdateListener(const css::uno::Reference
< css::form::XUpdateListener
>& l
) override
;
253 virtual void SAL_CALL
removeUpdateListener(const css::uno::Reference
< css::form::XUpdateListener
>& l
) override
;
254 virtual sal_Bool SAL_CALL
commit() override
;
256 // css::container::XElementAccess
257 virtual css::uno::Type SAL_CALL
getElementType( ) override
;
258 virtual sal_Bool SAL_CALL
hasElements( ) override
;
260 // css::container::XEnumerationAccess
261 virtual css::uno::Reference
< css::container::XEnumeration
> SAL_CALL
createEnumeration() override
;
263 // css::container::XIndexAccess
264 virtual sal_Int32 SAL_CALL
getCount() override
;
265 virtual css::uno::Any SAL_CALL
getByIndex(sal_Int32 _rIndex
) override
;
267 // css::form::XGridControl
268 virtual void SAL_CALL
addGridControlListener( const css::uno::Reference
< css::form::XGridControlListener
>& _listener
) override
;
269 virtual void SAL_CALL
removeGridControlListener( const css::uno::Reference
< css::form::XGridControlListener
>& _listener
) override
;
271 // css::form::XGrid (base of XGridControl)
272 virtual sal_Int16 SAL_CALL
getCurrentColumnPosition() override
;
273 virtual void SAL_CALL
setCurrentColumnPosition(sal_Int16 nPos
) override
;
275 // css::form::XGridFieldDataSupplier (base of XGridControl)
276 virtual css::uno::Sequence
< sal_Bool
> SAL_CALL
queryFieldDataType( const css::uno::Type
& xType
) override
;
277 virtual css::uno::Sequence
< css::uno::Any
> SAL_CALL
queryFieldData( sal_Int32 nRow
, const css::uno::Type
& xType
) override
;
280 virtual OUString
GetComponentServiceName() const override
;
282 // css::util::XModifyBroadcaster
283 virtual void SAL_CALL
addModifyListener(const css::uno::Reference
< css::util::XModifyListener
>& l
) override
;
284 virtual void SAL_CALL
removeModifyListener(const css::uno::Reference
< css::util::XModifyListener
>& l
) override
;
286 // css::util::XModeSelector
287 virtual void SAL_CALL
setMode(const OUString
& Mode
) override
;
288 virtual OUString SAL_CALL
getMode() override
;
289 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedModes() override
;
290 virtual sal_Bool SAL_CALL
supportsMode(const OUString
& Mode
) override
;
292 // css::container::XContainer
293 virtual void SAL_CALL
addContainerListener(const css::uno::Reference
< css::container::XContainerListener
>& l
) override
;
294 virtual void SAL_CALL
removeContainerListener(const css::uno::Reference
< css::container::XContainerListener
>& l
) override
;
296 // css::frame::XDispatchProvider
297 virtual css::uno::Reference
< css::frame::XDispatch
> SAL_CALL
queryDispatch(const css::util::URL
& aURL
, const OUString
& aTargetFrameName
, sal_Int32 nSearchFlags
) override
;
298 virtual css::uno::Sequence
< css::uno::Reference
< css::frame::XDispatch
> > SAL_CALL
queryDispatches(const css::uno::Sequence
< css::frame::DispatchDescriptor
>& aDescripts
) override
;
300 // css::frame::XDispatchProviderInterception
301 virtual void SAL_CALL
registerDispatchProviderInterceptor(const css::uno::Reference
< css::frame::XDispatchProviderInterceptor
>& xInterceptor
) override
;
302 virtual void SAL_CALL
releaseDispatchProviderInterceptor(const css::uno::Reference
< css::frame::XDispatchProviderInterceptor
>& xInterceptor
) override
;
304 // css::view::XSelectionSupplier
305 virtual sal_Bool SAL_CALL
select( const css::uno::Any
& aSelection
) override
;
306 virtual css::uno::Any SAL_CALL
getSelection( ) override
;
307 virtual void SAL_CALL
addSelectionChangeListener( const css::uno::Reference
< css::view::XSelectionChangeListener
>& xListener
) override
;
308 virtual void SAL_CALL
removeSelectionChangeListener( const css::uno::Reference
< css::view::XSelectionChangeListener
>& xListener
) override
;
311 virtual void SAL_CALL
setFocus() override
;
314 virtual rtl::Reference
<FmXGridPeer
> imp_CreatePeer(vcl::Window
* pParent
);
315 // ImplCreatePeer would be better, but doesn't work because it's not exported
318 // FmXGridPeer -> Peer for the Gridcontrol
320 class SAL_WARN_UNUSED SVXCORE_DLLPUBLIC FmXGridPeer
:
321 public cppu::ImplInheritanceHelper
<
323 css::form::XGridPeer
,
324 css::form::XBoundComponent
,
325 css::form::XGridControl
,
326 css::sdb::XRowSetSupplier
,
327 css::util::XModifyBroadcaster
,
328 css::beans::XPropertyChangeListener
,
329 css::container::XContainerListener
,
330 css::sdbc::XRowSetListener
,
331 css::form::XLoadListener
,
332 css::view::XSelectionChangeListener
,
333 css::container::XIndexAccess
,
334 css::container::XEnumerationAccess
,
335 css::util::XModeSelector
,
336 css::container::XContainer
,
337 css::frame::XStatusListener
,
338 css::frame::XDispatchProvider
,
339 css::frame::XDispatchProviderInterception
,
340 css::form::XResetListener
,
341 css::view::XSelectionSupplier
>
344 css::uno::Reference
< css::uno::XComponentContext
> m_xContext
;
348 css::uno::Reference
< css::container::XIndexContainer
> m_xColumns
;
349 css::uno::Reference
< css::sdbc::XRowSet
> m_xCursor
;
350 ::comphelper::OInterfaceContainerHelper4
<css::util::XModifyListener
> m_aModifyListeners
;
351 ::comphelper::OInterfaceContainerHelper4
<css::form::XUpdateListener
> m_aUpdateListeners
;
352 ::comphelper::OInterfaceContainerHelper4
<css::container::XContainerListener
> m_aContainerListeners
;
353 ::comphelper::OInterfaceContainerHelper4
<css::view::XSelectionChangeListener
> m_aSelectionListeners
;
354 ::comphelper::OInterfaceContainerHelper4
<css::form::XGridControlListener
> m_aGridControlListeners
;
357 sal_Int32 m_nCursorListening
;
359 css::uno::Reference
< css::frame::XDispatchProviderInterceptor
> m_xFirstDispatchInterceptor
;
361 bool m_bInterceptingDispatch
;
363 std::unique_ptr
<bool[]> m_pStateCache
;
364 // one bool for each supported url
365 std::unique_ptr
<css::uno::Reference
< css::frame::XDispatch
>[]> m_pDispatchers
;
366 // one dispatcher for each supported url
367 // (I would like to have a vector here but including the stl in an exported file seems
368 // very risky to me...)
370 class SAL_DLLPRIVATE GridListenerDelegator
;
371 friend class GridListenerDelegator
;
372 std::unique_ptr
<GridListenerDelegator
> m_pGridListener
;
375 FmXGridPeer(const css::uno::Reference
< css::uno::XComponentContext
>&);
376 virtual ~FmXGridPeer() override
;
378 // late constructor, to always be called after the real constructor!
379 void Create(vcl::Window
* pParent
, WinBits nStyle
);
381 // css::form::XGridPeer
382 virtual css::uno::Reference
< css::container::XIndexContainer
> SAL_CALL
getColumns( ) override
;
383 virtual void SAL_CALL
setColumns( const css::uno::Reference
< css::container::XIndexContainer
>& aColumns
) override final
;
385 // css::lang::XComponent
386 virtual void SAL_CALL
dispose() override
;
388 // css::lang::XEventListener
389 virtual void SAL_CALL
disposing(const css::lang::EventObject
& Source
) override
;
391 // css::form::XBoundComponent
392 virtual void SAL_CALL
addUpdateListener(const css::uno::Reference
< css::form::XUpdateListener
>& l
) override
;
393 virtual void SAL_CALL
removeUpdateListener(const css::uno::Reference
< css::form::XUpdateListener
>& l
) override
;
394 virtual sal_Bool SAL_CALL
commit() override
;
396 // css::container::XElementAccess
397 virtual css::uno::Type SAL_CALL
getElementType( ) override
;
398 virtual sal_Bool SAL_CALL
hasElements( ) override
;
400 // css::container::XEnumerationAccess
401 virtual css::uno::Reference
< css::container::XEnumeration
> SAL_CALL
createEnumeration() override
;
403 // css::container::XIndexAccess
404 virtual sal_Int32 SAL_CALL
getCount() override
;
405 virtual css::uno::Any SAL_CALL
getByIndex(sal_Int32 _rIndex
) override
;
407 // css::beans::XPropertyChangeListener
408 virtual void SAL_CALL
propertyChange(const css::beans::PropertyChangeEvent
& evt
) override
;
410 // css::form::XLoadListener
411 virtual void SAL_CALL
loaded(const css::lang::EventObject
& rEvent
) override
;
412 virtual void SAL_CALL
unloaded(const css::lang::EventObject
& rEvent
) override
;
413 virtual void SAL_CALL
unloading(const css::lang::EventObject
& aEvent
) override
;
414 virtual void SAL_CALL
reloading(const css::lang::EventObject
& aEvent
) override
;
415 virtual void SAL_CALL
reloaded(const css::lang::EventObject
& aEvent
) override
;
417 // css::sdbc::XRowSetListener
418 virtual void SAL_CALL
cursorMoved(const css::lang::EventObject
& event
) override
;
419 virtual void SAL_CALL
rowChanged(const css::lang::EventObject
& event
) override
;
420 virtual void SAL_CALL
rowSetChanged(const css::lang::EventObject
& event
) override
;
422 // css::container::XContainerListener
423 virtual void SAL_CALL
elementInserted(const css::container::ContainerEvent
& Event
) override
;
424 virtual void SAL_CALL
elementRemoved(const css::container::ContainerEvent
& Event
) override
;
425 virtual void SAL_CALL
elementReplaced(const css::container::ContainerEvent
& Event
) override
;
428 virtual void SAL_CALL
setProperty( const OUString
& PropertyName
, const css::uno::Any
& Value
) override
;
429 virtual css::uno::Any SAL_CALL
getProperty( const OUString
& PropertyName
) override
;
430 virtual css::uno::Reference
< css::accessibility::XAccessibleContext
>
431 CreateAccessibleContext() override
;
433 // css::form::XGridControl
434 virtual void SAL_CALL
addGridControlListener( const css::uno::Reference
< css::form::XGridControlListener
>& _listener
) override
;
435 virtual void SAL_CALL
removeGridControlListener( const css::uno::Reference
< css::form::XGridControlListener
>& _listener
) override
;
437 // css::form::XGrid (base of XGridControl)
438 virtual sal_Int16 SAL_CALL
getCurrentColumnPosition() override
;
439 virtual void SAL_CALL
setCurrentColumnPosition(sal_Int16 nPos
) override
;
441 // css::form::XGridFieldDataSupplier (base of XGridControl)
442 virtual css::uno::Sequence
< sal_Bool
> SAL_CALL
queryFieldDataType( const css::uno::Type
& xType
) override
;
443 virtual css::uno::Sequence
< css::uno::Any
> SAL_CALL
queryFieldData( sal_Int32 nRow
, const css::uno::Type
& xType
) override
;
445 // css::sdb::XRowSetSupplier
446 virtual css::uno::Reference
< css::sdbc::XRowSet
> SAL_CALL
getRowSet() override
;
447 virtual void SAL_CALL
setRowSet(const css::uno::Reference
< css::sdbc::XRowSet
>& xDataSource
) override final
;
449 // css::util::XModifyBroadcaster
450 virtual void SAL_CALL
addModifyListener(const css::uno::Reference
< css::util::XModifyListener
>& l
) override
;
451 virtual void SAL_CALL
removeModifyListener(const css::uno::Reference
< css::util::XModifyListener
>& l
) override
;
454 virtual void SAL_CALL
setDesignMode(sal_Bool bOn
) override
;
455 virtual sal_Bool SAL_CALL
isDesignMode() override
;
457 // css::view::XSelectionChangeListener
458 virtual void SAL_CALL
selectionChanged(const css::lang::EventObject
& aEvent
) override
;
463 void updateGrid(const css::uno::Reference
< css::sdbc::XRowSet
>& _rDatabaseCursor
);
464 void startCursorListening();
465 void stopCursorListening();
467 // css::util::XModeSelector
468 virtual void SAL_CALL
setMode(const OUString
& Mode
) override
;
469 virtual OUString SAL_CALL
getMode() override
;
470 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedModes() override
;
471 virtual sal_Bool SAL_CALL
supportsMode(const OUString
& Mode
) override
;
473 // css::container::XContainer
474 virtual void SAL_CALL
addContainerListener(const css::uno::Reference
< css::container::XContainerListener
>& l
) override
;
475 virtual void SAL_CALL
removeContainerListener(const css::uno::Reference
< css::container::XContainerListener
>& l
) override
;
477 void columnVisible(DbGridColumn
const * pColumn
);
478 void columnHidden(DbGridColumn
const * pColumn
);
481 virtual void SAL_CALL
draw( sal_Int32 x
, sal_Int32 y
) override
;
483 // css::frame::XDispatchProvider
484 virtual css::uno::Reference
< css::frame::XDispatch
> SAL_CALL
queryDispatch(const css::util::URL
& aURL
, const OUString
& aTargetFrameName
, sal_Int32 nSearchFlags
) override
;
485 virtual css::uno::Sequence
< css::uno::Reference
< css::frame::XDispatch
> > SAL_CALL
queryDispatches(const css::uno::Sequence
< css::frame::DispatchDescriptor
>& aDescripts
) override
;
487 // css::frame::XDispatchProviderInterception
488 virtual void SAL_CALL
registerDispatchProviderInterceptor(const css::uno::Reference
< css::frame::XDispatchProviderInterceptor
>& xInterceptor
) override
;
489 virtual void SAL_CALL
releaseDispatchProviderInterceptor(const css::uno::Reference
< css::frame::XDispatchProviderInterceptor
>& xInterceptor
) override
;
491 // css::frame::XStatusListener
492 virtual void SAL_CALL
statusChanged(const css::frame::FeatureStateEvent
& Event
) override
;
494 // css::form::XResetListener
495 virtual sal_Bool SAL_CALL
approveReset(const css::lang::EventObject
& rEvent
) override
;
496 virtual void SAL_CALL
resetted(const css::lang::EventObject
& rEvent
) override
;
498 // css::view::XSelectionSupplier
499 virtual sal_Bool SAL_CALL
select( const css::uno::Any
& aSelection
) override
;
500 virtual css::uno::Any SAL_CALL
getSelection( ) override
;
501 virtual void SAL_CALL
addSelectionChangeListener( const css::uno::Reference
< css::view::XSelectionChangeListener
>& xListener
) override
;
502 virtual void SAL_CALL
removeSelectionChangeListener( const css::uno::Reference
< css::view::XSelectionChangeListener
>& xListener
) override
;
505 virtual VclPtr
<FmGridControl
> imp_CreateControl(vcl::Window
* pParent
, WinBits nStyle
);
507 static css::uno::Sequence
< css::util::URL
>& getSupportedURLs();
508 static const std::vector
<DbGridControlNavigationBarState
>& getSupportedGridSlots();
509 void ConnectToDispatcher();
510 void DisConnectFromDispatcher();
511 void UpdateDispatches(); // will connect if not already connected and just update else
513 /** If a derived class wants to listen at some column properties, it doesn't have
514 to override all methods affecting columns (setColumns, elementInserted, elementRemoved ...)
515 Instead it may use addColumnListeners and removeColumnListeners which are called in all
518 void addColumnListeners(const css::uno::Reference
< css::beans::XPropertySet
>& xCol
);
519 void removeColumnListeners(const css::uno::Reference
< css::beans::XPropertySet
>& xCol
);
521 void selectionChanged();
522 void columnChanged();
524 DECL_DLLPRIVATE_LINK(OnQueryGridSlotState
, DbGridControlNavigationBarState
, int);
525 DECL_DLLPRIVATE_LINK(OnExecuteGridSlot
, DbGridControlNavigationBarState
, bool);
529 #endif // _SVX_FMGRID_HXX
531 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */