LibreOffice Module dbaccess (master) 1
|
#include <sbagrid.hxx>
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 |
HeaderBar * | GetHeaderBar () 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 |
CursorWrapper * | getDataSource () 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 |
NavigationBar & | GetNavigationBar () |
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 DbGridRowRef & | GetCurrentRow () 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) |
CursorWrapper * | GetSeekCursor (GrantControlAccess) const |
const DbGridRowRef & | GetSeekRow (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< BrowserHeader > | imp_CreateHeaderBar (BrowseBox *pParent) override |
virtual ::svt::CellController * | GetController (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::XPropertySet > | getField (sal_uInt16 nModelPos) |
css::uno::Reference< css::beans::XPropertySet > | getDataSource () 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) |
SvNumberFormatter * | GetDatasourceFormatter () |
DECL_LINK (AsynchDropEvent, void *, void) | |
bool | IsReadOnlyDB () const |
void | implTransferSelectedRows (sal_Int16 nRowPos, bool _bTrueIfClipboardFalseIfDrag) |
Private Attributes | |
svx::ODataAccessDescriptor | m_aDataDescriptor |
SbaGridListener * | m_pMasterListener |
ImplSVEvent * | m_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< BrowserHeader > | imp_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 |
FmXGridPeer * | GetPeer () 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::CellController * | GetController (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< DbGridColumn > | CreateColumn (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 DbGridRowRef & | GetEmptyRow () const |
const DbGridRowRef & | GetSeekRow () const |
const DbGridRowRef & | GetPaintRow () 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< CursorWrapper > | m_pDataCursor |
std::unique_ptr< CursorWrapper > | m_pSeekCursor |
bool | m_bUpdating |
Definition at line 195 of file sbagrid.hxx.
SbaGridControl::SbaGridControl | ( | css::uno::Reference< css::uno::XComponentContext > const & | _rM, |
Window * | pParent, | ||
FmXGridPeer * | _pPeer, | ||
WinBits | nBits | ||
) |
Definition at line 607 of file sbagrid.cxx.
|
overridevirtual |
Definition at line 616 of file sbagrid.cxx.
|
overrideprivatevirtual |
Definition at line 1131 of file sbagrid.cxx.
References BROWSER_INVALIDID, tools::Rectangle::Contains(), DBG_UNHANDLED_EXCEPTION, DND_ACTION_COPY, DND_ACTION_NONE, Exception, DbGridControl::GetCurrentPos(), DbGridControl::GetCurrentRow(), getDataSource(), DbGridControl::GetEmptyRow(), getField(), DbGridControl::GetModelColumnPos(), DbGridControl::GetOptions(), FmGridControl::GetPeer(), DbGridControl::GetViewColumnPos(), tools::SvRef< typename T >::is(), DbGridControl::IsCurrentAppending(), DbGridControl::IsModified(), m_bActivatingForDrop, and PROPERTY_ISREADONLY().
|
overridevirtual |
Definition at line 814 of file sbagrid.cxx.
References dbaui::SbaGridListener::CellActivated(), and m_pMasterListener.
Referenced by ExecuteDrop().
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().
|
overridevirtual |
Definition at line 821 of file sbagrid.cxx.
References dbaui::SbaGridListener::CellDeactivated(), and m_pMasterListener.
Referenced by dbaui::SbaXDataBrowserController::Execute().
|
private |
|
virtual |
Reimplemented from FmGridControl.
Referenced by dbaui::SbaXDataBrowserController::Execute().
|
overridevirtual |
Reimplemented from DbGridControl.
Definition at line 621 of file sbagrid.cxx.
References DbGridControl::dispose(), m_nAsyncDropEvent, and Application::RemoveUserEvent().
|
private |
Definition at line 1007 of file sbagrid.cxx.
References DND_ACTION_COPY, DND_ACTION_LINK, Exception, DbGridControl::GetColumnIdFromViewPos(), FmXGridPeer::getColumns(), DbGridControl::getContext(), getDataSource(), DbGridControl::GetModelColumnPos(), FmGridControl::GetPeer(), PROPERTY_BOUNDFIELD(), and PROPERTY_CONTROLSOURCE().
Referenced by StartDrag().
|
private |
Definition at line 1084 of file sbagrid.cxx.
References DND_ACTION_COPY, Exception, FmGridControl::GetPeer(), and svt::OStringTransfer::StartStringDrag().
Referenced by StartDrag().
|
overrideprivatevirtual |
Definition at line 1227 of file sbagrid.cxx.
References ActivateCell(), BROWSER_INVALIDID, DND_ACTION_COPY, DND_ACTION_NONE, tools::SvRef< typename T >::get(), getDataSource(), svt::EditCellController::GetEditImplementation(), DbGridControl::GetEmptyRow(), DbGridControl::GetOptions(), TransferableDataHelper::GetString(), DbGridControl::IsCurrentAppending(), LINK, m_aDataDescriptor, m_nAsyncDropEvent, svt::EditCellController::Modify(), Application::PostUserEvent(), Application::RemoveUserEvent(), and svt::IEditImplementation::SetText().
|
overridevirtual |
return the description of the specified object.
eObjType | The type to ask for |
_nPosition | The position of a tablecell (index position), header bar column/row cell |
Reimplemented from FmGridControl.
Definition at line 1354 of file sbagrid.cxx.
References DBA_RES, and FmGridControl::GetAccessibleObjectDescription().
|
overrideprivate |
Definition at line 634 of file sbagrid.cxx.
References DbGridControl::GetController(), and m_bActivatingForDrop.
|
private |
Definition at line 1295 of file sbagrid.cxx.
References FmGridControl::GetPeer().
Referenced by AcceptDrop(), DoColumnDrag(), ExecuteDrop(), GetDatasourceFormatter(), and implTransferSelectedRows().
|
private |
Definition at line 665 of file sbagrid.cxx.
References DbGridControl::getContext(), getDataSource(), and SvNumberFormatsSupplierObj::GetNumberFormatter().
Referenced by SetColAttrs().
|
private |
Definition at line 840 of file sbagrid.cxx.
References Exception, FmXGridPeer::getColumns(), FmGridControl::GetPeer(), PROPERTY_BOUNDFIELD(), and TOOLS_WARN_EXCEPTION.
Referenced by AcceptDrop(), and SetColAttrs().
|
inline |
Definition at line 223 of file sbagrid.hxx.
Referenced by dbaui::SbaTableQueryBrowser::Construct().
|
overrideprivatevirtual |
Reimplemented from FmGridControl.
Definition at line 629 of file sbagrid.cxx.
References VclPtr< class reference_type >::Create().
|
private |
Definition at line 1049 of file sbagrid.cxx.
References Any, DND_ACTION_COPY, DND_ACTION_LINK, Exception, DbGridControl::getContext(), getDataSource(), FmGridControl::getSelectionBookmarks(), and IsAllSelected().
Referenced by CopySelectedRowsToClipboard(), and StartDrag().
|
inline |
Definition at line 221 of file sbagrid.hxx.
Referenced by dbaui::SbaTableQueryBrowser::Execute(), and implTransferSelectedRows().
|
private |
Definition at line 864 of file sbagrid.cxx.
References Exception, DbGridControl::getContext(), FmGridControl::GetPeer(), PROPERTY_ISREADONLY(), and TOOLS_WARN_EXCEPTION.
Referenced by PreExecuteRowContextMenu().
|
overrideprivatevirtual |
Definition at line 899 of file sbagrid.cxx.
References BROWSER_INVALIDID, and vcl::Window::MouseButtonDown().
|
overrideprivatevirtual |
Reimplemented from DbGridControl.
Definition at line 834 of file sbagrid.cxx.
References dbaui::SbaGridListener::ColumnChanged(), and m_pMasterListener.
|
overrideprivatevirtual |
Reimplemented from DbGridControl.
Definition at line 828 of file sbagrid.cxx.
References m_pMasterListener, and dbaui::SbaGridListener::RowChanged().
|
overrideprivatevirtual |
Reimplemented from DbGridControl.
Definition at line 793 of file sbagrid.cxx.
References CopySelectedRowsToClipboard(), DbGridControl::PostExecuteRowContextMenu(), SetBrowserAttrs(), and SetRowHeight().
|
overrideprivatevirtual |
Reimplemented from DbGridControl.
Definition at line 642 of file sbagrid.cxx.
References DBA_RES, weld::Menu::insert(), weld::Menu::insert_separator(), IsReadOnlyDB(), nPos, DbGridControl::PreExecuteRowContextMenu(), and TRISTATE_INDET.
|
overridevirtual |
Reimplemented from FmGridControl.
Definition at line 805 of file sbagrid.cxx.
References m_pMasterListener, FmGridControl::Select(), and dbaui::SbaGridListener::SelectionChanged().
|
private |
Definition at line 770 of file sbagrid.cxx.
References aArguments, Any, DBG_UNHANDLED_EXCEPTION, Exception, DbGridControl::getContext(), VCLUnoHelper::GetInterface(), FmGridControl::GetPeer(), and comphelper::makePropertyValue().
Referenced by PostExecuteRowContextMenu().
|
private |
Definition at line 751 of file sbagrid.cxx.
References dbaui::callColumnFormatDialog(), FmXGridPeer::getColumns(), GetDatasourceFormatter(), getField(), GetFrameWeld(), DbGridControl::GetModelColumnPos(), and FmGridControl::GetPeer().
|
private |
Definition at line 677 of file sbagrid.cxx.
References Any, Exception, FmXGridPeer::getColumns(), GetFrameWeld(), DbGridControl::GetModelColumnPos(), FmGridControl::GetPeer(), dbaui::DlgSize::GetValue(), nValue, PROPERTY_WIDTH(), RET_OK, and weld::DialogController::run().
|
inline |
Definition at line 215 of file sbagrid.hxx.
References m_pMasterListener.
Referenced by dbaui::SbaXDataBrowserController::Construct().
|
private |
Definition at line 711 of file sbagrid.cxx.
References Any, Exception, GetFrameWeld(), FmGridControl::GetPeer(), dbaui::DlgSize::GetValue(), nValue, PROPERTY_ROW_HEIGHT(), RET_OK, weld::DialogController::run(), and TOOLS_WARN_EXCEPTION.
Referenced by PostExecuteRowContextMenu().
|
overrideprivatevirtual |
Reimplemented from DbGridControl.
Definition at line 914 of file sbagrid.cxx.
References BROWSER_INVALIDID, DoColumnDrag(), DoFieldDrag(), DbGridControl::GetCurrentPos(), DbGridControl::GetOptions(), DbGridControl::GetViewColCount(), implTransferSelectedRows(), DbGridControl::IsCurrentAppending(), DbGridControl::IsModified(), DbGridControl::StartDrag(), Point::X(), and Point::Y().
|
friend |
Definition at line 197 of file sbagrid.hxx.
|
friend |
Definition at line 198 of file sbagrid.hxx.
|
private |
Definition at line 201 of file sbagrid.hxx.
Referenced by ExecuteDrop().
|
private |
Definition at line 206 of file sbagrid.hxx.
Referenced by AcceptDrop(), and GetController().
|
private |
Definition at line 204 of file sbagrid.hxx.
Referenced by dispose(), and ExecuteDrop().
|
private |
Definition at line 202 of file sbagrid.hxx.
Referenced by ActivateCell(), DeactivateCell(), onColumnChange(), onRowChange(), Select(), and SetMasterListener().