LibreOffice Module dbaccess (master) 1
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
dbaui::SbaGridControl Class Referencefinal

#include <sbagrid.hxx>

Inheritance diagram for dbaui::SbaGridControl:
[legend]
Collaboration diagram for dbaui::SbaGridControl:
[legend]

Public Member Functions

 SbaGridControl (css::uno::Reference< css::uno::XComponentContext > const &_rM, Window *pParent, FmXGridPeer *_pPeer, WinBits nBits)
 
virtual ~SbaGridControl () override
 
virtual void dispose () override
 
virtual void Select () override
 
void SetMasterListener (SbaGridListener *pListener)
 
virtual void ActivateCell (sal_Int32 nRow, sal_uInt16 nCol, bool bSetCellFocus=true) override
 
virtual void DeactivateCell (bool bUpdate=true) override
 
bool IsAllSelected () const
 
HeaderBarGetHeaderBar () const
 
virtual OUString GetAccessibleObjectDescription (AccessibleBrowseBoxObjType eObjType, sal_Int32 _nPosition=-1) const override
 return the description of the specified object. More...
 
void CopySelectedRowsToClipboard ()
 copies the currently selected rows to the clipboard @precond at least one row is selected More...
 
virtual void DeleteSelectedRows () override
 
- Public Member Functions inherited from FmGridControl
 FmGridControl (const css::uno::Reference< css::uno::XComponentContext > &, vcl::Window *pParent, FmXGridPeer *_pPeer, WinBits nBits)
 
virtual void KeyInput (const KeyEvent &rKEvt) override
 
void propertyChange (const css::beans::PropertyChangeEvent &evt)
 
void positioned ()
 
bool commit ()
 
void inserted ()
 
void markColumn (sal_uInt16 nId)
 
bool isColumnMarked (sal_uInt16 nId) const
 
sal_Int32 GetSelectedColumn () const
 
virtual OUString GetAccessibleObjectName (AccessibleBrowseBoxObjType eObjType, sal_Int32 _nPosition=-1) const override
 
virtual OUString GetAccessibleObjectDescription (AccessibleBrowseBoxObjType eObjType, sal_Int32 _nPosition=-1) const override
 
- Public Member Functions inherited from DbGridControl
 DbGridControl (css::uno::Reference< css::uno::XComponentContext > const &_rxContext, vcl::Window *pParent, WinBits nBits)
 
virtual ~DbGridControl () override
 
virtual void dispose () override
 
virtual void Init () override
 
virtual void InitColumnsByFields (const css::uno::Reference< css::container::XIndexAccess > &xFields)=0
 
virtual void RemoveRows () override
 
virtual OUString GetCellText (sal_Int32 _nRow, sal_uInt16 _nColId) const override
 
void RemoveRows (bool bNewCursor)
 
const css::uno::Reference< css::util::XNumberFormatter > & getNumberFormatter () const
 
void setDataSource (const css::uno::Reference< css::sdbc::XRowSet > &rCursor, DbGridControlOptions nOpts=DbGridControlOptions::Insert|DbGridControlOptions::Update|DbGridControlOptions::Delete)
 
virtual void Dispatch (sal_uInt16 nId) override
 
CursorWrappergetDataSource () const
 
const std::vector< std::unique_ptr< DbGridColumn > > & GetColumns () const
 
void EnableHandle (bool bEnable)
 
bool HasHandle () const
 
void InsertHandleColumn ()
 
sal_uInt16 GetViewColumnPos (sal_uInt16 nId) const
 
sal_uInt16 GetModelColumnPos (sal_uInt16 nId) const
 
sal_uInt16 GetViewColCount () const
 
sal_uInt16 GetModelColCount () const
 
sal_uInt16 GetColumnIdFromViewPos (sal_uInt16 nPos) const
 
sal_uInt16 GetColumnIdFromModelPos (sal_uInt16 nPos) const
 
virtual void SetDesignMode (bool bMode)
 
bool IsDesignMode () const
 
bool IsOpen () const
 
void SetFilterMode (bool bMode)
 
bool IsFilterMode () const
 
bool IsFilterRow (sal_Int32 nRow) const
 
void EnableNavigationBar (bool bEnable)
 
bool HasNavigationBar () const
 
DbGridControlOptions GetOptions () const
 
NavigationBarGetNavigationBar ()
 
DbGridControlOptions SetOptions (DbGridControlOptions nOpt)
 
const css::util::Date & getNullDate () const
 
void MoveToPosition (sal_uInt32 nPos)
 
void MoveToFirst ()
 
void MoveToNext ()
 
void MoveToPrev ()
 
void MoveToLast ()
 
void AppendNew ()
 
void AdjustDataSource (bool bFull=false)
 
void Undo ()
 
virtual void BeginCursorAction ()
 
virtual void EndCursorAction ()
 
bool IsUpdating () const
 
void RowRemoved (sal_Int32 nRow, sal_Int32 nNumRows=1, bool bDoPaint=true)
 
void RowInserted (sal_Int32 nRow, sal_Int32 nNumRows=1, bool bDoPaint=true)
 
void RowModified (sal_Int32 nRow)
 
void resetCurrentRow ()
 
bool getDisplaySynchron () const
 
void setDisplaySynchron (bool bSync)
 
const DbGridRowRefGetCurrentRow () const
 
void SetStateProvider (const Link< DbGridControlNavigationBarState, int > &rProvider)
 
void SetSlotExecutor (const Link< DbGridControlNavigationBarState, bool > &rExecutor)
 
void EnablePermanentCursor (bool bEnable)
 
bool IsPermanentCursorEnabled () const
 
void ForceHideScrollbars ()
 
const css::uno::Reference< css::uno::XComponentContext > & getContext () const
 
bool canCopyCellText (sal_Int32 _nRow, sal_uInt16 _nColId)
 
void copyCellText (sal_Int32 _nRow, sal_uInt16 _nColId)
 
void setGridListener (FmGridListener *_pListener)
 
void refreshController (sal_uInt16 _nColId, GrantControlAccess _aAccess)
 
CursorWrapperGetSeekCursor (GrantControlAccess) const
 
const DbGridRowRefGetSeekRow (GrantControlAccess) const
 
void SetSeekPos (sal_Int32 nPos, GrantControlAccess)
 
virtual sal_Int32 GetAccessibleControlCount () const override
 
virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessibleControl (sal_Int32 _nIndex) override
 
virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessibleCell (sal_Int32 nRow, sal_uInt16 nColumnId) override
 

Private Member Functions

virtual void StartDrag (sal_Int8 _nAction, const Point &_rPosPixel) override
 
virtual sal_Int8 AcceptDrop (const BrowserAcceptDropEvent &rEvt) override
 
virtual sal_Int8 ExecuteDrop (const BrowserExecuteDropEvent &rEvt) override
 
virtual void MouseButtonDown (const BrowserMouseEvent &rMEvt) override
 
virtual VclPtr< BrowserHeaderimp_CreateHeaderBar (BrowseBox *pParent) override
 
virtual ::svt::CellControllerGetController (sal_Int32 nRow, sal_uInt16 nCol) override
 
virtual void PreExecuteRowContextMenu (weld::Menu &rMenu) override
 
virtual void PostExecuteRowContextMenu (const OUString &rExecutionResult) override
 
virtual void onRowChange () override
 
virtual void onColumnChange () override
 
css::uno::Reference< css::beans::XPropertySetgetField (sal_uInt16 nModelPos)
 
css::uno::Reference< css::beans::XPropertySetgetDataSource () const
 
void DoColumnDrag (sal_uInt16 nColumnPos)
 
void DoFieldDrag (sal_uInt16 nColumnPos, sal_Int16 nRowPos)
 
void SetBrowserAttrs ()
 
void SetColWidth (sal_uInt16 nColId)
 
void SetRowHeight ()
 
void SetColAttrs (sal_uInt16 nColId)
 
SvNumberFormatterGetDatasourceFormatter ()
 
 DECL_LINK (AsynchDropEvent, void *, void)
 
bool IsReadOnlyDB () const
 
void implTransferSelectedRows (sal_Int16 nRowPos, bool _bTrueIfClipboardFalseIfDrag)
 

Private Attributes

svx::ODataAccessDescriptor m_aDataDescriptor
 
SbaGridListenerm_pMasterListener
 
ImplSVEventm_nAsyncDropEvent
 
bool m_bActivatingForDrop
 

Friends

class SbaGridHeader
 
class SbaXGridPeer
 

Additional Inherited Members

- Protected Member Functions inherited from FmGridControl
virtual void Command (const CommandEvent &rEvt) override
 
virtual VclPtr< BrowserHeaderimp_CreateHeaderBar (BrowseBox *pParent) override
 
virtual tools::Long QueryMinimumRowHeight () override
 
virtual void RowHeightChanged () override
 
virtual void ColumnResized (sal_uInt16 nId) override
 
virtual void ColumnMoved (sal_uInt16 nId) override
 
virtual void DeleteSelectedRows () override
 
virtual void SetDesignMode (bool bMode) override
 
virtual void CellModified () override
 
virtual void HideColumn (sal_uInt16 nId) override
 
virtual void ShowColumn (sal_uInt16 nId) override
 
bool IsInColumnMove () const
 
virtual void BeginCursorAction () override
 
virtual void EndCursorAction () override
 
virtual void Select () override
 
void InitColumnsByModels (const css::uno::Reference< css::container::XIndexContainer > &xColumns)
 
virtual void InitColumnsByFields (const css::uno::Reference< css::container::XIndexAccess > &xFields) override
 
FmXGridPeerGetPeer () const
 
css::uno::Sequence< css::uno::Any > getSelectionBookmarks ()
 
bool selectBookmarks (const css::uno::Sequence< css::uno::Any > &_rBookmarks)
 
bool isColumnSelected (DbGridColumn const *_pColumn) const
 
- Protected Member Functions inherited from DbGridControl
virtual bool SeekRow (sal_Int32 nRow) override
 
virtual void VisibleRowsChanged (sal_Int32 nNewTopRow, sal_uInt16 nNumRows) override
 
virtual void PaintCell (OutputDevice &rDev, const tools::Rectangle &rRect, sal_uInt16 nColId) const override
 
virtual RowStatus GetRowStatus (sal_Int32 nRow) const override
 
virtual bool CursorMoving (sal_Int32 nNewRow, sal_uInt16 nNewCol) override
 
virtual void CursorMoved () override
 
virtual void ArrangeControls (sal_uInt16 &nX, sal_uInt16 nY) override
 
virtual sal_uInt32 GetTotalCellWidth (sal_Int32 nRow, sal_uInt16 nColId) override
 
virtual void Command (const CommandEvent &rEvt) override
 
virtual bool PreNotify (NotifyEvent &rEvt) override
 
virtual void KeyInput (const KeyEvent &rEvt) override
 
virtual void StateChanged (StateChangedType nType) override
 
virtual void DataChanged (const DataChangedEvent &rDCEvt) override
 
virtual void Select () override
 
virtual ::svt::CellControllerGetController (sal_Int32 nRow, sal_uInt16 nCol) override
 
virtual void CellModified () override
 
virtual bool SaveModified () override
 
virtual bool IsModified () const override
 
virtual sal_uInt16 AppendColumn (const OUString &rName, sal_uInt16 nWidth, sal_uInt16 nPos=HEADERBAR_APPEND, sal_uInt16 nId=sal_uInt16(-1)) override
 
void RemoveColumn (sal_uInt16 nId)
 
std::unique_ptr< DbGridColumnCreateColumn (sal_uInt16 nId)
 
virtual void ColumnMoved (sal_uInt16 nId) override
 
virtual bool SaveRow () override
 
virtual bool IsTabAllowed (bool bForward) const override
 
virtual void HideColumn (sal_uInt16 nId)
 
virtual void ShowColumn (sal_uInt16 nId)
 
virtual void PreExecuteRowContextMenu (weld::Menu &rMenu)
 
virtual void PostExecuteRowContextMenu (const OUString &rExecutionResult)
 
void DataSourcePropertyChanged (const css::beans::PropertyChangeEvent &evt)
 
void FieldValueChanged (sal_uInt16 _nId)
 
void FieldListenerDisposing (sal_uInt16 _nId)
 
void disposing (sal_uInt16 _nId)
 
virtual void onRowChange ()
 
virtual void onColumnChange ()
 
virtual void StartDrag (sal_Int8 nAction, const Point &rPosPixel) override
 
void executeRowContextMenu (const Point &_rPreferredPos)
 
void RecalcRows (sal_Int32 nNewTopRow, sal_uInt16 nLinesOnScreen, bool bUpdateCursor)
 
bool SeekCursor (sal_Int32 nRow, bool bAbsolute=false)
 
void RemoveColumns ()
 
void AdjustRows ()
 
sal_Int32 AlignSeekCursor ()
 
bool SetCurrent (sal_Int32 nNewRow)
 
OUString GetCurrentRowCellText (DbGridColumn const *pCol, const DbGridRowRef &_rRow) const
 
virtual void DeleteSelectedRows ()
 
bool IsCurrentAppending () const
 
bool IsInsertionRow (sal_Int32 nRow) const
 
void SetSeekPos (sal_Int32 nPos)
 
sal_Int32 GetCurrentPos () const
 
sal_Int32 GetSeekPos () const
 
sal_Int32 GetTotalCount () const
 
const DbGridRowRefGetEmptyRow () const
 
const DbGridRowRefGetSeekRow () const
 
const DbGridRowRefGetPaintRow () const
 
void ConnectToFields ()
 
void DisconnectFromFields ()
 
void implAdjustInSolarThread (bool _bRows)
 
void ImplInitWindow (const InitWindowFacet _eInitWhat)
 
 DECL_DLLPRIVATE_LINK (OnDelete, void *, void)
 
 DECL_DLLPRIVATE_LINK (OnAsyncAdjust, void *, void)
 
- Static Protected Member Functions inherited from FmGridControl
static void InitColumnByField (DbGridColumn *_pColumn, const css::uno::Reference< css::beans::XPropertySet > &_rxColumnModel, const css::uno::Reference< css::container::XNameAccess > &_rxFieldsByNames, const css::uno::Reference< css::container::XIndexAccess > &_rxFieldsByIndex)
 
- Static Protected Member Functions inherited from DbGridControl
static bool IsValid (const DbGridRowRef &_xRow)
 
- Protected Attributes inherited from DbGridControl
std::unique_ptr< CursorWrapperm_pDataCursor
 
std::unique_ptr< CursorWrapperm_pSeekCursor
 
bool m_bUpdating
 

Detailed Description

Definition at line 195 of file sbagrid.hxx.

Constructor & Destructor Documentation

◆ SbaGridControl()

SbaGridControl::SbaGridControl ( css::uno::Reference< css::uno::XComponentContext > const &  _rM,
Window pParent,
FmXGridPeer _pPeer,
WinBits  nBits 
)

Definition at line 607 of file sbagrid.cxx.

◆ ~SbaGridControl()

SbaGridControl::~SbaGridControl ( )
overridevirtual

Definition at line 616 of file sbagrid.cxx.

Member Function Documentation

◆ AcceptDrop()

sal_Int8 SbaGridControl::AcceptDrop ( const BrowserAcceptDropEvent rEvt)
overrideprivatevirtual

◆ ActivateCell()

void SbaGridControl::ActivateCell ( sal_Int32  nRow,
sal_uInt16  nCol,
bool  bSetCellFocus = true 
)
overridevirtual

Definition at line 814 of file sbagrid.cxx.

References dbaui::SbaGridListener::CellActivated(), and m_pMasterListener.

Referenced by ExecuteDrop().

◆ CopySelectedRowsToClipboard()

void SbaGridControl::CopySelectedRowsToClipboard ( )

copies the currently selected rows to the clipboard @precond at least one row is selected

Definition at line 1043 of file sbagrid.cxx.

References implTransferSelectedRows().

Referenced by dbaui::SbaXDataBrowserController::Execute(), and PostExecuteRowContextMenu().

◆ DeactivateCell()

void SbaGridControl::DeactivateCell ( bool  bUpdate = true)
overridevirtual

◆ DECL_LINK()

dbaui::SbaGridControl::DECL_LINK ( AsynchDropEvent  ,
void *  ,
void   
)
private

◆ DeleteSelectedRows()

virtual void FmGridControl::DeleteSelectedRows ( )
virtual

Reimplemented from FmGridControl.

Referenced by dbaui::SbaXDataBrowserController::Execute().

◆ dispose()

void SbaGridControl::dispose ( void  )
overridevirtual

Reimplemented from DbGridControl.

Definition at line 621 of file sbagrid.cxx.

References DbGridControl::dispose(), m_nAsyncDropEvent, and Application::RemoveUserEvent().

◆ DoColumnDrag()

void SbaGridControl::DoColumnDrag ( sal_uInt16  nColumnPos)
private

◆ DoFieldDrag()

void SbaGridControl::DoFieldDrag ( sal_uInt16  nColumnPos,
sal_Int16  nRowPos 
)
private

◆ ExecuteDrop()

sal_Int8 SbaGridControl::ExecuteDrop ( const BrowserExecuteDropEvent rEvt)
overrideprivatevirtual

◆ GetAccessibleObjectDescription()

OUString SbaGridControl::GetAccessibleObjectDescription ( AccessibleBrowseBoxObjType  eObjType,
sal_Int32  _nPosition = -1 
) const
overridevirtual

return the description of the specified object.

Parameters
eObjTypeThe type to ask for
_nPositionThe position of a tablecell (index position), header bar column/row cell
Returns
The description of the specified object.

Reimplemented from FmGridControl.

Definition at line 1354 of file sbagrid.cxx.

References DBA_RES, and FmGridControl::GetAccessibleObjectDescription().

◆ GetController()

CellController * SbaGridControl::GetController ( sal_Int32  nRow,
sal_uInt16  nCol 
)
overrideprivate

Definition at line 634 of file sbagrid.cxx.

References DbGridControl::GetController(), and m_bActivatingForDrop.

◆ getDataSource()

Reference< XPropertySet > SbaGridControl::getDataSource ( ) const
private

◆ GetDatasourceFormatter()

SvNumberFormatter * SbaGridControl::GetDatasourceFormatter ( )
private

◆ getField()

Reference< XPropertySet > SbaGridControl::getField ( sal_uInt16  nModelPos)
private

◆ GetHeaderBar()

HeaderBar * dbaui::SbaGridControl::GetHeaderBar ( ) const
inline

Definition at line 223 of file sbagrid.hxx.

Referenced by dbaui::SbaTableQueryBrowser::Construct().

◆ imp_CreateHeaderBar()

VclPtr< BrowserHeader > SbaGridControl::imp_CreateHeaderBar ( BrowseBox pParent)
overrideprivatevirtual

Reimplemented from FmGridControl.

Definition at line 629 of file sbagrid.cxx.

References VclPtr< class reference_type >::Create().

◆ implTransferSelectedRows()

void SbaGridControl::implTransferSelectedRows ( sal_Int16  nRowPos,
bool  _bTrueIfClipboardFalseIfDrag 
)
private

◆ IsAllSelected()

bool dbaui::SbaGridControl::IsAllSelected ( ) const
inline

Definition at line 221 of file sbagrid.hxx.

Referenced by dbaui::SbaTableQueryBrowser::Execute(), and implTransferSelectedRows().

◆ IsReadOnlyDB()

bool SbaGridControl::IsReadOnlyDB ( ) const
private

◆ MouseButtonDown()

void SbaGridControl::MouseButtonDown ( const BrowserMouseEvent rMEvt)
overrideprivatevirtual

Definition at line 899 of file sbagrid.cxx.

References BROWSER_INVALIDID, and vcl::Window::MouseButtonDown().

◆ onColumnChange()

void SbaGridControl::onColumnChange ( )
overrideprivatevirtual

Reimplemented from DbGridControl.

Definition at line 834 of file sbagrid.cxx.

References dbaui::SbaGridListener::ColumnChanged(), and m_pMasterListener.

◆ onRowChange()

void SbaGridControl::onRowChange ( )
overrideprivatevirtual

Reimplemented from DbGridControl.

Definition at line 828 of file sbagrid.cxx.

References m_pMasterListener, and dbaui::SbaGridListener::RowChanged().

◆ PostExecuteRowContextMenu()

void SbaGridControl::PostExecuteRowContextMenu ( const OUString &  rExecutionResult)
overrideprivatevirtual

◆ PreExecuteRowContextMenu()

void SbaGridControl::PreExecuteRowContextMenu ( weld::Menu rMenu)
overrideprivatevirtual

◆ Select()

void SbaGridControl::Select ( )
overridevirtual

Reimplemented from FmGridControl.

Definition at line 805 of file sbagrid.cxx.

References m_pMasterListener, FmGridControl::Select(), and dbaui::SbaGridListener::SelectionChanged().

◆ SetBrowserAttrs()

void SbaGridControl::SetBrowserAttrs ( )
private

◆ SetColAttrs()

void SbaGridControl::SetColAttrs ( sal_uInt16  nColId)
private

◆ SetColWidth()

void SbaGridControl::SetColWidth ( sal_uInt16  nColId)
private

◆ SetMasterListener()

void dbaui::SbaGridControl::SetMasterListener ( SbaGridListener pListener)
inline

Definition at line 215 of file sbagrid.hxx.

References m_pMasterListener.

Referenced by dbaui::SbaXDataBrowserController::Construct().

◆ SetRowHeight()

void SbaGridControl::SetRowHeight ( )
private

◆ StartDrag()

void SbaGridControl::StartDrag ( sal_Int8  _nAction,
const Point _rPosPixel 
)
overrideprivatevirtual

Friends And Related Function Documentation

◆ SbaGridHeader

friend class SbaGridHeader
friend

Definition at line 197 of file sbagrid.hxx.

◆ SbaXGridPeer

friend class SbaXGridPeer
friend

Definition at line 198 of file sbagrid.hxx.

Member Data Documentation

◆ m_aDataDescriptor

svx::ODataAccessDescriptor dbaui::SbaGridControl::m_aDataDescriptor
private

Definition at line 201 of file sbagrid.hxx.

Referenced by ExecuteDrop().

◆ m_bActivatingForDrop

bool dbaui::SbaGridControl::m_bActivatingForDrop
private

Definition at line 206 of file sbagrid.hxx.

Referenced by AcceptDrop(), and GetController().

◆ m_nAsyncDropEvent

ImplSVEvent* dbaui::SbaGridControl::m_nAsyncDropEvent
private

Definition at line 204 of file sbagrid.hxx.

Referenced by dispose(), and ExecuteDrop().

◆ m_pMasterListener

SbaGridListener* dbaui::SbaGridControl::m_pMasterListener
private

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