Bump version to 6.4-15
[LibreOffice.git] / include / svx / fmgridif.hxx
blob8b2cdb5e4e29ee6527ba90001f8a03ec41832b11
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 <tools/wintypes.hxx>
45 #include <toolkit/controls/unocontrol.hxx>
46 #include <toolkit/awt/vclxwindow.hxx>
47 #include <comphelper/servicehelper.hxx>
48 #include <comphelper/uno3.hxx>
49 #include <cppuhelper/implbase.hxx>
50 #include <cppuhelper/implbase10.hxx>
51 #include <memory>
53 namespace com::sun::star::beans { class XPropertySet; }
54 namespace com::sun::star::uno { class XComponentContext; }
56 class DbGridColumn;
57 enum class DbGridControlNavigationBarState;
59 class SAL_WARN_UNUSED OWeakSubObject : public ::cppu::OWeakObject
61 protected:
62 ::cppu::OWeakObject& m_rParent;
64 public:
65 OWeakSubObject(::cppu::OWeakObject& rParent) : m_rParent(rParent) { }
67 virtual void SAL_CALL acquire() throw() override { m_rParent.acquire(); }
68 virtual void SAL_CALL release() throw() override { m_rParent.release(); }
72 // FmXModifyMultiplexer
74 class SAL_WARN_UNUSED FmXModifyMultiplexer final : public OWeakSubObject
75 ,public ::comphelper::OInterfaceContainerHelper2
76 ,public css::util::XModifyListener
78 public:
79 FmXModifyMultiplexer( ::cppu::OWeakObject& rSource, ::osl::Mutex& rMutex );
80 DECLARE_UNO3_DEFAULTS(FmXModifyMultiplexer,OWeakSubObject)
81 virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type& _rType) override;
83 // css::lang::XEventListener
84 virtual void SAL_CALL disposing(const css::lang::EventObject& Source) override;
86 // css::util::XModifyListener
87 virtual void SAL_CALL modified(const css::lang::EventObject& Source) override;
89 // resolve ambiguity : both OWeakObject and OInterfaceContainerHelper2 have these memory operators
90 using OWeakSubObject::operator new;
91 using OWeakSubObject::operator delete;
95 // FmXUpdateMultiplexer
97 class SAL_WARN_UNUSED FmXUpdateMultiplexer final : public OWeakSubObject,
98 public ::comphelper::OInterfaceContainerHelper2,
99 public css::form::XUpdateListener
101 public:
102 FmXUpdateMultiplexer( ::cppu::OWeakObject& rSource, ::osl::Mutex& rMutex );
103 DECLARE_UNO3_DEFAULTS(FmXUpdateMultiplexer,OWeakSubObject)
105 virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type& _rType) override;
107 // css::lang::XEventListener
108 virtual void SAL_CALL disposing(const css::lang::EventObject& Source) override;
110 // css::form::XUpdateListener
111 virtual sal_Bool SAL_CALL approveUpdate(const css::lang::EventObject &) override;
112 virtual void SAL_CALL updated(const css::lang::EventObject &) override;
114 // resolve ambiguity : both OWeakObject and OInterfaceContainerHelper2 have these memory operators
115 using OWeakSubObject::operator new;
116 using OWeakSubObject::operator delete;
120 // FmXSelectionMultiplexer
122 class SAL_WARN_UNUSED FmXSelectionMultiplexer final : public OWeakSubObject
123 ,public ::comphelper::OInterfaceContainerHelper2
124 ,public css::view::XSelectionChangeListener
126 public:
127 FmXSelectionMultiplexer( ::cppu::OWeakObject& rSource, ::osl::Mutex& rMutex );
128 DECLARE_UNO3_DEFAULTS(FmXSelectionMultiplexer, OWeakSubObject)
130 virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type& _rType) override;
132 // css::lang::XEventListener
133 virtual void SAL_CALL disposing(const css::lang::EventObject& Source) override;
135 // css::view::XSelectionChangeListener
136 virtual void SAL_CALL selectionChanged( const css::lang::EventObject& aEvent ) override;
138 // resolve ambiguity : both OWeakObject and OInterfaceContainerHelper2 have these memory operators
139 using OWeakSubObject::operator new;
140 using OWeakSubObject::operator delete;
144 // FmXGridControlMultiplexer
146 class SAL_WARN_UNUSED FmXGridControlMultiplexer final : public OWeakSubObject
147 ,public ::comphelper::OInterfaceContainerHelper2
148 ,public css::form::XGridControlListener
150 public:
151 FmXGridControlMultiplexer( ::cppu::OWeakObject& rSource, ::osl::Mutex& rMutex );
152 DECLARE_UNO3_DEFAULTS( FmXGridControlMultiplexer, OWeakSubObject )
154 virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type& _rType) override;
156 // css::lang::XEventListener
157 virtual void SAL_CALL disposing(const css::lang::EventObject& Source) override;
159 // css::view::XSelectionChangeListener
160 virtual void SAL_CALL columnChanged( const css::lang::EventObject& _event ) override;
162 // resolve ambiguity : both OWeakObject and OInterfaceContainerHelper2 have these memory operators
163 using OWeakSubObject::operator new;
164 using OWeakSubObject::operator delete;
168 // FmXContainerMultiplexer
170 class SAL_WARN_UNUSED FmXContainerMultiplexer final : public OWeakSubObject,
171 public ::comphelper::OInterfaceContainerHelper2,
172 public css::container::XContainerListener
174 public:
175 FmXContainerMultiplexer( ::cppu::OWeakObject& rSource, ::osl::Mutex& rMutex);
176 DECLARE_UNO3_DEFAULTS(FmXContainerMultiplexer,OWeakSubObject)
177 virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type& _rType) override;
179 // css::lang::XEventListener
180 virtual void SAL_CALL disposing(const css::lang::EventObject& Source) override;
182 // css::container::XContainerListener
183 virtual void SAL_CALL elementInserted(const css::container::ContainerEvent& Event) override;
184 virtual void SAL_CALL elementRemoved(const css::container::ContainerEvent& Event) override;
185 virtual void SAL_CALL elementReplaced(const css::container::ContainerEvent& Event) override;
187 // resolve ambiguity : both OWeakObject and OInterfaceContainerHelper2 have these memory operators
188 using OWeakSubObject::operator new;
189 using OWeakSubObject::operator delete;
193 // FmXGridControl
195 typedef ::cppu::ImplHelper10< css::form::XBoundComponent,
196 css::form::XGridControl,
197 css::util::XModifyBroadcaster,
198 css::container::XIndexAccess,
199 css::container::XEnumerationAccess,
200 css::util::XModeSelector,
201 css::container::XContainer,
202 css::frame::XDispatchProvider,
203 css::frame::XDispatchProviderInterception,
204 css::view::XSelectionSupplier
205 > FmXGridControl_BASE;
207 class FmXGridPeer;
208 class SAL_WARN_UNUSED 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;
217 protected:
218 bool m_bInDraw;
220 css::uno::Reference< css::uno::XComponentContext > m_xContext;
222 public:
223 FmXGridControl(const css::uno::Reference< css::uno::XComponentContext >&);
224 virtual ~FmXGridControl() override;
226 // UNO binding
227 DECLARE_UNO3_AGG_DEFAULTS(FmXGridControl, UnoControl)
228 virtual css::uno::Any SAL_CALL queryAggregation(const css::uno::Type& _rType) override;
230 // XTypeProvider
231 virtual css::uno::Sequence< css::uno::Type> SAL_CALL getTypes( ) override;
232 virtual css::uno::Sequence<sal_Int8> SAL_CALL getImplementationId( ) override;
234 // css::lang::XComponent
235 virtual void SAL_CALL dispose() override;
237 // css::lang::XServiceInfo
238 virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) override;
239 virtual OUString SAL_CALL getImplementationName() override;
240 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
242 // css::awt::XControl
243 virtual void SAL_CALL createPeer(const css::uno::Reference< css::awt::XToolkit >& _rToolkit, const css::uno::Reference< css::awt::XWindowPeer >& Parent) override;
244 virtual sal_Bool SAL_CALL setModel(const css::uno::Reference< css::awt::XControlModel >& Model) override;
245 virtual void SAL_CALL setDesignMode(sal_Bool bOn) override;
247 // css::awt::XView
248 virtual void SAL_CALL draw( sal_Int32 x, sal_Int32 y ) override;
250 // css::form::XBoundComponent
251 virtual void SAL_CALL addUpdateListener(const css::uno::Reference< css::form::XUpdateListener >& l) override;
252 virtual void SAL_CALL removeUpdateListener(const css::uno::Reference< css::form::XUpdateListener >& l) override;
253 virtual sal_Bool SAL_CALL commit() override;
255 // css::container::XElementAccess
256 virtual css::uno::Type SAL_CALL getElementType( ) override;
257 virtual sal_Bool SAL_CALL hasElements( ) override;
259 // css::container::XEnumerationAccess
260 virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() override;
262 // css::container::XIndexAccess
263 virtual sal_Int32 SAL_CALL getCount() override;
264 virtual css::uno::Any SAL_CALL getByIndex(sal_Int32 _rIndex) override;
266 // css::form::XGridControl
267 virtual void SAL_CALL addGridControlListener( const css::uno::Reference< css::form::XGridControlListener >& _listener ) override;
268 virtual void SAL_CALL removeGridControlListener( const css::uno::Reference< css::form::XGridControlListener >& _listener ) override;
270 // css::form::XGrid (base of XGridControl)
271 virtual sal_Int16 SAL_CALL getCurrentColumnPosition() override;
272 virtual void SAL_CALL setCurrentColumnPosition(sal_Int16 nPos) override;
274 // css::form::XGridFieldDataSupplier (base of XGridControl)
275 virtual css::uno::Sequence< sal_Bool > SAL_CALL queryFieldDataType( const css::uno::Type& xType ) override;
276 virtual css::uno::Sequence< css::uno::Any > SAL_CALL queryFieldData( sal_Int32 nRow, const css::uno::Type& xType ) override;
278 // UnoControl
279 virtual OUString GetComponentServiceName() override;
281 // css::util::XModifyBroadcaster
282 virtual void SAL_CALL addModifyListener(const css::uno::Reference< css::util::XModifyListener >& l) override;
283 virtual void SAL_CALL removeModifyListener(const css::uno::Reference< css::util::XModifyListener >& l) override;
285 // css::util::XModeSelector
286 virtual void SAL_CALL setMode(const OUString& Mode) override;
287 virtual OUString SAL_CALL getMode() override;
288 virtual css::uno::Sequence< OUString> SAL_CALL getSupportedModes() override;
289 virtual sal_Bool SAL_CALL supportsMode(const OUString& Mode) override;
291 // css::container::XContainer
292 virtual void SAL_CALL addContainerListener(const css::uno::Reference< css::container::XContainerListener >& l) override;
293 virtual void SAL_CALL removeContainerListener(const css::uno::Reference< css::container::XContainerListener >& l) override;
295 // css::frame::XDispatchProvider
296 virtual css::uno::Reference< css::frame::XDispatch > SAL_CALL queryDispatch(const css::util::URL& aURL, const OUString& aTargetFrameName, sal_Int32 nSearchFlags) override;
297 virtual css::uno::Sequence< css::uno::Reference< css::frame::XDispatch > > SAL_CALL queryDispatches(const css::uno::Sequence< css::frame::DispatchDescriptor >& aDescripts) override;
299 // css::frame::XDispatchProviderInterception
300 virtual void SAL_CALL registerDispatchProviderInterceptor(const css::uno::Reference< css::frame::XDispatchProviderInterceptor >& xInterceptor) override;
301 virtual void SAL_CALL releaseDispatchProviderInterceptor(const css::uno::Reference< css::frame::XDispatchProviderInterceptor >& xInterceptor) override;
303 // css::view::XSelectionSupplier
304 virtual sal_Bool SAL_CALL select( const css::uno::Any& aSelection ) override;
305 virtual css::uno::Any SAL_CALL getSelection( ) override;
306 virtual void SAL_CALL addSelectionChangeListener( const css::uno::Reference< css::view::XSelectionChangeListener >& xListener ) override;
307 virtual void SAL_CALL removeSelectionChangeListener( const css::uno::Reference< css::view::XSelectionChangeListener >& xListener ) override;
309 protected:
310 virtual FmXGridPeer* imp_CreatePeer(vcl::Window* pParent);
311 // ImplCreatePeer would be better, but doesn't work because it's not exported
316 // FmXGridPeer -> Peer for the Gridcontrol
318 class FmGridControl;
319 class SAL_WARN_UNUSED SVX_DLLPUBLIC FmXGridPeer:
320 public cppu::ImplInheritanceHelper<
321 VCLXWindow,
322 css::form::XGridPeer,
323 css::form::XBoundComponent,
324 css::form::XGridControl,
325 css::sdb::XRowSetSupplier,
326 css::util::XModifyBroadcaster,
327 css::beans::XPropertyChangeListener,
328 css::container::XContainerListener,
329 css::sdbc::XRowSetListener,
330 css::form::XLoadListener,
331 css::view::XSelectionChangeListener,
332 css::container::XIndexAccess,
333 css::container::XEnumerationAccess,
334 css::util::XModeSelector,
335 css::container::XContainer,
336 css::frame::XStatusListener,
337 css::frame::XDispatchProvider,
338 css::frame::XDispatchProviderInterception,
339 css::form::XResetListener,
340 css::view::XSelectionSupplier>
342 protected:
343 css::uno::Reference< css::uno::XComponentContext > m_xContext;
344 ::osl::Mutex m_aMutex;
346 private:
347 css::uno::Reference< css::container::XIndexContainer > m_xColumns;
348 css::uno::Reference< css::sdbc::XRowSet > m_xCursor;
349 ::comphelper::OInterfaceContainerHelper2 m_aModifyListeners,
350 m_aUpdateListeners,
351 m_aContainerListeners,
352 m_aSelectionListeners,
353 m_aGridControlListeners;
355 OUString m_aMode;
356 sal_Int32 m_nCursorListening;
358 css::uno::Reference< css::frame::XDispatchProviderInterceptor > m_xFirstDispatchInterceptor;
360 bool m_bInterceptingDispatch;
362 std::unique_ptr<bool[]> m_pStateCache;
363 // one bool for each supported url
364 std::unique_ptr<css::uno::Reference< css::frame::XDispatch >[]> m_pDispatchers;
365 // one dispatcher for each supported url
366 // (I would like to have a vector here but including the stl in an exported file seems
367 // very risky to me...)
369 class GridListenerDelegator;
370 friend class GridListenerDelegator;
371 std::unique_ptr<GridListenerDelegator> m_pGridListener;
373 public:
374 FmXGridPeer(const css::uno::Reference< css::uno::XComponentContext >&);
375 virtual ~FmXGridPeer() override;
377 // late constructor, to always be called after the real constructor!
378 void Create(vcl::Window* pParent, WinBits nStyle);
380 // css::lang::XUnoTunnel
381 UNO3_GETIMPLEMENTATION_DECL(FmXGridPeer)
383 // css::form::XGridPeer
384 virtual css::uno::Reference< css::container::XIndexContainer > SAL_CALL getColumns( ) override;
385 virtual void SAL_CALL setColumns( const css::uno::Reference< css::container::XIndexContainer >& aColumns ) override final;
387 // css::lang::XComponent
388 virtual void SAL_CALL dispose() override;
390 // css::lang::XEventListener
391 virtual void SAL_CALL disposing(const css::lang::EventObject& Source) override;
393 // css::form::XBoundComponent
394 virtual void SAL_CALL addUpdateListener(const css::uno::Reference< css::form::XUpdateListener >& l) override;
395 virtual void SAL_CALL removeUpdateListener(const css::uno::Reference< css::form::XUpdateListener >& l) override;
396 virtual sal_Bool SAL_CALL commit() override;
398 // css::container::XElementAccess
399 virtual css::uno::Type SAL_CALL getElementType( ) override;
400 virtual sal_Bool SAL_CALL hasElements( ) override;
402 // css::container::XEnumerationAccess
403 virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() override;
405 // css::container::XIndexAccess
406 virtual sal_Int32 SAL_CALL getCount() override;
407 virtual css::uno::Any SAL_CALL getByIndex(sal_Int32 _rIndex) override;
409 // css::beans::XPropertyChangeListener
410 virtual void SAL_CALL propertyChange(const css::beans::PropertyChangeEvent& evt) override;
412 // css::form::XLoadListener
413 virtual void SAL_CALL loaded(const css::lang::EventObject& rEvent) override;
414 virtual void SAL_CALL unloaded(const css::lang::EventObject& rEvent) override;
415 virtual void SAL_CALL unloading(const css::lang::EventObject& aEvent) override;
416 virtual void SAL_CALL reloading(const css::lang::EventObject& aEvent) override;
417 virtual void SAL_CALL reloaded(const css::lang::EventObject& aEvent) override;
419 // css::sdbc::XRowSetListener
420 virtual void SAL_CALL cursorMoved(const css::lang::EventObject& event) override;
421 virtual void SAL_CALL rowChanged(const css::lang::EventObject& event) override;
422 virtual void SAL_CALL rowSetChanged(const css::lang::EventObject& event) override;
424 // css::container::XContainerListener
425 virtual void SAL_CALL elementInserted(const css::container::ContainerEvent& Event) override;
426 virtual void SAL_CALL elementRemoved(const css::container::ContainerEvent& Event) override;
427 virtual void SAL_CALL elementReplaced(const css::container::ContainerEvent& Event) override;
429 // VCLXWindow
430 virtual void SAL_CALL setProperty( const OUString& PropertyName, const css::uno::Any& Value ) override;
431 virtual css::uno::Any SAL_CALL getProperty( const OUString& PropertyName ) override;
432 virtual css::uno::Reference< css::accessibility::XAccessibleContext >
433 CreateAccessibleContext() override;
435 // css::form::XGridControl
436 virtual void SAL_CALL addGridControlListener( const css::uno::Reference< css::form::XGridControlListener >& _listener ) override;
437 virtual void SAL_CALL removeGridControlListener( const css::uno::Reference< css::form::XGridControlListener >& _listener ) override;
439 // css::form::XGrid (base of XGridControl)
440 virtual sal_Int16 SAL_CALL getCurrentColumnPosition() override;
441 virtual void SAL_CALL setCurrentColumnPosition(sal_Int16 nPos) override;
443 // css::form::XGridFieldDataSupplier (base of XGridControl)
444 virtual css::uno::Sequence< sal_Bool > SAL_CALL queryFieldDataType( const css::uno::Type& xType ) override;
445 virtual css::uno::Sequence< css::uno::Any > SAL_CALL queryFieldData( sal_Int32 nRow, const css::uno::Type& xType ) override;
447 // css::sdb::XRowSetSupplier
448 virtual css::uno::Reference< css::sdbc::XRowSet > SAL_CALL getRowSet() override;
449 virtual void SAL_CALL setRowSet(const css::uno::Reference< css::sdbc::XRowSet >& xDataSource) override final;
451 // css::util::XModifyBroadcaster
452 virtual void SAL_CALL addModifyListener(const css::uno::Reference< css::util::XModifyListener >& l) override;
453 virtual void SAL_CALL removeModifyListener(const css::uno::Reference< css::util::XModifyListener >& l) override;
455 // UnoControl
456 virtual void SAL_CALL setDesignMode(sal_Bool bOn) override;
457 virtual sal_Bool SAL_CALL isDesignMode() override;
459 // css::view::XSelectionChangeListener
460 virtual void SAL_CALL selectionChanged(const css::lang::EventObject& aEvent) override;
462 void CellModified();
464 // PropertyListening
465 void updateGrid(const css::uno::Reference< css::sdbc::XRowSet >& _rDatabaseCursor);
466 void startCursorListening();
467 void stopCursorListening();
469 // css::util::XModeSelector
470 virtual void SAL_CALL setMode(const OUString& Mode) override;
471 virtual OUString SAL_CALL getMode() override;
472 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedModes() override;
473 virtual sal_Bool SAL_CALL supportsMode(const OUString& Mode) override;
475 // css::container::XContainer
476 virtual void SAL_CALL addContainerListener(const css::uno::Reference< css::container::XContainerListener >& l) override;
477 virtual void SAL_CALL removeContainerListener(const css::uno::Reference< css::container::XContainerListener >& l) override;
479 void columnVisible(DbGridColumn const * pColumn);
480 void columnHidden(DbGridColumn const * pColumn);
482 // css::awt::XView
483 virtual void SAL_CALL draw( sal_Int32 x, sal_Int32 y ) override;
485 // css::frame::XDispatchProvider
486 virtual css::uno::Reference< css::frame::XDispatch > SAL_CALL queryDispatch(const css::util::URL& aURL, const OUString& aTargetFrameName, sal_Int32 nSearchFlags) override;
487 virtual css::uno::Sequence< css::uno::Reference< css::frame::XDispatch > > SAL_CALL queryDispatches(const css::uno::Sequence< css::frame::DispatchDescriptor >& aDescripts) override;
489 // css::frame::XDispatchProviderInterception
490 virtual void SAL_CALL registerDispatchProviderInterceptor(const css::uno::Reference< css::frame::XDispatchProviderInterceptor >& xInterceptor) override;
491 virtual void SAL_CALL releaseDispatchProviderInterceptor(const css::uno::Reference< css::frame::XDispatchProviderInterceptor >& xInterceptor) override;
493 // css::frame::XStatusListener
494 virtual void SAL_CALL statusChanged(const css::frame::FeatureStateEvent& Event) override;
496 // css::form::XResetListener
497 virtual sal_Bool SAL_CALL approveReset(const css::lang::EventObject& rEvent) override;
498 virtual void SAL_CALL resetted(const css::lang::EventObject& rEvent) override;
500 // css::view::XSelectionSupplier
501 virtual sal_Bool SAL_CALL select( const css::uno::Any& aSelection ) override;
502 virtual css::uno::Any SAL_CALL getSelection( ) override;
503 virtual void SAL_CALL addSelectionChangeListener( const css::uno::Reference< css::view::XSelectionChangeListener >& xListener ) override;
504 virtual void SAL_CALL removeSelectionChangeListener( const css::uno::Reference< css::view::XSelectionChangeListener >& xListener ) override;
506 protected:
507 virtual VclPtr<FmGridControl> imp_CreateControl(vcl::Window* pParent, WinBits nStyle);
509 static css::uno::Sequence< css::util::URL>& getSupportedURLs();
510 static const std::vector<DbGridControlNavigationBarState>& getSupportedGridSlots();
511 void ConnectToDispatcher();
512 void DisConnectFromDispatcher();
513 void UpdateDispatches(); // will connect if not already connected and just update else
515 /** If a derived class wants to listen at some column properties, it doesn't have
516 to override all methods affecting columns (setColumns, elementInserted, elementRemoved ...)
517 Instead it may use addColumnListeners and removeColumnListeners which are called in all
518 the cases.
520 void addColumnListeners(const css::uno::Reference< css::beans::XPropertySet >& xCol);
521 void removeColumnListeners(const css::uno::Reference< css::beans::XPropertySet >& xCol);
523 void selectionChanged();
524 void columnChanged();
526 DECL_LINK(OnQueryGridSlotState, DbGridControlNavigationBarState, int);
527 DECL_LINK(OnExecuteGridSlot, DbGridControlNavigationBarState, bool);
531 #endif // _SVX_FMGRID_HXX
533 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */