19#ifndef INCLUDED_SVX_FMGRIDIF_HXX
20#define INCLUDED_SVX_FMGRIDIF_HXX
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>
77 ,
public css::util::XModifyListener
82 virtual css::uno::Any SAL_CALL
queryInterface(
const css::uno::Type& _rType)
override;
85 virtual void SAL_CALL disposing(
const css::lang::EventObject&
Source)
override;
88 virtual void SAL_CALL modified(
const css::lang::EventObject&
Source)
override;
91 using OWeakSubObject::operator
new;
92 using OWeakSubObject::operator
delete;
100 public css::form::XUpdateListener
106 virtual css::uno::Any SAL_CALL
queryInterface(
const css::uno::Type& _rType)
override;
109 virtual void SAL_CALL disposing(
const css::lang::EventObject&
Source)
override;
112 virtual sal_Bool SAL_CALL approveUpdate(
const css::lang::EventObject &)
override;
113 virtual void SAL_CALL updated(
const css::lang::EventObject &)
override;
116 using OWeakSubObject::operator
new;
117 using OWeakSubObject::operator
delete;
125 ,
public css::view::XSelectionChangeListener
131 virtual css::uno::Any SAL_CALL
queryInterface(
const css::uno::Type& _rType)
override;
134 virtual void SAL_CALL disposing(
const css::lang::EventObject&
Source)
override;
140 using OWeakSubObject::operator
new;
141 using OWeakSubObject::operator
delete;
149 ,
public css::form::XGridControlListener
155 virtual css::uno::Any SAL_CALL
queryInterface(
const css::uno::Type& _rType)
override;
158 virtual void SAL_CALL disposing(
const css::lang::EventObject&
Source)
override;
161 virtual void SAL_CALL columnChanged(
const css::lang::EventObject& _event )
override;
164 using OWeakSubObject::operator
new;
165 using OWeakSubObject::operator
delete;
173 public css::container::XContainerListener
178 virtual css::uno::Any SAL_CALL
queryInterface(
const css::uno::Type& _rType)
override;
181 virtual void SAL_CALL disposing(
const css::lang::EventObject&
Source)
override;
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;
189 using OWeakSubObject::operator
new;
190 using OWeakSubObject::operator
delete;
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
221 css::uno::Reference< css::uno::XComponentContext >
m_xContext;
224 FmXGridControl(
const css::uno::Reference< css::uno::XComponentContext >&);
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;
236 virtual void SAL_CALL
dispose()
override;
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;
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;
257 virtual css::uno::Type SAL_CALL getElementType( )
override;
258 virtual sal_Bool SAL_CALL hasElements( )
override;
261 virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration()
override;
264 virtual sal_Int32 SAL_CALL getCount()
override;
265 virtual css::uno::Any SAL_CALL getByIndex(sal_Int32 _rIndex)
override;
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;
272 virtual sal_Int16 SAL_CALL getCurrentColumnPosition()
override;
273 virtual void SAL_CALL setCurrentColumnPosition(sal_Int16 nPos)
override;
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;
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;
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;
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;
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;
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;
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;
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;
375 FmXGridPeer(
const css::uno::Reference< css::uno::XComponentContext >&);
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;
386 virtual void SAL_CALL
dispose()
override;
389 virtual void SAL_CALL disposing(
const css::lang::EventObject& Source)
override;
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;
397 virtual css::uno::Type SAL_CALL getElementType( )
override;
398 virtual sal_Bool SAL_CALL hasElements( )
override;
401 virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration()
override;
404 virtual sal_Int32 SAL_CALL getCount()
override;
405 virtual css::uno::Any SAL_CALL getByIndex(sal_Int32 _rIndex)
override;
408 virtual void SAL_CALL propertyChange(
const css::beans::PropertyChangeEvent& evt)
override;
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;
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;
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;
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;
438 virtual sal_Int16 SAL_CALL getCurrentColumnPosition()
override;
439 virtual void SAL_CALL setCurrentColumnPosition(sal_Int16 nPos)
override;
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;
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;
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;
463 void updateGrid(
const css::uno::Reference< css::sdbc::XRowSet >& _rDatabaseCursor);
464 void startCursorListening();
465 void stopCursorListening();
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;
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;
481 virtual void SAL_CALL draw( sal_Int32 x, sal_Int32 y )
override;
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;
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;
492 virtual void SAL_CALL statusChanged(
const css::frame::FeatureStateEvent& Event)
override;
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;
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;
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();
518 void addColumnListeners(
const css::uno::Reference< css::beans::XPropertySet >& xCol);
519 void removeColumnListeners(
const css::uno::Reference< css::beans::XPropertySet >& xCol);
522 void columnChanged();
FmXSelectionMultiplexer m_aSelectionListeners
css::uno::Reference< css::uno::XComponentContext > m_xContext
FmXUpdateMultiplexer m_aUpdateListeners
FmXModifyMultiplexer m_aModifyListeners
FmXContainerMultiplexer m_aContainerListeners
FmXGridControlMultiplexer m_aGridControlListeners
std::unique_ptr< GridListenerDelegator > m_pGridListener
css::uno::Reference< css::uno::XComponentContext > m_xContext
virtual void SAL_CALL selectionChanged(const css::lang::EventObject &aEvent) override
css::uno::Reference< css::frame::XDispatchProviderInterceptor > m_xFirstDispatchInterceptor
css::uno::Reference< css::sdbc::XRowSet > m_xCursor
sal_Int32 m_nCursorListening
std::unique_ptr< bool[]> m_pStateCache
::comphelper::OInterfaceContainerHelper4< css::form::XUpdateListener > m_aUpdateListeners
::comphelper::OInterfaceContainerHelper4< css::util::XModifyListener > m_aModifyListeners
std::unique_ptr< css::uno::Reference< css::frame::XDispatch >[]> m_pDispatchers
bool m_bInterceptingDispatch
DECL_DLLPRIVATE_LINK(OnQueryGridSlotState, DbGridControlNavigationBarState, int)
css::uno::Reference< css::container::XIndexContainer > m_xColumns
::comphelper::OInterfaceContainerHelper4< css::view::XSelectionChangeListener > m_aSelectionListeners
DECL_DLLPRIVATE_LINK(OnExecuteGridSlot, DbGridControlNavigationBarState, bool)
::comphelper::OInterfaceContainerHelper4< css::form::XGridControlListener > m_aGridControlListeners
::comphelper::OInterfaceContainerHelper4< css::container::XContainerListener > m_aContainerListeners
OWeakSubObject(::cppu::OWeakObject &rParent)
virtual void SAL_CALL release() noexcept override
virtual void SAL_CALL acquire() noexcept override
::cppu::OWeakObject & m_rParent
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) SAL_OVERRIDE
::cppu::ImplHelper10< css::form::XBoundComponent, css::form::XGridControl, css::util::XModifyBroadcaster, css::container::XIndexAccess, css::container::XEnumerationAccess, css::util::XModeSelector, css::container::XContainer, css::frame::XDispatchProvider, css::frame::XDispatchProviderInterception, css::view::XSelectionSupplier > FmXGridControl_BASE
DbGridControlNavigationBarState
virtual DECL_LISTENERMULTIPLEXER_END void SAL_CALL selectionChanged(const css::lang::EventObject &aEvent) override
void SAL_CALL elementReplaced(const css::container::ContainerEvent &Event) override
void SAL_CALL elementRemoved(const css::container::ContainerEvent &Event) override
DECL_LISTENERMULTIPLEXER_END void SAL_CALL elementInserted(const css::container::ContainerEvent &Event) override
class SAL_NO_VTABLE XPropertySet
css::uno::Sequence< OUString > getSupportedServiceNames()
OUString getImplementationName()
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
#define SVXCORE_DLLPUBLIC
#define DECLARE_UNO3_AGG_DEFAULTS(classname, baseclass)
#define DECLARE_UNO3_DEFAULTS(classname, baseclass)