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 
265 
267  {
268  ENSURE_OR_THROW( m_pWindow, "no window" );
269  return *m_pWindow;
270  }
271 
272  // control alignment
273  bool isAlignedController() const { return m_bAlignedController; }
274  void AlignControl(sal_Int16 nAlignment);
275 
276  void SetTextLineColor();
277  void SetTextLineColor(const Color& _rColor);
278 
279  // initializing before a control is displayed
280  virtual void Init( vcl::Window& rParent, const css::uno::Reference< css::sdbc::XRowSet >& xCursor );
281  virtual ::svt::CellControllerRef CreateController() const = 0;
282 
283  // writing the value into the model
284  bool Commit();
285 
286  // Formatting the field data to output text
287  virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, Color** ppColor = nullptr) = 0;
288 
289  virtual void Update(){}
290  // Refresh the control by the field data
291  virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) = 0;
292 
293  // painting a cell content in the specified rectangle
294  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);
295  virtual void PaintCell( OutputDevice& _rDev, const tools::Rectangle& _rRect );
296 
297  void ImplInitWindow( vcl::Window const & rParent, const InitWindowFacet _eInitWhat );
298 
299  double GetValue(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) const;
300 
301 protected:
302  void invalidatedController();
303 
309  virtual bool commitControl( ) = 0;
310 
321  virtual void updateFromModel( css::uno::Reference< css::beans::XPropertySet > _rxModel ) = 0;
322 
323 protected:
324 // OPropertyChangeListener
325  virtual void _propertyChanged(const css::beans::PropertyChangeEvent& evt) override;
326 
327 private:
328  void implDoPropertyListening( const OUString& _rPropertyName, bool _bWarnIfNotExistent );
329 
331  void implAdjustReadOnly( const css::uno::Reference< css::beans::XPropertySet >& _rxModel,bool i_bReadOnly );
332 
334  void implAdjustEnabled( const css::uno::Reference< css::beans::XPropertySet >& _rxModel );
335 };
336 
337 
339 {
341 }
342 
343 
345 {
346  OSL_ENSURE( !isValuePropertyLocked(), "DbCellControl::lockValueProperty: not to be nested!" );
348 }
349 
350 
352 {
353  OSL_ENSURE( isValuePropertyLocked(), "DbCellControl::lockValueProperty: not locked so far!" );
355 }
356 
357 
361 {
362 public:
363 
364 protected:
365  DbLimitedLengthField( DbGridColumn& _rColumn );
366 
367 protected:
368  // DbCellControl
369  virtual void implAdjustGenericFieldSetting( const css::uno::Reference< css::beans::XPropertySet >& _rxModel ) override;
370 
371 protected:
372  void implSetMaxTextLen( sal_Int16 _nMaxLen )
373  {
374  implSetEffectiveMaxTextLen( _nMaxLen ? _nMaxLen : EDIT_NOLIMIT );
375  }
376  virtual void implSetEffectiveMaxTextLen( sal_Int32 _nMaxLen );
377 };
378 
379 
381 {
382  std::unique_ptr<::svt::IEditImplementation> m_pEdit;
383  std::unique_ptr<::svt::IEditImplementation> m_pPainterImplementation;
385 
386 protected:
387  virtual ~DbTextField( ) override;
388 
389 public:
390  DbTextField(DbGridColumn& _rColumn);
391 
392  ::svt::IEditImplementation* GetEditImplementation() { return m_pEdit.get(); }
393  bool IsSimpleEdit() const { return m_bIsSimpleEdit; }
394 
395  virtual void Init( vcl::Window& rParent, const css::uno::Reference< css::sdbc::XRowSet >& xCursor ) override;
396  virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, Color** ppColor = nullptr) override;
397  virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) override;
398  virtual ::svt::CellControllerRef CreateController() const override;
399  virtual void PaintFieldToCell( OutputDevice& _rDev, const tools::Rectangle& _rRect,
400  const css::uno::Reference< css::sdb::XColumn >& _rxField,
401  const css::uno::Reference< css::util::XNumberFormatter >& _rxFormatter ) override;
402 
403 protected:
404  // DbCellControl
405  virtual bool commitControl( ) override;
406  virtual void updateFromModel( css::uno::Reference< css::beans::XPropertySet > _rxModel ) override;
407  // DbLimitedLengthField
408  virtual void implSetEffectiveMaxTextLen( sal_Int32 _nMaxLen ) override;
409 };
410 
411 
413 {
414 public:
415  DbFormattedField(DbGridColumn& _rColumn);
416  virtual ~DbFormattedField() override;
417 
418  virtual void Init( vcl::Window& rParent, const css::uno::Reference< css::sdbc::XRowSet >& xCursor ) override;
419  virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, Color** ppColor = nullptr) override;
420  virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) override;
421  virtual ::svt::CellControllerRef CreateController() const override;
422 
423 private:
424  // DbCellControl
425  virtual bool commitControl( ) override;
426  virtual void updateFromModel( css::uno::Reference< css::beans::XPropertySet > _rxModel ) override;
427 
428  // OPropertyChangeListener
429  virtual void _propertyChanged(const css::beans::PropertyChangeEvent& evt) override;
430 
431  css::uno::Reference< css::util::XNumberFormatsSupplier > m_xSupplier;
432 };
433 
434 
435 class DbCheckBox : public DbCellControl
436 {
437 public:
438  DbCheckBox(DbGridColumn& _rColumn);
439 
440  virtual void Init( vcl::Window& rParent, const css::uno::Reference< css::sdbc::XRowSet >& xCursor ) override;
441  virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) override;
442  virtual ::svt::CellControllerRef CreateController() const override;
443  virtual void PaintFieldToCell(OutputDevice& rDev, const tools::Rectangle& rRect,
444  const css::uno::Reference< css::sdb::XColumn >& _rxField,
445  const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) override;
446  virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, Color** ppColor = nullptr) override;
447 
448 protected:
449  // DbCellControl
450  virtual bool commitControl( ) override;
451  virtual void updateFromModel( css::uno::Reference< css::beans::XPropertySet > _rxModel ) override;
452 };
453 
454 
455 class DbComboBox : public DbCellControl
456 {
457 
458 public:
459  DbComboBox(DbGridColumn& _rColumn);
460 
461  virtual void Init( vcl::Window& rParent, const css::uno::Reference< css::sdbc::XRowSet >& xCursor ) override;
462  virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, Color** ppColor = nullptr) override;
463  virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) override;
464  virtual ::svt::CellControllerRef CreateController() const override;
465 
466  void SetList(const css::uno::Any& rItems);
467 
468 protected:
469  // DbCellControl
470  virtual bool commitControl( ) override;
471  virtual void updateFromModel( css::uno::Reference< css::beans::XPropertySet > _rxModel ) override;
472 
473  virtual void implAdjustGenericFieldSetting( const css::uno::Reference< css::beans::XPropertySet >& _rxModel ) override;
474 
475  // OPropertyChangeListener
476  virtual void _propertyChanged(const css::beans::PropertyChangeEvent& evt) override;
477 };
478 
479 
481 {
482  bool m_bBound : 1;
483  css::uno::Sequence< OUString > m_aValueList;
484 
485 public:
486  DbListBox(DbGridColumn& _rColumn);
487 
488  virtual void Init( vcl::Window& rParent, const css::uno::Reference< css::sdbc::XRowSet >& xCursor ) override;
489  virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, Color** ppColor = nullptr) override;
490  virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) override;
491  virtual ::svt::CellControllerRef CreateController() const override;
492 
493  void SetList(const css::uno::Any& rItems);
494 
495 protected:
496  // DbCellControl
497  virtual bool commitControl( ) override;
498  virtual void updateFromModel( css::uno::Reference< css::beans::XPropertySet > _rxModel ) override;
499 
500  virtual void implAdjustGenericFieldSetting( const css::uno::Reference< css::beans::XPropertySet >& _rxModel ) override;
501 
502  // OPropertyChangeListener
503  virtual void _propertyChanged(const css::beans::PropertyChangeEvent& evt) override;
504 };
505 
506 
508 {
509 public:
510  DbPatternField( DbGridColumn& _rColumn, const css::uno::Reference<css::uno::XComponentContext>& _rContext );
511  virtual void Init( vcl::Window& rParent, const css::uno::Reference< css::sdbc::XRowSet >& xCursor ) override;
512  virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, Color** ppColor = nullptr) override;
513  virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) override;
514  virtual ::svt::CellControllerRef CreateController() const override;
515 
516 protected:
518  virtual bool commitControl( ) override;
519  virtual void updateFromModel( css::uno::Reference< css::beans::XPropertySet > _rxModel ) override;
520 
521  virtual void implAdjustGenericFieldSetting( const css::uno::Reference< css::beans::XPropertySet >& _rxModel ) override;
522 
523 private:
524  OUString impl_formatText(const OUString& _rText);
525 
526 private:
527  ::std::unique_ptr< ::dbtools::FormattedColumnValue > m_pValueFormatter;
528  ::std::unique_ptr< ::dbtools::FormattedColumnValue > m_pPaintFormatter;
529  css::uno::Reference<css::uno::XComponentContext> m_xContext;
530 };
531 
532 
534 {
535 private:
536  sal_Int16 m_nStandardAlign;
537 
538 public:
539 
540 protected:
541  DbSpinField( DbGridColumn& _rColumn, sal_Int16 _nStandardAlign = css::awt::TextAlign::RIGHT );
542 
543 public:
544  virtual void Init( vcl::Window& rParent, const css::uno::Reference< css::sdbc::XRowSet >& _rxCursor ) override;
545  virtual ::svt::CellControllerRef CreateController() const override;
546 
547 protected:
549  vcl::Window* _pParent,
550  WinBits _nFieldStyle,
551  const css::uno::Reference< css::beans::XPropertySet >& _rxModel
552  ) = 0;
553 };
554 
555 
556 class DbDateField : public DbSpinField
557 {
558 public:
559  DbDateField(DbGridColumn& _rColumn);
560  virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, Color** ppColor = nullptr) override;
561  virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) override;
562 
563 protected:
564  // DbCellControl
565  virtual bool commitControl( ) override;
566  virtual void updateFromModel( css::uno::Reference< css::beans::XPropertySet > _rxModel ) override;
567 
568  // DbSpinField
570  vcl::Window* _pParent,
571  WinBits _nFieldStyle,
572  const css::uno::Reference< css::beans::XPropertySet >& _rxModel
573  ) override;
574 
576  virtual void implAdjustGenericFieldSetting( const css::uno::Reference< css::beans::XPropertySet >& _rxModel ) override;
577 };
578 
579 
580 class DbTimeField : public DbSpinField
581 {
582 public:
583  DbTimeField(DbGridColumn& _rColumn);
584  virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, Color** ppColor = nullptr) override;
585  virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) override;
586 
587 protected:
588  // DbCellControl
589  virtual bool commitControl( ) override;
590  virtual void updateFromModel( css::uno::Reference< css::beans::XPropertySet > _rxModel ) override;
591 
592  // DbSpinField
594  vcl::Window* _pParent,
595  WinBits _nFieldStyle,
596  const css::uno::Reference< css::beans::XPropertySet >& _rxModel
597  ) override;
598 
600  virtual void implAdjustGenericFieldSetting( const css::uno::Reference< css::beans::XPropertySet >& _rxModel ) override;
601 };
602 
603 
605 {
606  sal_Int16 m_nScale;
607 
608 public:
609  DbCurrencyField(DbGridColumn& _rColumn);
610  virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, Color** ppColor = nullptr) override;
611  virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) override;
612 
613  double GetCurrency(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) const;
614 
615 protected:
616  // DbCellControl
617  virtual bool commitControl( ) override;
618  virtual void updateFromModel( css::uno::Reference< css::beans::XPropertySet > _rxModel ) override;
619 
620  // DbSpinField
622  vcl::Window* _pParent,
623  WinBits _nFieldStyle,
624  const css::uno::Reference< css::beans::XPropertySet >& _rxModel
625  ) override;
626 
628  virtual void implAdjustGenericFieldSetting( const css::uno::Reference< css::beans::XPropertySet >& _rxModel ) override;
629 };
630 
631 
633 {
634 public:
635  DbNumericField(DbGridColumn& _rColumn);
636  virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, Color** ppColor = nullptr) override;
637  virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) override;
638 
639 protected:
640  // DbCellControl
641  virtual bool commitControl( ) override;
642  virtual void updateFromModel( css::uno::Reference< css::beans::XPropertySet > _rxModel ) override;
643 
644  // DbSpinField
646  vcl::Window* _pParent,
647  WinBits _nFieldStyle,
648  const css::uno::Reference< css::beans::XPropertySet >& _rxModel
649  ) override;
650 
652  void implAdjustGenericFieldSetting( const css::uno::Reference< css::beans::XPropertySet >& _rxModel ) override;
653 };
654 
655 
656 class DbFilterField final
657  :public DbCellControl
658  ,public ::svxform::OSQLParserClient
659 {
660 public:
661  DbFilterField(const css::uno::Reference< css::uno::XComponentContext >& rxContext, DbGridColumn& _rColumn);
662  virtual ~DbFilterField() override;
663 
664  virtual void Init( vcl::Window& rParent, const css::uno::Reference< css::sdbc::XRowSet >& xCursor ) override;
665  virtual ::svt::CellControllerRef CreateController() const override;
666  virtual void PaintCell(OutputDevice& rDev, const tools::Rectangle& rRect) override;
667  virtual void Update() override;
668  virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, Color** ppColor = nullptr) override;
669  virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) override;
670 
671  const OUString& GetText() const {return m_aText;}
672  void SetText(const OUString& rText);
673 
674  void SetCommitHdl( const Link<DbFilterField&,void>& rLink ) { m_aCommitLink = rLink; }
675 
676 private:
677  // DbCellControl
678  virtual bool commitControl( ) override;
679  virtual void updateFromModel( css::uno::Reference< css::beans::XPropertySet > _rxModel ) override;
680 
681  void SetList(const css::uno::Any& rItems, bool bComboBox);
682  void CreateControl(vcl::Window* pParent, const css::uno::Reference< css::beans::XPropertySet >& xModel);
683  DECL_LINK( OnClick, VclPtr<CheckBox>, void );
684 
685  css::uno::Sequence< OUString > m_aValueList;
686  OUString m_aText;
688  sal_Int16 m_nControlClass;
689  bool m_bFilterList : 1;
691 };
692 
693 
694 // Base class providing the access to a grid cell
695 
696 typedef ::cppu::ImplHelper2 < css::awt::XControl
697  , css::form::XBoundControl
699 typedef ::cppu::ImplHelper1 < css::awt::XWindow
702  ,public FmXGridCell_Base
703  ,public FmXGridCell_WindowBase
704 {
705 protected:
706  ::osl::Mutex m_aMutex;
708  std::unique_ptr<DbCellControl> m_pCellControl;
709 
710 private:
716 
717 protected:
718  virtual ~FmXGridCell() override;
719 
720 public:
721  FmXGridCell( DbGridColumn* pColumn, std::unique_ptr<DbCellControl> pControl );
722  void init();
723 
725  virtual css::uno::Any SAL_CALL queryAggregation( const css::uno::Type& _rType ) override;
726 
727  void SetTextLineColor();
728  void SetTextLineColor(const Color& _rColor);
729 
730 // XTypeProvider
731  virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override;
732  virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
733 
734 // OComponentHelper
735  virtual void SAL_CALL disposing() override;
736 
737 // css::lang::XComponent
738  virtual void SAL_CALL dispose() override {OComponentHelper::dispose();}
739  virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener >& aListener) override { OComponentHelper::addEventListener(aListener);}
740  virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener >& aListener) override { OComponentHelper::removeEventListener(aListener);}
741 
742 // css::awt::XControl
743  virtual void SAL_CALL setContext(const css::uno::Reference< css::uno::XInterface >& /*Context*/) override {}
744  virtual css::uno::Reference< css::uno::XInterface > SAL_CALL getContext() override;
745  virtual void SAL_CALL createPeer(const css::uno::Reference< css::awt::XToolkit >& /*Toolkit*/, const css::uno::Reference< css::awt::XWindowPeer >& /*Parent*/) override {}
746 
747  virtual css::uno::Reference< css::awt::XWindowPeer > SAL_CALL getPeer() override {return css::uno::Reference< css::awt::XWindowPeer > ();}
748  virtual sal_Bool SAL_CALL setModel(const css::uno::Reference< css::awt::XControlModel >& /*Model*/) override {return false;}
749  virtual css::uno::Reference< css::awt::XControlModel > SAL_CALL getModel() override;
750  virtual css::uno::Reference< css::awt::XView > SAL_CALL getView() override {return css::uno::Reference< css::awt::XView > ();}
751  virtual void SAL_CALL setDesignMode(sal_Bool /*bOn*/) override {}
752  virtual sal_Bool SAL_CALL isDesignMode() override {return false;}
753  virtual sal_Bool SAL_CALL isTransparent() override {return false;}
754 
755 // css::form::XBoundControl
756  virtual sal_Bool SAL_CALL getLock() override;
757  virtual void SAL_CALL setLock(sal_Bool _bLock) override;
758 
759  // XWindow
760  virtual void SAL_CALL setPosSize( ::sal_Int32 X, ::sal_Int32 Y, ::sal_Int32 Width, ::sal_Int32 Height, ::sal_Int16 Flags ) override;
761  virtual css::awt::Rectangle SAL_CALL getPosSize( ) override;
762  virtual void SAL_CALL setVisible( sal_Bool Visible ) override;
763  virtual void SAL_CALL setEnable( sal_Bool Enable ) override;
764  virtual void SAL_CALL setFocus( ) override;
765  virtual void SAL_CALL addWindowListener( const css::uno::Reference< css::awt::XWindowListener >& xListener ) override;
766  virtual void SAL_CALL removeWindowListener( const css::uno::Reference< css::awt::XWindowListener >& xListener ) override;
767  virtual void SAL_CALL addFocusListener( const css::uno::Reference< css::awt::XFocusListener >& xListener ) override;
768  virtual void SAL_CALL removeFocusListener( const css::uno::Reference< css::awt::XFocusListener >& xListener ) override;
769  virtual void SAL_CALL addKeyListener( const css::uno::Reference< css::awt::XKeyListener >& xListener ) override;
770  virtual void SAL_CALL removeKeyListener( const css::uno::Reference< css::awt::XKeyListener >& xListener ) override;
771  virtual void SAL_CALL addMouseListener( const css::uno::Reference< css::awt::XMouseListener >& xListener ) override;
772  virtual void SAL_CALL removeMouseListener( const css::uno::Reference< css::awt::XMouseListener >& xListener ) override;
773  virtual void SAL_CALL addMouseMotionListener( const css::uno::Reference< css::awt::XMouseMotionListener >& xListener ) override;
774  virtual void SAL_CALL removeMouseMotionListener( const css::uno::Reference< css::awt::XMouseMotionListener >& xListener ) override;
775  virtual void SAL_CALL addPaintListener( const css::uno::Reference< css::awt::XPaintListener >& xListener ) override;
776  virtual void SAL_CALL removePaintListener( const css::uno::Reference< css::awt::XPaintListener >& xListener ) override;
777 
778  bool Commit() {return m_pCellControl->Commit();}
779  void ImplInitWindow( vcl::Window const & rParent, const InitWindowFacet _eInitWhat )
780  { m_pCellControl->ImplInitWindow( rParent, _eInitWhat ); }
781 
782  bool isAlignedController() const { return m_pCellControl->isAlignedController(); }
783  void AlignControl(sal_Int16 nAlignment)
784  { m_pCellControl->AlignControl(nAlignment);}
785 
786 protected:
787  virtual vcl::Window* getEventWindow() const;
788  virtual void onWindowEvent( const VclEventId _nEventId, const vcl::Window& _rWindow, const void* _pEventData );
789 
790  // default implementations call our focus listeners, don't forget to call them if you override this
791  virtual void onFocusGained( const css::awt::FocusEvent& _rEvent );
792  virtual void onFocusLost( const css::awt::FocusEvent& _rEvent );
793 
794 private:
795  DECL_LINK( OnWindowEvent, VclWindowEvent&, void );
796 };
797 
798 
799 class FmXDataCell : public FmXGridCell
800 {
801 public:
802  FmXDataCell( DbGridColumn* pColumn, std::unique_ptr<DbCellControl> pControl )
803  :FmXGridCell( pColumn, std::move(pControl) )
804  {
805  }
806 
807  virtual void PaintFieldToCell(OutputDevice& rDev,
808  const tools::Rectangle& rRect,
809  const css::uno::Reference< css::sdb::XColumn >& xField,
810  const css::uno::Reference< css::util::XNumberFormatter >& xFormatter);
811 
812  void UpdateFromField(const css::uno::Reference< css::sdb::XColumn >& xField,
813  const css::uno::Reference< css::util::XNumberFormatter >& xFormatter)
814  { m_pCellControl->UpdateFromField(xField, xFormatter); }
815 
816 protected:
817  void UpdateFromColumn();
818 };
819 
820 
821 class FmXTextCell : public FmXDataCell
822 {
823 protected:
838 
839 public:
840  FmXTextCell( DbGridColumn* pColumn, std::unique_ptr<DbCellControl> pControl );
841 
842  virtual void PaintFieldToCell(OutputDevice& rDev,
843  const tools::Rectangle& rRect,
844  const css::uno::Reference< css::sdb::XColumn >& xField,
845  const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) override;
846 
847  OUString GetText(const css::uno::Reference< css::sdb::XColumn >& _rxField,
848  const css::uno::Reference< css::util::XNumberFormatter >& xFormatter,
849  Color** ppColor = nullptr)
850  {return m_pCellControl->GetFormatText(_rxField, xFormatter, ppColor);}
851 };
852 
853 
854 typedef ::cppu::ImplHelper2 < css::awt::XTextComponent
855  , css::form::XChangeBroadcaster
857 class FmXEditCell final : public FmXTextCell,
858  public FmXEditCell_Base
859 {
860 public:
861  FmXEditCell( DbGridColumn* pColumn, std::unique_ptr<DbCellControl> pControl );
862 
864  virtual css::uno::Any SAL_CALL queryAggregation( const css::uno::Type& _rType ) override;
865 
866 // XTypeProvider
867  virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override;
868  virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
869 
870 // OComponentHelper
871  virtual void SAL_CALL disposing() override;
872 
873 // css::awt::XTextComponent
874  virtual void SAL_CALL addTextListener(const css::uno::Reference< css::awt::XTextListener >& l) override;
875  virtual void SAL_CALL removeTextListener(const css::uno::Reference< css::awt::XTextListener >& l) override;
876  virtual void SAL_CALL setText(const OUString& aText) override;
877  virtual void SAL_CALL insertText(const css::awt::Selection& Sel, const OUString& Text) override;
878  virtual OUString SAL_CALL getText() override;
879  virtual OUString SAL_CALL getSelectedText() override;
880  virtual void SAL_CALL setSelection(const css::awt::Selection& aSelection) override;
881  virtual css::awt::Selection SAL_CALL getSelection() override;
882  virtual sal_Bool SAL_CALL isEditable() override;
883  virtual void SAL_CALL setEditable(sal_Bool bEditable) override;
884  virtual void SAL_CALL setMaxTextLen(sal_Int16 nLen) override;
885  virtual sal_Int16 SAL_CALL getMaxTextLen() override;
886 
887  // XChangeBroadcaster
888  virtual void SAL_CALL addChangeListener( const css::uno::Reference< css::form::XChangeListener >& aListener ) override;
889  virtual void SAL_CALL removeChangeListener( const css::uno::Reference< css::form::XChangeListener >& aListener ) override;
890 
891 private:
892  virtual ~FmXEditCell() override;
893 
894  virtual void onWindowEvent( const VclEventId _nEventId, const vcl::Window& _rWindow, const void* _pEventData ) override;
895 
896  virtual void onFocusGained( const css::awt::FocusEvent& _rEvent ) override;
897  virtual void onFocusLost( const css::awt::FocusEvent& _rEvent ) override;
898 
899  void onTextChanged();
900 
901  OUString m_sValueOnEnter;
904  ::svt::IEditImplementation* m_pEditImplementation;
906 };
907 
908 
909 typedef ::cppu::ImplHelper2 < css::awt::XCheckBox
910  , css::awt::XButton
913  public FmXCheckBoxCell_Base
914 {
919 
920 protected:
921  virtual ~FmXCheckBoxCell() override;
922 
923 public:
924  FmXCheckBoxCell( DbGridColumn* pColumn, std::unique_ptr<DbCellControl> pControl );
925 
926 // UNO
928  virtual css::uno::Any SAL_CALL queryAggregation( const css::uno::Type& _rType ) override;
929  virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override;
930  virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
931 
932 // OComponentHelper
933  virtual void SAL_CALL disposing() override;
934 
935 // css::awt::XCheckBox
936  virtual void SAL_CALL addItemListener(const css::uno::Reference< css::awt::XItemListener >& l) override;
937  virtual void SAL_CALL removeItemListener(const css::uno::Reference< css::awt::XItemListener >& l) override;
938  virtual sal_Int16 SAL_CALL getState() override;
939  virtual void SAL_CALL setState(sal_Int16 n) override;
940  virtual void SAL_CALL setLabel(const OUString& Label) override;
941  virtual void SAL_CALL enableTriState(sal_Bool b) override;
942 
943  // XButton
944  virtual void SAL_CALL addActionListener( const css::uno::Reference< css::awt::XActionListener >& l ) override;
945  virtual void SAL_CALL removeActionListener( const css::uno::Reference< css::awt::XActionListener >& l ) override;
946  //virtual void SAL_CALL setLabel( const OUString& Label ) throw (css::uno::RuntimeException);
947  virtual void SAL_CALL setActionCommand( const OUString& Command ) override;
948 
949 protected:
950  virtual vcl::Window* getEventWindow() const override;
951  virtual void onWindowEvent( const VclEventId _nEventId, const vcl::Window& _rWindow, const void* _pEventData ) override;
952 };
953 
954 
955 class FmXListBoxCell final :public FmXTextCell
956 {
957 public:
958  FmXListBoxCell( DbGridColumn* pColumn, std::unique_ptr<DbCellControl> pControl );
959 
960  virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
961 
962 // OComponentHelper
963  virtual void SAL_CALL disposing() override;
964 
965 private:
966  virtual ~FmXListBoxCell() override;
967 
968  DECL_LINK(ChangedHdl, weld::ComboBox&, void);
969 
970  void OnDoubleClick();
971 
975 };
976 
977 
978 typedef ::cppu::ImplHelper1 < css::awt::XComboBox
981  ,public FmXComboBoxCell_Base
982 {
983 private:
987  sal_uInt16 m_nLines;
988 
989  DECL_LINK(ChangedHdl, weld::ComboBox&, void);
990 
991 protected:
992  virtual ~FmXComboBoxCell() override;
993 
994 public:
995  FmXComboBoxCell( DbGridColumn* pColumn, std::unique_ptr<DbCellControl> pControl );
996 
998  virtual css::uno::Any SAL_CALL queryAggregation( const css::uno::Type& _rType ) override;
999  virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override;
1000  virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
1001 
1002  // OComponentHelper
1003  virtual void SAL_CALL disposing() override;
1004 
1005  // XComboBox
1006  virtual void SAL_CALL addItemListener( const css::uno::Reference< css::awt::XItemListener >& Listener ) override;
1007  virtual void SAL_CALL removeItemListener( const css::uno::Reference< css::awt::XItemListener >& Listener ) override;
1008  virtual void SAL_CALL addActionListener( const css::uno::Reference< css::awt::XActionListener >& Listener ) override;
1009  virtual void SAL_CALL removeActionListener( const css::uno::Reference< css::awt::XActionListener >& Listener ) override;
1010  virtual void SAL_CALL addItem( const OUString& Item, ::sal_Int16 Pos ) override;
1011  virtual void SAL_CALL addItems( const css::uno::Sequence< OUString >& Items, ::sal_Int16 Pos ) override;
1012  virtual void SAL_CALL removeItems( ::sal_Int16 nPos, ::sal_Int16 nCount ) override;
1013  virtual ::sal_Int16 SAL_CALL getItemCount( ) override;
1014  virtual OUString SAL_CALL getItem( ::sal_Int16 Pos ) override;
1015  virtual css::uno::Sequence< OUString > SAL_CALL getItems( ) override;
1016  virtual ::sal_Int16 SAL_CALL getDropDownLineCount( ) override;
1017  virtual void SAL_CALL setDropDownLineCount( ::sal_Int16 Lines ) override;
1018 };
1019 
1020 typedef ::cppu::ImplHelper2 < css::awt::XTextComponent
1021  , css::lang::XUnoTunnel
1023 class FmXFilterCell final : public FmXGridCell
1024  ,public FmXFilterCell_Base
1025 {
1026 public:
1027  FmXFilterCell(DbGridColumn* pColumn, std::unique_ptr<DbFilterField> pControl);
1028 
1029 
1031  virtual css::uno::Any SAL_CALL queryAggregation( const css::uno::Type& _rType ) override;
1032  virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override;
1033  virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
1034 
1035 // XUnoTunnel
1036  virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;
1037 
1038 // helpers for XUnoTunnel
1039  static const css::uno::Sequence<sal_Int8>& getUnoTunnelId();
1040 
1041 // painting the filter text
1042  void PaintCell(OutputDevice& rDev, const tools::Rectangle& rRect);
1043  void Update(){m_pCellControl->Update();}
1044 
1045 // OComponentHelper
1046  virtual void SAL_CALL disposing() override;
1047 
1048 // css::awt::XTextComponent
1049  virtual void SAL_CALL addTextListener(const css::uno::Reference< css::awt::XTextListener >& l) override;
1050  virtual void SAL_CALL removeTextListener(const css::uno::Reference< css::awt::XTextListener >& l) override;
1051  virtual void SAL_CALL setText(const OUString& aText) override;
1052  virtual void SAL_CALL insertText(const css::awt::Selection& Sel, const OUString& Text) override;
1053  virtual OUString SAL_CALL getText() override;
1054  virtual OUString SAL_CALL getSelectedText() override;
1055  virtual void SAL_CALL setSelection(const css::awt::Selection& aSelection) override;
1056  virtual css::awt::Selection SAL_CALL getSelection() override;
1057  virtual sal_Bool SAL_CALL isEditable() override;
1058  virtual void SAL_CALL setEditable(sal_Bool bEditable) override;
1059  virtual void SAL_CALL setMaxTextLen(sal_Int16 nLen) override;
1060  virtual sal_Int16 SAL_CALL getMaxTextLen() override;
1061 
1062 private:
1063  DECL_LINK( OnCommit, DbFilterField&, void );
1064  virtual ~FmXFilterCell() override;
1065 
1067 };
1068 
1069 #endif // INCLUDED_SVX_SOURCE_INC_GRIDCELL_HXX
1070 
1071 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual vcl::Window * getEventWindow() const override
Definition: gridcell.cxx:3944
const css::uno::Reference< css::beans::XPropertySet > & getModel() const
Definition: gridcell.hxx:122
Type
virtual sal_Int16 SAL_CALL getState() override
Definition: gridcell.cxx:3893
OUString GetText(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter, Color **ppColor=nullptr)
Definition: gridcell.hxx:847
::osl::Mutex m_aMutex
Definition: gridcell.hxx:706
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
void implValuePropertyChanged()
Definition: gridcell.cxx:625
bool m_bNumeric
Definition: gridcell.hxx:93
virtual void SAL_CALL removeMouseListener(const css::uno::Reference< css::awt::XMouseListener > &xListener) override
Definition: gridcell.cxx:3337
void UpdateControl()
Definition: gridcell.hxx:152
virtual void SAL_CALL addItemListener(const css::uno::Reference< css::awt::XItemListener > &l) override
Definition: gridcell.cxx:3869
void ImplInitWindow(vcl::Window const &rParent, const InitWindowFacet _eInitWhat)
Definition: gridcell.cxx:705
virtual ::svt::CellControllerRef CreateController() const override
Definition: gridcell.cxx:2807
weld::ComboBox * m_pBox
Definition: gridcell.hxx:974
DECL_LINK(OnClick, VclPtr< CheckBox >, void)
virtual void SAL_CALL enableTriState(sal_Bool b) override
Definition: gridcell.cxx:3906
bool m_bObject
Definition: gridcell.hxx:94
virtual void SAL_CALL addActionListener(const css::uno::Reference< css::awt::XActionListener > &l) override
Definition: gridcell.cxx:3915
virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter) override
Definition: gridcell.cxx:1699
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:3225
virtual bool commitControl() override
commits the content of the control (e.g.
Definition: gridcell.cxx:1209
DbCurrencyField(DbGridColumn &_rColumn)
Definition: gridcell.cxx:2021
std::unique_ptr<::svt::IEditImplementation > m_pEdit
Definition: gridcell.hxx:382
virtual void SAL_CALL setSelection(const css::awt::Selection &aSelection) override
Definition: gridcell.cxx:3702
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
Definition: gridcell.cxx:3612
bool m_bTransparent
Definition: gridcell.hxx:205
FmXTextCell(DbGridColumn *pColumn, std::unique_ptr< DbCellControl > pControl)
Definition: gridcell.cxx:3496
::cppu::ImplHelper2< css::awt::XControl, css::form::XBoundControl > FmXGridCell_Base
Definition: gridcell.hxx:698
DbComboBox(DbGridColumn &_rColumn)
Definition: gridcell.cxx:2408
DbGridColumn * m_pColumn
Definition: gridcell.hxx:707
Flags
virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter, Color **ppColor=nullptr) override
Definition: gridcell.cxx:2124
vcl::Window & GetWindow() const
Definition: gridcell.hxx:266
bool m_bAccessingValueProperty
Definition: gridcell.hxx:207
::comphelper::OInterfaceContainerHelper2 m_aFocusListeners
Definition: gridcell.hxx:712
a field which is bound to a column which supports the MaxTextLen property
Definition: gridcell.hxx:360
virtual ::svt::CellControllerRef CreateController() const override
Definition: gridcell.cxx:1146
virtual void implSetEffectiveMaxTextLen(sal_Int32 _nMaxLen) override
Definition: gridcell.cxx:1227
virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter) override
Definition: gridcell.cxx:2488
virtual void implSetEffectiveMaxTextLen(sal_Int32 _nMaxLen)
Definition: gridcell.cxx:1044
DbPatternField(DbGridColumn &_rColumn, const css::uno::Reference< css::uno::XComponentContext > &_rContext)
Definition: gridcell.cxx:1737
virtual ~DbFormattedField() override
Definition: gridcell.cxx:1242
void setLock(bool _bLock)
Definition: gridcell.cxx:390
virtual void Init(vcl::Window &rParent, const css::uno::Reference< css::sdbc::XRowSet > &xCursor) override
Definition: gridcell.cxx:1246
::comphelper::OInterfaceContainerHelper2 m_aItemListeners
Definition: gridcell.hxx:915
signed char sal_Int8
sal_Int16 m_nControlClass
Definition: gridcell.hxx:688
::cppu::ImplHelper2< css::awt::XCheckBox, css::awt::XButton > FmXCheckBoxCell_Base
Definition: gridcell.hxx:911
void SetList(const css::uno::Any &rItems)
Definition: gridcell.cxx:2429
virtual OUString SAL_CALL getText() override
Definition: gridcell.cxx:3664
virtual void Init(vcl::Window &rParent, const css::uno::Reference< css::sdbc::XRowSet > &xCursor) override
Definition: gridcell.cxx:2565
virtual void Init(vcl::Window &rParent, const css::uno::Reference< css::sdbc::XRowSet > &xCursor) override
Definition: gridcell.cxx:2769
virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter) override
Definition: gridcell.cxx:2614
::cppu::ImplHelper2< css::awt::XTextComponent, css::form::XChangeBroadcaster > FmXEditCell_Base
Definition: gridcell.hxx:856
FmXEditCell(DbGridColumn *pColumn, std::unique_ptr< DbCellControl > pControl)
Definition: gridcell.cxx:3550
virtual void SAL_CALL setMaxTextLen(sal_Int16 nLen) override
Definition: gridcell.cxx:3748
virtual sal_Bool SAL_CALL isDesignMode() override
Definition: gridcell.hxx:752
virtual void SAL_CALL setVisible(sal_Bool Visible) override
Definition: gridcell.cxx:3267
sal_Int16 m_nFieldType
Definition: gridcell.hxx:85
virtual bool commitControl() override
commits the content of the control (e.g.
Definition: gridcell.cxx:2006
void ImplInitWindow(vcl::Window const &rParent, const InitWindowFacet _eInitWhat)
Definition: gridcell.cxx:518
virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter) override
Definition: gridcell.cxx:1528
virtual void _propertyChanged(const css::beans::PropertyChangeEvent &evt) override
Definition: gridcell.cxx:1460
exports com.sun.star. awt
void CreateControl(sal_Int32 _nFieldPos, const css::uno::Reference< css::beans::XPropertySet > &xField, sal_Int32 nTypeId)
Definition: gridcell.cxx:140
virtual bool commitControl() override
commits the content of the control (e.g.
Definition: gridcell.cxx:2643
virtual void SAL_CALL setEditable(sal_Bool bEditable) override
Definition: gridcell.cxx:3731
sal_Int32 m_nFormatKey
Definition: gridcell.hxx:84
virtual bool commitControl() override
commits the content of the control (e.g.
Definition: gridcell.cxx:1594
void implSetMaxTextLen(sal_Int16 _nMaxLen)
Definition: gridcell.hxx:372
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
virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter, Color **ppColor=nullptr) override
Definition: gridcell.cxx:1982
void init()
Definition: gridcell.cxx:3128
virtual void PaintCell(OutputDevice &_rDev, const tools::Rectangle &_rRect)
Definition: gridcell.cxx:949
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:3309
virtual void SAL_CALL addKeyListener(const css::uno::Reference< css::awt::XKeyListener > &xListener) override
Definition: gridcell.cxx:3316
sal_Int16 m_nStandardAlign
Definition: gridcell.hxx:536
virtual void SAL_CALL addWindowListener(const css::uno::Reference< css::awt::XWindowListener > &xListener) override
Definition: gridcell.cxx:3288
sal_Int16 SetAlignmentFromModel(sal_Int16 nStandardAlign)
Definition: gridcell.cxx:377
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:1152
virtual void SAL_CALL addPaintListener(const css::uno::Reference< css::awt::XPaintListener > &xListener) override
Definition: gridcell.cxx:3358
rtl::Reference< FmXGridCell > m_pCell
Definition: gridcell.hxx:77
DbLimitedLengthField(DbGridColumn &_rColumn)
Definition: gridcell.cxx:1025
::comphelper::OInterfaceContainerHelper2 m_aTextListeners
Definition: gridcell.hxx:1066
virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter, Color **ppColor=nullptr) override
Definition: gridcell.cxx:1478
bool IsNumeric() const
Definition: gridcell.hxx:131
bool m_bLocked
Definition: gridcell.hxx:96
DbCellControl(DbGridColumn &_rColumn)
Definition: gridcell.cxx:528
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:809
bool IsAutoValue() const
Definition: gridcell.hxx:128
virtual bool commitControl() override
commits the content of the control (e.g.
Definition: gridcell.cxx:2287
virtual void SAL_CALL setActionCommand(const OUString &Command) override
Definition: gridcell.cxx:3938
css::uno::Sequence< OUString > m_aValueList
Definition: gridcell.hxx:685
virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter) override
Definition: gridcell.cxx:2130
::std::unique_ptr< ::dbtools::FormattedColumnValue > m_pPaintFormatter
Definition: gridcell.hxx:528
FmXGridCell(DbGridColumn *pColumn, std::unique_ptr< DbCellControl > pControl)
Definition: gridcell.cxx:3115
virtual void onWindowEvent(const VclEventId _nEventId, const vcl::Window &_rWindow, const void *_pEventData) override
Definition: gridcell.cxx:3796
virtual void SAL_CALL removeKeyListener(const css::uno::Reference< css::awt::XKeyListener > &xListener) override
Definition: gridcell.cxx:3323
css::uno::Reference< css::sdb::XColumn > GetCurrentFieldValue() const
Definition: gridcell.cxx:439
VclPtr< vcl::Window > m_pPainter
Definition: gridcell.hxx:214
virtual void onFocusGained(const css::awt::FocusEvent &_rEvent)
Definition: gridcell.cxx:3377
css::uno::Reference< css::uno::XComponentContext > m_xContext
Definition: gridcell.hxx:529
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL getContext() override
Definition: gridcell.cxx:3219
virtual void _propertyChanged(const css::beans::PropertyChangeEvent &evt) override
Definition: gridcell.cxx:2417
virtual bool commitControl()=0
commits the content of the control (e.g.
sal_Int64 WinBits
::svt::IEditImplementation * m_pEditImplementation
Definition: gridcell.hxx:904
::comphelper::OInterfaceContainerHelper2 m_aChangeListeners
Definition: gridcell.hxx:903
virtual ::svt::CellControllerRef CreateController() const override
Definition: gridcell.cxx:2474
virtual void SAL_CALL setText(const OUString &aText) override
Definition: gridcell.cxx:3637
bool isTransparent() const
Definition: gridcell.hxx:222
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
Definition: gridcell.cxx:3170
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:829
const css::uno::Reference< css::beans::XPropertySet > & GetField() const
Definition: gridcell.hxx:135
css::uno::Reference< css::sdbc::XRowSet > m_xCursor
Definition: gridcell.hxx:210
virtual void Update() override
Definition: gridcell.cxx:2952
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:1894
virtual bool commitControl() override
commits the content of the control (e.g.
Definition: gridcell.cxx:2839
virtual void updateFromModel(css::uno::Reference< css::beans::XPropertySet > _rxModel) override
updates the current content of the control (e.g.
Definition: gridcell.cxx:2275
virtual void SAL_CALL addChangeListener(const css::uno::Reference< css::form::XChangeListener > &aListener) override
Definition: gridcell.cxx:3757
bool m_bIsSimpleEdit
Definition: gridcell.hxx:384
VclEventId
void SetCommitHdl(const Link< DbFilterField &, void > &rLink)
Definition: gridcell.hxx:674
virtual bool commitControl() override
commits the content of the control (e.g.
Definition: gridcell.cxx:2507
virtual sal_Bool SAL_CALL isEditable() override
Definition: gridcell.cxx:3723
virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter) override
Definition: gridcell.cxx:1822
virtual void SAL_CALL addMouseMotionListener(const css::uno::Reference< css::awt::XMouseMotionListener > &xListener) override
Definition: gridcell.cxx:3344
::comphelper::OInterfaceContainerHelper2 m_aMouseListeners
Definition: gridcell.hxx:714
virtual void SAL_CALL insertText(const css::awt::Selection &Sel, const OUString &Text) override
Definition: gridcell.cxx:3652
::comphelper::OInterfaceContainerHelper2 m_aItemListeners
Definition: gridcell.hxx:984
::svt::CellControllerRef s_xEmptyController
Definition: gridcell.hxx:98
virtual bool commitControl() override
commits the content of the control (e.g.
Definition: gridcell.cxx:2395
virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter, Color **ppColor=nullptr) override
Definition: gridcell.cxx:1732
sal_Int16 m_nAlign
Definition: gridcell.hxx:89
virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener > &aListener) override
Definition: gridcell.hxx:740
bool m_bFilterList
Definition: gridcell.hxx:689
virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter) override
Definition: gridcell.cxx:1987
virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener > &aListener) override
Definition: gridcell.hxx:739
DbGridColumn(sal_uInt16 _nId, DbGridControl &rParent)
Definition: gridcell.hxx:101
sal_Int16 GetAlignment() const
Definition: gridcell.hxx:129
bool isAlignedController() const
Definition: gridcell.hxx:273
bool m_bInSave
Definition: gridcell.hxx:92
OUString m_aText
Definition: gridcell.hxx:686
DbGridControl & m_rParent
Definition: gridcell.hxx:80
bool Commit()
Definition: gridcell.cxx:271
::std::unique_ptr< ::dbtools::FormattedColumnValue > m_pValueFormatter
Definition: gridcell.hxx:527
OComponentHelper(::osl::Mutex &rMutex)
::comphelper::OInterfaceContainerHelper2 m_aMouseMotionListeners
Definition: gridcell.hxx:715
void AlignControl(sal_Int16 nAlignment)
Definition: gridcell.hxx:783
virtual void SAL_CALL addFocusListener(const css::uno::Reference< css::awt::XFocusListener > &xListener) override
Definition: gridcell.cxx:3302
DbFilterField(const css::uno::Reference< css::uno::XComponentContext > &rxContext, DbGridColumn &_rColumn)
Definition: gridcell.cxx:2659
virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter, Color **ppColor=nullptr) override
Definition: gridcell.cxx:2263
OUString m_sValueOnEnter
Definition: gridcell.hxx:901
void setAlignedController(bool _bAlign)
Definition: gridcell.hxx:226
virtual void SAL_CALL setFocus() override
Definition: gridcell.cxx:3281
virtual VclPtr< SpinField > createField(vcl::Window *_pParent, WinBits _nFieldStyle, const css::uno::Reference< css::beans::XPropertySet > &_rxModel) override
Definition: gridcell.cxx:2078
virtual void SAL_CALL addMouseListener(const css::uno::Reference< css::awt::XMouseListener > &xListener) override
Definition: gridcell.cxx:3330
void SetList(const css::uno::Any &rItems)
Definition: gridcell.cxx:2539
void implDoPropertyListening(const OUString &_rPropertyName, bool _bWarnIfNotExistent)
Definition: gridcell.cxx:579
bool m_bFastPaint
determines whether the text of this cell can be painted directly, without using the painter control ...
Definition: gridcell.hxx:837
virtual void SAL_CALL removeWindowListener(const css::uno::Reference< css::awt::XWindowListener > &xListener) override
Definition: gridcell.cxx:3295
virtual void SAL_CALL disposing() override
Definition: gridcell.cxx:3189
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
Definition: gridcell.cxx:3857
virtual void SAL_CALL disposing() override
Definition: gridcell.cxx:3586
virtual void implAdjustGenericFieldSetting(const css::uno::Reference< css::beans::XPropertySet > &_rxModel)
Definition: gridcell.cxx:638
virtual void SAL_CALL dispose() override
Definition: gridcell.hxx:738
virtual void SAL_CALL setLock(sal_Bool _bLock) override
Definition: gridcell.cxx:3240
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:2035
virtual css::uno::Any SAL_CALL queryAggregation(const css::uno::Type &_rType) override
Definition: gridcell.cxx:3601
DECL_LINK(OnWindowEvent, VclWindowEvent &, void)
virtual void implAdjustGenericFieldSetting(const css::uno::Reference< css::beans::XPropertySet > &_rxModel) override
Definition: gridcell.cxx:1747
virtual sal_Bool SAL_CALL setModel(const css::uno::Reference< css::awt::XControlModel > &) override
Definition: gridcell.hxx:748
virtual void Init(vcl::Window &rParent, const css::uno::Reference< css::sdbc::XRowSet > &xCursor)
Definition: gridcell.cxx:842
virtual void implAdjustGenericFieldSetting(const css::uno::Reference< css::beans::XPropertySet > &_rxModel) override
Definition: gridcell.cxx:2579
unsigned char sal_Bool
css::uno::Sequence< OUString > m_aValueList
Definition: gridcell.hxx:483
virtual void SAL_CALL disposing() override
Definition: gridcell.cxx:3833
virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter, Color **ppColor=nullptr) override
Definition: gridcell.cxx:1799
DbDateField(DbGridColumn &_rColumn)
Definition: gridcell.cxx:2173
virtual sal_Bool SAL_CALL isTransparent() override
Definition: gridcell.hxx:753
void SetTextLineColor()
Definition: gridcell.cxx:901
::cppu::ImplHelper1< css::awt::XComboBox > FmXComboBoxCell_Base
Definition: gridcell.hxx:979
virtual void onFocusLost(const css::awt::FocusEvent &_rEvent) override
Definition: gridcell.cxx:3784
virtual void onWindowEvent(const VclEventId _nEventId, const vcl::Window &_rWindow, const void *_pEventData)
Definition: gridcell.cxx:3391
virtual void SAL_CALL removeMouseMotionListener(const css::uno::Reference< css::awt::XMouseMotionListener > &xListener) override
Definition: gridcell.cxx:3351
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:3503
virtual void updateFromModel(css::uno::Reference< css::beans::XPropertySet > _rxModel) override
updates the current content of the control (e.g.
Definition: gridcell.cxx:2624
virtual void Init(vcl::Window &rParent, const css::uno::Reference< css::sdbc::XRowSet > &xCursor) override
Definition: gridcell.cxx:1637
bool m_bBound
Definition: gridcell.hxx:482
void invalidatedController()
Definition: gridcell.cxx:1018
virtual ::svt::CellControllerRef CreateController() const override
Definition: gridcell.cxx:1877
virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter) override
Definition: gridcell.cxx:3077
virtual vcl::Window * getEventWindow() const
Definition: gridcell.cxx:3136
virtual void updateFromModel(css::uno::Reference< css::beans::XPropertySet > _rxModel) override
updates the current content of the control (e.g.
Definition: gridcell.cxx:2830
::comphelper::OInterfaceContainerHelper2 m_aActionListeners
Definition: gridcell.hxx:916
void unlockValueProperty()
unlocks the listening at the value property
Definition: gridcell.hxx:351
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:3253
virtual ~FmXCheckBoxCell() override
Definition: gridcell.cxx:3821
::comphelper::OInterfaceContainerHelper2 m_aItemListeners
Definition: gridcell.hxx:972
bool isLocked() const
Definition: gridcell.hxx:182
FmXDataCell(DbGridColumn *pColumn, std::unique_ptr< DbCellControl > pControl)
Definition: gridcell.hxx:802
css::uno::Reference< css::beans::XPropertySet > m_xModel
Definition: gridcell.hxx:72
void UpdateFromColumn()
Definition: gridcell.cxx:3488
bool m_bReadOnly
Definition: gridcell.hxx:90
virtual void Init(vcl::Window &rParent, const css::uno::Reference< css::sdbc::XRowSet > &xCursor) override
Definition: gridcell.cxx:1771
virtual void PaintCell(OutputDevice &rDev, const tools::Rectangle &rRect) override
Definition: gridcell.cxx:2677
sal_Int32 GetKey() const
Definition: gridcell.hxx:133
virtual void SAL_CALL setState(sal_Int16 n) override
Definition: gridcell.cxx:3881
bool isAlignedController() const
Definition: gridcell.hxx:782
::svt::IEditImplementation * GetEditImplementation()
Definition: gridcell.hxx:392
TextAlign
DbSpinField(DbGridColumn &_rColumn, sal_Int16 _nStandardAlign=css::awt::TextAlign::RIGHT)
Definition: gridcell.cxx:1848
DbCheckBox(DbGridColumn &_rColumn)
Definition: gridcell.cxx:1615
virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter, Color **ppColor=nullptr)=0
virtual ~FmXEditCell() override
Definition: gridcell.cxx:3573
#define DECLARE_UNO3_AGG_DEFAULTS(classname, baseclass)
void Clear()
Definition: gridcell.cxx:311
virtual void SAL_CALL removePaintListener(const css::uno::Reference< css::awt::XPaintListener > &xListener) override
Definition: gridcell.cxx:3364
virtual VclPtr< SpinField > createField(vcl::Window *_pParent, WinBits _nFieldStyle, const css::uno::Reference< css::beans::XPropertySet > &_rxModel) override
Definition: gridcell.cxx:2310
virtual bool commitControl() override
commits the content of the control (e.g.
Definition: gridcell.cxx:1724
void impl_toggleScriptManager_nothrow(bool _bAttach)
attaches or detaches our cell object to the SctriptEventAttacherManager implemented by our model's pa...
Definition: gridcell.cxx:239
DbTimeField(DbGridColumn &_rColumn)
Definition: gridcell.cxx:2300
virtual void updateFromModel(css::uno::Reference< css::beans::XPropertySet > _rxModel) override
updates the current content of the control (e.g.
Definition: gridcell.cxx:1570
::comphelper::OInterfaceContainerHelper2 m_aKeyListeners
Definition: gridcell.hxx:713
virtual css::uno::Reference< css::awt::XView > SAL_CALL getView() override
Definition: gridcell.hxx:750
sal_uInt16 m_nId
Definition: gridcell.hxx:87
#define ENSURE_OR_THROW(c, m)
::cppu::ImplHelper1< css::awt::XWindow > FmXGridCell_WindowBase
Definition: gridcell.hxx:700
void setModel(const css::uno::Reference< css::beans::XPropertySet > &_xModel)
Definition: gridcell.cxx:299
virtual void updateFromModel(css::uno::Reference< css::beans::XPropertySet > _rxModel) override
updates the current content of the control (e.g.
Definition: gridcell.cxx:2136
virtual void SAL_CALL setContext(const css::uno::Reference< css::uno::XInterface > &) override
Definition: gridcell.hxx:743
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:2377
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:2316
virtual ~DbFilterField() override
Definition: gridcell.cxx:2670
void onTextChanged()
Definition: gridcell.cxx:3769
void SetText(const OUString &rText)
Definition: gridcell.cxx:2920
virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter, Color **ppColor=nullptr) override
Definition: gridcell.cxx:1161
virtual void updateFromModel(css::uno::Reference< css::beans::XPropertySet > _rxModel) override
updates the current content of the control (e.g.
Definition: gridcell.cxx:2383
virtual void implAdjustGenericFieldSetting(const css::uno::Reference< css::beans::XPropertySet > &_rxModel) override
Definition: gridcell.cxx:2446
virtual sal_Int16 SAL_CALL getMaxTextLen() override
Definition: gridcell.cxx:3740
DbNumericField(DbGridColumn &_rColumn)
Definition: gridcell.cxx:1882
virtual void SAL_CALL removeTextListener(const css::uno::Reference< css::awt::XTextListener > &l) override
Definition: gridcell.cxx:3631
void UpdateFromField(const DbGridRow *pRow, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter)
Definition: gridcell.cxx:261
virtual void _propertyChanged(const css::beans::PropertyChangeEvent &evt) override
Definition: gridcell.cxx:644
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:3480
virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter) override
Definition: gridcell.cxx:1182
virtual bool commitControl() override
DbCellControl.
Definition: gridcell.cxx:1841
virtual ~DbCellControl() override
Definition: gridcell.cxx:616
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:978
virtual void Init(vcl::Window &rParent, const css::uno::Reference< css::sdbc::XRowSet > &_rxCursor) override
Definition: gridcell.cxx:1855
void setTransparent(bool _bSet)
Definition: gridcell.hxx:223
bool isValuePropertyLocked() const
determined whether or not the value property is locked
Definition: gridcell.hxx:338
void doPropertyListening(const OUString &_rPropertyName)
Definition: gridcell.cxx:601
void SetTextLineColor()
Definition: gridcell.cxx:3155
bool Commit()
Definition: gridcell.hxx:778
virtual sal_Bool SAL_CALL getLock() override
Definition: gridcell.cxx:3233
const OUString & GetText() const
Definition: gridcell.hxx:671
sal_Int16 m_nFieldPos
Definition: gridcell.hxx:88
bool IsReadOnly() const
Definition: gridcell.hxx:127
::svt::CellControllerRef m_xController
Definition: gridcell.hxx:74
Link< DbFilterField &, void > m_aCommitLink
Definition: gridcell.hxx:687
OUString GetCellText(const DbGridRow *pRow, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter) const
virtual void SAL_CALL setLabel(const OUString &Label) override
Definition: gridcell.cxx:3927
weld::ComboBox * m_pComboBox
Definition: gridcell.hxx:986
bool m_bFilterListFilled
Definition: gridcell.hxx:690
DbTextField(DbGridColumn &_rColumn)
Definition: gridcell.cxx:1051
virtual void updateFromModel(css::uno::Reference< css::beans::XPropertySet > _rxModel) override
updates the current content of the control (e.g.
Definition: gridcell.cxx:2494
virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter, Color **ppColor=nullptr) override
Definition: gridcell.cxx:2589
virtual void Init(vcl::Window &rParent, const css::uno::Reference< css::sdbc::XRowSet > &xCursor) override
Definition: gridcell.cxx:1063
void Paint(OutputDevice &rDev, const tools::Rectangle &rRect, const DbGridRow *pRow, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter)
Definition: gridcell.cxx:451
double GetCurrency(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter) const
Definition: gridcell.cxx:2084
virtual css::uno::Reference< css::awt::XWindowPeer > SAL_CALL getPeer() override
Definition: gridcell.hxx:747
sal_uInt16 m_nLines
Definition: gridcell.hxx:987
virtual css::uno::Any SAL_CALL queryAggregation(const css::uno::Type &_rType) override
Definition: gridcell.cxx:3846
std::unique_ptr<::svt::IEditImplementation > m_pPainterImplementation
Definition: gridcell.hxx:383
VclPtr< vcl::Window > m_pWindow
Definition: gridcell.hxx:215
FmXCheckBoxCell(DbGridColumn *pColumn, std::unique_ptr< DbCellControl > pControl)
Definition: gridcell.cxx:3812
virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter) override
Definition: gridcell.cxx:2269
virtual void SAL_CALL removeItemListener(const css::uno::Reference< css::awt::XItemListener > &l) override
Definition: gridcell.cxx:3875
virtual void Update()
Definition: gridcell.hxx:289
DbFormattedField(DbGridColumn &_rColumn)
Definition: gridcell.cxx:1235
void CreateControl(vcl::Window *pParent, const css::uno::Reference< css::beans::XPropertySet > &xModel)
Definition: gridcell.cxx:2718
css::uno::Reference< css::beans::XPropertySet > m_xField
Definition: gridcell.hxx:73
bool m_bHidden
Definition: gridcell.hxx:95
bool IsSimpleEdit() const
Definition: gridcell.hxx:393
virtual bool commitControl() override
commits the content of the control (e.g.
Definition: gridcell.cxx:2156
void SetList(const css::uno::Any &rItems, bool bComboBox)
Definition: gridcell.cxx:2693
sal_Int16 m_nTypeId
Definition: gridcell.hxx:86
virtual void Init(vcl::Window &rParent, const css::uno::Reference< css::sdbc::XRowSet > &xCursor) override
Definition: gridcell.cxx:2451
css::uno::Reference< css::util::XNumberFormatsSupplier > m_xSupplier
Definition: gridcell.hxx:431
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:1785
virtual css::awt::Selection SAL_CALL getSelection() override
Definition: gridcell.cxx:3711
::comphelper::OInterfaceContainerHelper2 m_aTextListeners
Definition: gridcell.hxx:902
virtual void SAL_CALL setDesignMode(sal_Bool) override
Definition: gridcell.hxx:751
virtual void updateFromModel(css::uno::Reference< css::beans::XPropertySet > _rxModel) override
updates the current content of the control (e.g.
Definition: gridcell.cxx:1829
std::unique_ptr< DbCellControl > m_pCellControl
Definition: gridcell.hxx:708
virtual OUString SAL_CALL getSelectedText() override
Definition: gridcell.cxx:3688
bool IsHidden() const
Definition: gridcell.hxx:132
virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter, Color **ppColor=nullptr) override
Definition: gridcell.cxx:3071
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:1705
virtual ::svt::CellControllerRef CreateController() const override
Definition: gridcell.cxx:1455
::osl::Mutex m_aMutex
Definition: gridcell.hxx:62
sal_Int16 m_nScale
Definition: gridcell.hxx:606
InitWindowFacet
Definition: gridctrl.hxx:118
virtual void updateFromModel(css::uno::Reference< css::beans::XPropertySet > _rxModel) override
updates the current content of the control (e.g.
Definition: gridcell.cxx:1189
virtual ::svt::CellControllerRef CreateController() const override
Definition: gridcell.cxx:2584
void SetObject(sal_Int16 nPos)
Definition: gridcell.hxx:169
virtual ~DbTextField() override
Definition: gridcell.cxx:1057
virtual void onFocusLost(const css::awt::FocusEvent &_rEvent)
Definition: gridcell.cxx:3384
VclPtr< CheckBox > m_pBox
Definition: gridcell.hxx:918
virtual ~FmXGridCell() override
Definition: gridcell.cxx:3144
virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter, Color **ppColor=nullptr) override
Definition: gridcell.cxx:2371
void UpdateFromField(const css::uno::Reference< css::sdb::XColumn > &xField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter)
Definition: gridcell.hxx:812
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:3763
OUString m_aActionCommand
Definition: gridcell.hxx:917
sal_Int16 SetAlignment(sal_Int16 _nAlign)
Definition: gridcell.cxx:332
double GetValue(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter) const
Definition: gridcell.cxx:985
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:1714
virtual void SAL_CALL setEnable(sal_Bool Enable) override
Definition: gridcell.cxx:3274
virtual css::uno::Any SAL_CALL queryAggregation(const css::uno::Type &_rType) override
Definition: gridcell.cxx:3204
virtual void onFocusGained(const css::awt::FocusEvent &_rEvent) override
Definition: gridcell.cxx:3777
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:3625
const ::svt::CellControllerRef & GetController() const
Definition: gridcell.hxx:134
virtual ::svt::CellControllerRef CreateController() const override
Definition: gridcell.cxx:1673
virtual void implAdjustGenericFieldSetting(const css::uno::Reference< css::beans::XPropertySet > &_rxModel) override
Definition: gridcell.cxx:1032
virtual void updateFromModel(css::uno::Reference< css::beans::XPropertySet > _rxModel) override
updates the current content of the control (e.g.
Definition: gridcell.cxx:1992
rtl::Reference<::comphelper::OPropertyChangeMultiplexer > m_pModelChangeBroadcaster
Definition: gridcell.hxx:201
virtual void _propertyChanged(const css::beans::PropertyChangeEvent &evt) override
Definition: gridcell.cxx:2527
OUString impl_formatText(const OUString &_rText)
Definition: gridcell.cxx:1791
#define EDIT_NOLIMIT
virtual css::awt::Rectangle SAL_CALL getPosSize() override
Definition: gridcell.cxx:3260
void SetReadOnly(bool bRead)
Definition: gridcell.hxx:168
bool m_bOwnEditImplementation
Definition: gridcell.hxx:905
::comphelper::OInterfaceContainerHelper2 m_aWindowListeners
Definition: gridcell.hxx:711
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:2199
virtual void onWindowEvent(const VclEventId _nEventId, const vcl::Window &_rWindow, const void *_pEventData) override
Definition: gridcell.cxx:3950
virtual void SAL_CALL removeActionListener(const css::uno::Reference< css::awt::XActionListener > &l) override
Definition: gridcell.cxx:3921
bool Commit()
Definition: gridcell.cxx:684
virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter, Color **ppColor=nullptr) override
Definition: gridcell.cxx:2480
virtual VclPtr< SpinField > createField(vcl::Window *_pParent, WinBits _nFieldStyle, const css::uno::Reference< css::beans::XPropertySet > &_rxModel) override
Definition: gridcell.cxx:1950
DbListBox(DbGridColumn &_rColumn)
Definition: gridcell.cxx:2517
void lockValueProperty()
locks the listening at the value property.
Definition: gridcell.hxx:344
void ImplInitWindow(vcl::Window const &rParent, const InitWindowFacet _eInitWhat)
Definition: gridcell.hxx:779
virtual VclPtr< SpinField > createField(vcl::Window *_pParent, WinBits _nFieldStyle, const css::uno::Reference< css::beans::XPropertySet > &_rxModel) override
Definition: gridcell.cxx:2183
virtual ::svt::CellControllerRef CreateController() const =0
FmXGridCell * GetCell() const
Definition: gridcell.hxx:137
virtual VclPtr< SpinField > createField(vcl::Window *_pParent, WinBits _nFieldStyle, const css::uno::Reference< css::beans::XPropertySet > &_rxModel)=0
void AlignControl(sal_Int16 nAlignment)
Definition: gridcell.cxx:929
virtual void SAL_CALL createPeer(const css::uno::Reference< css::awt::XToolkit > &, const css::uno::Reference< css::awt::XWindowPeer > &) override
Definition: gridcell.hxx:745