LibreOffice Module svx (master)  1
gridcell.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 
20 #ifndef INCLUDED_SVX_SOURCE_INC_GRIDCELL_HXX
21 #define INCLUDED_SVX_SOURCE_INC_GRIDCELL_HXX
22 
23 #include <memory>
24 #include <svx/gridctrl.hxx>
25 
26 #include "sqlparserclient.hxx"
27 
28 #include <com/sun/star/sdb/XColumn.hpp>
29 #include <com/sun/star/form/XBoundControl.hpp>
30 #include <com/sun/star/awt/XTextComponent.hpp>
31 #include <com/sun/star/awt/XListBox.hpp>
32 #include <com/sun/star/awt/XComboBox.hpp>
33 #include <com/sun/star/awt/TextAlign.hpp>
34 #include <com/sun/star/awt/XControlModel.hpp>
35 #include <com/sun/star/awt/XControl.hpp>
36 #include <com/sun/star/awt/XCheckBox.hpp>
37 #include <com/sun/star/awt/XButton.hpp>
38 #include <com/sun/star/lang/XUnoTunnel.hpp>
39 #include <com/sun/star/form/XChangeBroadcaster.hpp>
40 #include <com/sun/star/awt/XWindow.hpp>
41 #include <com/sun/star/util/XNumberFormatsSupplier.hpp>
42 
45 #include <comphelper/uno3.hxx>
47 #include <cppuhelper/component.hxx>
48 #include <cppuhelper/implbase1.hxx>
49 #include <cppuhelper/implbase2.hxx>
50 #include <tools/diagnose_ex.h>
51 
52 class DbCellControl;
53 class Edit;
54 class FmXGridCell;
55 namespace dbtools {
56  class FormattedColumnValue;
57 }
58 
60 {
61 protected:
62  ::osl::Mutex m_aMutex;
63 };
64 
65 
66 // DbGridColumn, column description
67 
69 {
70  friend class DbGridControl;
71 
72  css::uno::Reference< css::beans::XPropertySet > m_xModel;
73  css::uno::Reference< css::beans::XPropertySet > m_xField; // connection to the database field
74  ::svt::CellControllerRef m_xController; // structure for managing the controls for a column
75  // this is positioned by the DbBrowseBox on the respective
76  // cells of a column
78 
79 protected:
81 
82 private:
83  sal_Int32 m_nLastVisibleWidth; // only valid if m_bHidden == sal_True
84  sal_Int32 m_nFormatKey;
85  sal_Int16 m_nFieldType;
86  sal_Int16 m_nTypeId;
87  sal_uInt16 m_nId;
88  sal_Int16 m_nFieldPos;
89  sal_Int16 m_nAlign; // specified with TXT_ALIGN_LEFT...
90  bool m_bReadOnly : 1;
91  bool m_bAutoValue : 1;
92  bool m_bInSave : 1;
93  bool m_bNumeric : 1;
94  bool m_bObject : 1; // does the column reference an object datatype?
95  bool m_bHidden : 1;
96  bool m_bLocked : 1;
97 
98  static ::svt::CellControllerRef s_xEmptyController;
99  // used by locked columns
100 public:
101  DbGridColumn(sal_uInt16 _nId, DbGridControl& rParent)
102  :m_rParent(rParent)
103  ,m_nLastVisibleWidth(-1)
104  ,m_nFormatKey(0)
105  ,m_nFieldType(0)
106  ,m_nTypeId(0)
107  ,m_nId(_nId)
108  ,m_nFieldPos(-1)
109  ,m_nAlign(css::awt::TextAlign::LEFT)
110  ,m_bReadOnly(false)
111  ,m_bAutoValue(false)
112  ,m_bInSave(false)
113  ,m_bNumeric(false)
114  ,m_bObject(false)
115  ,m_bHidden(false)
116  ,m_bLocked(false)
117  {
118  }
119 
120  ~DbGridColumn();
121 
122  const css::uno::Reference< css::beans::XPropertySet >& getModel() const { return m_xModel; }
123  void setModel(const css::uno::Reference< css::beans::XPropertySet >& _xModel);
124 
125 
126  sal_uInt16 GetId() const {return m_nId;}
127  bool IsReadOnly() const {return m_bReadOnly;}
128  bool IsAutoValue() const {return m_bAutoValue;}
129  sal_Int16 GetAlignment() const {return m_nAlign;}
130  sal_Int16 GetFieldPos() const {return m_nFieldPos; }
131  bool IsNumeric() const {return m_bNumeric;}
132  bool IsHidden() const {return m_bHidden;}
133  sal_Int32 GetKey() const {return m_nFormatKey;}
134  const ::svt::CellControllerRef& GetController() const {return m_bLocked ? s_xEmptyController : m_xController;}
135  const css::uno::Reference< css::beans::XPropertySet >& GetField() const {return m_xField;}
136  DbGridControl& GetParent() const {return m_rParent;}
137  FmXGridCell* GetCell() const {return m_pCell.get();}
138 
139  css::uno::Reference< css::sdb::XColumn > GetCurrentFieldValue() const;
140 
141  // Drawing a field at a position. If a view is set, it takes over the drawing,
142  // e.g., for checkboxes.
143  void Paint(OutputDevice& rDev,
144  const tools::Rectangle& rRect,
145  const DbGridRow* pRow,
146  const css::uno::Reference< css::util::XNumberFormatter >& xFormatter);
147 
148 
149  // Initializing in the alive mode.
150  // If no ColumnController is set, a default initialization is performed.
151  void CreateControl(sal_Int32 _nFieldPos, const css::uno::Reference< css::beans::XPropertySet >& xField, sal_Int32 nTypeId);
153  {
154  css::uno::Reference< css::beans::XPropertySet > xField(m_xField);
155  CreateControl(m_nFieldPos, xField, m_nTypeId);
156  }
157 
158  // Editing a Zelle
159  void UpdateFromField(const DbGridRow* pRow, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter);
160  bool Commit();
161 
162  // releasing all the data required for the AliveMode
163  void Clear();
164 
165  OUString GetCellText(const DbGridRow* pRow, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) const;
166  OUString GetCellText(const css::uno::Reference< css::sdb::XColumn >& xField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) const;
167 
168  void SetReadOnly(bool bRead){m_bReadOnly = bRead;}
169  void SetObject(sal_Int16 nPos) {m_bObject = m_bReadOnly = true; m_nFieldPos = nPos;}
170 
171  void ImplInitWindow( vcl::Window const & rParent, const InitWindowFacet _eInitWhat );
172 
173  // properties that can bleed through onto the css::frame::Controller
174  sal_Int16 SetAlignment(sal_Int16 _nAlign);
175  // if _nAlign is -1, the alignment is calculated from the type of the field we are bound to
176  // the value really set is returned
177  sal_Int16 SetAlignmentFromModel(sal_Int16 nStandardAlign);
178  // set the alignment according to the "Align"-property of m_xModel, use the given standard
179  // alignment if the property if void, return the really set alignment
180 
181  // column locking
182  bool isLocked() const { return m_bLocked; }
183  void setLock(bool _bLock);
184 
185 private:
189  void impl_toggleScriptManager_nothrow( bool _bAttach );
190 };
191 
192 
193 // DbCellControl, provides the data for a CellController.
194 // Is usually only required for complex controls such as combo boxes.
195 
197  :public FmMutexHelper // _before_ the listener, so the listener is to be destroyed first!
199 {
200 private:
203 
204 private:
205  bool m_bTransparent : 1;
208 
209  css::uno::Reference< css::sdbc::XRowSet >
211 
212 protected:
216 
217 protected:
218  // attribute access
219  const css::uno::Reference< css::sdbc::XRowSet >& getCursor() const { return m_xCursor; }
220 
221  // control transparency
222  bool isTransparent( ) const { return m_bTransparent; }
223  void setTransparent( bool _bSet ) { m_bTransparent = _bSet; }
224 
225  // control alignment
226  void setAlignedController( bool _bAlign ) { m_bAlignedController = _bAlign; }
227 
228 
232  inline bool isValuePropertyLocked() const;
233 
242  inline void lockValueProperty();
246  inline void unlockValueProperty();
247 
248 protected:
249  // adds the given property to the list of properties which we listen for
250  void doPropertyListening( const OUString& _rPropertyName );
251 
252  // called whenever a property which affects field settings in general is called
253  // you should overwrite this method for every property you add yourself as listener to
254  // with doPropertyListening
255  virtual void implAdjustGenericFieldSetting( const css::uno::Reference< css::beans::XPropertySet >& _rxModel );
256 
257  // called by _propertyChanged if a property which denotes the column value has changed
258  void implValuePropertyChanged( );
259 
260 
261 public:
262  DbCellControl(DbGridColumn& _rColumn);
263  virtual ~DbCellControl() override;
264 
266  {
267  ENSURE_OR_THROW( m_pWindow, "no window" );
268  return *m_pWindow;
269  }
270 
271  // control alignment
272  bool isAlignedController() const { return m_bAlignedController; }
273  void AlignControl(sal_Int16 nAlignment);
274 
275  void SetTextLineColor();
276  void SetTextLineColor(const Color& _rColor);
277 
278  // initializing before a control is displayed
279  virtual void Init( BrowserDataWin& rParent, const css::uno::Reference< css::sdbc::XRowSet >& xCursor );
280  virtual ::svt::CellControllerRef CreateController() const = 0;
281 
282  // writing the value into the model
283  bool Commit();
284 
285  // Formatting the field data to output text
286  virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, const Color** ppColor = nullptr) = 0;
287 
288  virtual void Update(){}
289  // Refresh the control by the field data
290  virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) = 0;
291 
292  // painting a cell content in the specified rectangle
293  virtual void PaintFieldToCell( OutputDevice& rDev, const tools::Rectangle& rRect, const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter);
294  virtual void PaintCell( OutputDevice& _rDev, const tools::Rectangle& _rRect );
295 
296  void ImplInitWindow( vcl::Window const & rParent, const InitWindowFacet _eInitWhat );
297 
298  double GetValue(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) const;
299 
300 protected:
301  void invalidatedController();
302 
308  virtual bool commitControl( ) = 0;
309 
320  virtual void updateFromModel( css::uno::Reference< css::beans::XPropertySet > _rxModel ) = 0;
321 
322 protected:
323 // OPropertyChangeListener
324  virtual void _propertyChanged(const css::beans::PropertyChangeEvent& evt) override;
325 
326 private:
327  void implDoPropertyListening( const OUString& _rPropertyName, bool _bWarnIfNotExistent );
328 
330  void implAdjustReadOnly( const css::uno::Reference< css::beans::XPropertySet >& _rxModel,bool i_bReadOnly );
331 
333  void implAdjustEnabled( const css::uno::Reference< css::beans::XPropertySet >& _rxModel );
334 };
335 
336 
338 {
340 }
341 
342 
344 {
345  OSL_ENSURE( !isValuePropertyLocked(), "DbCellControl::lockValueProperty: not to be nested!" );
347 }
348 
349 
351 {
352  OSL_ENSURE( isValuePropertyLocked(), "DbCellControl::lockValueProperty: not locked so far!" );
354 }
355 
356 
360 {
361 public:
362 
363 protected:
364  DbLimitedLengthField( DbGridColumn& _rColumn );
365 
366 protected:
367  // DbCellControl
368  virtual void implAdjustGenericFieldSetting( const css::uno::Reference< css::beans::XPropertySet >& _rxModel ) override;
369 
370 protected:
371  void implSetMaxTextLen( sal_Int16 _nMaxLen )
372  {
373  implSetEffectiveMaxTextLen(_nMaxLen);
374  }
375  virtual void implSetEffectiveMaxTextLen( sal_Int32 _nMaxLen );
376 };
377 
378 
379 class DbTextField final : public DbLimitedLengthField
380 {
381  std::unique_ptr<::svt::IEditImplementation> m_pEdit;
382  std::unique_ptr<::svt::IEditImplementation> m_pPainterImplementation;
384 
385  virtual ~DbTextField( ) override;
386 
387 public:
388  DbTextField(DbGridColumn& _rColumn);
389 
391  bool IsMultiLineEdit() const { return m_bIsMultiLineEdit; }
392 
393  virtual void Init( BrowserDataWin& rParent, const css::uno::Reference< css::sdbc::XRowSet >& xCursor ) override;
394  virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, const Color** ppColor = nullptr) override;
395  virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) override;
396  virtual ::svt::CellControllerRef CreateController() const override;
397  virtual void PaintFieldToCell( OutputDevice& _rDev, const tools::Rectangle& _rRect,
398  const css::uno::Reference< css::sdb::XColumn >& _rxField,
399  const css::uno::Reference< css::util::XNumberFormatter >& _rxFormatter ) override;
400 
401 private:
402  // DbCellControl
403  virtual bool commitControl( ) override;
404  virtual void updateFromModel( css::uno::Reference< css::beans::XPropertySet > _rxModel ) override;
405  // DbLimitedLengthField
406  virtual void implSetEffectiveMaxTextLen( sal_Int32 _nMaxLen ) override;
407 };
408 
409 
411 {
412 public:
413  DbFormattedField(DbGridColumn& _rColumn);
414  virtual ~DbFormattedField() override;
415 
416  virtual void Init( BrowserDataWin& rParent, const css::uno::Reference< css::sdbc::XRowSet >& xCursor ) override;
417  virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, const Color** ppColor = nullptr) override;
418  virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) override;
419  virtual ::svt::CellControllerRef CreateController() const override;
420 
421 private:
422  // DbCellControl
423  virtual bool commitControl( ) override;
424  virtual void updateFromModel( css::uno::Reference< css::beans::XPropertySet > _rxModel ) override;
425 
426  // OPropertyChangeListener
427  virtual void _propertyChanged(const css::beans::PropertyChangeEvent& evt) override;
428 
429  css::uno::Reference< css::util::XNumberFormatsSupplier > m_xSupplier;
430 };
431 
432 
433 class DbCheckBox final : public DbCellControl
434 {
435 public:
436  DbCheckBox(DbGridColumn& _rColumn);
437 
438  virtual void Init( BrowserDataWin& rParent, const css::uno::Reference< css::sdbc::XRowSet >& xCursor ) override;
439  virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) override;
440  virtual ::svt::CellControllerRef CreateController() const override;
441  virtual void PaintFieldToCell(OutputDevice& rDev, const tools::Rectangle& rRect,
442  const css::uno::Reference< css::sdb::XColumn >& _rxField,
443  const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) override;
444  virtual void PaintCell(OutputDevice& rDev, const tools::Rectangle& rRect) override;
445  virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, const Color** ppColor = nullptr) override;
446 
447 private:
448  // DbCellControl
449  virtual bool commitControl( ) override;
450  virtual void updateFromModel( css::uno::Reference< css::beans::XPropertySet > _rxModel ) override;
451 };
452 
453 
454 class DbComboBox final : public DbCellControl
455 {
456 
457 public:
458  DbComboBox(DbGridColumn& _rColumn);
459 
460  virtual void Init( BrowserDataWin& rParent, const css::uno::Reference< css::sdbc::XRowSet >& xCursor ) override;
461  virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, const Color** ppColor = nullptr) override;
462  virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) override;
463  virtual ::svt::CellControllerRef CreateController() const override;
464 
465  void SetList(const css::uno::Any& rItems);
466 
467 private:
468  // DbCellControl
469  virtual bool commitControl( ) override;
470  virtual void updateFromModel( css::uno::Reference< css::beans::XPropertySet > _rxModel ) override;
471 
472  virtual void implAdjustGenericFieldSetting( const css::uno::Reference< css::beans::XPropertySet >& _rxModel ) override;
473 
474  // OPropertyChangeListener
475  virtual void _propertyChanged(const css::beans::PropertyChangeEvent& evt) override;
476 };
477 
478 
479 class DbListBox final : public DbCellControl
480 {
481  bool m_bBound : 1;
482  css::uno::Sequence< OUString > m_aValueList;
483 
484 public:
485  DbListBox(DbGridColumn& _rColumn);
486 
487  virtual void Init( BrowserDataWin& rParent, const css::uno::Reference< css::sdbc::XRowSet >& xCursor ) override;
488  virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, const Color** ppColor = nullptr) override;
489  virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) override;
490  virtual ::svt::CellControllerRef CreateController() const override;
491 
492  void SetList(const css::uno::Any& rItems);
493 
494 private:
495  // DbCellControl
496  virtual bool commitControl( ) override;
497  virtual void updateFromModel( css::uno::Reference< css::beans::XPropertySet > _rxModel ) override;
498 
499  virtual void implAdjustGenericFieldSetting( const css::uno::Reference< css::beans::XPropertySet >& _rxModel ) override;
500 
501  // OPropertyChangeListener
502  virtual void _propertyChanged(const css::beans::PropertyChangeEvent& evt) override;
503 };
504 
505 
506 class DbPatternField final : public DbCellControl
507 {
508 public:
509  DbPatternField( DbGridColumn& _rColumn, const css::uno::Reference<css::uno::XComponentContext>& _rContext );
510  virtual void Init( BrowserDataWin& rParent, const css::uno::Reference< css::sdbc::XRowSet >& xCursor ) override;
511  virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, const Color** ppColor = nullptr) override;
512  virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) override;
513  virtual ::svt::CellControllerRef CreateController() const override;
514 
515 private:
517  virtual bool commitControl( ) override;
518  virtual void updateFromModel( css::uno::Reference< css::beans::XPropertySet > _rxModel ) override;
519 
520  virtual void implAdjustGenericFieldSetting( const css::uno::Reference< css::beans::XPropertySet >& _rxModel ) override;
521 
522  OUString impl_formatText(const OUString& _rText);
523 
524  ::std::unique_ptr< ::dbtools::FormattedColumnValue > m_pValueFormatter;
525  ::std::unique_ptr< ::dbtools::FormattedColumnValue > m_pPaintFormatter;
526  css::uno::Reference<css::uno::XComponentContext> m_xContext;
527 };
528 
529 
531 {
532 private:
533  sal_Int16 m_nStandardAlign;
534 
535 public:
536 
537 protected:
538  DbSpinField( DbGridColumn& _rColumn, sal_Int16 _nStandardAlign = css::awt::TextAlign::RIGHT );
539 
540 public:
541  virtual void Init( BrowserDataWin& rParent, const css::uno::Reference< css::sdbc::XRowSet >& _rxCursor ) override;
542  virtual ::svt::CellControllerRef CreateController() const override;
543 
544 protected:
546  BrowserDataWin* _pParent,
547  bool bSpinButton,
548  const css::uno::Reference< css::beans::XPropertySet >& _rxModel
549  ) = 0;
550 };
551 
552 class DbDateField final : public DbSpinField
553 {
554 public:
555  DbDateField(DbGridColumn& _rColumn);
556  virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, const Color** ppColor = nullptr) override;
557  virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) override;
558 
559 private:
560  // DbCellControl
561  virtual bool commitControl( ) override;
562  virtual void updateFromModel( css::uno::Reference< css::beans::XPropertySet > _rxModel ) override;
563 
564  // DbSpinField
566  BrowserDataWin* _pParent,
567  bool bSpinButton,
568  const css::uno::Reference< css::beans::XPropertySet >& _rxModel
569  ) override;
570 
572  virtual void implAdjustGenericFieldSetting( const css::uno::Reference< css::beans::XPropertySet >& _rxModel ) override;
573 };
574 
575 class DbTimeField final : public DbSpinField
576 {
577 public:
578  DbTimeField(DbGridColumn& _rColumn);
579  virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, const Color** ppColor = nullptr) override;
580  virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) override;
581 
582 private:
583  // DbCellControl
584  virtual bool commitControl( ) override;
585  virtual void updateFromModel( css::uno::Reference< css::beans::XPropertySet > _rxModel ) override;
586 
587  // DbSpinField
589  BrowserDataWin* _pParent,
590  bool bSpinButton,
591  const css::uno::Reference< css::beans::XPropertySet >& _rxModel
592  ) override;
593 
595  virtual void implAdjustGenericFieldSetting( const css::uno::Reference< css::beans::XPropertySet >& _rxModel ) override;
596 };
597 
598 class DbCurrencyField final : public DbSpinField
599 {
600 public:
601  DbCurrencyField(DbGridColumn& _rColumn);
602  virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, const Color** ppColor = nullptr) override;
603  virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) override;
604 
605 private:
606  // DbCellControl
607  virtual bool commitControl( ) override;
608  virtual void updateFromModel( css::uno::Reference< css::beans::XPropertySet > _rxModel ) override;
609 
610  // DbSpinField
612  BrowserDataWin* _pParent,
613  bool bSpinButton,
614  const css::uno::Reference< css::beans::XPropertySet >& _rxModel
615  ) override;
616 
618  virtual void implAdjustGenericFieldSetting( const css::uno::Reference< css::beans::XPropertySet >& _rxModel ) override;
619 };
620 
621 class DbNumericField final : public DbSpinField
622 {
623 public:
624  DbNumericField(DbGridColumn& _rColumn);
625 
626  virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, const Color** ppColor = nullptr) override;
627  virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) override;
628 
629 private:
630  // DbCellControl
631  virtual bool commitControl( ) override;
632  virtual void updateFromModel( css::uno::Reference< css::beans::XPropertySet > _rxModel ) override;
633 
634  // DbSpinField
636  BrowserDataWin* _pParent,
637  bool bSpinButton,
638  const css::uno::Reference< css::beans::XPropertySet >& _rxModel
639  ) override;
640 
642  void implAdjustGenericFieldSetting( const css::uno::Reference< css::beans::XPropertySet >& _rxModel ) override;
643 };
644 
645 class DbFilterField final
646  :public DbCellControl
647  ,public ::svxform::OSQLParserClient
648 {
649 public:
650  DbFilterField(const css::uno::Reference< css::uno::XComponentContext >& rxContext, DbGridColumn& _rColumn);
651  virtual ~DbFilterField() override;
652 
653  virtual void Init( BrowserDataWin& rParent, const css::uno::Reference< css::sdbc::XRowSet >& xCursor ) override;
654  virtual ::svt::CellControllerRef CreateController() const override;
655  virtual void PaintCell(OutputDevice& rDev, const tools::Rectangle& rRect) override;
656  virtual void Update() override;
657  virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, const Color** ppColor = nullptr) override;
658  virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) override;
659 
660  const OUString& GetText() const {return m_aText;}
661  void SetText(const OUString& rText);
662 
663  void SetCommitHdl( const Link<DbFilterField&,void>& rLink ) { m_aCommitLink = rLink; }
664 
665 private:
666  // DbCellControl
667  virtual bool commitControl( ) override;
668  virtual void updateFromModel( css::uno::Reference< css::beans::XPropertySet > _rxModel ) override;
669 
670  void SetList(const css::uno::Any& rItems, bool bComboBox);
671  void CreateControl(BrowserDataWin* pParent, const css::uno::Reference< css::beans::XPropertySet >& xModel);
672  DECL_LINK(OnToggle, weld::CheckButton&, void);
673 
674  css::uno::Sequence< OUString > m_aValueList;
675  OUString m_aText;
677  sal_Int16 m_nControlClass;
678  bool m_bFilterList : 1;
680 };
681 
682 
683 // Base class providing the access to a grid cell
684 
685 typedef ::cppu::ImplHelper2 < css::awt::XControl
686  , css::form::XBoundControl
688 typedef ::cppu::ImplHelper1 < css::awt::XWindow
691  ,public FmXGridCell_Base
692  ,public FmXGridCell_WindowBase
693 {
694 protected:
695  ::osl::Mutex m_aMutex;
697  std::unique_ptr<DbCellControl> m_pCellControl;
698 
699 private:
705 
706 protected:
707  virtual ~FmXGridCell() override;
708 
709 public:
710  FmXGridCell( DbGridColumn* pColumn, std::unique_ptr<DbCellControl> pControl );
711  void init();
712 
714  virtual css::uno::Any SAL_CALL queryAggregation( const css::uno::Type& _rType ) override;
715 
716  void SetTextLineColor();
717  void SetTextLineColor(const Color& _rColor);
718 
719 // XTypeProvider
720  virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override;
721  virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
722 
723 // OComponentHelper
724  virtual void SAL_CALL disposing() override;
725 
726 // css::lang::XComponent
727  virtual void SAL_CALL dispose() override {OComponentHelper::dispose();}
728  virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener >& aListener) override { OComponentHelper::addEventListener(aListener);}
729  virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener >& aListener) override { OComponentHelper::removeEventListener(aListener);}
730 
731 // css::awt::XControl
732  virtual void SAL_CALL setContext(const css::uno::Reference< css::uno::XInterface >& /*Context*/) override {}
733  virtual css::uno::Reference< css::uno::XInterface > SAL_CALL getContext() override;
734  virtual void SAL_CALL createPeer(const css::uno::Reference< css::awt::XToolkit >& /*Toolkit*/, const css::uno::Reference< css::awt::XWindowPeer >& /*Parent*/) override {}
735 
736  virtual css::uno::Reference< css::awt::XWindowPeer > SAL_CALL getPeer() override {return css::uno::Reference< css::awt::XWindowPeer > ();}
737  virtual sal_Bool SAL_CALL setModel(const css::uno::Reference< css::awt::XControlModel >& /*Model*/) override {return false;}
738  virtual css::uno::Reference< css::awt::XControlModel > SAL_CALL getModel() override;
739  virtual css::uno::Reference< css::awt::XView > SAL_CALL getView() override {return css::uno::Reference< css::awt::XView > ();}
740  virtual void SAL_CALL setDesignMode(sal_Bool /*bOn*/) override {}
741  virtual sal_Bool SAL_CALL isDesignMode() override {return false;}
742  virtual sal_Bool SAL_CALL isTransparent() override {return false;}
743 
744 // css::form::XBoundControl
745  virtual sal_Bool SAL_CALL getLock() override;
746  virtual void SAL_CALL setLock(sal_Bool _bLock) override;
747 
748  // XWindow
749  virtual void SAL_CALL setPosSize( ::sal_Int32 X, ::sal_Int32 Y, ::sal_Int32 Width, ::sal_Int32 Height, ::sal_Int16 Flags ) override;
750  virtual css::awt::Rectangle SAL_CALL getPosSize( ) override;
751  virtual void SAL_CALL setVisible( sal_Bool Visible ) override;
752  virtual void SAL_CALL setEnable( sal_Bool Enable ) override;
753  virtual void SAL_CALL setFocus( ) override;
754  virtual void SAL_CALL addWindowListener( const css::uno::Reference< css::awt::XWindowListener >& xListener ) override;
755  virtual void SAL_CALL removeWindowListener( const css::uno::Reference< css::awt::XWindowListener >& xListener ) override;
756  virtual void SAL_CALL addFocusListener( const css::uno::Reference< css::awt::XFocusListener >& xListener ) override;
757  virtual void SAL_CALL removeFocusListener( const css::uno::Reference< css::awt::XFocusListener >& xListener ) override;
758  virtual void SAL_CALL addKeyListener( const css::uno::Reference< css::awt::XKeyListener >& xListener ) override;
759  virtual void SAL_CALL removeKeyListener( const css::uno::Reference< css::awt::XKeyListener >& xListener ) override;
760  virtual void SAL_CALL addMouseListener( const css::uno::Reference< css::awt::XMouseListener >& xListener ) override;
761  virtual void SAL_CALL removeMouseListener( const css::uno::Reference< css::awt::XMouseListener >& xListener ) override;
762  virtual void SAL_CALL addMouseMotionListener( const css::uno::Reference< css::awt::XMouseMotionListener >& xListener ) override;
763  virtual void SAL_CALL removeMouseMotionListener( const css::uno::Reference< css::awt::XMouseMotionListener >& xListener ) override;
764  virtual void SAL_CALL addPaintListener( const css::uno::Reference< css::awt::XPaintListener >& xListener ) override;
765  virtual void SAL_CALL removePaintListener( const css::uno::Reference< css::awt::XPaintListener >& xListener ) override;
766 
767  bool Commit() {return m_pCellControl->Commit();}
768  void ImplInitWindow( vcl::Window const & rParent, const InitWindowFacet _eInitWhat )
769  { m_pCellControl->ImplInitWindow( rParent, _eInitWhat ); }
770 
771  bool isAlignedController() const { return m_pCellControl->isAlignedController(); }
772  void AlignControl(sal_Int16 nAlignment)
773  { m_pCellControl->AlignControl(nAlignment);}
774 
775 protected:
776  void onWindowEvent(const VclEventId _nEventId, const void* _pEventData);
777 
778  // default implementations call our focus listeners, don't forget to call them if you override this
779  virtual void onFocusGained( const css::awt::FocusEvent& _rEvent );
780  virtual void onFocusLost( const css::awt::FocusEvent& _rEvent );
781 
782 private:
784  DECL_LINK(OnFocusGained, LinkParamNone*, void);
785  DECL_LINK(OnFocusLost, LinkParamNone*, void);
786  DECL_LINK(OnMousePress, const MouseEvent&, void);
787  DECL_LINK(OnMouseRelease, const MouseEvent&, void);
788  DECL_LINK(OnMouseMove, const MouseEvent&, void);
789 
790  DECL_LINK( OnWindowEvent, VclWindowEvent&, void );
791 };
792 
793 
794 class FmXDataCell : public FmXGridCell
795 {
796 public:
797  FmXDataCell( DbGridColumn* pColumn, std::unique_ptr<DbCellControl> pControl )
798  :FmXGridCell( pColumn, std::move(pControl) )
799  {
800  }
801 
802  virtual void PaintFieldToCell(OutputDevice& rDev,
803  const tools::Rectangle& rRect,
804  const css::uno::Reference< css::sdb::XColumn >& xField,
805  const css::uno::Reference< css::util::XNumberFormatter >& xFormatter);
806 
807  void UpdateFromField(const css::uno::Reference< css::sdb::XColumn >& xField,
808  const css::uno::Reference< css::util::XNumberFormatter >& xFormatter)
809  { m_pCellControl->UpdateFromField(xField, xFormatter); }
810 
811 protected:
812  void UpdateFromColumn();
813 };
814 
815 
816 class FmXTextCell : public FmXDataCell
817 {
818 protected:
820 
821 public:
822  FmXTextCell( DbGridColumn* pColumn, std::unique_ptr<DbCellControl> pControl );
823 
824  virtual void PaintFieldToCell(OutputDevice& rDev,
825  const tools::Rectangle& rRect,
826  const css::uno::Reference< css::sdb::XColumn >& xField,
827  const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) override;
828 
829  OUString GetText(const css::uno::Reference< css::sdb::XColumn >& _rxField,
830  const css::uno::Reference< css::util::XNumberFormatter >& xFormatter,
831  const Color** ppColor = nullptr)
832  {return m_pCellControl->GetFormatText(_rxField, xFormatter, ppColor);}
833 };
834 
835 
836 typedef ::cppu::ImplHelper2 < css::awt::XTextComponent
837  , css::form::XChangeBroadcaster
839 class FmXEditCell final : public FmXTextCell,
840  public FmXEditCell_Base
841 {
842 public:
843  FmXEditCell( DbGridColumn* pColumn, std::unique_ptr<DbCellControl> pControl );
844 
846  virtual css::uno::Any SAL_CALL queryAggregation( const css::uno::Type& _rType ) override;
847 
848 // XTypeProvider
849  virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override;
850  virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
851 
852 // OComponentHelper
853  virtual void SAL_CALL disposing() override;
854 
855 // css::awt::XTextComponent
856  virtual void SAL_CALL addTextListener(const css::uno::Reference< css::awt::XTextListener >& l) override;
857  virtual void SAL_CALL removeTextListener(const css::uno::Reference< css::awt::XTextListener >& l) override;
858  virtual void SAL_CALL setText(const OUString& aText) override;
859  virtual void SAL_CALL insertText(const css::awt::Selection& Sel, const OUString& Text) override;
860  virtual OUString SAL_CALL getText() override;
861  virtual OUString SAL_CALL getSelectedText() override;
862  virtual void SAL_CALL setSelection(const css::awt::Selection& aSelection) override;
863  virtual css::awt::Selection SAL_CALL getSelection() override;
864  virtual sal_Bool SAL_CALL isEditable() override;
865  virtual void SAL_CALL setEditable(sal_Bool bEditable) override;
866  virtual void SAL_CALL setMaxTextLen(sal_Int16 nLen) override;
867  virtual sal_Int16 SAL_CALL getMaxTextLen() override;
868 
869  // XChangeBroadcaster
870  virtual void SAL_CALL addChangeListener( const css::uno::Reference< css::form::XChangeListener >& aListener ) override;
871  virtual void SAL_CALL removeChangeListener( const css::uno::Reference< css::form::XChangeListener >& aListener ) override;
872 
873 private:
874  virtual ~FmXEditCell() override;
875 
876  virtual void onFocusGained( const css::awt::FocusEvent& _rEvent ) override;
877  virtual void onFocusLost( const css::awt::FocusEvent& _rEvent ) override;
878 
879  DECL_LINK(ModifyHdl, LinkParamNone*, void);
880 
881  void onTextChanged();
882 
883  OUString m_sValueOnEnter;
888 };
889 
890 typedef ::cppu::ImplHelper2 < css::awt::XCheckBox
891  , css::awt::XButton
893 class FmXCheckBoxCell final : public FmXDataCell,
894  public FmXCheckBoxCell_Base
895 {
900 
901  DECL_LINK(ModifyHdl, LinkParamNone*, void);
902 
903  virtual ~FmXCheckBoxCell() override;
904 
905 public:
906  FmXCheckBoxCell( DbGridColumn* pColumn, std::unique_ptr<DbCellControl> pControl );
907 
908 // UNO
910  virtual css::uno::Any SAL_CALL queryAggregation( const css::uno::Type& _rType ) override;
911  virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override;
912  virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
913 
914 // OComponentHelper
915  virtual void SAL_CALL disposing() override;
916 
917 // css::awt::XCheckBox
918  virtual void SAL_CALL addItemListener(const css::uno::Reference< css::awt::XItemListener >& l) override;
919  virtual void SAL_CALL removeItemListener(const css::uno::Reference< css::awt::XItemListener >& l) override;
920  virtual sal_Int16 SAL_CALL getState() override;
921  virtual void SAL_CALL setState(sal_Int16 n) override;
922  virtual void SAL_CALL setLabel(const OUString& Label) override;
923  virtual void SAL_CALL enableTriState(sal_Bool b) override;
924 
925  // XButton
926  virtual void SAL_CALL addActionListener( const css::uno::Reference< css::awt::XActionListener >& l ) override;
927  virtual void SAL_CALL removeActionListener( const css::uno::Reference< css::awt::XActionListener >& l ) override;
928  //virtual void SAL_CALL setLabel( const OUString& Label ) throw (css::uno::RuntimeException);
929  virtual void SAL_CALL setActionCommand( const OUString& Command ) override;
930 };
931 
932 typedef ::cppu::ImplHelper1 < css::awt::XListBox
934 class FmXListBoxCell final : public FmXTextCell
935  , public FmXListBoxCell_Base
936 {
937 public:
938  FmXListBoxCell( DbGridColumn* pColumn, std::unique_ptr<DbCellControl> pControl );
939 
941  virtual css::uno::Any SAL_CALL queryAggregation( const css::uno::Type& _rType ) override;
942  virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override;
943  virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
944 
945 // OComponentHelper
946  virtual void SAL_CALL disposing() override;
947 
948 // css::awt::XListBox
949  virtual void SAL_CALL addItemListener(const css::uno::Reference< css::awt::XItemListener >& l) override;
950  virtual void SAL_CALL removeItemListener(const css::uno::Reference< css::awt::XItemListener >& l) override;
951  virtual void SAL_CALL addActionListener(const css::uno::Reference< css::awt::XActionListener >& l) override;
952  virtual void SAL_CALL removeActionListener(const css::uno::Reference< css::awt::XActionListener >& l) override;
953  virtual void SAL_CALL addItem(const OUString& aItem, sal_Int16 nPos) override;
954  virtual void SAL_CALL addItems(const css::uno::Sequence< OUString >& aItems, sal_Int16 nPos) override;
955  virtual void SAL_CALL removeItems(sal_Int16 nPos, sal_Int16 nCount) override;
956  virtual sal_Int16 SAL_CALL getItemCount() override;
957  virtual OUString SAL_CALL getItem(sal_Int16 nPos) override;
958  virtual css::uno::Sequence< OUString > SAL_CALL getItems() override;
959  virtual sal_Int16 SAL_CALL getSelectedItemPos() override;
960  virtual css::uno::Sequence< sal_Int16 > SAL_CALL getSelectedItemsPos() override;
961  virtual OUString SAL_CALL getSelectedItem() override;
962  virtual css::uno::Sequence< OUString > SAL_CALL getSelectedItems() override;
963  virtual void SAL_CALL selectItemPos(sal_Int16 nPos, sal_Bool bSelect) override;
964  virtual void SAL_CALL selectItemsPos(const css::uno::Sequence< sal_Int16 >& aPositions, sal_Bool bSelect) override;
965  virtual void SAL_CALL selectItem(const OUString& aItem, sal_Bool bSelect) override;
966  virtual sal_Bool SAL_CALL isMutipleMode() override;
967  virtual void SAL_CALL setMultipleMode(sal_Bool bMulti) override;
968  virtual sal_Int16 SAL_CALL getDropDownLineCount() override;
969  virtual void SAL_CALL setDropDownLineCount(sal_Int16 nLines) override;
970  virtual void SAL_CALL makeVisible(sal_Int16 nEntry) override;
971 
972 private:
973  virtual ~FmXListBoxCell() override;
974 
975  DECL_LINK(ChangedHdl, bool, void);
976 
977  void OnDoubleClick();
978 
982  sal_uInt16 m_nLines;
983  bool m_bMulti;
984 };
985 
986 
987 typedef ::cppu::ImplHelper1 < css::awt::XComboBox
989 class FmXComboBoxCell final : public FmXTextCell
990  , public FmXComboBoxCell_Base
991 {
992 private:
996  sal_uInt16 m_nLines;
997 
998  DECL_LINK(ChangedHdl, bool, void);
999 
1000  virtual ~FmXComboBoxCell() override;
1001 
1002 public:
1003  FmXComboBoxCell( DbGridColumn* pColumn, std::unique_ptr<DbCellControl> pControl );
1004 
1006  virtual css::uno::Any SAL_CALL queryAggregation( const css::uno::Type& _rType ) override;
1007  virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override;
1008  virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
1009 
1010  // OComponentHelper
1011  virtual void SAL_CALL disposing() override;
1012 
1013  // XComboBox
1014  virtual void SAL_CALL addItemListener( const css::uno::Reference< css::awt::XItemListener >& Listener ) override;
1015  virtual void SAL_CALL removeItemListener( const css::uno::Reference< css::awt::XItemListener >& Listener ) override;
1016  virtual void SAL_CALL addActionListener( const css::uno::Reference< css::awt::XActionListener >& Listener ) override;
1017  virtual void SAL_CALL removeActionListener( const css::uno::Reference< css::awt::XActionListener >& Listener ) override;
1018  virtual void SAL_CALL addItem( const OUString& Item, ::sal_Int16 Pos ) override;
1019  virtual void SAL_CALL addItems( const css::uno::Sequence< OUString >& Items, ::sal_Int16 Pos ) override;
1020  virtual void SAL_CALL removeItems( ::sal_Int16 nPos, ::sal_Int16 nCount ) override;
1021  virtual ::sal_Int16 SAL_CALL getItemCount( ) override;
1022  virtual OUString SAL_CALL getItem( ::sal_Int16 Pos ) override;
1023  virtual css::uno::Sequence< OUString > SAL_CALL getItems( ) override;
1024  virtual ::sal_Int16 SAL_CALL getDropDownLineCount( ) override;
1025  virtual void SAL_CALL setDropDownLineCount( ::sal_Int16 Lines ) override;
1026 };
1027 
1028 typedef ::cppu::ImplHelper2 < css::awt::XTextComponent
1029  , css::lang::XUnoTunnel
1031 class FmXFilterCell final : public FmXGridCell
1032  ,public FmXFilterCell_Base
1033 {
1034 public:
1035  FmXFilterCell(DbGridColumn* pColumn, std::unique_ptr<DbFilterField> pControl);
1036 
1037 
1039  virtual css::uno::Any SAL_CALL queryAggregation( const css::uno::Type& _rType ) override;
1040  virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override;
1041  virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
1042 
1043 // XUnoTunnel
1044  virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;
1045 
1046 // helpers for XUnoTunnel
1047  static const css::uno::Sequence<sal_Int8>& getUnoTunnelId();
1048 
1049 // painting the filter text
1050  void PaintCell(OutputDevice& rDev, const tools::Rectangle& rRect);
1051  void Update(){m_pCellControl->Update();}
1052 
1053 // OComponentHelper
1054  virtual void SAL_CALL disposing() override;
1055 
1056 // css::awt::XTextComponent
1057  virtual void SAL_CALL addTextListener(const css::uno::Reference< css::awt::XTextListener >& l) override;
1058  virtual void SAL_CALL removeTextListener(const css::uno::Reference< css::awt::XTextListener >& l) override;
1059  virtual void SAL_CALL setText(const OUString& aText) override;
1060  virtual void SAL_CALL insertText(const css::awt::Selection& Sel, const OUString& Text) override;
1061  virtual OUString SAL_CALL getText() override;
1062  virtual OUString SAL_CALL getSelectedText() override;
1063  virtual void SAL_CALL setSelection(const css::awt::Selection& aSelection) override;
1064  virtual css::awt::Selection SAL_CALL getSelection() override;
1065  virtual sal_Bool SAL_CALL isEditable() override;
1066  virtual void SAL_CALL setEditable(sal_Bool bEditable) override;
1067  virtual void SAL_CALL setMaxTextLen(sal_Int16 nLen) override;
1068  virtual sal_Int16 SAL_CALL getMaxTextLen() override;
1069 
1070 private:
1071  DECL_LINK( OnCommit, DbFilterField&, void );
1072  virtual ~FmXFilterCell() override;
1073 
1075 };
1076 
1077 #endif // INCLUDED_SVX_SOURCE_INC_GRIDCELL_HXX
1078 
1079 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
const css::uno::Reference< css::beans::XPropertySet > & getModel() const
Definition: gridcell.hxx:122
Type
virtual sal_Int16 SAL_CALL getState() override
Definition: gridcell.cxx:3919
::osl::Mutex m_aMutex
Definition: gridcell.hxx:695
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter, const Color **ppColor=nullptr) override
Definition: gridcell.cxx:2306
void implValuePropertyChanged()
Definition: gridcell.cxx:618
bool m_bNumeric
Definition: gridcell.hxx:93
virtual void SAL_CALL removeMouseListener(const css::uno::Reference< css::awt::XMouseListener > &xListener) override
Definition: gridcell.cxx:3415
void UpdateControl()
Definition: gridcell.hxx:152
virtual void SAL_CALL addItemListener(const css::uno::Reference< css::awt::XItemListener > &l) override
Definition: gridcell.cxx:3898
void ImplInitWindow(vcl::Window const &rParent, const InitWindowFacet _eInitWhat)
Definition: gridcell.cxx:696
virtual ::svt::CellControllerRef CreateController() const override
Definition: gridcell.cxx:2870
virtual VclPtr< svt::ControlBase > createField(BrowserDataWin *_pParent, bool bSpinButton, const css::uno::Reference< css::beans::XPropertySet > &_rxModel) override
Definition: gridcell.cxx:2354
virtual void SAL_CALL enableTriState(sal_Bool b) override
Definition: gridcell.cxx:3931
bool m_bObject
Definition: gridcell.hxx:94
virtual void Init(BrowserDataWin &rParent, const css::uno::Reference< css::sdbc::XRowSet > &xCursor) override
Definition: gridcell.cxx:1853
virtual void SAL_CALL addActionListener(const css::uno::Reference< css::awt::XActionListener > &l) override
Definition: gridcell.cxx:3939
virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter) override
Definition: gridcell.cxx:1676
virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter, const Color **ppColor=nullptr) override
Definition: gridcell.cxx:2056
virtual void updateFromModel(css::uno::Reference< css::beans::XPropertySet > _rxModel)=0
updates the current content of the control (e.g.
virtual css::uno::Reference< css::awt::XControlModel > SAL_CALL getModel() override
Definition: gridcell.cxx:3303
virtual bool commitControl() override
commits the content of the control (e.g.
Definition: gridcell.cxx:1190
DbCurrencyField(DbGridColumn &_rColumn)
Definition: gridcell.cxx:2098
std::unique_ptr<::svt::IEditImplementation > m_pEdit
Definition: gridcell.hxx:381
virtual void SAL_CALL setSelection(const css::awt::Selection &aSelection) override
Definition: gridcell.cxx:3755
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
Definition: gridcell.cxx:3672
bool m_bTransparent
Definition: gridcell.hxx:205
FmXTextCell(DbGridColumn *pColumn, std::unique_ptr< DbCellControl > pControl)
Definition: gridcell.cxx:3563
bool m_bIsMultiLineText
Definition: gridcell.hxx:819
::cppu::ImplHelper2< css::awt::XControl, css::form::XBoundControl > FmXGridCell_Base
Definition: gridcell.hxx:687
DbComboBox(DbGridColumn &_rColumn)
Definition: gridcell.cxx:2457
DbGridColumn * m_pColumn
Definition: gridcell.hxx:696
Flags
svt::ControlBase * getEventWindow() const
Definition: gridcell.cxx:3217
bool m_bAccessingValueProperty
Definition: gridcell.hxx:207
::comphelper::OInterfaceContainerHelper2 m_aFocusListeners
Definition: gridcell.hxx:701
virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter, const Color **ppColor=nullptr)=0
virtual void Init(BrowserDataWin &rParent, const css::uno::Reference< css::sdbc::XRowSet > &xCursor) override
Definition: gridcell.cxx:1226
a field which is bound to a column which supports the MaxTextLen property
Definition: gridcell.hxx:359
virtual ::svt::CellControllerRef CreateController() const override
Definition: gridcell.cxx:1132
virtual void implSetEffectiveMaxTextLen(sal_Int32 _nMaxLen) override
Definition: gridcell.cxx:1207
virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter) override
Definition: gridcell.cxx:2535
DECL_LINK(ModifyHdl, LinkParamNone *, void)
virtual void implSetEffectiveMaxTextLen(sal_Int32 _nMaxLen)
Definition: gridcell.cxx:1022
void CreateControl(BrowserDataWin *pParent, const css::uno::Reference< css::beans::XPropertySet > &xModel)
Definition: gridcell.cxx:2784
DbPatternField(DbGridColumn &_rColumn, const css::uno::Reference< css::uno::XComponentContext > &_rContext)
Definition: gridcell.cxx:1818
virtual ~DbFormattedField() override
Definition: gridcell.cxx:1222
void setLock(bool _bLock)
Definition: gridcell.cxx:385
::comphelper::OInterfaceContainerHelper2 m_aItemListeners
Definition: gridcell.hxx:896
signed char sal_Int8
sal_Int16 m_nControlClass
Definition: gridcell.hxx:677
::cppu::ImplHelper2< css::awt::XCheckBox, css::awt::XButton > FmXCheckBoxCell_Base
Definition: gridcell.hxx:892
virtual void Init(BrowserDataWin &rParent, const css::uno::Reference< css::sdbc::XRowSet > &xCursor) override
Definition: gridcell.cxx:2834
void SetList(const css::uno::Any &rItems)
Definition: gridcell.cxx:2478
virtual OUString SAL_CALL getText() override
Definition: gridcell.cxx:3719
virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter) override
Definition: gridcell.cxx:2666
::cppu::ImplHelper2< css::awt::XTextComponent, css::form::XChangeBroadcaster > FmXEditCell_Base
Definition: gridcell.hxx:838
FmXEditCell(DbGridColumn *pColumn, std::unique_ptr< DbCellControl > pControl)
Definition: gridcell.cxx:3616
virtual void SAL_CALL setMaxTextLen(sal_Int16 nLen) override
Definition: gridcell.cxx:3796
virtual sal_Bool SAL_CALL isDesignMode() override
Definition: gridcell.hxx:741
virtual void SAL_CALL setVisible(sal_Bool Visible) override
Definition: gridcell.cxx:3345
sal_Int16 m_nFieldType
Definition: gridcell.hxx:85
virtual bool commitControl() override
commits the content of the control (e.g.
Definition: gridcell.cxx:2082
void ImplInitWindow(vcl::Window const &rParent, const InitWindowFacet _eInitWhat)
Definition: gridcell.cxx:511
virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter) override
Definition: gridcell.cxx:1508
virtual void _propertyChanged(const css::beans::PropertyChangeEvent &evt) override
Definition: gridcell.cxx:1440
exports com.sun.star. awt
void CreateControl(sal_Int32 _nFieldPos, const css::uno::Reference< css::beans::XPropertySet > &xField, sal_Int32 nTypeId)
Definition: gridcell.cxx:137
virtual bool commitControl() override
commits the content of the control (e.g.
Definition: gridcell.cxx:2700
virtual void SAL_CALL setEditable(sal_Bool bEditable) override
Definition: gridcell.cxx:3781
sal_Int32 m_nFormatKey
Definition: gridcell.hxx:84
virtual bool commitControl() override
commits the content of the control (e.g.
Definition: gridcell.cxx:1574
void implSetMaxTextLen(sal_Int16 _nMaxLen)
Definition: gridcell.hxx:371
sal_Int32 m_nLastVisibleWidth
Definition: gridcell.hxx:83
sal_Int16 GetFieldPos() const
Definition: gridcell.hxx:130
const css::uno::Reference< css::sdbc::XRowSet > & getCursor() const
Definition: gridcell.hxx:219
void init()
Definition: gridcell.cxx:3203
virtual VclPtr< svt::ControlBase > createField(BrowserDataWin *_pParent, bool bSpinButton, const css::uno::Reference< css::beans::XPropertySet > &_rxModel) override
Definition: gridcell.cxx:2025
virtual void PaintCell(OutputDevice &_rDev, const tools::Rectangle &_rRect)
Definition: gridcell.cxx:952
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
virtual void SAL_CALL removeFocusListener(const css::uno::Reference< css::awt::XFocusListener > &xListener) override
Definition: gridcell.cxx:3387
virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter, const Color **ppColor=nullptr) override
Definition: gridcell.cxx:2641
virtual void SAL_CALL addKeyListener(const css::uno::Reference< css::awt::XKeyListener > &xListener) override
Definition: gridcell.cxx:3394
sal_Int16 m_nStandardAlign
Definition: gridcell.hxx:533
virtual void SAL_CALL addWindowListener(const css::uno::Reference< css::awt::XWindowListener > &xListener) override
Definition: gridcell.cxx:3366
sal_Int16 SetAlignmentFromModel(sal_Int16 nStandardAlign)
Definition: gridcell.cxx:372
virtual void PaintFieldToCell(OutputDevice &_rDev, const tools::Rectangle &_rRect, const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &_rxFormatter) override
Definition: gridcell.cxx:1137
virtual void SAL_CALL addPaintListener(const css::uno::Reference< css::awt::XPaintListener > &xListener) override
Definition: gridcell.cxx:3435
rtl::Reference< FmXGridCell > m_pCell
Definition: gridcell.hxx:77
virtual void Init(BrowserDataWin &rParent, const css::uno::Reference< css::sdbc::XRowSet > &xCursor) override
Definition: gridcell.cxx:2500
DbLimitedLengthField(DbGridColumn &_rColumn)
Definition: gridcell.cxx:1003
::comphelper::OInterfaceContainerHelper2 m_aTextListeners
Definition: gridcell.hxx:1074
virtual void Init(BrowserDataWin &rParent, const css::uno::Reference< css::sdbc::XRowSet > &xCursor)
Definition: gridcell.cxx:829
bool IsNumeric() const
Definition: gridcell.hxx:131
bool m_bLocked
Definition: gridcell.hxx:96
DbCellControl(DbGridColumn &_rColumn)
Definition: gridcell.cxx:521
void implAdjustReadOnly(const css::uno::Reference< css::beans::XPropertySet > &_rxModel, bool i_bReadOnly)
updates the "readonly" setting on m_pWindow, according to the respective property value in the given ...
Definition: gridcell.cxx:802
bool IsAutoValue() const
Definition: gridcell.hxx:128
virtual bool commitControl() override
commits the content of the control (e.g.
Definition: gridcell.cxx:2329
virtual void SAL_CALL setActionCommand(const OUString &Command) override
Definition: gridcell.cxx:3960
css::uno::Sequence< OUString > m_aValueList
Definition: gridcell.hxx:674
virtual void Init(BrowserDataWin &rParent, const css::uno::Reference< css::sdbc::XRowSet > &xCursor) override
Definition: gridcell.cxx:1041
virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter) override
Definition: gridcell.cxx:2181
sal_uInt16 m_nLines
Definition: gridcell.hxx:982
::std::unique_ptr< ::dbtools::FormattedColumnValue > m_pPaintFormatter
Definition: gridcell.hxx:525
FmXGridCell(DbGridColumn *pColumn, std::unique_ptr< DbCellControl > pControl)
Definition: gridcell.cxx:3191
virtual void SAL_CALL removeKeyListener(const css::uno::Reference< css::awt::XKeyListener > &xListener) override
Definition: gridcell.cxx:3401
css::uno::Reference< css::sdb::XColumn > GetCurrentFieldValue() const
Definition: gridcell.cxx:432
virtual void Init(BrowserDataWin &rParent, const css::uno::Reference< css::sdbc::XRowSet > &_rxCursor) override
Definition: gridcell.cxx:1933
virtual void onFocusGained(const css::awt::FocusEvent &_rEvent)
Definition: gridcell.cxx:3451
css::uno::Reference< css::uno::XComponentContext > m_xContext
Definition: gridcell.hxx:526
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL getContext() override
Definition: gridcell.cxx:3297
virtual void _propertyChanged(const css::beans::PropertyChangeEvent &evt) override
Definition: gridcell.cxx:2466
virtual bool commitControl()=0
commits the content of the control (e.g.
::svt::IEditImplementation * m_pEditImplementation
Definition: gridcell.hxx:886
::comphelper::OInterfaceContainerHelper2 m_aChangeListeners
Definition: gridcell.hxx:885
virtual ::svt::CellControllerRef CreateController() const override
Definition: gridcell.cxx:2522
virtual void SAL_CALL setText(const OUString &aText) override
Definition: gridcell.cxx:3694
bool isTransparent() const
Definition: gridcell.hxx:222
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
Definition: gridcell.cxx:3248
void implAdjustEnabled(const css::uno::Reference< css::beans::XPropertySet > &_rxModel)
updates the "enabled" setting on m_pWindow, according to the respective property value in the given m...
Definition: gridcell.cxx:817
const css::uno::Reference< css::beans::XPropertySet > & GetField() const
Definition: gridcell.hxx:135
virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter, const Color **ppColor=nullptr) override
Definition: gridcell.cxx:2176
css::uno::Reference< css::sdbc::XRowSet > m_xCursor
Definition: gridcell.hxx:210
virtual void Update() override
Definition: gridcell.cxx:3031
DECL_LINK(ModifyHdl, LinkParamNone *, void)
void implAdjustGenericFieldSetting(const css::uno::Reference< css::beans::XPropertySet > &_rxModel) override
initializes everything which relates to the properties describing the numeric behaviour ...
Definition: gridcell.cxx:1970
int nCount
virtual bool commitControl() override
commits the content of the control (e.g.
Definition: gridcell.cxx:2902
virtual void updateFromModel(css::uno::Reference< css::beans::XPropertySet > _rxModel) override
updates the current content of the control (e.g.
Definition: gridcell.cxx:2316
virtual void SAL_CALL addChangeListener(const css::uno::Reference< css::form::XChangeListener > &aListener) override
Definition: gridcell.cxx:3804
virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter, const Color **ppColor=nullptr) override
Definition: gridcell.cxx:1879
VclEventId
void SetCommitHdl(const Link< DbFilterField &, void > &rLink)
Definition: gridcell.hxx:663
virtual bool commitControl() override
commits the content of the control (e.g.
Definition: gridcell.cxx:2559
DECL_LINK(OnToggle, weld::CheckButton &, void)
virtual VclPtr< svt::ControlBase > createField(BrowserDataWin *_pParent, bool bSpinButton, const css::uno::Reference< css::beans::XPropertySet > &_rxModel)=0
virtual sal_Bool SAL_CALL isEditable() override
Definition: gridcell.cxx:3774
virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter) override
Definition: gridcell.cxx:1901
virtual void Init(BrowserDataWin &rParent, const css::uno::Reference< css::sdbc::XRowSet > &xCursor) override
Definition: gridcell.cxx:1616
virtual void SAL_CALL addMouseMotionListener(const css::uno::Reference< css::awt::XMouseMotionListener > &xListener) override
Definition: gridcell.cxx:3422
::comphelper::OInterfaceContainerHelper2 m_aMouseListeners
Definition: gridcell.hxx:703
virtual void SAL_CALL insertText(const css::awt::Selection &Sel, const OUString &Text) override
Definition: gridcell.cxx:3708
virtual void PaintCell(OutputDevice &rDev, const tools::Rectangle &rRect) override
Definition: gridcell.cxx:1712
::comphelper::OInterfaceContainerHelper2 m_aItemListeners
Definition: gridcell.hxx:993
::svt::CellControllerRef s_xEmptyController
Definition: gridcell.hxx:98
virtual bool commitControl() override
commits the content of the control (e.g.
Definition: gridcell.cxx:2441
sal_Int16 m_nAlign
Definition: gridcell.hxx:89
virtual VclPtr< svt::ControlBase > createField(BrowserDataWin *_pParent, bool bSpinButton, const css::uno::Reference< css::beans::XPropertySet > &_rxModel) override
Definition: gridcell.cxx:2145
virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener > &aListener) override
Definition: gridcell.hxx:729
bool m_bFilterList
Definition: gridcell.hxx:678
virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter) override
Definition: gridcell.cxx:2061
virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener > &aListener) override
Definition: gridcell.hxx:728
DbGridColumn(sal_uInt16 _nId, DbGridControl &rParent)
Definition: gridcell.hxx:101
sal_Int16 GetAlignment() const
Definition: gridcell.hxx:129
bool isAlignedController() const
Definition: gridcell.hxx:272
bool m_bInSave
Definition: gridcell.hxx:92
OUString m_aText
Definition: gridcell.hxx:675
DECL_LINK(OnFocusGained, LinkParamNone *, void)
DbGridControl & m_rParent
Definition: gridcell.hxx:80
bool Commit()
Definition: gridcell.cxx:268
::std::unique_ptr< ::dbtools::FormattedColumnValue > m_pValueFormatter
Definition: gridcell.hxx:524
OComponentHelper(::osl::Mutex &rMutex)
::comphelper::OInterfaceContainerHelper2 m_aMouseMotionListeners
Definition: gridcell.hxx:704
virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter, const Color **ppColor=nullptr) override
Definition: gridcell.cxx:3150
void AlignControl(sal_Int16 nAlignment)
Definition: gridcell.hxx:772
virtual void SAL_CALL addFocusListener(const css::uno::Reference< css::awt::XFocusListener > &xListener) override
Definition: gridcell.cxx:3380
DbFilterField(const css::uno::Reference< css::uno::XComponentContext > &rxContext, DbGridColumn &_rColumn)
Definition: gridcell.cxx:2716
OUString m_sValueOnEnter
Definition: gridcell.hxx:883
void setAlignedController(bool _bAlign)
Definition: gridcell.hxx:226
virtual void SAL_CALL setFocus() override
Definition: gridcell.cxx:3359
virtual void SAL_CALL addMouseListener(const css::uno::Reference< css::awt::XMouseListener > &xListener) override
Definition: gridcell.cxx:3408
void SetList(const css::uno::Any &rItems)
Definition: gridcell.cxx:2591
void implDoPropertyListening(const OUString &_rPropertyName, bool _bWarnIfNotExistent)
Definition: gridcell.cxx:572
virtual void SAL_CALL removeWindowListener(const css::uno::Reference< css::awt::XWindowListener > &xListener) override
Definition: gridcell.cxx:3373
virtual void SAL_CALL disposing() override
Definition: gridcell.cxx:3267
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
Definition: gridcell.cxx:3887
virtual void Init(BrowserDataWin &rParent, const css::uno::Reference< css::sdbc::XRowSet > &xCursor) override
Definition: gridcell.cxx:2617
virtual void SAL_CALL disposing() override
Definition: gridcell.cxx:3649
virtual void implAdjustGenericFieldSetting(const css::uno::Reference< css::beans::XPropertySet > &_rxModel)
Definition: gridcell.cxx:631
virtual void SAL_CALL dispose() override
Definition: gridcell.hxx:727
virtual void SAL_CALL setLock(sal_Bool _bLock) override
Definition: gridcell.cxx:3318
DbGridControl & GetParent() const
Definition: gridcell.hxx:136
virtual void implAdjustGenericFieldSetting(const css::uno::Reference< css::beans::XPropertySet > &_rxModel) override
initializes everything which relates to the properties describing the numeric behaviour ...
Definition: gridcell.cxx:2110
virtual css::uno::Any SAL_CALL queryAggregation(const css::uno::Type &_rType) override
Definition: gridcell.cxx:3662
virtual void implAdjustGenericFieldSetting(const css::uno::Reference< css::beans::XPropertySet > &_rxModel) override
Definition: gridcell.cxx:1827
virtual sal_Bool SAL_CALL setModel(const css::uno::Reference< css::awt::XControlModel > &) override
Definition: gridcell.hxx:737
virtual void implAdjustGenericFieldSetting(const css::uno::Reference< css::beans::XPropertySet > &_rxModel) override
Definition: gridcell.cxx:2631
unsigned char sal_Bool
css::uno::Sequence< OUString > m_aValueList
Definition: gridcell.hxx:482
virtual void SAL_CALL disposing() override
Definition: gridcell.cxx:3863
DbDateField(DbGridColumn &_rColumn)
Definition: gridcell.cxx:2218
virtual sal_Bool SAL_CALL isTransparent() override
Definition: gridcell.hxx:742
void SetTextLineColor()
Definition: gridcell.cxx:888
::cppu::ImplHelper1< css::awt::XComboBox > FmXComboBoxCell_Base
Definition: gridcell.hxx:988
virtual void onFocusLost(const css::awt::FocusEvent &_rEvent) override
Definition: gridcell.cxx:3827
virtual void SAL_CALL removeMouseMotionListener(const css::uno::Reference< css::awt::XMouseMotionListener > &xListener) override
Definition: gridcell.cxx:3429
virtual void PaintFieldToCell(OutputDevice &rDev, const tools::Rectangle &rRect, const css::uno::Reference< css::sdb::XColumn > &xField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter) override
Definition: gridcell.cxx:3570
virtual void updateFromModel(css::uno::Reference< css::beans::XPropertySet > _rxModel) override
updates the current content of the control (e.g.
Definition: gridcell.cxx:2676
bool m_bBound
Definition: gridcell.hxx:481
void invalidatedController()
Definition: gridcell.cxx:996
bool IsMultiLineEdit() const
Definition: gridcell.hxx:391
virtual ::svt::CellControllerRef CreateController() const override
Definition: gridcell.cxx:1954
virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter) override
Definition: gridcell.cxx:3155
virtual void updateFromModel(css::uno::Reference< css::beans::XPropertySet > _rxModel) override
updates the current content of the control (e.g.
Definition: gridcell.cxx:2893
::comphelper::OInterfaceContainerHelper2 m_aActionListeners
Definition: gridcell.hxx:897
void unlockValueProperty()
unlocks the listening at the value property
Definition: gridcell.hxx:350
DbGridColumn & m_rColumn
Definition: gridcell.hxx:213
virtual void SAL_CALL setPosSize(::sal_Int32 X,::sal_Int32 Y,::sal_Int32 Width,::sal_Int32 Height,::sal_Int16 Flags) override
Definition: gridcell.cxx:3331
virtual ~FmXCheckBoxCell() override
Definition: gridcell.cxx:3853
::comphelper::OInterfaceContainerHelper2 m_aItemListeners
Definition: gridcell.hxx:979
bool isLocked() const
Definition: gridcell.hxx:182
FmXDataCell(DbGridColumn *pColumn, std::unique_ptr< DbCellControl > pControl)
Definition: gridcell.hxx:797
css::uno::Reference< css::beans::XPropertySet > m_xModel
Definition: gridcell.hxx:72
void UpdateFromColumn()
Definition: gridcell.cxx:3555
bool m_bReadOnly
Definition: gridcell.hxx:90
virtual void PaintCell(OutputDevice &rDev, const tools::Rectangle &rRect) override
Definition: gridcell.cxx:2734
sal_Int32 GetKey() const
Definition: gridcell.hxx:133
virtual void SAL_CALL setState(sal_Int16 n) override
Definition: gridcell.cxx:3908
bool isAlignedController() const
Definition: gridcell.hxx:771
::svt::IEditImplementation * GetEditImplementation()
Definition: gridcell.hxx:390
TextAlign
VclPtr< svt::ControlBase > m_pWindow
Definition: gridcell.hxx:215
DbSpinField(DbGridColumn &_rColumn, sal_Int16 _nStandardAlign=css::awt::TextAlign::RIGHT)
Definition: gridcell.cxx:1927
DbCheckBox(DbGridColumn &_rColumn)
Definition: gridcell.cxx:1595
virtual ~FmXEditCell() override
Definition: gridcell.cxx:3639
#define DECLARE_UNO3_AGG_DEFAULTS(classname, baseclass)
void Clear()
Definition: gridcell.cxx:306
virtual void SAL_CALL removePaintListener(const css::uno::Reference< css::awt::XPaintListener > &xListener) override
Definition: gridcell.cxx:3440
virtual bool commitControl() override
commits the content of the control (e.g.
Definition: gridcell.cxx:1806
void impl_toggleScriptManager_nothrow(bool _bAttach)
attaches or detaches our cell object to the SctriptEventAttacherManager implemented by our model's pa...
Definition: gridcell.cxx:236
DbTimeField(DbGridColumn &_rColumn)
Definition: gridcell.cxx:2345
virtual void updateFromModel(css::uno::Reference< css::beans::XPropertySet > _rxModel) override
updates the current content of the control (e.g.
Definition: gridcell.cxx:1550
::comphelper::OInterfaceContainerHelper2 m_aKeyListeners
Definition: gridcell.hxx:702
virtual css::uno::Reference< css::awt::XView > SAL_CALL getView() override
Definition: gridcell.hxx:739
sal_uInt16 m_nId
Definition: gridcell.hxx:87
#define ENSURE_OR_THROW(c, m)
::cppu::ImplHelper1< css::awt::XWindow > FmXGridCell_WindowBase
Definition: gridcell.hxx:689
void setModel(const css::uno::Reference< css::beans::XPropertySet > &_xModel)
Definition: gridcell.cxx:294
virtual void updateFromModel(css::uno::Reference< css::beans::XPropertySet > _rxModel) override
updates the current content of the control (e.g.
Definition: gridcell.cxx:2186
virtual void SAL_CALL setContext(const css::uno::Reference< css::uno::XInterface > &) override
Definition: gridcell.hxx:732
virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter, const Color **ppColor=nullptr) override
Definition: gridcell.cxx:2527
bool m_bAutoValue
Definition: gridcell.hxx:91
virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter) override
Definition: gridcell.cxx:2422
const sal_uInt32 LEFT
virtual void implAdjustGenericFieldSetting(const css::uno::Reference< css::beans::XPropertySet > &_rxModel) override
initializes everything which relates to the properties describing the numeric behaviour ...
Definition: gridcell.cxx:2359
virtual ~DbFilterField() override
Definition: gridcell.cxx:2727
void onTextChanged()
Definition: gridcell.cxx:3814
void SetText(const OUString &rText)
Definition: gridcell.cxx:2991
virtual void updateFromModel(css::uno::Reference< css::beans::XPropertySet > _rxModel) override
updates the current content of the control (e.g.
Definition: gridcell.cxx:2427
virtual void implAdjustGenericFieldSetting(const css::uno::Reference< css::beans::XPropertySet > &_rxModel) override
Definition: gridcell.cxx:2495
virtual sal_Int16 SAL_CALL getMaxTextLen() override
Definition: gridcell.cxx:3789
DbNumericField(DbGridColumn &_rColumn)
Definition: gridcell.cxx:1959
virtual void SAL_CALL removeTextListener(const css::uno::Reference< css::awt::XTextListener > &l) override
Definition: gridcell.cxx:3689
void UpdateFromField(const DbGridRow *pRow, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter)
Definition: gridcell.cxx:258
virtual void _propertyChanged(const css::beans::PropertyChangeEvent &evt) override
Definition: gridcell.cxx:637
virtual void PaintFieldToCell(OutputDevice &rDev, const tools::Rectangle &rRect, const css::uno::Reference< css::sdb::XColumn > &xField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter)
Definition: gridcell.cxx:3547
virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter) override
Definition: gridcell.cxx:1165
virtual bool commitControl() override
DbCellControl.
Definition: gridcell.cxx:1920
virtual ~DbCellControl() override
Definition: gridcell.cxx:609
virtual void PaintFieldToCell(OutputDevice &rDev, const tools::Rectangle &rRect, const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter)
Definition: gridcell.cxx:958
VclPtr<::svt::CheckBoxControl > m_pBox
Definition: gridcell.hxx:899
void setTransparent(bool _bSet)
Definition: gridcell.hxx:223
bool isValuePropertyLocked() const
determined whether or not the value property is locked
Definition: gridcell.hxx:337
void doPropertyListening(const OUString &_rPropertyName)
Definition: gridcell.cxx:594
void SetTextLineColor()
Definition: gridcell.cxx:3234
bool Commit()
Definition: gridcell.hxx:767
virtual sal_Bool SAL_CALL getLock() override
Definition: gridcell.cxx:3311
const OUString & GetText() const
Definition: gridcell.hxx:660
sal_Int16 m_nFieldPos
Definition: gridcell.hxx:88
void onWindowEvent(const VclEventId _nEventId, const void *_pEventData)
Definition: gridcell.cxx:3527
bool IsReadOnly() const
Definition: gridcell.hxx:127
OUString GetText(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter, const Color **ppColor=nullptr)
Definition: gridcell.hxx:829
::svt::CellControllerRef m_xController
Definition: gridcell.hxx:74
Link< DbFilterField &, void > m_aCommitLink
Definition: gridcell.hxx:676
bool m_bIsMultiLineEdit
Definition: gridcell.hxx:383
OUString GetCellText(const DbGridRow *pRow, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter) const
VclPtr<::svt::ListBoxControl > m_pBox
Definition: gridcell.hxx:981
virtual void SAL_CALL setLabel(const OUString &Label) override
Definition: gridcell.cxx:3950
bool m_bFilterListFilled
Definition: gridcell.hxx:679
DbTextField(DbGridColumn &_rColumn)
Definition: gridcell.cxx:1029
virtual void updateFromModel(css::uno::Reference< css::beans::XPropertySet > _rxModel) override
updates the current content of the control (e.g.
Definition: gridcell.cxx:2541
void Paint(OutputDevice &rDev, const tools::Rectangle &rRect, const DbGridRow *pRow, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter)
Definition: gridcell.cxx:444
svt::ControlBase & GetWindow() const
Definition: gridcell.hxx:265
virtual css::uno::Reference< css::awt::XWindowPeer > SAL_CALL getPeer() override
Definition: gridcell.hxx:736
sal_uInt16 m_nLines
Definition: gridcell.hxx:996
virtual css::uno::Any SAL_CALL queryAggregation(const css::uno::Type &_rType) override
Definition: gridcell.cxx:3876
std::unique_ptr<::svt::IEditImplementation > m_pPainterImplementation
Definition: gridcell.hxx:382
FmXCheckBoxCell(DbGridColumn *pColumn, std::unique_ptr< DbCellControl > pControl)
Definition: gridcell.cxx:3844
virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter) override
Definition: gridcell.cxx:2311
virtual void SAL_CALL removeItemListener(const css::uno::Reference< css::awt::XItemListener > &l) override
Definition: gridcell.cxx:3903
virtual void Update()
Definition: gridcell.hxx:288
DbFormattedField(DbGridColumn &_rColumn)
Definition: gridcell.cxx:1215
css::uno::Reference< css::beans::XPropertySet > m_xField
Definition: gridcell.hxx:73
virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter, const Color **ppColor=nullptr) override
Definition: gridcell.cxx:1145
VclPtr< svt::ControlBase > m_pPainter
Definition: gridcell.hxx:214
virtual VclPtr< svt::ControlBase > createField(BrowserDataWin *_pParent, bool bSpinButton, const css::uno::Reference< css::beans::XPropertySet > &_rxModel) override
Definition: gridcell.cxx:2228
bool m_bHidden
Definition: gridcell.hxx:95
virtual bool commitControl() override
commits the content of the control (e.g.
Definition: gridcell.cxx:2202
void SetList(const css::uno::Any &rItems, bool bComboBox)
Definition: gridcell.cxx:2759
sal_Int16 m_nTypeId
Definition: gridcell.hxx:86
css::uno::Reference< css::util::XNumberFormatsSupplier > m_xSupplier
Definition: gridcell.hxx:429
virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter)=0
virtual ::svt::CellControllerRef CreateController() const override
Definition: gridcell.cxx:1866
virtual css::awt::Selection SAL_CALL getSelection() override
Definition: gridcell.cxx:3763
::comphelper::OInterfaceContainerHelper2 m_aTextListeners
Definition: gridcell.hxx:884
virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter, const Color **ppColor=nullptr) override
Definition: gridcell.cxx:2417
virtual void SAL_CALL setDesignMode(sal_Bool) override
Definition: gridcell.hxx:740
virtual void updateFromModel(css::uno::Reference< css::beans::XPropertySet > _rxModel) override
updates the current content of the control (e.g.
Definition: gridcell.cxx:1908
std::unique_ptr< DbCellControl > m_pCellControl
Definition: gridcell.hxx:697
virtual OUString SAL_CALL getSelectedText() override
Definition: gridcell.cxx:3742
bool IsHidden() const
Definition: gridcell.hxx:132
virtual void PaintFieldToCell(OutputDevice &rDev, const tools::Rectangle &rRect, const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter) override
Definition: gridcell.cxx:1681
virtual ::svt::CellControllerRef CreateController() const override
Definition: gridcell.cxx:1435
::osl::Mutex m_aMutex
Definition: gridcell.hxx:62
InitWindowFacet
Definition: gridctrl.hxx:115
virtual void updateFromModel(css::uno::Reference< css::beans::XPropertySet > _rxModel) override
updates the current content of the control (e.g.
Definition: gridcell.cxx:1171
virtual ::svt::CellControllerRef CreateController() const override
Definition: gridcell.cxx:2636
void SetObject(sal_Int16 nPos)
Definition: gridcell.hxx:169
virtual ~DbTextField() override
Definition: gridcell.cxx:1035
virtual void onFocusLost(const css::awt::FocusEvent &_rEvent)
Definition: gridcell.cxx:3457
virtual ~FmXGridCell() override
Definition: gridcell.cxx:3224
virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter, const Color **ppColor=nullptr) override
Definition: gridcell.cxx:1813
void UpdateFromField(const css::uno::Reference< css::sdb::XColumn > &xField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter)
Definition: gridcell.hxx:807
rtl::Reference<::comphelper::OPropertyChangeMultiplexer > m_pFieldChangeBroadcaster
Definition: gridcell.hxx:202
virtual void SAL_CALL removeChangeListener(const css::uno::Reference< css::form::XChangeListener > &aListener) override
Definition: gridcell.cxx:3809
OUString m_aActionCommand
Definition: gridcell.hxx:898
sal_Int16 SetAlignment(sal_Int16 _nAlign)
Definition: gridcell.cxx:327
virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter, const Color **ppColor=nullptr) override
Definition: gridcell.cxx:1458
double GetValue(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter) const
Definition: gridcell.cxx:964
bool m_bAlignedController
Definition: gridcell.hxx:206
virtual void updateFromModel(css::uno::Reference< css::beans::XPropertySet > _rxModel) override
updates the current content of the control (e.g.
Definition: gridcell.cxx:1797
virtual void SAL_CALL setEnable(sal_Bool Enable) override
Definition: gridcell.cxx:3352
VclPtr<::svt::ComboBoxControl > m_pComboBox
Definition: gridcell.hxx:995
virtual css::uno::Any SAL_CALL queryAggregation(const css::uno::Type &_rType) override
Definition: gridcell.cxx:3282
virtual void onFocusGained(const css::awt::FocusEvent &_rEvent) override
Definition: gridcell.cxx:3821
sal_uInt16 GetId() const
Definition: gridcell.hxx:126
virtual void SAL_CALL addTextListener(const css::uno::Reference< css::awt::XTextListener > &l) override
Definition: gridcell.cxx:3683
const ::svt::CellControllerRef & GetController() const
Definition: gridcell.hxx:134
virtual ::svt::CellControllerRef CreateController() const override
Definition: gridcell.cxx:1651
virtual void implAdjustGenericFieldSetting(const css::uno::Reference< css::beans::XPropertySet > &_rxModel) override
Definition: gridcell.cxx:1010
virtual void updateFromModel(css::uno::Reference< css::beans::XPropertySet > _rxModel) override
updates the current content of the control (e.g.
Definition: gridcell.cxx:2066
rtl::Reference<::comphelper::OPropertyChangeMultiplexer > m_pModelChangeBroadcaster
Definition: gridcell.hxx:201
virtual void _propertyChanged(const css::beans::PropertyChangeEvent &evt) override
Definition: gridcell.cxx:2579
sal_uInt16 nPos
OUString impl_formatText(const OUString &_rText)
Definition: gridcell.cxx:1871
virtual css::awt::Rectangle SAL_CALL getPosSize() override
Definition: gridcell.cxx:3338
void SetReadOnly(bool bRead)
Definition: gridcell.hxx:168
bool m_bOwnEditImplementation
Definition: gridcell.hxx:887
::comphelper::OInterfaceContainerHelper2 m_aWindowListeners
Definition: gridcell.hxx:700
virtual void implAdjustGenericFieldSetting(const css::uno::Reference< css::beans::XPropertySet > &_rxModel) override
initializes everything which relates to the properties describing the numeric behaviour ...
Definition: gridcell.cxx:2239
virtual void SAL_CALL removeActionListener(const css::uno::Reference< css::awt::XActionListener > &l) override
Definition: gridcell.cxx:3945
bool Commit()
Definition: gridcell.cxx:676
DbListBox(DbGridColumn &_rColumn)
Definition: gridcell.cxx:2569
void lockValueProperty()
locks the listening at the value property.
Definition: gridcell.hxx:343
void ImplInitWindow(vcl::Window const &rParent, const InitWindowFacet _eInitWhat)
Definition: gridcell.hxx:768
virtual ::svt::CellControllerRef CreateController() const =0
FmXGridCell * GetCell() const
Definition: gridcell.hxx:137
void AlignControl(sal_Int16 nAlignment)
Definition: gridcell.cxx:932
virtual void SAL_CALL createPeer(const css::uno::Reference< css::awt::XToolkit > &, const css::uno::Reference< css::awt::XWindowPeer > &) override
Definition: gridcell.hxx:734