bump product version to 6.3.0.0.beta1
[LibreOffice.git] / include / svx / fmgridif.hxx
blob873ad62ad43ba756a6486683a92af2ed7d66c6e6
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/uno3.hxx>
48 #include <cppuhelper/implbase.hxx>
49 #include <cppuhelper/implbase10.hxx>
50 #include <memory>
52 namespace com::sun::star::beans { class XPropertySet; }
53 namespace com::sun::star::uno { class XComponentContext; }
55 class DbGridColumn;
56 enum class DbGridControlNavigationBarState;
58 class SAL_WARN_UNUSED OWeakSubObject : public ::cppu::OWeakObject
60 protected:
61 ::cppu::OWeakObject& m_rParent;
63 public:
64 OWeakSubObject(::cppu::OWeakObject& rParent) : m_rParent(rParent) { }
66 virtual void SAL_CALL acquire() throw() override { m_rParent.acquire(); }
67 virtual void SAL_CALL release() throw() override { m_rParent.release(); }
71 // FmXModifyMultiplexer
73 class SAL_WARN_UNUSED FmXModifyMultiplexer :public OWeakSubObject
74 ,public ::comphelper::OInterfaceContainerHelper2
75 ,public css::util::XModifyListener
77 public:
78 FmXModifyMultiplexer( ::cppu::OWeakObject& rSource, ::osl::Mutex& rMutex );
79 DECLARE_UNO3_DEFAULTS(FmXModifyMultiplexer,OWeakSubObject)
80 virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type& _rType) override;
82 // css::lang::XEventListener
83 virtual void SAL_CALL disposing(const css::lang::EventObject& Source) override;
85 // css::util::XModifyListener
86 virtual void SAL_CALL modified(const css::lang::EventObject& Source) override;
88 // resolve ambiguity : both OWeakObject and OInterfaceContainerHelper2 have these memory operators
89 using OWeakSubObject::operator new;
90 using OWeakSubObject::operator delete;
94 // FmXUpdateMultiplexer
96 class SAL_WARN_UNUSED FmXUpdateMultiplexer : public OWeakSubObject,
97 public ::comphelper::OInterfaceContainerHelper2,
98 public css::form::XUpdateListener
100 public:
101 FmXUpdateMultiplexer( ::cppu::OWeakObject& rSource, ::osl::Mutex& rMutex );
102 DECLARE_UNO3_DEFAULTS(FmXUpdateMultiplexer,OWeakSubObject)
104 virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type& _rType) override;
106 // css::lang::XEventListener
107 virtual void SAL_CALL disposing(const css::lang::EventObject& Source) override;
109 // css::form::XUpdateListener
110 virtual sal_Bool SAL_CALL approveUpdate(const css::lang::EventObject &) override;
111 virtual void SAL_CALL updated(const css::lang::EventObject &) override;
113 // resolve ambiguity : both OWeakObject and OInterfaceContainerHelper2 have these memory operators
114 using OWeakSubObject::operator new;
115 using OWeakSubObject::operator delete;
119 // FmXSelectionMultiplexer
121 class SAL_WARN_UNUSED FmXSelectionMultiplexer :public OWeakSubObject
122 ,public ::comphelper::OInterfaceContainerHelper2
123 ,public css::view::XSelectionChangeListener
125 public:
126 FmXSelectionMultiplexer( ::cppu::OWeakObject& rSource, ::osl::Mutex& rMutex );
127 DECLARE_UNO3_DEFAULTS(FmXSelectionMultiplexer, OWeakSubObject)
129 virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type& _rType) override;
131 // css::lang::XEventListener
132 virtual void SAL_CALL disposing(const css::lang::EventObject& Source) override;
134 // css::view::XSelectionChangeListener
135 virtual void SAL_CALL selectionChanged( const css::lang::EventObject& aEvent ) override;
137 // resolve ambiguity : both OWeakObject and OInterfaceContainerHelper2 have these memory operators
138 using OWeakSubObject::operator new;
139 using OWeakSubObject::operator delete;
143 // FmXGridControlMultiplexer
145 class SAL_WARN_UNUSED FmXGridControlMultiplexer :public OWeakSubObject
146 ,public ::comphelper::OInterfaceContainerHelper2
147 ,public css::form::XGridControlListener
149 public:
150 FmXGridControlMultiplexer( ::cppu::OWeakObject& rSource, ::osl::Mutex& rMutex );
151 DECLARE_UNO3_DEFAULTS( FmXGridControlMultiplexer, OWeakSubObject )
153 virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type& _rType) override;
155 // css::lang::XEventListener
156 virtual void SAL_CALL disposing(const css::lang::EventObject& Source) override;
158 // css::view::XSelectionChangeListener
159 virtual void SAL_CALL columnChanged( const css::lang::EventObject& _event ) override;
161 // resolve ambiguity : both OWeakObject and OInterfaceContainerHelper2 have these memory operators
162 using OWeakSubObject::operator new;
163 using OWeakSubObject::operator delete;
167 // FmXContainerMultiplexer
169 class SAL_WARN_UNUSED FmXContainerMultiplexer : public OWeakSubObject,
170 public ::comphelper::OInterfaceContainerHelper2,
171 public css::container::XContainerListener
173 public:
174 FmXContainerMultiplexer( ::cppu::OWeakObject& rSource, ::osl::Mutex& rMutex);
175 DECLARE_UNO3_DEFAULTS(FmXContainerMultiplexer,OWeakSubObject)
176 virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type& _rType) override;
178 // css::lang::XEventListener
179 virtual void SAL_CALL disposing(const css::lang::EventObject& Source) override;
181 // css::container::XContainerListener
182 virtual void SAL_CALL elementInserted(const css::container::ContainerEvent& Event) override;
183 virtual void SAL_CALL elementRemoved(const css::container::ContainerEvent& Event) override;
184 virtual void SAL_CALL elementReplaced(const css::container::ContainerEvent& Event) override;
186 // resolve ambiguity : both OWeakObject and OInterfaceContainerHelper2 have these memory operators
187 using OWeakSubObject::operator new;
188 using OWeakSubObject::operator delete;
192 // FmXGridControl
194 typedef ::cppu::ImplHelper10< css::form::XBoundComponent,
195 css::form::XGridControl,
196 css::util::XModifyBroadcaster,
197 css::container::XIndexAccess,
198 css::container::XEnumerationAccess,
199 css::util::XModeSelector,
200 css::container::XContainer,
201 css::frame::XDispatchProvider,
202 css::frame::XDispatchProviderInterception,
203 css::view::XSelectionSupplier
204 > FmXGridControl_BASE;
206 class FmXGridPeer;
207 class SAL_WARN_UNUSED SVX_DLLPUBLIC FmXGridControl :public UnoControl
208 ,public FmXGridControl_BASE
210 FmXModifyMultiplexer m_aModifyListeners;
211 FmXUpdateMultiplexer m_aUpdateListeners;
212 FmXContainerMultiplexer m_aContainerListeners;
213 FmXSelectionMultiplexer m_aSelectionListeners;
214 FmXGridControlMultiplexer m_aGridControlListeners;
216 protected:
217 bool m_bInDraw;
219 css::uno::Reference< css::uno::XComponentContext > m_xContext;
221 public:
222 FmXGridControl(const css::uno::Reference< css::uno::XComponentContext >&);
223 virtual ~FmXGridControl() override;
225 // UNO binding
226 DECLARE_UNO3_AGG_DEFAULTS(FmXGridControl, UnoControl)
227 virtual css::uno::Any SAL_CALL queryAggregation(const css::uno::Type& _rType) override;
229 // XTypeProvider
230 virtual css::uno::Sequence< css::uno::Type> SAL_CALL getTypes( ) override;
231 virtual css::uno::Sequence<sal_Int8> SAL_CALL getImplementationId( ) override;
233 // css::lang::XComponent
234 virtual void SAL_CALL dispose() override;
236 // css::lang::XServiceInfo
237 virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) override;
238 virtual OUString SAL_CALL getImplementationName() override;
239 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
241 // css::awt::XControl
242 virtual void SAL_CALL createPeer(const css::uno::Reference< css::awt::XToolkit >& _rToolkit, const css::uno::Reference< css::awt::XWindowPeer >& Parent) override;
243 virtual sal_Bool SAL_CALL setModel(const css::uno::Reference< css::awt::XControlModel >& Model) override;
244 virtual void SAL_CALL setDesignMode(sal_Bool bOn) override;
246 // css::awt::XView
247 virtual void SAL_CALL draw( sal_Int32 x, sal_Int32 y ) override;
249 // css::form::XBoundComponent
250 virtual void SAL_CALL addUpdateListener(const css::uno::Reference< css::form::XUpdateListener >& l) override;
251 virtual void SAL_CALL removeUpdateListener(const css::uno::Reference< css::form::XUpdateListener >& l) override;
252 virtual sal_Bool SAL_CALL commit() override;
254 // css::container::XElementAccess
255 virtual css::uno::Type SAL_CALL getElementType( ) override;
256 virtual sal_Bool SAL_CALL hasElements( ) override;
258 // css::container::XEnumerationAccess
259 virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() override;
261 // css::container::XIndexAccess
262 virtual sal_Int32 SAL_CALL getCount() override;
263 virtual css::uno::Any SAL_CALL getByIndex(sal_Int32 _rIndex) override;
265 // css::form::XGridControl
266 virtual void SAL_CALL addGridControlListener( const css::uno::Reference< css::form::XGridControlListener >& _listener ) override;
267 virtual void SAL_CALL removeGridControlListener( const css::uno::Reference< css::form::XGridControlListener >& _listener ) override;
269 // css::form::XGrid (base of XGridControl)
270 virtual sal_Int16 SAL_CALL getCurrentColumnPosition() override;
271 virtual void SAL_CALL setCurrentColumnPosition(sal_Int16 nPos) override;
273 // css::form::XGridFieldDataSupplier (base of XGridControl)
274 virtual css::uno::Sequence< sal_Bool > SAL_CALL queryFieldDataType( const css::uno::Type& xType ) override;
275 virtual css::uno::Sequence< css::uno::Any > SAL_CALL queryFieldData( sal_Int32 nRow, const css::uno::Type& xType ) override;
277 // UnoControl
278 virtual OUString GetComponentServiceName() override;
280 // css::util::XModifyBroadcaster
281 virtual void SAL_CALL addModifyListener(const css::uno::Reference< css::util::XModifyListener >& l) override;
282 virtual void SAL_CALL removeModifyListener(const css::uno::Reference< css::util::XModifyListener >& l) override;
284 // css::util::XModeSelector
285 virtual void SAL_CALL setMode(const OUString& Mode) override;
286 virtual OUString SAL_CALL getMode() override;
287 virtual css::uno::Sequence< OUString> SAL_CALL getSupportedModes() override;
288 virtual sal_Bool SAL_CALL supportsMode(const OUString& Mode) override;
290 // css::container::XContainer
291 virtual void SAL_CALL addContainerListener(const css::uno::Reference< css::container::XContainerListener >& l) override;
292 virtual void SAL_CALL removeContainerListener(const css::uno::Reference< css::container::XContainerListener >& l) override;
294 // css::frame::XDispatchProvider
295 virtual css::uno::Reference< css::frame::XDispatch > SAL_CALL queryDispatch(const css::util::URL& aURL, const OUString& aTargetFrameName, sal_Int32 nSearchFlags) override;
296 virtual css::uno::Sequence< css::uno::Reference< css::frame::XDispatch > > SAL_CALL queryDispatches(const css::uno::Sequence< css::frame::DispatchDescriptor >& aDescripts) override;
298 // css::frame::XDispatchProviderInterception
299 virtual void SAL_CALL registerDispatchProviderInterceptor(const css::uno::Reference< css::frame::XDispatchProviderInterceptor >& xInterceptor) override;
300 virtual void SAL_CALL releaseDispatchProviderInterceptor(const css::uno::Reference< css::frame::XDispatchProviderInterceptor >& xInterceptor) override;
302 // css::view::XSelectionSupplier
303 virtual sal_Bool SAL_CALL select( const css::uno::Any& aSelection ) override;
304 virtual css::uno::Any SAL_CALL getSelection( ) override;
305 virtual void SAL_CALL addSelectionChangeListener( const css::uno::Reference< css::view::XSelectionChangeListener >& xListener ) override;
306 virtual void SAL_CALL removeSelectionChangeListener( const css::uno::Reference< css::view::XSelectionChangeListener >& xListener ) override;
308 protected:
309 virtual FmXGridPeer* imp_CreatePeer(vcl::Window* pParent);
310 // ImplCreatePeer would be better, but doesn't work because it's not exported
315 // FmXGridPeer -> Peer for the Gridcontrol
317 class FmGridControl;
318 class SAL_WARN_UNUSED SVX_DLLPUBLIC FmXGridPeer:
319 public cppu::ImplInheritanceHelper<
320 VCLXWindow,
321 css::form::XGridPeer,
322 css::form::XBoundComponent,
323 css::form::XGridControl,
324 css::sdb::XRowSetSupplier,
325 css::util::XModifyBroadcaster,
326 css::beans::XPropertyChangeListener,
327 css::container::XContainerListener,
328 css::sdbc::XRowSetListener,
329 css::form::XLoadListener,
330 css::view::XSelectionChangeListener,
331 css::container::XIndexAccess,
332 css::container::XEnumerationAccess,
333 css::util::XModeSelector,
334 css::container::XContainer,
335 css::frame::XStatusListener,
336 css::frame::XDispatchProvider,
337 css::frame::XDispatchProviderInterception,
338 css::form::XResetListener,
339 css::view::XSelectionSupplier>
341 protected:
342 css::uno::Reference< css::uno::XComponentContext > m_xContext;
343 ::osl::Mutex m_aMutex;
345 private:
346 css::uno::Reference< css::container::XIndexContainer > m_xColumns;
347 css::uno::Reference< css::sdbc::XRowSet > m_xCursor;
348 ::comphelper::OInterfaceContainerHelper2 m_aModifyListeners,
349 m_aUpdateListeners,
350 m_aContainerListeners,
351 m_aSelectionListeners,
352 m_aGridControlListeners;
354 OUString m_aMode;
355 sal_Int32 m_nCursorListening;
357 css::uno::Reference< css::frame::XDispatchProviderInterceptor > m_xFirstDispatchInterceptor;
359 bool m_bInterceptingDispatch;
361 std::unique_ptr<bool[]> m_pStateCache;
362 // one bool for each supported url
363 std::unique_ptr<css::uno::Reference< css::frame::XDispatch >[]> m_pDispatchers;
364 // one dispatcher for each supported url
365 // (I would like to have a vector here but including the stl in an exported file seems
366 // very risky to me ....)
368 class GridListenerDelegator;
369 friend class GridListenerDelegator;
370 std::unique_ptr<GridListenerDelegator> m_pGridListener;
372 public:
373 FmXGridPeer(const css::uno::Reference< css::uno::XComponentContext >&);
374 virtual ~FmXGridPeer() override;
376 // late constructor, to always be called after the real constructor!
377 void Create(vcl::Window* pParent, WinBits nStyle);
379 // css::lang::XUnoTunnel
380 static const css::uno::Sequence< sal_Int8 >& getUnoTunnelImplementationId() throw();
381 static FmXGridPeer* getImplementation( const css::uno::Reference< css::uno::XInterface >& _rxIFace ) throw();
382 sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& _rIdentifier ) override;
384 // css::form::XGridPeer
385 virtual css::uno::Reference< css::container::XIndexContainer > SAL_CALL getColumns( ) override;
386 virtual void SAL_CALL setColumns( const css::uno::Reference< css::container::XIndexContainer >& aColumns ) override;
388 // css::lang::XComponent
389 virtual void SAL_CALL dispose() override;
391 // css::lang::XEventListener
392 virtual void SAL_CALL disposing(const css::lang::EventObject& Source) override;
394 // css::form::XBoundComponent
395 virtual void SAL_CALL addUpdateListener(const css::uno::Reference< css::form::XUpdateListener >& l) override;
396 virtual void SAL_CALL removeUpdateListener(const css::uno::Reference< css::form::XUpdateListener >& l) override;
397 virtual sal_Bool SAL_CALL commit() override;
399 // css::container::XElementAccess
400 virtual css::uno::Type SAL_CALL getElementType( ) override;
401 virtual sal_Bool SAL_CALL hasElements( ) override;
403 // css::container::XEnumerationAccess
404 virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() override;
406 // css::container::XIndexAccess
407 virtual sal_Int32 SAL_CALL getCount() override;
408 virtual css::uno::Any SAL_CALL getByIndex(sal_Int32 _rIndex) override;
410 // css::beans::XPropertyChangeListener
411 virtual void SAL_CALL propertyChange(const css::beans::PropertyChangeEvent& evt) override;
413 // css::form::XLoadListener
414 virtual void SAL_CALL loaded(const css::lang::EventObject& rEvent) override;
415 virtual void SAL_CALL unloaded(const css::lang::EventObject& rEvent) override;
416 virtual void SAL_CALL unloading(const css::lang::EventObject& aEvent) override;
417 virtual void SAL_CALL reloading(const css::lang::EventObject& aEvent) override;
418 virtual void SAL_CALL reloaded(const css::lang::EventObject& aEvent) override;
420 // css::sdbc::XRowSetListener
421 virtual void SAL_CALL cursorMoved(const css::lang::EventObject& event) override;
422 virtual void SAL_CALL rowChanged(const css::lang::EventObject& event) override;
423 virtual void SAL_CALL rowSetChanged(const css::lang::EventObject& event) override;
425 // css::container::XContainerListener
426 virtual void SAL_CALL elementInserted(const css::container::ContainerEvent& Event) override;
427 virtual void SAL_CALL elementRemoved(const css::container::ContainerEvent& Event) override;
428 virtual void SAL_CALL elementReplaced(const css::container::ContainerEvent& Event) override;
430 // VCLXWindow
431 virtual void SAL_CALL setProperty( const OUString& PropertyName, const css::uno::Any& Value ) override;
432 virtual css::uno::Any SAL_CALL getProperty( const OUString& PropertyName ) override;
433 virtual css::uno::Reference< css::accessibility::XAccessibleContext >
434 CreateAccessibleContext() override;
436 // css::form::XGridControl
437 virtual void SAL_CALL addGridControlListener( const css::uno::Reference< css::form::XGridControlListener >& _listener ) override;
438 virtual void SAL_CALL removeGridControlListener( const css::uno::Reference< css::form::XGridControlListener >& _listener ) override;
440 // css::form::XGrid (base of XGridControl)
441 virtual sal_Int16 SAL_CALL getCurrentColumnPosition() override;
442 virtual void SAL_CALL setCurrentColumnPosition(sal_Int16 nPos) override;
444 // css::form::XGridFieldDataSupplier (base of XGridControl)
445 virtual css::uno::Sequence< sal_Bool > SAL_CALL queryFieldDataType( const css::uno::Type& xType ) override;
446 virtual css::uno::Sequence< css::uno::Any > SAL_CALL queryFieldData( sal_Int32 nRow, const css::uno::Type& xType ) override;
448 // css::sdb::XRowSetSupplier
449 virtual css::uno::Reference< css::sdbc::XRowSet > SAL_CALL getRowSet() override;
450 virtual void SAL_CALL setRowSet(const css::uno::Reference< css::sdbc::XRowSet >& xDataSource) override;
452 // css::util::XModifyBroadcaster
453 virtual void SAL_CALL addModifyListener(const css::uno::Reference< css::util::XModifyListener >& l) override;
454 virtual void SAL_CALL removeModifyListener(const css::uno::Reference< css::util::XModifyListener >& l) override;
456 // UnoControl
457 virtual void SAL_CALL setDesignMode(sal_Bool bOn) override;
458 virtual sal_Bool SAL_CALL isDesignMode() override;
460 // css::view::XSelectionChangeListener
461 virtual void SAL_CALL selectionChanged(const css::lang::EventObject& aEvent) override;
463 void CellModified();
465 // PropertyListening
466 void updateGrid(const css::uno::Reference< css::sdbc::XRowSet >& _rDatabaseCursor);
467 void startCursorListening();
468 void stopCursorListening();
470 // css::util::XModeSelector
471 virtual void SAL_CALL setMode(const OUString& Mode) override;
472 virtual OUString SAL_CALL getMode() override;
473 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedModes() override;
474 virtual sal_Bool SAL_CALL supportsMode(const OUString& Mode) override;
476 // css::container::XContainer
477 virtual void SAL_CALL addContainerListener(const css::uno::Reference< css::container::XContainerListener >& l) override;
478 virtual void SAL_CALL removeContainerListener(const css::uno::Reference< css::container::XContainerListener >& l) override;
480 void columnVisible(DbGridColumn const * pColumn);
481 void columnHidden(DbGridColumn const * pColumn);
483 // css::awt::XView
484 virtual void SAL_CALL draw( sal_Int32 x, sal_Int32 y ) override;
486 // css::frame::XDispatchProvider
487 virtual css::uno::Reference< css::frame::XDispatch > SAL_CALL queryDispatch(const css::util::URL& aURL, const OUString& aTargetFrameName, sal_Int32 nSearchFlags) override;
488 virtual css::uno::Sequence< css::uno::Reference< css::frame::XDispatch > > SAL_CALL queryDispatches(const css::uno::Sequence< css::frame::DispatchDescriptor >& aDescripts) override;
490 // css::frame::XDispatchProviderInterception
491 virtual void SAL_CALL registerDispatchProviderInterceptor(const css::uno::Reference< css::frame::XDispatchProviderInterceptor >& xInterceptor) override;
492 virtual void SAL_CALL releaseDispatchProviderInterceptor(const css::uno::Reference< css::frame::XDispatchProviderInterceptor >& xInterceptor) override;
494 // css::frame::XStatusListener
495 virtual void SAL_CALL statusChanged(const css::frame::FeatureStateEvent& Event) override;
497 // css::form::XResetListener
498 virtual sal_Bool SAL_CALL approveReset(const css::lang::EventObject& rEvent) override;
499 virtual void SAL_CALL resetted(const css::lang::EventObject& rEvent) override;
501 // css::view::XSelectionSupplier
502 virtual sal_Bool SAL_CALL select( const css::uno::Any& aSelection ) override;
503 virtual css::uno::Any SAL_CALL getSelection( ) override;
504 virtual void SAL_CALL addSelectionChangeListener( const css::uno::Reference< css::view::XSelectionChangeListener >& xListener ) override;
505 virtual void SAL_CALL removeSelectionChangeListener( const css::uno::Reference< css::view::XSelectionChangeListener >& xListener ) override;
507 protected:
508 virtual VclPtr<FmGridControl> imp_CreateControl(vcl::Window* pParent, WinBits nStyle);
510 static css::uno::Sequence< css::util::URL>& getSupportedURLs();
511 static const std::vector<DbGridControlNavigationBarState>& getSupportedGridSlots();
512 void ConnectToDispatcher();
513 void DisConnectFromDispatcher();
514 void UpdateDispatches(); // will connect if not already connected and just update else
516 /** If a derived class wants to listen at some column properties, it doesn't have
517 to override all methods affecting columns (setColumns, elementInserted, elementRemoved ...)
518 Instead it may use addColumnListeners and removeColumnListeners which are called in all
519 the cases.
521 void addColumnListeners(const css::uno::Reference< css::beans::XPropertySet >& xCol);
522 void removeColumnListeners(const css::uno::Reference< css::beans::XPropertySet >& xCol);
524 void selectionChanged();
525 void columnChanged();
527 DECL_LINK(OnQueryGridSlotState, DbGridControlNavigationBarState, int);
528 DECL_LINK(OnExecuteGridSlot, DbGridControlNavigationBarState, bool);
532 #endif // _SVX_FMGRID_HXX
534 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */