LibreOffice Module svx (master) 1
gridctrl.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19#ifndef INCLUDED_SVX_GRIDCTRL_HXX
20#define INCLUDED_SVX_GRIDCTRL_HXX
21
22#include <com/sun/star/util/Date.hpp>
23
24#include <tools/ref.hxx>
27#include <osl/mutex.hxx>
28#include <svx/svxdllapi.h>
30#include <memory>
31#include <vector>
32
33namespace comphelper { class OPropertyChangeMultiplexer; }
34namespace com::sun::star::beans { struct PropertyChangeEvent; }
35namespace com::sun::star::container { class XIndexAccess; }
36namespace com::sun::star::sdbc { class XRowSet; }
37namespace com::sun::star::sdb { class XRowsChangeListener; }
38namespace com::sun::star::uno { class XComponentContext; }
39namespace com::sun::star::util { class XNumberFormatter; }
40namespace weld { class Menu; }
41
42class CursorWrapper;
43
44bool CompareBookmark(const css::uno::Any& aLeft, const css::uno::Any& aRight);
45
46namespace svxform
47{
48 class DataColumn;
49}
50
51enum class GridRowStatus
52{
53 Clean,
55 Deleted,
57};
58
59
60// DbGridRow, description of rows
61
62
63class SAL_DLLPUBLIC_RTTI DbGridRow final : public SvRefBase
64{
65 css::uno::Any m_aBookmark; // Bookmark of the row, can be set
66 ::std::vector< std::unique_ptr<::svxform::DataColumn> >
70 // row is no longer valid
71 // is removed on the next positioning
72public:
73 DbGridRow();
74 DbGridRow(CursorWrapper* pCur, bool bPaintCursor);
75 void SetState(CursorWrapper* pCur, bool bPaintCursor);
76
77 virtual ~DbGridRow() override;
78
79 bool HasField(sal_uInt32 nPos) const { return nPos < m_aVariants.size(); }
80 const ::svxform::DataColumn& GetField(sal_uInt32 nPos) const { return *m_aVariants[ nPos ]; }
81
82 void SetStatus(GridRowStatus _eStat) { m_eStatus = _eStat; }
83 GridRowStatus GetStatus() const { return m_eStatus; }
84 void SetNew(bool _bNew) { m_bIsNew = _bNew; }
85 bool IsNew() const { return m_bIsNew; }
86
87 const css::uno::Any& GetBookmark() const { return m_aBookmark; }
88
89 bool IsValid() const { return m_eStatus == GridRowStatus::Clean || m_eStatus == GridRowStatus::Modified; }
90 bool IsModified() const { return m_eStatus == GridRowStatus::Modified; }
91};
92
94
95
96// DbGridControl
97
98class DbGridColumn;
99
101{
102public:
103 virtual void selectionChanged() = 0;
104 virtual void columnChanged() = 0;
105
106protected:
108};
109
110#define GRID_COLUMN_NOT_FOUND SAL_MAX_UINT16
111
112
113// InitWindowFacet, describing which aspect of a column's Window to (re-)initialize
114
116{
117 Font = 0x01,
118 Foreground = 0x02,
119 Background = 0x04,
120 WritingMode = 0x08,
121 All = 0x0F
122};
123namespace o3tl
124{
125 template<> struct typed_flags<InitWindowFacet> : is_typed_flags<InitWindowFacet, 0x0f> {};
126}
127
128
129// these options are or'ed and indicate, which of the single
130// features can be released, default is readonly which means 0
132{
133 Readonly = 0x00,
134 Insert = 0x01,
135 Update = 0x02,
136 Delete = 0x04
137};
138namespace o3tl
139{
140 template<> struct typed_flags<DbGridControlOptions> : is_typed_flags<DbGridControlOptions, 0x07> {};
141}
142
143// StatusIds for Controls of the Bar
144// important for invalidation
146{
147 NONE,
148 Text,
149 Absolute,
150 Of,
151 Count,
152 First,
153 Next,
154 Prev,
155 Last,
156 New,
157 Undo // related to SID_FM_RECORD_UNDO
158};
159
162
163// NavigationBar
165{
167 {
168 public:
169 AbsolutePos(std::unique_ptr<weld::Entry> xEntry, NavigationBar* pBar);
170
171 virtual bool DoKeyInput(const KeyEvent& rEvt) override;
172 virtual void PositionFired(sal_Int64 nRecord) override;
173
174 weld::Entry* GetWidget() { return m_xWidget.get(); }
175 private:
177 };
178
180
181 // additional controls
182 std::unique_ptr<weld::Label> m_xRecordText;
183 std::unique_ptr<AbsolutePos> m_xAbsolute; // absolute positioning
184 std::unique_ptr<weld::Label> m_xRecordOf;
185 std::unique_ptr<weld::Label> m_xRecordCount;
186
187 std::unique_ptr<weld::Button> m_xFirstBtn; // Button for 'go to the first record'
188 std::unique_ptr<weld::Button> m_xPrevBtn; // Button for 'go to the previous record'
189 std::unique_ptr<weld::Button> m_xNextBtn; // Button for 'go to the next record'
190 std::unique_ptr<weld::Button> m_xLastBtn; // Button for 'go to the last record'
191 std::unique_ptr<weld::Button> m_xNewBtn; // Button for 'go to a new record'
192
193 std::shared_ptr<weld::ButtonPressRepeater> m_xPrevRepeater;
194 std::shared_ptr<weld::ButtonPressRepeater> m_xNextRepeater;
195
196 sal_Int32 m_nCurrentPos;
197
198 bool m_bPositioning; // protect PositionDataSource against recursion
199
200public:
201 NavigationBar(vcl::Window* pParent);
202 virtual ~NavigationBar() override;
203 virtual void dispose() override;
204
205 // Status methods for Controls
206 void InvalidateAll(sal_Int32 nCurrentPos, bool bAll = false);
209 bool GetState(DbGridControlNavigationBarState nWhich) const;
210 sal_uInt16 ArrangeControls();
211
212private:
213
214 DECL_LINK(OnClick, weld::Button&, void);
215
216 void PositionDataSource(sal_Int32 nRecord);
217};
218
220{
224
225public:
226
227 friend class NavigationBar;
228
229private:
232
233 css::uno::Reference< css::util::XNumberFormatter > m_xFormatter;
234 css::uno::Reference< css::uno::XComponentContext > m_xContext;
235
236 std::vector< std::unique_ptr<DbGridColumn> > m_aColumns; // Column description
238 DbGridRowRef m_xDataRow; // Row which can be modified
239 // comes from the data cursor
240 DbGridRowRef m_xSeekRow, // Row to which the iterator can set
241 // comes from the data cursor
242
243 m_xEmptyRow; // record set to insert
244
246
247 // if we modify the row for the new record, we automatically insert a "new new row".
248 // But if somebody else inserts a new record into the data source, we have to do the same.
249 // For that reason we have to listen to some properties of our data source.
252 css::uno::Reference< css::sdb::XRowsChangeListener>
253 m_xRowSetListener; // get notification when rows were changed
254
256 // property listeners for field values
257
258 std::unique_ptr<DisposeListenerGridBridge> m_pCursorDisposeListener;
259 // need to know about the disposing of the seek cursor
260 // construct analogous to the data source proplistener/multiplexer above :
261 // DisposeListenerGridBridge is a bridge from FmXDisposeListener which I don't want to be derived from
262
264
265protected:
266 std::unique_ptr<CursorWrapper> m_pDataCursor; // Cursor for Updates
267 std::unique_ptr<CursorWrapper> m_pSeekCursor; // Cursor for Seeking
268
269private:
270 // iteration variables
272 DbGridRowRef m_xPaintRow; // Row to be displayed
273 sal_Int32 m_nSeekPos; // Position of the SeekCursor
274 sal_Int32 m_nTotalCount; // is set when the data cursor finished counting the
275 // records. Initial value is -1
277 osl::Mutex m_aAdjustSafety;
278
279 css::util::Date
280 m_aNullDate; // NullDate of the Numberformatter;
281
283 sal_Int32 m_nCurrentPos; // Current position;
284 ImplSVEvent * m_nDeleteEvent; // EventId for asynchronous deletion of rows
285 DbGridControlOptions m_nOptions; // What is the able to do (Insert, Update, Delete)
286 // default readonly
287 DbGridControlOptions m_nOptionMask; // the mask of options to be enabled in setDataSource
288 // (with respect to the data source capabilities)
289 // defaults to (insert | update | delete)
290 sal_uInt16 m_nLastColId;
291 sal_Int32 m_nLastRowId;
292
293 bool m_bDesignMode : 1; // default = sal_False
295
297 bool m_bHandle : 1;
300 bool m_bPendingAdjustRows : 1; // if an async adjust is pending, is it for AdjustRows or AdjustDataSource ?
302
303protected:
304 bool m_bUpdating : 1; // are any updates being executed right now?
305
306protected:
307 virtual bool SeekRow(sal_Int32 nRow) override;
308 virtual void VisibleRowsChanged( sal_Int32 nNewTopRow, sal_uInt16 nNumRows) override;
309 virtual void PaintCell(OutputDevice& rDev, const tools::Rectangle& rRect, sal_uInt16 nColId) const override;
310 virtual RowStatus GetRowStatus(sal_Int32 nRow) const override;
311 virtual bool CursorMoving(sal_Int32 nNewRow, sal_uInt16 nNewCol) override;
312 virtual void CursorMoved() override;
313 virtual void ArrangeControls(sal_uInt16& nX, sal_uInt16 nY) override;
314 virtual sal_uInt32 GetTotalCellWidth(sal_Int32 nRow, sal_uInt16 nColId) override;
315 virtual void Command(const CommandEvent& rEvt) override;
316 virtual bool PreNotify(NotifyEvent& rEvt) override;
317 virtual void KeyInput(const KeyEvent& rEvt) override;
318 virtual void StateChanged( StateChangedType nType ) override;
319 virtual void DataChanged( const DataChangedEvent& rDCEvt ) override;
320 virtual void Select() override;
321
322 virtual ::svt::CellController* GetController(sal_Int32 nRow, sal_uInt16 nCol) override;
323
324 virtual void CellModified() override;
325 virtual bool SaveModified() override;
326 virtual bool IsModified() const override;
327
328 virtual sal_uInt16 AppendColumn(const OUString& rName, sal_uInt16 nWidth, sal_uInt16 nPos = HEADERBAR_APPEND, sal_uInt16 nId = sal_uInt16(-1)) override;
329 void RemoveColumn(sal_uInt16 nId);
330 std::unique_ptr<DbGridColumn> CreateColumn(sal_uInt16 nId);
331 virtual void ColumnMoved(sal_uInt16 nId) override;
332 virtual bool SaveRow() override;
333 virtual bool IsTabAllowed(bool bForward) const override;
334
336 virtual void HideColumn(sal_uInt16 nId);
338 virtual void ShowColumn(sal_uInt16 nId);
339
347 virtual void PreExecuteRowContextMenu(weld::Menu& rMenu);
350 virtual void PostExecuteRowContextMenu(const OString& rExecutionResult);
351
353 void DataSourcePropertyChanged(const css::beans::PropertyChangeEvent& evt);
354
355 void FieldValueChanged(sal_uInt16 _nId);
356 void FieldListenerDisposing(sal_uInt16 _nId);
357
358 void disposing(sal_uInt16 _nId);
359
360 // own overridables
362 virtual void onRowChange();
364 virtual void onColumnChange();
365
366 // DragSourceHelper overridables
367 virtual void StartDrag( sal_Int8 nAction, const Point& rPosPixel ) override;
368
369 void executeRowContextMenu(const Point& _rPreferredPos);
370
371public:
373 css::uno::Reference< css::uno::XComponentContext > const & _rxContext,
374 vcl::Window* pParent,
375 WinBits nBits);
376
377 virtual ~DbGridControl() override;
378 virtual void dispose() override;
379
380 virtual void Init() override;
381 virtual void InitColumnsByFields(const css::uno::Reference< css::container::XIndexAccess >& xFields) = 0;
382 virtual void RemoveRows() override;
383
392 virtual OUString GetCellText(sal_Int32 _nRow, sal_uInt16 _nColId) const override;
393
394 void RemoveRows(bool bNewCursor);
395
396 const css::uno::Reference< css::util::XNumberFormatter >& getNumberFormatter() const {return m_xFormatter;}
397
398 // the data source
399 // the options can restrict but not extend the update abilities
400 void setDataSource(const css::uno::Reference< css::sdbc::XRowSet >& rCursor,
402 virtual void Dispatch(sal_uInt16 nId) override;
403
404 CursorWrapper* getDataSource() const {return m_pDataCursor.get();}
405 const std::vector< std::unique_ptr<DbGridColumn> >& GetColumns() const {return m_aColumns;}
406
407 void EnableHandle(bool bEnable);
408 bool HasHandle() const {return m_bHandle;}
409 void InsertHandleColumn();
410
411 // which position does the column with the id in the View have, the handle column doesn't count
412 sal_uInt16 GetViewColumnPos( sal_uInt16 nId ) const { sal_uInt16 nPos = GetColumnPos(nId); return (nPos==BROWSER_INVALIDID) ? GRID_COLUMN_NOT_FOUND : nPos-1; }
413
414 // which position does the column with the id in m_aColumns have, that means the css::sdbcx::Container
415 // returned from the GetColumns (may be different from the position returned by GetViewColumnPos
416 // if there are hidden columns)
417 sal_uInt16 GetModelColumnPos( sal_uInt16 nId ) const;
418
419 // the number of columns in the model
420 sal_uInt16 GetViewColCount() const { return ColCount() - 1; }
421 sal_uInt16 GetModelColCount() const { return static_cast<sal_uInt16>(m_aColumns.size()); }
422 // reverse to GetViewColumnPos: Id of position, the first non-handle column has position 0
423 sal_uInt16 GetColumnIdFromViewPos( sal_uInt16 nPos ) const { return GetColumnId(nPos + 1); }
424 sal_uInt16 GetColumnIdFromModelPos( sal_uInt16 nPos ) const;
425
426 virtual void SetDesignMode(bool bMode);
427 bool IsDesignMode() const {return m_bDesignMode;}
428 bool IsOpen() const {return m_pSeekCursor != nullptr;}
429
430 void SetFilterMode(bool bMode);
431 bool IsFilterMode() const {return m_bFilterMode;}
432 bool IsFilterRow(sal_Int32 nRow) const {return m_bFilterMode && nRow == 0;}
433
434 void EnableNavigationBar(bool bEnable);
435 bool HasNavigationBar() const {return m_bNavigationBar;}
436
437 DbGridControlOptions GetOptions() const {return m_nOptions;}
438 NavigationBar& GetNavigationBar() {return *m_aBar;}
440 // The new options are interpreted with respect to the current data source. If it is unable
441 // to update, to insert or to restore, the according options are ignored. If the grid isn't
442 // connected to a data source, all options except OPT_READONLY are ignored.
443
444 const css::util::Date& getNullDate() const {return m_aNullDate;}
445
446 // positioning
447 void MoveToPosition(sal_uInt32 nPos);
448 void MoveToFirst();
449 void MoveToNext();
450 void MoveToPrev();
451 void MoveToLast();
452 void AppendNew();
453
454 // adjustment of the cursors in case the data cursor has been
455 // moved from the outside.
456 // the flag indicates if an adjustment of the row count should be
457 // done as well
458 void AdjustDataSource(bool bFull = false);
459 void Undo();
460
461 virtual void BeginCursorAction();
462 virtual void EndCursorAction();
463
464 // is the current line being updated
465 bool IsUpdating() const {return m_bUpdating;}
466
467 void RowRemoved( sal_Int32 nRow, sal_Int32 nNumRows = 1, bool bDoPaint = true );
468 void RowInserted( sal_Int32 nRow, sal_Int32 nNumRows = 1, bool bDoPaint = true );
469 void RowModified( sal_Int32 nRow );
470
471 void resetCurrentRow();
472
473 bool getDisplaySynchron() const { return m_bSynchDisplay; }
474 void setDisplaySynchron(bool bSync);
475 // when set to sal_False, the display is no longer in sync with the current cursor position
476 // (means that in AdjustDataSource we are jumping to a row not belonging to CursorPosition)
477 // when using this, you should know what you are doing, because for example entering data
478 // in a row in the display that is not in sync with the position of the cursor can be very critical
479
480 const DbGridRowRef& GetCurrentRow() const {return m_xCurrentRow;}
481
482 void SetStateProvider(const Link<DbGridControlNavigationBarState,int>& rProvider) { m_aMasterStateProvider = rProvider; }
483 // if this link is set the given provider will be asked for the state of my items.
484 // the return values are interpreted as follows :
485 // <0 -> not specified (use default mechanism to determine the state)
486 // ==0 -> the item is disabled
487 // >0 -> the item is enabled
488 void SetSlotExecutor(const Link<DbGridControlNavigationBarState,bool>& rExecutor) { m_aMasterSlotExecutor = rExecutor; }
489 // analogous : if this link is set, all nav-bar slots will be routed through it when executed
490 // if the handler returns nonzero, no further handling of the slot occurs
491
492 void EnablePermanentCursor(bool bEnable);
493 bool IsPermanentCursorEnabled() const;
494
501 void ForceHideScrollbars();
502
503 const css::uno::Reference< css::uno::XComponentContext >&
504 getContext() const { return m_xContext; }
505
507 bool canCopyCellText(sal_Int32 _nRow, sal_uInt16 _nColId);
509 void copyCellText(sal_Int32 _nRow, sal_uInt16 _nColId);
510
511 // select in listener handling
512 void setGridListener( FmGridListener* _pListener ) { m_pGridListener = _pListener; }
513
514 // helper class to grant access to selected methods from within the DbCellControl class
516 {
517 friend class DbCellControl;
519 };
520
522 void refreshController(sal_uInt16 _nColId, GrantControlAccess _aAccess);
523
524 CursorWrapper* GetSeekCursor(GrantControlAccess /*_aAccess*/) const { return m_pSeekCursor.get(); }
525 const DbGridRowRef& GetSeekRow(GrantControlAccess /*_aAccess*/) const { return m_xSeekRow; }
526 void SetSeekPos(sal_Int32 nPos,GrantControlAccess /*_aAccess*/) {m_nSeekPos = nPos;}
527
532 virtual sal_Int32 GetAccessibleControlCount() const override;
533
540 virtual css::uno::Reference<
541 css::accessibility::XAccessible >
542 CreateAccessibleControl( sal_Int32 _nIndex ) override;
543
544 // IAccessibleTableProvider
549 virtual css::uno::Reference<
550 css::accessibility::XAccessible >
551 CreateAccessibleCell( sal_Int32 nRow, sal_uInt16 nColumnId ) override;
552
553protected:
554 void RecalcRows(sal_Int32 nNewTopRow, sal_uInt16 nLinesOnScreen, bool bUpdateCursor);
555 bool SeekCursor(sal_Int32 nRow, bool bAbsolute = false);
556 void RemoveColumns(); // cleaning of own structures
557 void AdjustRows();
558 sal_Int32 AlignSeekCursor();
559 bool SetCurrent(sal_Int32 nNewRow);
560
561 OUString GetCurrentRowCellText(DbGridColumn const * pCol,const DbGridRowRef& _rRow) const;
562 virtual void DeleteSelectedRows();
563 static bool IsValid(const DbGridRowRef& _xRow) { return _xRow.is() && _xRow->IsValid(); }
564
565 // row which is currently being appended
566 bool IsCurrentAppending() const;
567
568 // empty row for insertion
569 bool IsInsertionRow(sal_Int32 nRow) const;
570
571 void SetSeekPos(sal_Int32 nPos) {m_nSeekPos = nPos;}
572 sal_Int32 GetCurrentPos() const {return m_nCurrentPos;}
573 sal_Int32 GetSeekPos() const {return m_nSeekPos;}
574 sal_Int32 GetTotalCount() const {return m_nTotalCount;}
575
576 const DbGridRowRef& GetEmptyRow() const { return m_xEmptyRow; }
577 const DbGridRowRef& GetSeekRow() const { return m_xSeekRow; }
578 const DbGridRowRef& GetPaintRow() const { return m_xPaintRow; }
579
580 void ConnectToFields();
581 void DisconnectFromFields();
582
583 void implAdjustInSolarThread(bool _bRows);
584 // calls AdjustRows or AdjustDataSource, synchron if the caller is running in the solar thread, else asynchron
585
586protected:
587 void ImplInitWindow( const InitWindowFacet _eInitWhat );
588 DECL_DLLPRIVATE_LINK(OnDelete, void*, void);
589
590 DECL_DLLPRIVATE_LINK(OnAsyncAdjust, void*, void);
591 // if the param is != NULL, AdjustRows will be called, else AdjustDataSource
592
593private:
595};
596
597#endif // INCLUDED_SVX_GRIDCTRL_HXX
598
599/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Reference< XComponentContext > m_xContext
#define BROWSER_INVALIDID
BrowserMode
void RowRemoved(sal_Int32 nRow, sal_Int32 nNumRows=1, bool bDoPaint=true)
sal_uInt16 GetColumnId(sal_uInt16 nPos) const
virtual void Command(const CommandEvent &rEvt) override
virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessibleCell(sal_Int32 nRow, sal_uInt16 nColumnPos) override
virtual void Select()
sal_uInt16 ColCount() const
void InsertHandleColumn(sal_uLong nWidth)
void RowModified(sal_Int32 nRow, sal_uInt16 nColId=BROWSER_INVALIDID)
sal_uInt16 GetColumnPos(sal_uInt16 nColumnId) const
void RemoveColumn(sal_uInt16 nColumnId)
virtual void StartDrag(sal_Int8 _nAction, const Point &_rPosPixel) override
virtual OUString GetCellText(sal_Int32 _nRow, sal_uInt16 _nColId) const
void RowInserted(sal_Int32 nRow, sal_Int32 nNumRows=1, bool bDoPaint=true, bool bKeepSelection=false)
bool m_bNavigationBar
virtual void VisibleRowsChanged(sal_Int32 nNewTopRow, sal_uInt16 nNumRows)
void RemoveColumns()
CursorWrapper * getDataSource() const
Definition: gridctrl.hxx:404
bool IsUpdating() const
Definition: gridctrl.hxx:465
bool m_bUpdating
Definition: gridctrl.hxx:304
const css::util::Date & getNullDate() const
Definition: gridctrl.hxx:444
const css::uno::Reference< css::util::XNumberFormatter > & getNumberFormatter() const
Definition: gridctrl.hxx:396
bool m_bFilterMode
Definition: gridctrl.hxx:298
Link< DbGridControlNavigationBarState, int > m_aMasterStateProvider
Definition: gridctrl.hxx:230
css::util::Date m_aNullDate
Definition: gridctrl.hxx:280
void SetSeekPos(sal_Int32 nPos, GrantControlAccess)
Definition: gridctrl.hxx:526
bool IsDesignMode() const
Definition: gridctrl.hxx:427
DbGridRowRef m_xPaintRow
Definition: gridctrl.hxx:272
bool m_bSynchDisplay
Definition: gridctrl.hxx:296
bool getDisplaySynchron() const
Definition: gridctrl.hxx:473
bool m_bDesignMode
Definition: gridctrl.hxx:293
DbGridRowRef m_xDataRow
Definition: gridctrl.hxx:238
CursorWrapper * GetSeekCursor(GrantControlAccess) const
Definition: gridctrl.hxx:524
DECL_DLLPRIVATE_LINK(OnDelete, void *, void)
bool HasHandle() const
Definition: gridctrl.hxx:408
sal_Int32 m_nCurrentPos
Definition: gridctrl.hxx:283
const std::vector< std::unique_ptr< DbGridColumn > > & GetColumns() const
Definition: gridctrl.hxx:405
FmXGridSourcePropListener * m_pDataSourcePropListener
Definition: gridctrl.hxx:251
bool IsFilterMode() const
Definition: gridctrl.hxx:431
sal_uInt16 GetViewColumnPos(sal_uInt16 nId) const
Definition: gridctrl.hxx:412
bool m_bPendingAdjustRows
Definition: gridctrl.hxx:300
ImplSVEvent * m_nDeleteEvent
Definition: gridctrl.hxx:284
void SetSlotExecutor(const Link< DbGridControlNavigationBarState, bool > &rExecutor)
Definition: gridctrl.hxx:488
const DbGridRowRef & GetSeekRow(GrantControlAccess) const
Definition: gridctrl.hxx:525
sal_Int32 m_nLastRowId
Definition: gridctrl.hxx:291
void SetSeekPos(sal_Int32 nPos)
Definition: gridctrl.hxx:571
bool IsOpen() const
Definition: gridctrl.hxx:428
sal_uInt16 GetColumnIdFromViewPos(sal_uInt16 nPos) const
Definition: gridctrl.hxx:423
const DbGridRowRef & GetSeekRow() const
Definition: gridctrl.hxx:577
void SetStateProvider(const Link< DbGridControlNavigationBarState, int > &rProvider)
Definition: gridctrl.hxx:482
DbGridControlOptions GetOptions() const
Definition: gridctrl.hxx:437
std::vector< std::unique_ptr< DbGridColumn > > m_aColumns
Definition: gridctrl.hxx:236
const DbGridRowRef & GetCurrentRow() const
Definition: gridctrl.hxx:480
DbGridRowRef m_xEmptyRow
Definition: gridctrl.hxx:243
ImplSVEvent * m_nAsynAdjustEvent
Definition: gridctrl.hxx:245
osl::Mutex m_aDestructionSafety
Definition: gridctrl.hxx:276
void setGridListener(FmGridListener *_pListener)
Definition: gridctrl.hxx:512
css::uno::Reference< css::uno::XComponentContext > m_xContext
Definition: gridctrl.hxx:234
std::unique_ptr< CursorWrapper > m_pSeekCursor
Definition: gridctrl.hxx:267
BrowserMode m_nMode
Definition: gridctrl.hxx:282
sal_Int32 GetSeekPos() const
Definition: gridctrl.hxx:573
css::uno::Reference< css::sdb::XRowsChangeListener > m_xRowSetListener
Definition: gridctrl.hxx:253
std::unique_ptr< DisposeListenerGridBridge > m_pCursorDisposeListener
Definition: gridctrl.hxx:258
sal_uInt16 GetModelColCount() const
Definition: gridctrl.hxx:421
bool m_bRecordCountFinal
Definition: gridctrl.hxx:294
const css::uno::Reference< css::uno::XComponentContext > & getContext() const
Definition: gridctrl.hxx:504
sal_Int32 GetTotalCount() const
Definition: gridctrl.hxx:574
css::uno::Reference< css::util::XNumberFormatter > m_xFormatter
Definition: gridctrl.hxx:233
sal_uInt16 m_nLastColId
Definition: gridctrl.hxx:290
rtl::Reference<::comphelper::OPropertyChangeMultiplexer > m_pDataSourcePropMultiplexer
Definition: gridctrl.hxx:250
DbGridControlOptions m_nOptionMask
Definition: gridctrl.hxx:287
DbGridRowRef m_xSeekRow
Definition: gridctrl.hxx:240
osl::Mutex m_aAdjustSafety
Definition: gridctrl.hxx:277
DbGridControlOptions m_nOptions
Definition: gridctrl.hxx:285
Link< DbGridControlNavigationBarState, bool > m_aMasterSlotExecutor
Definition: gridctrl.hxx:231
DECL_DLLPRIVATE_LINK(OnAsyncAdjust, void *, void)
sal_Int32 m_nTotalCount
Definition: gridctrl.hxx:274
std::unique_ptr< CursorWrapper > m_pDataCursor
Definition: gridctrl.hxx:266
sal_uInt16 GetViewColCount() const
Definition: gridctrl.hxx:420
NavigationBar & GetNavigationBar()
Definition: gridctrl.hxx:438
bool m_bWantDestruction
Definition: gridctrl.hxx:299
bool m_bHideScrollbars
Definition: gridctrl.hxx:301
DbGridRowRef m_xCurrentRow
Definition: gridctrl.hxx:271
bool HasNavigationBar() const
Definition: gridctrl.hxx:435
const DbGridRowRef & GetEmptyRow() const
Definition: gridctrl.hxx:576
FmGridListener * m_pGridListener
Definition: gridctrl.hxx:263
virtual void InitColumnsByFields(const css::uno::Reference< css::container::XIndexAccess > &xFields)=0
const DbGridRowRef & GetPaintRow() const
Definition: gridctrl.hxx:578
VclPtr< NavigationBar > m_aBar
Definition: gridctrl.hxx:237
sal_Int32 GetCurrentPos() const
Definition: gridctrl.hxx:572
void * m_pFieldListeners
Definition: gridctrl.hxx:255
bool IsFilterRow(sal_Int32 nRow) const
Definition: gridctrl.hxx:432
static bool IsValid(const DbGridRowRef &_xRow)
Definition: gridctrl.hxx:563
sal_Int32 m_nSeekPos
Definition: gridctrl.hxx:273
bool m_bIsNew
Definition: gridctrl.hxx:69
void SetStatus(GridRowStatus _eStat)
Definition: gridctrl.hxx:82
void SetNew(bool _bNew)
Definition: gridctrl.hxx:84
bool IsValid() const
Definition: gridctrl.hxx:89
::std::vector< std::unique_ptr<::svxform::DataColumn > > m_aVariants
Definition: gridctrl.hxx:67
GridRowStatus GetStatus() const
Definition: gridctrl.hxx:83
GridRowStatus m_eStatus
Definition: gridctrl.hxx:68
css::uno::Any m_aBookmark
Definition: gridctrl.hxx:65
const css::uno::Any & GetBookmark() const
Definition: gridctrl.hxx:87
bool HasField(sal_uInt32 nPos) const
Definition: gridctrl.hxx:79
bool IsModified() const
Definition: gridctrl.hxx:90
const ::svxform::DataColumn & GetField(sal_uInt32 nPos) const
Definition: gridctrl.hxx:80
bool IsNew() const
Definition: gridctrl.hxx:85
virtual void columnChanged()=0
virtual void selectionChanged()=0
weld::Entry * GetWidget()
Definition: gridctrl.hxx:174
virtual bool DoKeyInput(const KeyEvent &rEvt) override
Definition: gridctrl.cxx:282
virtual void PositionFired(sal_Int64 nRecord) override
Definition: gridctrl.cxx:292
VclPtr< NavigationBar > m_xParent
Definition: gridctrl.hxx:176
AbsolutePos(std::unique_ptr< weld::Entry > xEntry, NavigationBar *pBar)
Definition: gridctrl.cxx:276
std::unique_ptr< weld::Button > m_xPrevBtn
Definition: gridctrl.hxx:188
std::unique_ptr< weld::Label > m_xRecordOf
Definition: gridctrl.hxx:184
DECL_LINK(OnClick, weld::Button &, void)
NavigationBar(vcl::Window *pParent)
Definition: gridctrl.cxx:309
sal_uInt16 ArrangeControls()
Definition: gridctrl.cxx:373
std::unique_ptr< weld::Label > m_xRecordCount
Definition: gridctrl.hxx:185
std::unique_ptr< weld::Button > m_xLastBtn
Definition: gridctrl.hxx:190
std::unique_ptr< weld::Label > m_xRecordText
Definition: gridctrl.hxx:182
void PositionDataSource(sal_Int32 nRecord)
Definition: gridctrl.cxx:298
void SetState(DbGridControlNavigationBarState nWhich)
Definition: gridctrl.cxx:498
std::unique_ptr< weld::Button > m_xNextBtn
Definition: gridctrl.hxx:189
virtual void dispose() override
Definition: gridctrl.cxx:359
std::shared_ptr< weld::ButtonPressRepeater > m_xNextRepeater
Definition: gridctrl.hxx:194
sal_Int32 m_nCurrentPos
Definition: gridctrl.hxx:196
std::unique_ptr< AbsolutePos > m_xAbsolute
Definition: gridctrl.hxx:183
void InvalidateAll(sal_Int32 nCurrentPos, bool bAll=false)
Definition: gridctrl.cxx:413
virtual ~NavigationBar() override
Definition: gridctrl.cxx:354
void InvalidateState(DbGridControlNavigationBarState nWhich)
Definition: gridctrl.hxx:207
bool GetState(DbGridControlNavigationBarState nWhich) const
Definition: gridctrl.cxx:443
std::unique_ptr< weld::Button > m_xNewBtn
Definition: gridctrl.hxx:191
std::unique_ptr< weld::Button > m_xFirstBtn
Definition: gridctrl.hxx:187
bool m_bPositioning
Definition: gridctrl.hxx:198
std::shared_ptr< weld::ButtonPressRepeater > m_xPrevRepeater
Definition: gridctrl.hxx:193
std::unique_ptr< weld::Entry > m_xWidget
virtual CellController * GetController(sal_Int32 nRow, sal_uInt16 nCol)
virtual void PaintCell(OutputDevice &rDev, const tools::Rectangle &rRect, sal_uInt16 nColId) const=0
virtual bool SaveRow()
virtual sal_uInt32 GetTotalCellWidth(sal_Int32 nRow, sal_uInt16 nColId)
virtual void Dispatch(sal_uInt16 nId)
virtual bool IsTabAllowed(bool bForward) const
virtual void CursorMoved() override
virtual void KeyInput(const KeyEvent &rEvt) override
virtual bool CursorMoving(sal_Int32 nNewRow, sal_uInt16 nNewCol)
virtual RowStatus GetRowStatus(sal_Int32 nRow) const
virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessibleControl(sal_Int32 nIndex) override
virtual void RemoveRows()
virtual bool PreNotify(NotifyEvent &rNEvt) override
virtual void StateChanged(StateChangedType nType) override
virtual bool SaveModified()
virtual void ColumnMoved(sal_uInt16 nId) override
virtual void DataChanged(const DataChangedEvent &rDCEvt) override
virtual void Init()
virtual sal_uInt16 AppendColumn(const OUString &rName, sal_uInt16 nWidth, sal_uInt16 nPos=HEADERBAR_APPEND, sal_uInt16 nId=sal_uInt16(-1))
virtual bool SeekRow(sal_Int32 nRow) override
virtual sal_Int32 GetAccessibleControlCount() const override
virtual bool IsModified() const
virtual void ArrangeControls(sal_uInt16 &nX, sal_uInt16 nY)
virtual void dispose() override
virtual void CellModified()
bool is() const
virtual void Insert(SotClipboardFormatId nFormat, const OUString &rFormatName) override
bool CompareBookmark(const css::uno::Any &aLeft, const css::uno::Any &aRight)
tools::SvRef< DbGridRow > DbGridRowRef
Definition: gridctrl.hxx:93
DbGridControlOptions
Definition: gridctrl.hxx:132
#define GRID_COLUMN_NOT_FOUND
Definition: gridctrl.hxx:110
InitWindowFacet
Definition: gridctrl.hxx:116
GridRowStatus
Definition: gridctrl.hxx:52
DbGridControlNavigationBarState
Definition: gridctrl.hxx:146
sal_uInt16 nPos
NONE
Count
class FmSearchEngine - Impl class for FmSearchDialog
sal_Int16 nId
sal_Int32 m_nCurrentPos
#define SVXCORE_DLLPUBLIC
Definition: svxdllapi.h:35
signed char sal_Int8
StateChangedType
sal_Int64 WinBits