LibreOffice Module svx (master)  1
Classes | Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Private Attributes | Friends | List of all members
FmXGridPeer Class Reference

#include <fmgridif.hxx>

Inheritance diagram for FmXGridPeer:
[legend]
Collaboration diagram for FmXGridPeer:
[legend]

Classes

class  GridListenerDelegator
 

Public Member Functions

 FmXGridPeer (const css::uno::Reference< css::uno::XComponentContext > &)
 
virtual ~FmXGridPeer () override
 
void Create (vcl::Window *pParent, WinBits nStyle)
 
virtual css::uno::Reference< css::container::XIndexContainer > SAL_CALL getColumns () override
 
virtual void SAL_CALL setColumns (const css::uno::Reference< css::container::XIndexContainer > &aColumns) override final
 
virtual void SAL_CALL dispose () override
 
virtual void SAL_CALL disposing (const css::lang::EventObject &Source) override
 
virtual void SAL_CALL addUpdateListener (const css::uno::Reference< css::form::XUpdateListener > &l) override
 
virtual void SAL_CALL removeUpdateListener (const css::uno::Reference< css::form::XUpdateListener > &l) override
 
virtual sal_Bool SAL_CALL commit () override
 
virtual css::uno::Type SAL_CALL getElementType () override
 
virtual sal_Bool SAL_CALL hasElements () override
 
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration () override
 
virtual sal_Int32 SAL_CALL getCount () override
 
virtual css::uno::Any SAL_CALL getByIndex (sal_Int32 _rIndex) override
 
virtual void SAL_CALL propertyChange (const css::beans::PropertyChangeEvent &evt) override
 
virtual void SAL_CALL loaded (const css::lang::EventObject &rEvent) override
 
virtual void SAL_CALL unloaded (const css::lang::EventObject &rEvent) override
 
virtual void SAL_CALL unloading (const css::lang::EventObject &aEvent) override
 
virtual void SAL_CALL reloading (const css::lang::EventObject &aEvent) override
 
virtual void SAL_CALL reloaded (const css::lang::EventObject &aEvent) override
 
virtual void SAL_CALL cursorMoved (const css::lang::EventObject &event) override
 
virtual void SAL_CALL rowChanged (const css::lang::EventObject &event) override
 
virtual void SAL_CALL rowSetChanged (const css::lang::EventObject &event) override
 
virtual void SAL_CALL elementInserted (const css::container::ContainerEvent &Event) override
 
virtual void SAL_CALL elementRemoved (const css::container::ContainerEvent &Event) override
 
virtual void SAL_CALL elementReplaced (const css::container::ContainerEvent &Event) override
 
virtual void SAL_CALL setProperty (const OUString &PropertyName, const css::uno::Any &Value) override
 
virtual css::uno::Any SAL_CALL getProperty (const OUString &PropertyName) override
 
virtual css::uno::Reference< css::accessibility::XAccessibleContext > CreateAccessibleContext () override
 
virtual void SAL_CALL addGridControlListener (const css::uno::Reference< css::form::XGridControlListener > &_listener) override
 
virtual void SAL_CALL removeGridControlListener (const css::uno::Reference< css::form::XGridControlListener > &_listener) override
 
virtual sal_Int16 SAL_CALL getCurrentColumnPosition () override
 
virtual void SAL_CALL setCurrentColumnPosition (sal_Int16 nPos) override
 
virtual css::uno::Sequence< sal_Bool > SAL_CALL queryFieldDataType (const css::uno::Type &xType) override
 
virtual css::uno::Sequence< css::uno::Any > SAL_CALL queryFieldData (sal_Int32 nRow, const css::uno::Type &xType) override
 
virtual css::uno::Reference< css::sdbc::XRowSet > SAL_CALL getRowSet () override
 
virtual void SAL_CALL setRowSet (const css::uno::Reference< css::sdbc::XRowSet > &xDataSource) override final
 
virtual void SAL_CALL addModifyListener (const css::uno::Reference< css::util::XModifyListener > &l) override
 
virtual void SAL_CALL removeModifyListener (const css::uno::Reference< css::util::XModifyListener > &l) override
 
virtual void SAL_CALL setDesignMode (sal_Bool bOn) override
 
virtual sal_Bool SAL_CALL isDesignMode () override
 
virtual void SAL_CALL selectionChanged (const css::lang::EventObject &aEvent) override
 
void CellModified ()
 
void updateGrid (const css::uno::Reference< css::sdbc::XRowSet > &_rDatabaseCursor)
 
void startCursorListening ()
 
void stopCursorListening ()
 
virtual void SAL_CALL setMode (const OUString &Mode) override
 
virtual OUString SAL_CALL getMode () override
 
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedModes () override
 
virtual sal_Bool SAL_CALL supportsMode (const OUString &Mode) override
 
virtual void SAL_CALL addContainerListener (const css::uno::Reference< css::container::XContainerListener > &l) override
 
virtual void SAL_CALL removeContainerListener (const css::uno::Reference< css::container::XContainerListener > &l) override
 
void columnVisible (DbGridColumn const *pColumn)
 
void columnHidden (DbGridColumn const *pColumn)
 
virtual void SAL_CALL draw (sal_Int32 x, sal_Int32 y) override
 
virtual css::uno::Reference< css::frame::XDispatch > SAL_CALL queryDispatch (const css::util::URL &aURL, const OUString &aTargetFrameName, sal_Int32 nSearchFlags) override
 
virtual css::uno::Sequence< css::uno::Reference< css::frame::XDispatch > > SAL_CALL queryDispatches (const css::uno::Sequence< css::frame::DispatchDescriptor > &aDescripts) override
 
virtual void SAL_CALL registerDispatchProviderInterceptor (const css::uno::Reference< css::frame::XDispatchProviderInterceptor > &xInterceptor) override
 
virtual void SAL_CALL releaseDispatchProviderInterceptor (const css::uno::Reference< css::frame::XDispatchProviderInterceptor > &xInterceptor) override
 
virtual void SAL_CALL statusChanged (const css::frame::FeatureStateEvent &Event) override
 
virtual sal_Bool SAL_CALL approveReset (const css::lang::EventObject &rEvent) override
 
virtual void SAL_CALL resetted (const css::lang::EventObject &rEvent) override
 
virtual sal_Bool SAL_CALL select (const css::uno::Any &aSelection) override
 
virtual css::uno::Any SAL_CALL getSelection () override
 
virtual void SAL_CALL addSelectionChangeListener (const css::uno::Reference< css::view::XSelectionChangeListener > &xListener) override
 
virtual void SAL_CALL removeSelectionChangeListener (const css::uno::Reference< css::view::XSelectionChangeListener > &xListener) override
 

Protected Member Functions

virtual VclPtr< FmGridControlimp_CreateControl (vcl::Window *pParent, WinBits nStyle)
 
void ConnectToDispatcher ()
 
void DisConnectFromDispatcher ()
 
void UpdateDispatches ()
 
void addColumnListeners (const css::uno::Reference< css::beans::XPropertySet > &xCol)
 If a derived class wants to listen at some column properties, it doesn't have to override all methods affecting columns (setColumns, elementInserted, elementRemoved ...) Instead it may use addColumnListeners and removeColumnListeners which are called in all the cases. More...
 
void removeColumnListeners (const css::uno::Reference< css::beans::XPropertySet > &xCol)
 
void selectionChanged ()
 
void columnChanged ()
 
 DECL_LINK (OnQueryGridSlotState, DbGridControlNavigationBarState, int)
 
 DECL_LINK (OnExecuteGridSlot, DbGridControlNavigationBarState, bool)
 

Static Protected Member Functions

static css::uno::Sequence< css::util::URL > & getSupportedURLs ()
 
static const std::vector< DbGridControlNavigationBarState > & getSupportedGridSlots ()
 

Protected Attributes

css::uno::Reference< css::uno::XComponentContext > m_xContext
 
::osl::Mutex m_aMutex
 

Private Attributes

css::uno::Reference< css::container::XIndexContainer > m_xColumns
 
css::uno::Reference< css::sdbc::XRowSet > m_xCursor
 
::comphelper::OInterfaceContainerHelper2 m_aModifyListeners
 
::comphelper::OInterfaceContainerHelper2 m_aUpdateListeners
 
::comphelper::OInterfaceContainerHelper2 m_aContainerListeners
 
::comphelper::OInterfaceContainerHelper2 m_aSelectionListeners
 
::comphelper::OInterfaceContainerHelper2 m_aGridControlListeners
 
OUString m_aMode
 
sal_Int32 m_nCursorListening
 
css::uno::Reference< css::frame::XDispatchProviderInterceptor > m_xFirstDispatchInterceptor
 
bool m_bInterceptingDispatch
 
std::unique_ptr< bool[]> m_pStateCache
 
std::unique_ptr< css::uno::Reference< css::frame::XDispatch >[]> m_pDispatchers
 
std::unique_ptr< GridListenerDelegatorm_pGridListener
 

Friends

class GridListenerDelegator
 

Detailed Description

Definition at line 319 of file fmgridif.hxx.

Constructor & Destructor Documentation

FmXGridPeer::FmXGridPeer ( const css::uno::Reference< css::uno::XComponentContext > &  )

Definition at line 1020 of file fmgridif.cxx.

References GridListenerDelegator, and m_pGridListener.

Referenced by FmXGridControl::imp_CreatePeer().

FmXGridPeer::~FmXGridPeer ( )
overridevirtual

Definition at line 1061 of file fmgridif.cxx.

References setColumns(), and setRowSet().

Member Function Documentation

void FmXGridPeer::addColumnListeners ( const css::uno::Reference< css::beans::XPropertySet > &  xCol)
protected

If a derived class wants to listen at some column properties, it doesn't have to override all methods affecting columns (setColumns, elementInserted, elementRemoved ...) Instead it may use addColumnListeners and removeColumnListeners which are called in all the cases.

Definition at line 1536 of file fmgridif.cxx.

References FM_PROP_ALIGN, FM_PROP_FORMATKEY, FM_PROP_HIDDEN, FM_PROP_LABEL, FM_PROP_WIDTH, i, Property, and SAL_N_ELEMENTS.

Referenced by elementInserted(), elementReplaced(), and setColumns().

void FmXGridPeer::addContainerListener ( const css::uno::Reference< css::container::XContainerListener > &  l)
overridevirtual
void SAL_CALL FmXGridPeer::addGridControlListener ( const css::uno::Reference< css::form::XGridControlListener > &  _listener)
overridevirtual
void FmXGridPeer::addModifyListener ( const css::uno::Reference< css::util::XModifyListener > &  l)
overridevirtual
void SAL_CALL FmXGridPeer::addSelectionChangeListener ( const css::uno::Reference< css::view::XSelectionChangeListener > &  xListener)
overridevirtual
void FmXGridPeer::addUpdateListener ( const css::uno::Reference< css::form::XUpdateListener > &  l)
overridevirtual
sal_Bool FmXGridPeer::approveReset ( const css::lang::EventObject &  rEvent)
overridevirtual

Definition at line 2516 of file fmgridif.cxx.

void FmXGridPeer::CellModified ( )
void FmXGridPeer::columnChanged ( )
protected
void FmXGridPeer::columnHidden ( DbGridColumn const *  pColumn)
void FmXGridPeer::columnVisible ( DbGridColumn const *  pColumn)
sal_Bool FmXGridPeer::commit ( )
overridevirtual
void FmXGridPeer::ConnectToDispatcher ( )
protected
void FmXGridPeer::Create ( vcl::Window pParent,
WinBits  nStyle 
)
Reference< XAccessibleContext > FmXGridPeer::CreateAccessibleContext ( )
overridevirtual
Reference< XEnumeration > FmXGridPeer::createEnumeration ( )
overridevirtual

Definition at line 2252 of file fmgridif.cxx.

void FmXGridPeer::cursorMoved ( const css::lang::EventObject &  event)
overridevirtual
FmXGridPeer::DECL_LINK ( OnQueryGridSlotState  ,
DbGridControlNavigationBarState  ,
int   
)
protected
FmXGridPeer::DECL_LINK ( OnExecuteGridSlot  ,
DbGridControlNavigationBarState  ,
bool   
)
protected
void FmXGridPeer::DisConnectFromDispatcher ( )
protected

Definition at line 2695 of file fmgridif.cxx.

References getSupportedURLs(), m_pDispatchers, and m_pStateCache.

Referenced by dispose(), and setDesignMode().

void FmXGridPeer::dispose ( void  )
overridevirtual
void FmXGridPeer::disposing ( const css::lang::EventObject &  Source)
overridevirtual
void FmXGridPeer::draw ( sal_Int32  x,
sal_Int32  y 
)
overridevirtual
void FmXGridPeer::elementInserted ( const css::container::ContainerEvent &  Event)
overridevirtual
void FmXGridPeer::elementRemoved ( const css::container::ContainerEvent &  Event)
overridevirtual
void FmXGridPeer::elementReplaced ( const css::container::ContainerEvent &  Event)
overridevirtual
Any FmXGridPeer::getByIndex ( sal_Int32  _rIndex)
overridevirtual
Reference< XIndexContainer > FmXGridPeer::getColumns ( )
overridevirtual

Definition at line 1530 of file fmgridif.cxx.

References m_xColumns.

Referenced by queryFieldDataType(), FmGridControl::Select(), and setProperty().

sal_Int32 FmXGridPeer::getCount ( )
overridevirtual

Definition at line 2259 of file fmgridif.cxx.

References DbGridControl::GetViewColCount().

Referenced by getByIndex(), and hasElements().

sal_Int16 FmXGridPeer::getCurrentColumnPosition ( )
overridevirtual
Type SAL_CALL FmXGridPeer::getElementType ( )
overridevirtual

Definition at line 2245 of file fmgridif.cxx.

References cppu::UnoType< class >::get().

OUString FmXGridPeer::getMode ( )
overridevirtual

Definition at line 2315 of file fmgridif.cxx.

References m_aMode.

Any FmXGridPeer::getProperty ( const OUString &  PropertyName)
overridevirtual
Reference< XRowSet > FmXGridPeer::getRowSet ( )
overridevirtual

Definition at line 2120 of file fmgridif.cxx.

References m_xCursor.

Any SAL_CALL FmXGridPeer::getSelection ( )
overridevirtual

Definition at line 2539 of file fmgridif.cxx.

References Any, FmGridControl::getSelectionBookmarks(), and makeAny().

const std::vector< DbGridControlNavigationBarState > & FmXGridPeer::getSupportedGridSlots ( )
staticprotected

Definition at line 2580 of file fmgridif.cxx.

References First, Last, New, Next, Prev, and Undo.

Referenced by statusChanged().

css::uno::Sequence< OUString > FmXGridPeer::getSupportedModes ( )
overridevirtual

Definition at line 2321 of file fmgridif.cxx.

Referenced by supportsMode().

Sequence< css::util::URL > & FmXGridPeer::getSupportedURLs ( )
staticprotected
sal_Bool FmXGridPeer::hasElements ( )
overridevirtual

Definition at line 2239 of file fmgridif.cxx.

References getCount().

VclPtr< FmGridControl > FmXGridPeer::imp_CreateControl ( vcl::Window pParent,
WinBits  nStyle 
)
protectedvirtual

Definition at line 1036 of file fmgridif.cxx.

References VclPtr< reference_type >::Create(), and m_xContext.

Referenced by Create().

sal_Bool FmXGridPeer::isDesignMode ( )
overridevirtual
void FmXGridPeer::loaded ( const css::lang::EventObject &  rEvent)
overridevirtual

Definition at line 1486 of file fmgridif.cxx.

References m_xCursor, and updateGrid().

void FmXGridPeer::propertyChange ( const css::beans::PropertyChangeEvent &  evt)
overridevirtual
Reference< css::frame::XDispatch > FmXGridPeer::queryDispatch ( const css::util::URL &  aURL,
const OUString &  aTargetFrameName,
sal_Int32  nSearchFlags 
)
overridevirtual

Definition at line 2381 of file fmgridif.cxx.

References m_bInterceptingDispatch, and m_xFirstDispatchInterceptor.

Referenced by ConnectToDispatcher(), and UpdateDispatches().

Sequence< Reference< css::frame::XDispatch > > FmXGridPeer::queryDispatches ( const css::uno::Sequence< css::frame::DispatchDescriptor > &  aDescripts)
overridevirtual

Definition at line 2400 of file fmgridif.cxx.

References m_xFirstDispatchInterceptor.

Sequence< Any > SAL_CALL FmXGridPeer::queryFieldData ( sal_Int32  nRow,
const css::uno::Type &  xType 
)
overridevirtual
Sequence< sal_Bool > SAL_CALL FmXGridPeer::queryFieldDataType ( const css::uno::Type &  xType)
overridevirtual
void FmXGridPeer::registerDispatchProviderInterceptor ( const css::uno::Reference< css::frame::XDispatchProviderInterceptor > &  xInterceptor)
overridevirtual

Definition at line 2410 of file fmgridif.cxx.

References isDesignMode(), m_xFirstDispatchInterceptor, and UpdateDispatches().

void FmXGridPeer::releaseDispatchProviderInterceptor ( const css::uno::Reference< css::frame::XDispatchProviderInterceptor > &  xInterceptor)
overridevirtual

Definition at line 2438 of file fmgridif.cxx.

References isDesignMode(), m_xFirstDispatchInterceptor, and UpdateDispatches().

void FmXGridPeer::reloaded ( const css::lang::EventObject &  aEvent)
overridevirtual

Definition at line 1512 of file fmgridif.cxx.

References i, m_xColumns, m_xCursor, and updateGrid().

void FmXGridPeer::reloading ( const css::lang::EventObject &  aEvent)
overridevirtual

Definition at line 1498 of file fmgridif.cxx.

References updateGrid().

void FmXGridPeer::removeColumnListeners ( const css::uno::Reference< css::beans::XPropertySet > &  xCol)
protected
void FmXGridPeer::removeContainerListener ( const css::uno::Reference< css::container::XContainerListener > &  l)
overridevirtual
void SAL_CALL FmXGridPeer::removeGridControlListener ( const css::uno::Reference< css::form::XGridControlListener > &  _listener)
overridevirtual
void FmXGridPeer::removeModifyListener ( const css::uno::Reference< css::util::XModifyListener > &  l)
overridevirtual
void SAL_CALL FmXGridPeer::removeSelectionChangeListener ( const css::uno::Reference< css::view::XSelectionChangeListener > &  xListener)
overridevirtual
void FmXGridPeer::removeUpdateListener ( const css::uno::Reference< css::form::XUpdateListener > &  l)
overridevirtual
void FmXGridPeer::resetted ( const css::lang::EventObject &  rEvent)
overridevirtual
void FmXGridPeer::rowChanged ( const css::lang::EventObject &  event)
overridevirtual
void FmXGridPeer::rowSetChanged ( const css::lang::EventObject &  event)
overridevirtual

Definition at line 1478 of file fmgridif.cxx.

sal_Bool SAL_CALL FmXGridPeer::select ( const css::uno::Any &  aSelection)
overridevirtual

Definition at line 2522 of file fmgridif.cxx.

virtual void SAL_CALL FmXGridPeer::selectionChanged ( const css::lang::EventObject &  aEvent)
overridevirtual
void FmXGridPeer::selectionChanged ( )
protected
void FmXGridPeer::setColumns ( const css::uno::Reference< css::container::XIndexContainer > &  aColumns)
finaloverridevirtual
void FmXGridPeer::setCurrentColumnPosition ( sal_Int16  nPos)
overridevirtual
void FmXGridPeer::setDesignMode ( sal_Bool  bOn)
overridevirtual
void FmXGridPeer::setMode ( const OUString &  Mode)
overridevirtual
void FmXGridPeer::setProperty ( const OUString &  PropertyName,
const css::uno::Any &  Value 
)
overridevirtual
void FmXGridPeer::setRowSet ( const css::uno::Reference< css::sdbc::XRowSet > &  xDataSource)
finaloverridevirtual
void FmXGridPeer::startCursorListening ( )
void FmXGridPeer::statusChanged ( const css::frame::FeatureStateEvent &  Event)
overridevirtual
void FmXGridPeer::stopCursorListening ( )
sal_Bool FmXGridPeer::supportsMode ( const OUString &  Mode)
overridevirtual

Definition at line 2332 of file fmgridif.cxx.

References comphelper::findValue(), and getSupportedModes().

Referenced by setMode().

void FmXGridPeer::unloaded ( const css::lang::EventObject &  rEvent)
overridevirtual

Definition at line 1492 of file fmgridif.cxx.

References updateGrid().

void FmXGridPeer::unloading ( const css::lang::EventObject &  aEvent)
overridevirtual

Definition at line 1505 of file fmgridif.cxx.

References updateGrid().

void FmXGridPeer::UpdateDispatches ( )
protected
void FmXGridPeer::updateGrid ( const css::uno::Reference< css::sdbc::XRowSet > &  _rDatabaseCursor)

Definition at line 2112 of file fmgridif.cxx.

References DbGridControl::setDataSource().

Referenced by loaded(), reloaded(), reloading(), unloaded(), and unloading().

Friends And Related Function Documentation

friend class GridListenerDelegator
friend

Definition at line 369 of file fmgridif.hxx.

Referenced by FmXGridPeer().

Member Data Documentation

::comphelper::OInterfaceContainerHelper2 FmXGridPeer::m_aContainerListeners
private
::comphelper::OInterfaceContainerHelper2 FmXGridPeer::m_aGridControlListeners
private

Definition at line 349 of file fmgridif.hxx.

Referenced by addGridControlListener(), columnChanged(), and removeGridControlListener().

OUString FmXGridPeer::m_aMode
private

Definition at line 355 of file fmgridif.hxx.

Referenced by getMode(), and setMode().

::comphelper::OInterfaceContainerHelper2 FmXGridPeer::m_aModifyListeners
private

Definition at line 349 of file fmgridif.hxx.

Referenced by addModifyListener(), CellModified(), dispose(), and removeModifyListener().

::osl::Mutex FmXGridPeer::m_aMutex
protected

Definition at line 344 of file fmgridif.hxx.

::comphelper::OInterfaceContainerHelper2 FmXGridPeer::m_aSelectionListeners
private
::comphelper::OInterfaceContainerHelper2 FmXGridPeer::m_aUpdateListeners
private

Definition at line 349 of file fmgridif.hxx.

Referenced by addUpdateListener(), commit(), dispose(), and removeUpdateListener().

bool FmXGridPeer::m_bInterceptingDispatch
private

Definition at line 360 of file fmgridif.hxx.

Referenced by queryDispatch().

sal_Int32 FmXGridPeer::m_nCursorListening
private

Definition at line 356 of file fmgridif.hxx.

Referenced by startCursorListening(), and stopCursorListening().

std::unique_ptr<css::uno::Reference< css::frame::XDispatch >[]> FmXGridPeer::m_pDispatchers
private
std::unique_ptr<GridListenerDelegator> FmXGridPeer::m_pGridListener
private

Definition at line 371 of file fmgridif.hxx.

Referenced by Create(), and FmXGridPeer().

std::unique_ptr<bool[]> FmXGridPeer::m_pStateCache
private
css::uno::Reference< css::container::XIndexContainer > FmXGridPeer::m_xColumns
private
css::uno::Reference< css::uno::XComponentContext > FmXGridPeer::m_xContext
protected

Definition at line 343 of file fmgridif.hxx.

Referenced by elementInserted(), and imp_CreateControl().

css::uno::Reference< css::sdbc::XRowSet > FmXGridPeer::m_xCursor
private
css::uno::Reference< css::frame::XDispatchProviderInterceptor > FmXGridPeer::m_xFirstDispatchInterceptor
private

The documentation for this class was generated from the following files: