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/form/XChangeBroadcaster.hpp>
39#include <com/sun/star/awt/XWindow.hpp>
40#include <com/sun/star/util/XNumberFormatsSupplier.hpp>
41
44#include <comphelper/uno3.hxx>
51
52class DbCellControl;
53class Edit;
54class FmXGridCell;
55namespace dbtools {
56 class FormattedColumnValue;
57}
58
59// DbGridColumn, column description
60
62{
63 friend class DbGridControl;
64
65 css::uno::Reference< css::beans::XPropertySet > m_xModel;
66 css::uno::Reference< css::beans::XPropertySet > m_xField; // connection to the database field
67 ::svt::CellControllerRef m_xController; // structure for managing the controls for a column
68 // this is positioned by the DbBrowseBox on the respective
69 // cells of a column
72 sal_Int32 m_nLastVisibleWidth; // only valid if m_bHidden == sal_True
73 sal_Int32 m_nFormatKey;
74 sal_Int16 m_nFieldType;
75 sal_Int16 m_nTypeId;
76 sal_uInt16 m_nId;
77 sal_Int16 m_nFieldPos;
78 sal_Int16 m_nAlign; // specified with TXT_ALIGN_LEFT...
79 bool m_bReadOnly : 1;
80 bool m_bAutoValue : 1;
81 bool m_bInSave : 1;
82 bool m_bNumeric : 1;
83 bool m_bObject : 1; // does the column reference an object datatype?
84 bool m_bHidden : 1;
85 bool m_bLocked : 1;
86
87 static ::svt::CellControllerRef s_xEmptyController;
88 // used by locked columns
89public:
90 DbGridColumn(sal_uInt16 _nId, DbGridControl& rParent)
91 :m_rParent(rParent)
93 ,m_nFormatKey(0)
94 ,m_nFieldType(0)
95 ,m_nTypeId(0)
96 ,m_nId(_nId)
97 ,m_nFieldPos(-1)
98 ,m_nAlign(css::awt::TextAlign::LEFT)
99 ,m_bReadOnly(false)
100 ,m_bAutoValue(false)
101 ,m_bInSave(false)
102 ,m_bNumeric(false)
103 ,m_bObject(false)
104 ,m_bHidden(false)
105 ,m_bLocked(false)
106 {
107 }
108
110
111 const css::uno::Reference< css::beans::XPropertySet >& getModel() const { return m_xModel; }
112 void setModel(const css::uno::Reference< css::beans::XPropertySet >& _xModel);
113
114
115 sal_uInt16 GetId() const {return m_nId;}
116 bool IsReadOnly() const {return m_bReadOnly;}
117 bool IsAutoValue() const {return m_bAutoValue;}
118 sal_Int16 GetAlignment() const {return m_nAlign;}
119 sal_Int16 GetFieldPos() const {return m_nFieldPos; }
120 bool IsNumeric() const {return m_bNumeric;}
121 bool IsHidden() const {return m_bHidden;}
122 sal_Int32 GetKey() const {return m_nFormatKey;}
123 const ::svt::CellControllerRef& GetController() const {return m_bLocked ? s_xEmptyController : m_xController;}
124 const css::uno::Reference< css::beans::XPropertySet >& GetField() const {return m_xField;}
126 FmXGridCell* GetCell() const {return m_pCell.get();}
127
128 css::uno::Reference< css::sdb::XColumn > GetCurrentFieldValue() const;
129
130 // Drawing a field at a position. If a view is set, it takes over the drawing,
131 // e.g., for checkboxes.
132 void Paint(OutputDevice& rDev,
133 const tools::Rectangle& rRect,
134 const DbGridRow* pRow,
135 const css::uno::Reference< css::util::XNumberFormatter >& xFormatter);
136
137
138 // Initializing in the alive mode.
139 // If no ColumnController is set, a default initialization is performed.
140 void CreateControl(sal_Int32 _nFieldPos, const css::uno::Reference< css::beans::XPropertySet >& xField, sal_Int32 nTypeId);
142 {
143 css::uno::Reference< css::beans::XPropertySet > xField(m_xField);
145 }
146
147 // Editing a Zelle
148 void UpdateFromField(const DbGridRow* pRow, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter);
149 bool Commit();
150
151 // releasing all the data required for the AliveMode
152 void Clear();
153
154 OUString GetCellText(const DbGridRow* pRow, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) const;
155 OUString GetCellText(const css::uno::Reference< css::sdb::XColumn >& xField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) const;
156
157 void SetReadOnly(bool bRead){m_bReadOnly = bRead;}
158 void SetObject(sal_Int16 nPos) {m_bObject = m_bReadOnly = true; m_nFieldPos = nPos;}
159
160 void ImplInitWindow( vcl::Window const & rParent, const InitWindowFacet _eInitWhat );
161
162 // properties that can bleed through onto the css::frame::Controller
163 sal_Int16 SetAlignment(sal_Int16 _nAlign);
164 // if _nAlign is -1, the alignment is calculated from the type of the field we are bound to
165 // the value really set is returned
166 sal_Int16 SetAlignmentFromModel(sal_Int16 nStandardAlign);
167 // set the alignment according to the "Align"-property of m_xModel, use the given standard
168 // alignment if the property if void, return the really set alignment
169
170 // column locking
171 bool isLocked() const { return m_bLocked; }
172 void setLock(bool _bLock);
173
174private:
178 void impl_toggleScriptManager_nothrow( bool _bAttach );
179};
180
181
182// DbCellControl, provides the data for a CellController.
183// Is usually only required for complex controls such as combo boxes.
184
186 :public cppu::BaseMutex // _before_ the listener, so the listener is to be destroyed first!
188{
189private:
192
193private:
197
198 css::uno::Reference< css::sdbc::XRowSet >
200
201protected:
205
206protected:
207 // attribute access
208 const css::uno::Reference< css::sdbc::XRowSet >& getCursor() const { return m_xCursor; }
209
210 // control transparency
211 bool isTransparent( ) const { return m_bTransparent; }
212 void setTransparent( bool _bSet ) { m_bTransparent = _bSet; }
213
214 // control alignment
215 void setAlignedController( bool _bAlign ) { m_bAlignedController = _bAlign; }
216
217
221 inline bool isValuePropertyLocked() const;
222
231 inline void lockValueProperty();
235 inline void unlockValueProperty();
236
237protected:
238 // adds the given property to the list of properties which we listen for
239 void doPropertyListening( const OUString& _rPropertyName );
240
241 // called whenever a property which affects field settings in general is called
242 // you should overwrite this method for every property you add yourself as listener to
243 // with doPropertyListening
244 virtual void implAdjustGenericFieldSetting( const css::uno::Reference< css::beans::XPropertySet >& _rxModel );
245
246 // called by _propertyChanged if a property which denotes the column value has changed
248
249
250public:
251 DbCellControl(DbGridColumn& _rColumn);
252 virtual ~DbCellControl() override;
253
255 {
256 ENSURE_OR_THROW( m_pWindow, "no window" );
257 return *m_pWindow;
258 }
259
260 // control alignment
262 void AlignControl(sal_Int16 nAlignment);
263
264 void SetTextLineColor();
265 void SetTextLineColor(const Color& _rColor);
266
267 // initializing before a control is displayed
268 virtual void Init( BrowserDataWin& rParent, const css::uno::Reference< css::sdbc::XRowSet >& xCursor );
269 virtual ::svt::CellControllerRef CreateController() const = 0;
270
271 // writing the value into the model
272 bool Commit();
273
274 // Formatting the field data to output text
275 virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, const Color** ppColor = nullptr) = 0;
276
277 virtual void Update(){}
278 // Refresh the control by the field data
279 virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) = 0;
280
281 // painting a cell content in the specified rectangle
282 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);
283 virtual void PaintCell( OutputDevice& _rDev, const tools::Rectangle& _rRect );
284
285 void ImplInitWindow( vcl::Window const & rParent, const InitWindowFacet _eInitWhat );
286
287 double GetValue(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) const;
288
289protected:
291
297 virtual bool commitControl( ) = 0;
298
309 virtual void updateFromModel( css::uno::Reference< css::beans::XPropertySet > _rxModel ) = 0;
310
311protected:
312// OPropertyChangeListener
313 virtual void _propertyChanged(const css::beans::PropertyChangeEvent& evt) override;
314
315private:
316 void implDoPropertyListening( const OUString& _rPropertyName, bool _bWarnIfNotExistent );
317
319 void implAdjustReadOnly( const css::uno::Reference< css::beans::XPropertySet >& _rxModel,bool i_bReadOnly );
320
322 void implAdjustEnabled( const css::uno::Reference< css::beans::XPropertySet >& _rxModel );
323};
324
325
327{
329}
330
331
333{
334 OSL_ENSURE( !isValuePropertyLocked(), "DbCellControl::lockValueProperty: not to be nested!" );
336}
337
338
340{
341 OSL_ENSURE( isValuePropertyLocked(), "DbCellControl::lockValueProperty: not locked so far!" );
343}
344
345
349{
350public:
351
352protected:
354
355protected:
356 // DbCellControl
357 virtual void implAdjustGenericFieldSetting( const css::uno::Reference< css::beans::XPropertySet >& _rxModel ) override;
358
359protected:
360 void implSetMaxTextLen( sal_Int16 _nMaxLen )
361 {
363 }
364 virtual void implSetEffectiveMaxTextLen( sal_Int32 _nMaxLen );
365};
366
367
369{
370 std::unique_ptr<::svt::IEditImplementation> m_pEdit;
371 std::unique_ptr<::svt::IEditImplementation> m_pPainterImplementation;
373
374 virtual ~DbTextField( ) override;
375
376public:
377 DbTextField(DbGridColumn& _rColumn);
378
380 bool IsMultiLineEdit() const { return m_bIsMultiLineEdit; }
381
382 virtual void Init( BrowserDataWin& rParent, const css::uno::Reference< css::sdbc::XRowSet >& xCursor ) override;
383 virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, const Color** ppColor = nullptr) override;
384 virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) override;
385 virtual ::svt::CellControllerRef CreateController() const override;
386 virtual void PaintFieldToCell( OutputDevice& _rDev, const tools::Rectangle& _rRect,
387 const css::uno::Reference< css::sdb::XColumn >& _rxField,
388 const css::uno::Reference< css::util::XNumberFormatter >& _rxFormatter ) override;
389
390private:
391 // DbCellControl
392 virtual bool commitControl( ) override;
393 virtual void updateFromModel( css::uno::Reference< css::beans::XPropertySet > _rxModel ) override;
394 // DbLimitedLengthField
395 virtual void implSetEffectiveMaxTextLen( sal_Int32 _nMaxLen ) override;
396};
397
398
400{
401public:
403 virtual ~DbFormattedField() override;
404
405 virtual void Init( BrowserDataWin& rParent, const css::uno::Reference< css::sdbc::XRowSet >& xCursor ) override;
406 virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, const Color** ppColor = nullptr) override;
407 virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) override;
408 virtual ::svt::CellControllerRef CreateController() const override;
409
410private:
411 // DbCellControl
412 virtual bool commitControl( ) override;
413 virtual void updateFromModel( css::uno::Reference< css::beans::XPropertySet > _rxModel ) override;
414
415 // OPropertyChangeListener
416 virtual void _propertyChanged(const css::beans::PropertyChangeEvent& evt) override;
417
418 css::uno::Reference< css::util::XNumberFormatsSupplier > m_xSupplier;
419};
420
421
422class DbCheckBox final : public DbCellControl
423{
424public:
425 DbCheckBox(DbGridColumn& _rColumn);
426
427 virtual void Init( BrowserDataWin& rParent, const css::uno::Reference< css::sdbc::XRowSet >& xCursor ) override;
428 virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) override;
429 virtual ::svt::CellControllerRef CreateController() const override;
430 virtual void PaintFieldToCell(OutputDevice& rDev, const tools::Rectangle& rRect,
431 const css::uno::Reference< css::sdb::XColumn >& _rxField,
432 const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) override;
433 virtual void PaintCell(OutputDevice& rDev, const tools::Rectangle& rRect) override;
434 virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, const Color** ppColor = nullptr) override;
435
436private:
437 // DbCellControl
438 virtual bool commitControl( ) override;
439 virtual void updateFromModel( css::uno::Reference< css::beans::XPropertySet > _rxModel ) override;
440};
441
442
443class DbComboBox final : public DbCellControl
444{
445
446public:
447 DbComboBox(DbGridColumn& _rColumn);
448
449 virtual void Init( BrowserDataWin& rParent, const css::uno::Reference< css::sdbc::XRowSet >& xCursor ) override;
450 virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, const Color** ppColor = nullptr) override;
451 virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) override;
452 virtual ::svt::CellControllerRef CreateController() const override;
453
454 void SetList(const css::uno::Any& rItems);
455
456private:
457 // DbCellControl
458 virtual bool commitControl( ) override;
459 virtual void updateFromModel( css::uno::Reference< css::beans::XPropertySet > _rxModel ) override;
460
461 virtual void implAdjustGenericFieldSetting( const css::uno::Reference< css::beans::XPropertySet >& _rxModel ) override;
462
463 // OPropertyChangeListener
464 virtual void _propertyChanged(const css::beans::PropertyChangeEvent& evt) override;
465};
466
467
468class DbListBox final : public DbCellControl
469{
470 bool m_bBound : 1;
471 css::uno::Sequence< OUString > m_aValueList;
472
473public:
474 DbListBox(DbGridColumn& _rColumn);
475
476 virtual void Init( BrowserDataWin& rParent, const css::uno::Reference< css::sdbc::XRowSet >& xCursor ) override;
477 virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, const Color** ppColor = nullptr) override;
478 virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) override;
479 virtual ::svt::CellControllerRef CreateController() const override;
480
481 void SetList(const css::uno::Any& rItems);
482
483private:
484 // DbCellControl
485 virtual bool commitControl( ) override;
486 virtual void updateFromModel( css::uno::Reference< css::beans::XPropertySet > _rxModel ) override;
487
488 virtual void implAdjustGenericFieldSetting( const css::uno::Reference< css::beans::XPropertySet >& _rxModel ) override;
489
490 // OPropertyChangeListener
491 virtual void _propertyChanged(const css::beans::PropertyChangeEvent& evt) override;
492};
493
494
495class DbPatternField final : public DbCellControl
496{
497public:
498 DbPatternField( DbGridColumn& _rColumn, const css::uno::Reference<css::uno::XComponentContext>& _rContext );
499 virtual void Init( BrowserDataWin& rParent, const css::uno::Reference< css::sdbc::XRowSet >& xCursor ) override;
500 virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, const Color** ppColor = nullptr) override;
501 virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) override;
502 virtual ::svt::CellControllerRef CreateController() const override;
503
504private:
506 virtual bool commitControl( ) override;
507 virtual void updateFromModel( css::uno::Reference< css::beans::XPropertySet > _rxModel ) override;
508
509 virtual void implAdjustGenericFieldSetting( const css::uno::Reference< css::beans::XPropertySet >& _rxModel ) override;
510
511 OUString impl_formatText(const OUString& _rText);
512
513 ::std::unique_ptr< ::dbtools::FormattedColumnValue > m_pValueFormatter;
514 ::std::unique_ptr< ::dbtools::FormattedColumnValue > m_pPaintFormatter;
515 css::uno::Reference<css::uno::XComponentContext> m_xContext;
516};
517
518
520{
521private:
523
524public:
525
526protected:
527 DbSpinField( DbGridColumn& _rColumn, sal_Int16 _nStandardAlign = css::awt::TextAlign::RIGHT );
528
529public:
530 virtual void Init( BrowserDataWin& rParent, const css::uno::Reference< css::sdbc::XRowSet >& _rxCursor ) override;
531 virtual ::svt::CellControllerRef CreateController() const override;
532
533protected:
535 BrowserDataWin* _pParent,
536 bool bSpinButton,
537 const css::uno::Reference< css::beans::XPropertySet >& _rxModel
538 ) = 0;
539};
540
541class DbDateField final : public DbSpinField
542{
543public:
544 DbDateField(DbGridColumn& _rColumn);
545 virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, const Color** ppColor = nullptr) override;
546 virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) override;
547
548private:
549 // DbCellControl
550 virtual bool commitControl( ) override;
551 virtual void updateFromModel( css::uno::Reference< css::beans::XPropertySet > _rxModel ) override;
552
553 // DbSpinField
555 BrowserDataWin* _pParent,
556 bool bSpinButton,
557 const css::uno::Reference< css::beans::XPropertySet >& _rxModel
558 ) override;
559
561 virtual void implAdjustGenericFieldSetting( const css::uno::Reference< css::beans::XPropertySet >& _rxModel ) override;
562};
563
564class DbTimeField final : public DbSpinField
565{
566public:
567 DbTimeField(DbGridColumn& _rColumn);
568 virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, const Color** ppColor = nullptr) override;
569 virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) override;
570
571private:
572 // DbCellControl
573 virtual bool commitControl( ) override;
574 virtual void updateFromModel( css::uno::Reference< css::beans::XPropertySet > _rxModel ) override;
575
576 // DbSpinField
578 BrowserDataWin* _pParent,
579 bool bSpinButton,
580 const css::uno::Reference< css::beans::XPropertySet >& _rxModel
581 ) override;
582
584 virtual void implAdjustGenericFieldSetting( const css::uno::Reference< css::beans::XPropertySet >& _rxModel ) override;
585};
586
587class DbCurrencyField final : public DbSpinField
588{
589public:
590 DbCurrencyField(DbGridColumn& _rColumn);
591 virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, const Color** ppColor = nullptr) override;
592 virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) override;
593
594private:
595 // DbCellControl
596 virtual bool commitControl( ) override;
597 virtual void updateFromModel( css::uno::Reference< css::beans::XPropertySet > _rxModel ) override;
598
599 // DbSpinField
601 BrowserDataWin* _pParent,
602 bool bSpinButton,
603 const css::uno::Reference< css::beans::XPropertySet >& _rxModel
604 ) override;
605
607 virtual void implAdjustGenericFieldSetting( const css::uno::Reference< css::beans::XPropertySet >& _rxModel ) override;
608};
609
610class DbNumericField final : public DbSpinField
611{
612public:
613 DbNumericField(DbGridColumn& _rColumn);
614
615 virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, const Color** ppColor = nullptr) override;
616 virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) override;
617
618private:
619 // DbCellControl
620 virtual bool commitControl( ) override;
621 virtual void updateFromModel( css::uno::Reference< css::beans::XPropertySet > _rxModel ) override;
622
623 // DbSpinField
625 BrowserDataWin* _pParent,
626 bool bSpinButton,
627 const css::uno::Reference< css::beans::XPropertySet >& _rxModel
628 ) override;
629
631 void implAdjustGenericFieldSetting( const css::uno::Reference< css::beans::XPropertySet >& _rxModel ) override;
632};
633
634class DbFilterField final
635 :public DbCellControl
636 ,public ::svxform::OSQLParserClient
637{
638public:
639 DbFilterField(const css::uno::Reference< css::uno::XComponentContext >& rxContext, DbGridColumn& _rColumn);
640 virtual ~DbFilterField() override;
641
642 virtual void Init( BrowserDataWin& rParent, const css::uno::Reference< css::sdbc::XRowSet >& xCursor ) override;
643 virtual ::svt::CellControllerRef CreateController() const override;
644 virtual void PaintCell(OutputDevice& rDev, const tools::Rectangle& rRect) override;
645 virtual void Update() override;
646 virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, const Color** ppColor = nullptr) override;
647 virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) override;
648
649 const OUString& GetText() const {return m_aText;}
650 void SetText(const OUString& rText);
651
652 void SetCommitHdl( const Link<DbFilterField&,void>& rLink ) { m_aCommitLink = rLink; }
653
654private:
655 // DbCellControl
656 virtual bool commitControl( ) override;
657 virtual void updateFromModel( css::uno::Reference< css::beans::XPropertySet > _rxModel ) override;
658
659 void SetList(const css::uno::Any& rItems, bool bComboBox);
660 void CreateControl(BrowserDataWin* pParent, const css::uno::Reference< css::beans::XPropertySet >& xModel);
661 DECL_LINK(OnToggle, weld::CheckButton&, void);
662
663 css::uno::Sequence< OUString > m_aValueList;
664 OUString m_aText;
669};
670
671
672// Base class providing the access to a grid cell
673
674typedef ::cppu::ImplHelper2 < css::awt::XControl
675 , css::form::XBoundControl
677typedef ::cppu::ImplHelper1 < css::awt::XWindow
680 ,public FmXGridCell_Base
682{
683protected:
684 ::osl::Mutex m_aMutex;
686 std::unique_ptr<DbCellControl> m_pCellControl;
687
688private:
694
695protected:
696 virtual ~FmXGridCell() override;
697
698public:
699 FmXGridCell( DbGridColumn* pColumn, std::unique_ptr<DbCellControl> pControl );
700 void init();
701
703 virtual css::uno::Any SAL_CALL queryAggregation( const css::uno::Type& _rType ) override;
704
705 void SetTextLineColor();
706 void SetTextLineColor(const Color& _rColor);
707
708// XTypeProvider
709 virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override;
710 virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
711
712// OComponentHelper
713 virtual void SAL_CALL disposing() override;
714
715// css::lang::XComponent
716 virtual void SAL_CALL dispose() override {OComponentHelper::dispose();}
717 virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener >& aListener) override { OComponentHelper::addEventListener(aListener);}
718 virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener >& aListener) override { OComponentHelper::removeEventListener(aListener);}
719
720// css::awt::XControl
721 virtual void SAL_CALL setContext(const css::uno::Reference< css::uno::XInterface >& /*Context*/) override {}
722 virtual css::uno::Reference< css::uno::XInterface > SAL_CALL getContext() override;
723 virtual void SAL_CALL createPeer(const css::uno::Reference< css::awt::XToolkit >& /*Toolkit*/, const css::uno::Reference< css::awt::XWindowPeer >& /*Parent*/) override {}
724
725 virtual css::uno::Reference< css::awt::XWindowPeer > SAL_CALL getPeer() override {return css::uno::Reference< css::awt::XWindowPeer > ();}
726 virtual sal_Bool SAL_CALL setModel(const css::uno::Reference< css::awt::XControlModel >& /*Model*/) override {return false;}
727 virtual css::uno::Reference< css::awt::XControlModel > SAL_CALL getModel() override;
728 virtual css::uno::Reference< css::awt::XView > SAL_CALL getView() override {return css::uno::Reference< css::awt::XView > ();}
729 virtual void SAL_CALL setDesignMode(sal_Bool /*bOn*/) override {}
730 virtual sal_Bool SAL_CALL isDesignMode() override {return false;}
731 virtual sal_Bool SAL_CALL isTransparent() override {return false;}
732
733// css::form::XBoundControl
734 virtual sal_Bool SAL_CALL getLock() override;
735 virtual void SAL_CALL setLock(sal_Bool _bLock) override;
736
737 // XWindow
738 virtual void SAL_CALL setPosSize( ::sal_Int32 X, ::sal_Int32 Y, ::sal_Int32 Width, ::sal_Int32 Height, ::sal_Int16 Flags ) override;
739 virtual css::awt::Rectangle SAL_CALL getPosSize( ) override;
740 virtual void SAL_CALL setVisible( sal_Bool Visible ) override;
741 virtual void SAL_CALL setEnable( sal_Bool Enable ) override;
742 virtual void SAL_CALL setFocus( ) override;
743 virtual void SAL_CALL addWindowListener( const css::uno::Reference< css::awt::XWindowListener >& xListener ) override;
744 virtual void SAL_CALL removeWindowListener( const css::uno::Reference< css::awt::XWindowListener >& xListener ) override;
745 virtual void SAL_CALL addFocusListener( const css::uno::Reference< css::awt::XFocusListener >& xListener ) override;
746 virtual void SAL_CALL removeFocusListener( const css::uno::Reference< css::awt::XFocusListener >& xListener ) override;
747 virtual void SAL_CALL addKeyListener( const css::uno::Reference< css::awt::XKeyListener >& xListener ) override;
748 virtual void SAL_CALL removeKeyListener( const css::uno::Reference< css::awt::XKeyListener >& xListener ) override;
749 virtual void SAL_CALL addMouseListener( const css::uno::Reference< css::awt::XMouseListener >& xListener ) override;
750 virtual void SAL_CALL removeMouseListener( const css::uno::Reference< css::awt::XMouseListener >& xListener ) override;
751 virtual void SAL_CALL addMouseMotionListener( const css::uno::Reference< css::awt::XMouseMotionListener >& xListener ) override;
752 virtual void SAL_CALL removeMouseMotionListener( const css::uno::Reference< css::awt::XMouseMotionListener >& xListener ) override;
753 virtual void SAL_CALL addPaintListener( const css::uno::Reference< css::awt::XPaintListener >& xListener ) override;
754 virtual void SAL_CALL removePaintListener( const css::uno::Reference< css::awt::XPaintListener >& xListener ) override;
755
756 bool Commit() {return m_pCellControl->Commit();}
757 void ImplInitWindow( vcl::Window const & rParent, const InitWindowFacet _eInitWhat )
758 { m_pCellControl->ImplInitWindow( rParent, _eInitWhat ); }
759
760 bool isAlignedController() const { return m_pCellControl->isAlignedController(); }
761 void AlignControl(sal_Int16 nAlignment)
762 { m_pCellControl->AlignControl(nAlignment);}
763
764protected:
765 // default implementations call our focus listeners, don't forget to call them if you override this
766 virtual void onFocusGained( const css::awt::FocusEvent& _rEvent );
767 virtual void onFocusLost( const css::awt::FocusEvent& _rEvent );
768
769private:
771 DECL_LINK(OnFocusGained, LinkParamNone*, void);
772 DECL_LINK(OnFocusLost, LinkParamNone*, void);
773 DECL_LINK(OnMousePress, const MouseEvent&, void);
774 DECL_LINK(OnMouseRelease, const MouseEvent&, void);
775 DECL_LINK(OnMouseMove, const MouseEvent&, void);
776 DECL_LINK(OnKeyInput, const KeyEvent&, void);
777 DECL_LINK(OnKeyRelease, const KeyEvent&, void);
778};
779
780
782{
783public:
784 FmXDataCell( DbGridColumn* pColumn, std::unique_ptr<DbCellControl> pControl )
785 :FmXGridCell( pColumn, std::move(pControl) )
786 {
787 }
788
789 virtual void PaintFieldToCell(OutputDevice& rDev,
790 const tools::Rectangle& rRect,
791 const css::uno::Reference< css::sdb::XColumn >& xField,
792 const css::uno::Reference< css::util::XNumberFormatter >& xFormatter);
793
794 void UpdateFromField(const css::uno::Reference< css::sdb::XColumn >& xField,
795 const css::uno::Reference< css::util::XNumberFormatter >& xFormatter)
796 { m_pCellControl->UpdateFromField(xField, xFormatter); }
797
798protected:
799 void UpdateFromColumn();
800};
801
802
804{
805protected:
807
808public:
809 FmXTextCell( DbGridColumn* pColumn, std::unique_ptr<DbCellControl> pControl );
810
811 virtual void PaintFieldToCell(OutputDevice& rDev,
812 const tools::Rectangle& rRect,
813 const css::uno::Reference< css::sdb::XColumn >& xField,
814 const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) override;
815
816 OUString GetText(const css::uno::Reference< css::sdb::XColumn >& _rxField,
817 const css::uno::Reference< css::util::XNumberFormatter >& xFormatter,
818 const Color** ppColor = nullptr)
819 {return m_pCellControl->GetFormatText(_rxField, xFormatter, ppColor);}
820};
821
822
823typedef ::cppu::ImplHelper2 < css::awt::XTextComponent
824 , css::form::XChangeBroadcaster
826class FmXEditCell final : public FmXTextCell,
827 public FmXEditCell_Base
828{
829public:
830 FmXEditCell( DbGridColumn* pColumn, std::unique_ptr<DbCellControl> pControl );
831
833 virtual css::uno::Any SAL_CALL queryAggregation( const css::uno::Type& _rType ) override;
834
835// XTypeProvider
836 virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override;
837 virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
838
839// OComponentHelper
840 virtual void SAL_CALL disposing() override;
841
842// css::awt::XTextComponent
843 virtual void SAL_CALL addTextListener(const css::uno::Reference< css::awt::XTextListener >& l) override;
844 virtual void SAL_CALL removeTextListener(const css::uno::Reference< css::awt::XTextListener >& l) override;
845 virtual void SAL_CALL setText(const OUString& aText) override;
846 virtual void SAL_CALL insertText(const css::awt::Selection& Sel, const OUString& Text) override;
847 virtual OUString SAL_CALL getText() override;
848 virtual OUString SAL_CALL getSelectedText() override;
849 virtual void SAL_CALL setSelection(const css::awt::Selection& aSelection) override;
850 virtual css::awt::Selection SAL_CALL getSelection() override;
851 virtual sal_Bool SAL_CALL isEditable() override;
852 virtual void SAL_CALL setEditable(sal_Bool bEditable) override;
853 virtual void SAL_CALL setMaxTextLen(sal_Int16 nLen) override;
854 virtual sal_Int16 SAL_CALL getMaxTextLen() override;
855
856 // XChangeBroadcaster
857 virtual void SAL_CALL addChangeListener( const css::uno::Reference< css::form::XChangeListener >& aListener ) override;
858 virtual void SAL_CALL removeChangeListener( const css::uno::Reference< css::form::XChangeListener >& aListener ) override;
859
860private:
861 virtual ~FmXEditCell() override;
862
863 virtual void onFocusGained( const css::awt::FocusEvent& _rEvent ) override;
864 virtual void onFocusLost( const css::awt::FocusEvent& _rEvent ) override;
865
866 DECL_LINK(ModifyHdl, LinkParamNone*, void);
867
868 void onTextChanged();
869
875};
876
877typedef ::cppu::ImplHelper2 < css::awt::XCheckBox
878 , css::awt::XButton
880class FmXCheckBoxCell final : public FmXDataCell,
882{
887
888 DECL_LINK(ModifyHdl, LinkParamNone*, void);
889
890 virtual ~FmXCheckBoxCell() override;
891
892public:
893 FmXCheckBoxCell( DbGridColumn* pColumn, std::unique_ptr<DbCellControl> pControl );
894
895// UNO
897 virtual css::uno::Any SAL_CALL queryAggregation( const css::uno::Type& _rType ) override;
898 virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override;
899 virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
900
901// OComponentHelper
902 virtual void SAL_CALL disposing() override;
903
904// css::awt::XCheckBox
905 virtual void SAL_CALL addItemListener(const css::uno::Reference< css::awt::XItemListener >& l) override;
906 virtual void SAL_CALL removeItemListener(const css::uno::Reference< css::awt::XItemListener >& l) override;
907 virtual sal_Int16 SAL_CALL getState() override;
908 virtual void SAL_CALL setState(sal_Int16 n) override;
909 virtual void SAL_CALL setLabel(const OUString& Label) override;
910 virtual void SAL_CALL enableTriState(sal_Bool b) override;
911
912 // XButton
913 virtual void SAL_CALL addActionListener( const css::uno::Reference< css::awt::XActionListener >& l ) override;
914 virtual void SAL_CALL removeActionListener( const css::uno::Reference< css::awt::XActionListener >& l ) override;
915 //virtual void SAL_CALL setLabel( const OUString& Label ) throw (css::uno::RuntimeException);
916 virtual void SAL_CALL setActionCommand( const OUString& Command ) override;
917};
918
919typedef ::cppu::ImplHelper1 < css::awt::XListBox
921class FmXListBoxCell final : public FmXTextCell
922 , public FmXListBoxCell_Base
923{
924public:
925 FmXListBoxCell( DbGridColumn* pColumn, std::unique_ptr<DbCellControl> pControl );
926
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::XListBox
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 void SAL_CALL addActionListener(const css::uno::Reference< css::awt::XActionListener >& l) override;
939 virtual void SAL_CALL removeActionListener(const css::uno::Reference< css::awt::XActionListener >& l) override;
940 virtual void SAL_CALL addItem(const OUString& aItem, sal_Int16 nPos) override;
941 virtual void SAL_CALL addItems(const css::uno::Sequence< OUString >& aItems, sal_Int16 nPos) override;
942 virtual void SAL_CALL removeItems(sal_Int16 nPos, sal_Int16 nCount) override;
943 virtual sal_Int16 SAL_CALL getItemCount() override;
944 virtual OUString SAL_CALL getItem(sal_Int16 nPos) override;
945 virtual css::uno::Sequence< OUString > SAL_CALL getItems() override;
946 virtual sal_Int16 SAL_CALL getSelectedItemPos() override;
947 virtual css::uno::Sequence< sal_Int16 > SAL_CALL getSelectedItemsPos() override;
948 virtual OUString SAL_CALL getSelectedItem() override;
949 virtual css::uno::Sequence< OUString > SAL_CALL getSelectedItems() override;
950 virtual void SAL_CALL selectItemPos(sal_Int16 nPos, sal_Bool bSelect) override;
951 virtual void SAL_CALL selectItemsPos(const css::uno::Sequence< sal_Int16 >& aPositions, sal_Bool bSelect) override;
952 virtual void SAL_CALL selectItem(const OUString& aItem, sal_Bool bSelect) override;
953 virtual sal_Bool SAL_CALL isMutipleMode() override;
954 virtual void SAL_CALL setMultipleMode(sal_Bool bMulti) override;
955 virtual sal_Int16 SAL_CALL getDropDownLineCount() override;
956 virtual void SAL_CALL setDropDownLineCount(sal_Int16 nLines) override;
957 virtual void SAL_CALL makeVisible(sal_Int16 nEntry) override;
958
959private:
960 virtual ~FmXListBoxCell() override;
961
962 DECL_LINK(ChangedHdl, bool, void);
963
964 void OnDoubleClick();
965
969 sal_uInt16 m_nLines;
971};
972
973
974typedef ::cppu::ImplHelper1 < css::awt::XComboBox
976class FmXComboBoxCell final : public FmXTextCell
977 , public FmXComboBoxCell_Base
978{
979private:
983 sal_uInt16 m_nLines;
984
985 DECL_LINK(ChangedHdl, bool, void);
986
987 virtual ~FmXComboBoxCell() override;
988
989public:
990 FmXComboBoxCell( DbGridColumn* pColumn, std::unique_ptr<DbCellControl> pControl );
991
993 virtual css::uno::Any SAL_CALL queryAggregation( const css::uno::Type& _rType ) override;
994 virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override;
995 virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
996
997 // OComponentHelper
998 virtual void SAL_CALL disposing() override;
999
1000 // XComboBox
1001 virtual void SAL_CALL addItemListener( const css::uno::Reference< css::awt::XItemListener >& Listener ) override;
1002 virtual void SAL_CALL removeItemListener( const css::uno::Reference< css::awt::XItemListener >& Listener ) override;
1003 virtual void SAL_CALL addActionListener( const css::uno::Reference< css::awt::XActionListener >& Listener ) override;
1004 virtual void SAL_CALL removeActionListener( const css::uno::Reference< css::awt::XActionListener >& Listener ) override;
1005 virtual void SAL_CALL addItem( const OUString& Item, ::sal_Int16 Pos ) override;
1006 virtual void SAL_CALL addItems( const css::uno::Sequence< OUString >& Items, ::sal_Int16 Pos ) override;
1007 virtual void SAL_CALL removeItems( ::sal_Int16 nPos, ::sal_Int16 nCount ) override;
1008 virtual ::sal_Int16 SAL_CALL getItemCount( ) override;
1009 virtual OUString SAL_CALL getItem( ::sal_Int16 Pos ) override;
1010 virtual css::uno::Sequence< OUString > SAL_CALL getItems( ) override;
1011 virtual ::sal_Int16 SAL_CALL getDropDownLineCount( ) override;
1012 virtual void SAL_CALL setDropDownLineCount( ::sal_Int16 Lines ) override;
1013};
1014
1015typedef ::cppu::ImplHelper1 < css::awt::XTextComponent
1017class FmXFilterCell final : public FmXGridCell
1018 ,public FmXFilterCell_Base
1019{
1020public:
1021 FmXFilterCell(DbGridColumn* pColumn, std::unique_ptr<DbFilterField> pControl);
1022
1023
1025 virtual css::uno::Any SAL_CALL queryAggregation( const css::uno::Type& _rType ) override;
1026 virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override;
1027 virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
1028
1029// painting the filter text
1030 void PaintCell(OutputDevice& rDev, const tools::Rectangle& rRect);
1031 void Update(){m_pCellControl->Update();}
1032
1033// OComponentHelper
1034 virtual void SAL_CALL disposing() override;
1035
1036// css::awt::XTextComponent
1037 virtual void SAL_CALL addTextListener(const css::uno::Reference< css::awt::XTextListener >& l) override;
1038 virtual void SAL_CALL removeTextListener(const css::uno::Reference< css::awt::XTextListener >& l) override;
1039 virtual void SAL_CALL setText(const OUString& aText) override;
1040 virtual void SAL_CALL insertText(const css::awt::Selection& Sel, const OUString& Text) override;
1041 virtual OUString SAL_CALL getText() override;
1042 virtual OUString SAL_CALL getSelectedText() override;
1043 virtual void SAL_CALL setSelection(const css::awt::Selection& aSelection) override;
1044 virtual css::awt::Selection SAL_CALL getSelection() override;
1045 virtual sal_Bool SAL_CALL isEditable() override;
1046 virtual void SAL_CALL setEditable(sal_Bool bEditable) override;
1047 virtual void SAL_CALL setMaxTextLen(sal_Int16 nLen) override;
1048 virtual sal_Int16 SAL_CALL getMaxTextLen() override;
1049
1050private:
1051 DECL_LINK( OnCommit, DbFilterField&, void );
1052 virtual ~FmXFilterCell() override;
1053
1055};
1056
1057#endif // INCLUDED_SVX_SOURCE_INC_GRIDCELL_HXX
1058
1059/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
bool m_bTransparent
Definition: gridcell.hxx:194
void ImplInitWindow(vcl::Window const &rParent, const InitWindowFacet _eInitWhat)
Definition: gridcell.cxx:696
virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter, const Color **ppColor=nullptr)=0
DbGridColumn & m_rColumn
Definition: gridcell.hxx:202
svt::ControlBase & GetWindow() const
Definition: gridcell.hxx:254
virtual void _propertyChanged(const css::beans::PropertyChangeEvent &evt) override
Definition: gridcell.cxx:637
void AlignControl(sal_Int16 nAlignment)
Definition: gridcell.cxx:932
bool isTransparent() const
Definition: gridcell.hxx:211
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
virtual ::svt::CellControllerRef CreateController() const =0
void setTransparent(bool _bSet)
Definition: gridcell.hxx:212
bool m_bAccessingValueProperty
Definition: gridcell.hxx:196
void invalidatedController()
Definition: gridcell.cxx:996
virtual bool commitControl()=0
commits the content of the control (e.g.
rtl::Reference<::comphelper::OPropertyChangeMultiplexer > m_pFieldChangeBroadcaster
Definition: gridcell.hxx:191
virtual void Init(BrowserDataWin &rParent, const css::uno::Reference< css::sdbc::XRowSet > &xCursor)
Definition: gridcell.cxx:829
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
void unlockValueProperty()
unlocks the listening at the value property
Definition: gridcell.hxx:339
const css::uno::Reference< css::sdbc::XRowSet > & getCursor() const
Definition: gridcell.hxx:208
virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter)=0
virtual void Update()
Definition: gridcell.hxx:277
void doPropertyListening(const OUString &_rPropertyName)
Definition: gridcell.cxx:594
css::uno::Reference< css::sdbc::XRowSet > m_xCursor
Definition: gridcell.hxx:199
VclPtr< svt::ControlBase > m_pWindow
Definition: gridcell.hxx:204
VclPtr< svt::ControlBase > m_pPainter
Definition: gridcell.hxx:203
void setAlignedController(bool _bAlign)
Definition: gridcell.hxx:215
bool isAlignedController() const
Definition: gridcell.hxx:261
bool isValuePropertyLocked() const
determined whether or not the value property is locked
Definition: gridcell.hxx:326
double GetValue(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter) const
Definition: gridcell.cxx:964
virtual void PaintCell(OutputDevice &_rDev, const tools::Rectangle &_rRect)
Definition: gridcell.cxx:952
bool Commit()
Definition: gridcell.cxx:676
bool m_bAlignedController
Definition: gridcell.hxx:195
void SetTextLineColor()
Definition: gridcell.cxx:888
rtl::Reference<::comphelper::OPropertyChangeMultiplexer > m_pModelChangeBroadcaster
Definition: gridcell.hxx:190
void implValuePropertyChanged()
Definition: gridcell.cxx:618
virtual void updateFromModel(css::uno::Reference< css::beans::XPropertySet > _rxModel)=0
updates the current content of the control (e.g.
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
virtual void implAdjustGenericFieldSetting(const css::uno::Reference< css::beans::XPropertySet > &_rxModel)
Definition: gridcell.cxx:631
DbCellControl(DbGridColumn &_rColumn)
Definition: gridcell.cxx:521
virtual ~DbCellControl() override
Definition: gridcell.cxx:609
void implDoPropertyListening(const OUString &_rPropertyName, bool _bWarnIfNotExistent)
Definition: gridcell.cxx:572
void lockValueProperty()
locks the listening at the value property.
Definition: gridcell.hxx:332
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:1680
DbCheckBox(DbGridColumn &_rColumn)
Definition: gridcell.cxx:1594
virtual void Init(BrowserDataWin &rParent, const css::uno::Reference< css::sdbc::XRowSet > &xCursor) override
Definition: gridcell.cxx:1615
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:1812
virtual void updateFromModel(css::uno::Reference< css::beans::XPropertySet > _rxModel) override
updates the current content of the control (e.g.
Definition: gridcell.cxx:1796
virtual ::svt::CellControllerRef CreateController() const override
Definition: gridcell.cxx:1650
virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter) override
Definition: gridcell.cxx:1675
virtual void PaintCell(OutputDevice &rDev, const tools::Rectangle &rRect) override
Definition: gridcell.cxx:1711
virtual bool commitControl() override
commits the content of the control (e.g.
Definition: gridcell.cxx:1805
DbComboBox(DbGridColumn &_rColumn)
Definition: gridcell.cxx:2456
virtual void Init(BrowserDataWin &rParent, const css::uno::Reference< css::sdbc::XRowSet > &xCursor) override
Definition: gridcell.cxx:2499
virtual void implAdjustGenericFieldSetting(const css::uno::Reference< css::beans::XPropertySet > &_rxModel) override
Definition: gridcell.cxx:2494
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:2526
virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter) override
Definition: gridcell.cxx:2534
virtual void _propertyChanged(const css::beans::PropertyChangeEvent &evt) override
Definition: gridcell.cxx:2465
virtual void updateFromModel(css::uno::Reference< css::beans::XPropertySet > _rxModel) override
updates the current content of the control (e.g.
Definition: gridcell.cxx:2540
virtual bool commitControl() override
commits the content of the control (e.g.
Definition: gridcell.cxx:2558
virtual ::svt::CellControllerRef CreateController() const override
Definition: gridcell.cxx:2521
void SetList(const css::uno::Any &rItems)
Definition: gridcell.cxx:2477
virtual void updateFromModel(css::uno::Reference< css::beans::XPropertySet > _rxModel) override
updates the current content of the control (e.g.
Definition: gridcell.cxx:2185
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:2175
virtual VclPtr< svt::ControlBase > createField(BrowserDataWin *_pParent, bool bSpinButton, const css::uno::Reference< css::beans::XPropertySet > &_rxModel) override
Definition: gridcell.cxx:2144
virtual bool commitControl() override
commits the content of the control (e.g.
Definition: gridcell.cxx:2201
virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter) override
Definition: gridcell.cxx:2180
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:2109
DbCurrencyField(DbGridColumn &_rColumn)
Definition: gridcell.cxx:2097
virtual void updateFromModel(css::uno::Reference< css::beans::XPropertySet > _rxModel) override
updates the current content of the control (e.g.
Definition: gridcell.cxx:2315
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:2238
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:2305
virtual VclPtr< svt::ControlBase > createField(BrowserDataWin *_pParent, bool bSpinButton, const css::uno::Reference< css::beans::XPropertySet > &_rxModel) override
Definition: gridcell.cxx:2227
virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter) override
Definition: gridcell.cxx:2310
DbDateField(DbGridColumn &_rColumn)
Definition: gridcell.cxx:2217
virtual bool commitControl() override
commits the content of the control (e.g.
Definition: gridcell.cxx:2328
void CreateControl(BrowserDataWin *pParent, const css::uno::Reference< css::beans::XPropertySet > &xModel)
Definition: gridcell.cxx:2783
virtual void Init(BrowserDataWin &rParent, const css::uno::Reference< css::sdbc::XRowSet > &xCursor) override
Definition: gridcell.cxx:2833
bool m_bFilterListFilled
Definition: gridcell.hxx:668
css::uno::Sequence< OUString > m_aValueList
Definition: gridcell.hxx:663
virtual bool commitControl() override
commits the content of the control (e.g.
Definition: gridcell.cxx:2901
const OUString & GetText() const
Definition: gridcell.hxx:649
virtual void updateFromModel(css::uno::Reference< css::beans::XPropertySet > _rxModel) override
updates the current content of the control (e.g.
Definition: gridcell.cxx:2892
virtual void Update() override
Definition: gridcell.cxx:3030
virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter) override
Definition: gridcell.cxx:3154
DbFilterField(const css::uno::Reference< css::uno::XComponentContext > &rxContext, DbGridColumn &_rColumn)
Definition: gridcell.cxx:2715
virtual ::svt::CellControllerRef CreateController() const override
Definition: gridcell.cxx:2869
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:3149
virtual void PaintCell(OutputDevice &rDev, const tools::Rectangle &rRect) override
Definition: gridcell.cxx:2733
DECL_LINK(OnToggle, weld::CheckButton &, void)
bool m_bFilterList
Definition: gridcell.hxx:667
void SetList(const css::uno::Any &rItems, bool bComboBox)
Definition: gridcell.cxx:2758
Link< DbFilterField &, void > m_aCommitLink
Definition: gridcell.hxx:665
OUString m_aText
Definition: gridcell.hxx:664
virtual ~DbFilterField() override
Definition: gridcell.cxx:2726
void SetText(const OUString &rText)
Definition: gridcell.cxx:2990
sal_Int16 m_nControlClass
Definition: gridcell.hxx:666
void SetCommitHdl(const Link< DbFilterField &, void > &rLink)
Definition: gridcell.hxx:652
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:1457
virtual void updateFromModel(css::uno::Reference< css::beans::XPropertySet > _rxModel) override
updates the current content of the control (e.g.
Definition: gridcell.cxx:1549
virtual bool commitControl() override
commits the content of the control (e.g.
Definition: gridcell.cxx:1573
virtual void _propertyChanged(const css::beans::PropertyChangeEvent &evt) override
Definition: gridcell.cxx:1439
virtual void Init(BrowserDataWin &rParent, const css::uno::Reference< css::sdbc::XRowSet > &xCursor) override
Definition: gridcell.cxx:1225
virtual ~DbFormattedField() override
Definition: gridcell.cxx:1221
css::uno::Reference< css::util::XNumberFormatsSupplier > m_xSupplier
Definition: gridcell.hxx:418
virtual ::svt::CellControllerRef CreateController() const override
Definition: gridcell.cxx:1434
DbFormattedField(DbGridColumn &_rColumn)
Definition: gridcell.cxx:1214
virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter) override
Definition: gridcell.cxx:1507
bool Commit()
Definition: gridcell.cxx:268
sal_Int32 GetKey() const
Definition: gridcell.hxx:122
DbGridControl & GetParent() const
Definition: gridcell.hxx:125
sal_uInt16 m_nId
Definition: gridcell.hxx:76
OUString GetCellText(const css::uno::Reference< css::sdb::XColumn > &xField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter) const
void ImplInitWindow(vcl::Window const &rParent, const InitWindowFacet _eInitWhat)
Definition: gridcell.cxx:511
void SetObject(sal_Int16 nPos)
Definition: gridcell.hxx:158
sal_Int16 SetAlignmentFromModel(sal_Int16 nStandardAlign)
Definition: gridcell.cxx:372
void UpdateControl()
Definition: gridcell.hxx:141
void SetReadOnly(bool bRead)
Definition: gridcell.hxx:157
void UpdateFromField(const DbGridRow *pRow, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter)
Definition: gridcell.cxx:258
bool IsNumeric() const
Definition: gridcell.hxx:120
OUString GetCellText(const DbGridRow *pRow, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter) const
void setModel(const css::uno::Reference< css::beans::XPropertySet > &_xModel)
Definition: gridcell.cxx:294
sal_Int16 GetAlignment() const
Definition: gridcell.hxx:118
::svt::CellControllerRef s_xEmptyController
Definition: gridcell.hxx:87
bool m_bNumeric
Definition: gridcell.hxx:82
bool m_bLocked
Definition: gridcell.hxx:85
sal_uInt16 GetId() const
Definition: gridcell.hxx:115
bool IsAutoValue() const
Definition: gridcell.hxx:117
bool IsHidden() const
Definition: gridcell.hxx:121
bool m_bAutoValue
Definition: gridcell.hxx:80
FmXGridCell * GetCell() const
Definition: gridcell.hxx:126
sal_Int16 m_nFieldType
Definition: gridcell.hxx:74
rtl::Reference< FmXGridCell > m_pCell
Definition: gridcell.hxx:70
void CreateControl(sal_Int32 _nFieldPos, const css::uno::Reference< css::beans::XPropertySet > &xField, sal_Int32 nTypeId)
Definition: gridcell.cxx:137
bool m_bHidden
Definition: gridcell.hxx:84
sal_Int16 GetFieldPos() const
Definition: gridcell.hxx:119
const ::svt::CellControllerRef & GetController() const
Definition: gridcell.hxx:123
css::uno::Reference< css::beans::XPropertySet > m_xModel
Definition: gridcell.hxx:65
sal_Int32 m_nLastVisibleWidth
Definition: gridcell.hxx:72
bool m_bObject
Definition: gridcell.hxx:83
DbGridControl & m_rParent
Definition: gridcell.hxx:71
void setLock(bool _bLock)
Definition: gridcell.cxx:385
sal_Int16 m_nFieldPos
Definition: gridcell.hxx:77
sal_Int16 m_nTypeId
Definition: gridcell.hxx:75
bool m_bReadOnly
Definition: gridcell.hxx:79
css::uno::Reference< css::sdb::XColumn > GetCurrentFieldValue() const
Definition: gridcell.cxx:432
sal_Int16 SetAlignment(sal_Int16 _nAlign)
Definition: gridcell.cxx:327
bool m_bInSave
Definition: gridcell.hxx:81
sal_Int32 m_nFormatKey
Definition: gridcell.hxx:73
bool isLocked() const
Definition: gridcell.hxx:171
sal_Int16 m_nAlign
Definition: gridcell.hxx:78
bool IsReadOnly() const
Definition: gridcell.hxx:116
const css::uno::Reference< css::beans::XPropertySet > & GetField() const
Definition: gridcell.hxx:124
::svt::CellControllerRef m_xController
Definition: gridcell.hxx:67
css::uno::Reference< css::beans::XPropertySet > m_xField
Definition: gridcell.hxx:66
void Paint(OutputDevice &rDev, const tools::Rectangle &rRect, const DbGridRow *pRow, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter)
Definition: gridcell.cxx:444
DbGridColumn(sal_uInt16 _nId, DbGridControl &rParent)
Definition: gridcell.hxx:90
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
void Clear()
Definition: gridcell.cxx:306
const css::uno::Reference< css::beans::XPropertySet > & getModel() const
Definition: gridcell.hxx:111
a field which is bound to a column which supports the MaxTextLen property
Definition: gridcell.hxx:349
virtual void implSetEffectiveMaxTextLen(sal_Int32 _nMaxLen)
Definition: gridcell.cxx:1022
void implSetMaxTextLen(sal_Int16 _nMaxLen)
Definition: gridcell.hxx:360
virtual void implAdjustGenericFieldSetting(const css::uno::Reference< css::beans::XPropertySet > &_rxModel) override
Definition: gridcell.cxx:1010
DbLimitedLengthField(DbGridColumn &_rColumn)
Definition: gridcell.cxx:1003
virtual void _propertyChanged(const css::beans::PropertyChangeEvent &evt) override
Definition: gridcell.cxx:2578
bool m_bBound
Definition: gridcell.hxx:470
virtual void Init(BrowserDataWin &rParent, const css::uno::Reference< css::sdbc::XRowSet > &xCursor) override
Definition: gridcell.cxx:2616
css::uno::Sequence< OUString > m_aValueList
Definition: gridcell.hxx:471
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:2640
virtual void implAdjustGenericFieldSetting(const css::uno::Reference< css::beans::XPropertySet > &_rxModel) override
Definition: gridcell.cxx:2630
virtual bool commitControl() override
commits the content of the control (e.g.
Definition: gridcell.cxx:2699
DbListBox(DbGridColumn &_rColumn)
Definition: gridcell.cxx:2568
virtual void updateFromModel(css::uno::Reference< css::beans::XPropertySet > _rxModel) override
updates the current content of the control (e.g.
Definition: gridcell.cxx:2675
virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter) override
Definition: gridcell.cxx:2665
void SetList(const css::uno::Any &rItems)
Definition: gridcell.cxx:2590
virtual ::svt::CellControllerRef CreateController() const override
Definition: gridcell.cxx:2635
virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter) override
Definition: gridcell.cxx:2060
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:2055
DbNumericField(DbGridColumn &_rColumn)
Definition: gridcell.cxx:1958
virtual VclPtr< svt::ControlBase > createField(BrowserDataWin *_pParent, bool bSpinButton, const css::uno::Reference< css::beans::XPropertySet > &_rxModel) override
Definition: gridcell.cxx:2024
virtual bool commitControl() override
commits the content of the control (e.g.
Definition: gridcell.cxx:2081
virtual void updateFromModel(css::uno::Reference< css::beans::XPropertySet > _rxModel) override
updates the current content of the control (e.g.
Definition: gridcell.cxx:2065
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:1969
virtual void Init(BrowserDataWin &rParent, const css::uno::Reference< css::sdbc::XRowSet > &xCursor) override
Definition: gridcell.cxx:1852
virtual bool commitControl() override
DbCellControl.
Definition: gridcell.cxx:1919
DbPatternField(DbGridColumn &_rColumn, const css::uno::Reference< css::uno::XComponentContext > &_rContext)
Definition: gridcell.cxx:1817
virtual ::svt::CellControllerRef CreateController() const override
Definition: gridcell.cxx:1865
virtual void updateFromModel(css::uno::Reference< css::beans::XPropertySet > _rxModel) override
updates the current content of the control (e.g.
Definition: gridcell.cxx:1907
css::uno::Reference< css::uno::XComponentContext > m_xContext
Definition: gridcell.hxx:515
virtual void implAdjustGenericFieldSetting(const css::uno::Reference< css::beans::XPropertySet > &_rxModel) override
Definition: gridcell.cxx:1826
OUString impl_formatText(const OUString &_rText)
Definition: gridcell.cxx:1870
virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter) override
Definition: gridcell.cxx:1900
::std::unique_ptr< ::dbtools::FormattedColumnValue > m_pPaintFormatter
Definition: gridcell.hxx:514
::std::unique_ptr< ::dbtools::FormattedColumnValue > m_pValueFormatter
Definition: gridcell.hxx:513
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:1878
DbSpinField(DbGridColumn &_rColumn, sal_Int16 _nStandardAlign=css::awt::TextAlign::RIGHT)
Definition: gridcell.cxx:1926
virtual ::svt::CellControllerRef CreateController() const override
Definition: gridcell.cxx:1953
sal_Int16 m_nStandardAlign
Definition: gridcell.hxx:522
virtual void Init(BrowserDataWin &rParent, const css::uno::Reference< css::sdbc::XRowSet > &_rxCursor) override
Definition: gridcell.cxx:1932
virtual VclPtr< svt::ControlBase > createField(BrowserDataWin *_pParent, bool bSpinButton, const css::uno::Reference< css::beans::XPropertySet > &_rxModel)=0
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
virtual void implSetEffectiveMaxTextLen(sal_Int32 _nMaxLen) override
Definition: gridcell.cxx:1206
::svt::IEditImplementation * GetEditImplementation()
Definition: gridcell.hxx:379
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:1165
virtual void updateFromModel(css::uno::Reference< css::beans::XPropertySet > _rxModel) override
updates the current content of the control (e.g.
Definition: gridcell.cxx:1171
bool m_bIsMultiLineEdit
Definition: gridcell.hxx: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
DbTextField(DbGridColumn &_rColumn)
Definition: gridcell.cxx:1029
virtual bool commitControl() override
commits the content of the control (e.g.
Definition: gridcell.cxx:1189
bool IsMultiLineEdit() const
Definition: gridcell.hxx:380
virtual ~DbTextField() override
Definition: gridcell.cxx:1035
virtual ::svt::CellControllerRef CreateController() const override
Definition: gridcell.cxx:1132
std::unique_ptr<::svt::IEditImplementation > m_pEdit
Definition: gridcell.hxx:370
std::unique_ptr<::svt::IEditImplementation > m_pPainterImplementation
Definition: gridcell.hxx:371
virtual void updateFromModel(css::uno::Reference< css::beans::XPropertySet > _rxModel) override
updates the current content of the control (e.g.
Definition: gridcell.cxx:2426
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:2358
virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter) override
Definition: gridcell.cxx:2421
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:2416
DbTimeField(DbGridColumn &_rColumn)
Definition: gridcell.cxx:2344
virtual VclPtr< svt::ControlBase > createField(BrowserDataWin *_pParent, bool bSpinButton, const css::uno::Reference< css::beans::XPropertySet > &_rxModel) override
Definition: gridcell.cxx:2353
virtual bool commitControl() override
commits the content of the control (e.g.
Definition: gridcell.cxx:2440
virtual void SAL_CALL removeActionListener(const css::uno::Reference< css::awt::XActionListener > &l) override
Definition: gridcell.cxx:3934
::comphelper::OInterfaceContainerHelper3< css::awt::XItemListener > m_aItemListeners
Definition: gridcell.hxx:883
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
Definition: gridcell.cxx:3876
OUString m_aActionCommand
Definition: gridcell.hxx:885
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
virtual void SAL_CALL disposing() override
Definition: gridcell.cxx:3852
virtual css::uno::Any SAL_CALL queryAggregation(const css::uno::Type &_rType) override
Definition: gridcell.cxx:3865
virtual void SAL_CALL addItemListener(const css::uno::Reference< css::awt::XItemListener > &l) override
Definition: gridcell.cxx:3887
VclPtr<::svt::CheckBoxControl > m_pBox
Definition: gridcell.hxx:886
virtual ~FmXCheckBoxCell() override
Definition: gridcell.cxx:3842
virtual void SAL_CALL removeItemListener(const css::uno::Reference< css::awt::XItemListener > &l) override
Definition: gridcell.cxx:3892
::comphelper::OInterfaceContainerHelper3< css::awt::XActionListener > m_aActionListeners
Definition: gridcell.hxx:884
FmXCheckBoxCell(DbGridColumn *pColumn, std::unique_ptr< DbCellControl > pControl)
Definition: gridcell.cxx:3833
virtual void SAL_CALL enableTriState(sal_Bool b) override
Definition: gridcell.cxx:3920
virtual void SAL_CALL setLabel(const OUString &Label) override
Definition: gridcell.cxx:3939
virtual sal_Int16 SAL_CALL getState() override
Definition: gridcell.cxx:3908
DECL_LINK(ModifyHdl, LinkParamNone *, void)
virtual void SAL_CALL addActionListener(const css::uno::Reference< css::awt::XActionListener > &l) override
Definition: gridcell.cxx:3928
virtual void SAL_CALL setState(sal_Int16 n) override
Definition: gridcell.cxx:3897
virtual void SAL_CALL setActionCommand(const OUString &Command) override
Definition: gridcell.cxx:3949
virtual void SAL_CALL addItems(const css::uno::Sequence< OUString > &Items, ::sal_Int16 Pos) override
Definition: gridcell.cxx:4384
::comphelper::OInterfaceContainerHelper3< css::awt::XActionListener > m_aActionListeners
Definition: gridcell.hxx:981
DECL_LINK(ChangedHdl, bool, void)
virtual void SAL_CALL removeActionListener(const css::uno::Reference< css::awt::XActionListener > &Listener) override
Definition: gridcell.cxx:4370
virtual void SAL_CALL addItem(const OUString &Item, ::sal_Int16 Pos) override
Definition: gridcell.cxx:4375
virtual void SAL_CALL removeItems(::sal_Int16 nPos, ::sal_Int16 nCount) override
Definition: gridcell.cxx:4399
virtual css::uno::Sequence< OUString > SAL_CALL getItems() override
Definition: gridcell.cxx:4427
virtual ~FmXComboBoxCell() override
Definition: gridcell.cxx:4312
virtual void SAL_CALL addActionListener(const css::uno::Reference< css::awt::XActionListener > &Listener) override
Definition: gridcell.cxx:4364
virtual css::uno::Any SAL_CALL queryAggregation(const css::uno::Type &_rType) override
Definition: gridcell.cxx:4334
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
Definition: gridcell.cxx:4344
virtual ::sal_Int16 SAL_CALL getDropDownLineCount() override
Definition: gridcell.cxx:4444
::comphelper::OInterfaceContainerHelper3< css::awt::XItemListener > m_aItemListeners
Definition: gridcell.hxx:980
VclPtr<::svt::ComboBoxControl > m_pComboBox
Definition: gridcell.hxx:982
FmXComboBoxCell(DbGridColumn *pColumn, std::unique_ptr< DbCellControl > pControl)
Definition: gridcell.cxx:4302
sal_uInt16 m_nLines
Definition: gridcell.hxx:983
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
virtual void SAL_CALL disposing() override
Definition: gridcell.cxx:4322
virtual void SAL_CALL removeItemListener(const css::uno::Reference< css::awt::XItemListener > &Listener) override
Definition: gridcell.cxx:4359
virtual ::sal_Int16 SAL_CALL getItemCount() override
Definition: gridcell.cxx:4409
virtual OUString SAL_CALL getItem(::sal_Int16 Pos) override
Definition: gridcell.cxx:4418
virtual void SAL_CALL addItemListener(const css::uno::Reference< css::awt::XItemListener > &Listener) override
Definition: gridcell.cxx:4354
virtual void SAL_CALL setDropDownLineCount(::sal_Int16 Lines) override
Definition: gridcell.cxx:4450
void UpdateFromColumn()
Definition: gridcell.cxx:3546
void UpdateFromField(const css::uno::Reference< css::sdb::XColumn > &xField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter)
Definition: gridcell.hxx:794
FmXDataCell(DbGridColumn *pColumn, std::unique_ptr< DbCellControl > pControl)
Definition: gridcell.hxx:784
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:3539
virtual css::uno::Any SAL_CALL queryAggregation(const css::uno::Type &_rType) override
Definition: gridcell.cxx:3651
virtual void SAL_CALL setText(const OUString &aText) override
Definition: gridcell.cxx:3683
virtual void SAL_CALL addTextListener(const css::uno::Reference< css::awt::XTextListener > &l) override
Definition: gridcell.cxx:3672
virtual void onFocusGained(const css::awt::FocusEvent &_rEvent) override
Definition: gridcell.cxx:3810
void onTextChanged()
Definition: gridcell.cxx:3803
DECL_LINK(ModifyHdl, LinkParamNone *, void)
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
FmXEditCell(DbGridColumn *pColumn, std::unique_ptr< DbCellControl > pControl)
Definition: gridcell.cxx:3605
virtual void SAL_CALL setEditable(sal_Bool bEditable) override
Definition: gridcell.cxx:3770
virtual void SAL_CALL setSelection(const css::awt::Selection &aSelection) override
Definition: gridcell.cxx:3744
virtual sal_Int16 SAL_CALL getMaxTextLen() override
Definition: gridcell.cxx:3778
virtual void SAL_CALL insertText(const css::awt::Selection &Sel, const OUString &Text) override
Definition: gridcell.cxx:3697
virtual void onFocusLost(const css::awt::FocusEvent &_rEvent) override
Definition: gridcell.cxx:3816
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
Definition: gridcell.cxx:3661
virtual OUString SAL_CALL getText() override
Definition: gridcell.cxx:3708
bool m_bOwnEditImplementation
Definition: gridcell.hxx:874
virtual OUString SAL_CALL getSelectedText() override
Definition: gridcell.cxx:3731
virtual void SAL_CALL removeTextListener(const css::uno::Reference< css::awt::XTextListener > &l) override
Definition: gridcell.cxx:3678
::comphelper::OInterfaceContainerHelper3< css::awt::XTextListener > m_aTextListeners
Definition: gridcell.hxx:871
virtual void SAL_CALL removeChangeListener(const css::uno::Reference< css::form::XChangeListener > &aListener) override
Definition: gridcell.cxx:3798
virtual ~FmXEditCell() override
Definition: gridcell.cxx:3628
::svt::IEditImplementation * m_pEditImplementation
Definition: gridcell.hxx:873
virtual sal_Bool SAL_CALL isEditable() override
Definition: gridcell.cxx:3763
virtual void SAL_CALL setMaxTextLen(sal_Int16 nLen) override
Definition: gridcell.cxx:3785
virtual void SAL_CALL addChangeListener(const css::uno::Reference< css::form::XChangeListener > &aListener) override
Definition: gridcell.cxx:3793
virtual void SAL_CALL disposing() override
Definition: gridcell.cxx:3638
OUString m_sValueOnEnter
Definition: gridcell.hxx:870
virtual css::awt::Selection SAL_CALL getSelection() override
Definition: gridcell.cxx:3752
::comphelper::OInterfaceContainerHelper3< css::form::XChangeListener > m_aChangeListeners
Definition: gridcell.hxx:872
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
::comphelper::OInterfaceContainerHelper3< css::awt::XTextListener > m_aTextListeners
Definition: gridcell.hxx:1054
virtual ~FmXFilterCell() override
Definition: gridcell.cxx:4484
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
Definition: gridcell.cxx:4523
virtual void SAL_CALL disposing() override
Definition: gridcell.cxx:4501
virtual void SAL_CALL addTextListener(const css::uno::Reference< css::awt::XTextListener > &l) override
Definition: gridcell.cxx:4536
virtual void SAL_CALL setMaxTextLen(sal_Int16 nLen) override
Definition: gridcell.cxx:4591
virtual void SAL_CALL setEditable(sal_Bool bEditable) override
Definition: gridcell.cxx:4582
virtual sal_Int16 SAL_CALL getMaxTextLen() override
Definition: gridcell.cxx:4586
virtual void SAL_CALL setSelection(const css::awt::Selection &aSelection) override
Definition: gridcell.cxx:4568
virtual void SAL_CALL setText(const OUString &aText) override
Definition: gridcell.cxx:4547
virtual OUString SAL_CALL getSelectedText() override
Definition: gridcell.cxx:4563
virtual void SAL_CALL insertText(const css::awt::Selection &Sel, const OUString &Text) override
Definition: gridcell.cxx:4553
virtual OUString SAL_CALL getText() override
Definition: gridcell.cxx:4557
void PaintCell(OutputDevice &rDev, const tools::Rectangle &rRect)
Definition: gridcell.cxx:4494
DECL_LINK(OnCommit, DbFilterField &, void)
FmXFilterCell(DbGridColumn *pColumn, std::unique_ptr< DbFilterField > pControl)
Definition: gridcell.cxx:4477
virtual void SAL_CALL removeTextListener(const css::uno::Reference< css::awt::XTextListener > &l) override
Definition: gridcell.cxx:4542
virtual sal_Bool SAL_CALL isEditable() override
Definition: gridcell.cxx:4577
virtual css::uno::Any SAL_CALL queryAggregation(const css::uno::Type &_rType) override
Definition: gridcell.cxx:4512
virtual css::awt::Selection SAL_CALL getSelection() override
Definition: gridcell.cxx:4572
virtual void SAL_CALL removePaintListener(const css::uno::Reference< css::awt::XPaintListener > &xListener) override
Definition: gridcell.cxx:3440
virtual void SAL_CALL setDesignMode(sal_Bool) override
Definition: gridcell.hxx:729
virtual css::awt::Rectangle SAL_CALL getPosSize() override
Definition: gridcell.cxx:3338
virtual void SAL_CALL addPaintListener(const css::uno::Reference< css::awt::XPaintListener > &xListener) override
Definition: gridcell.cxx:3435
virtual css::uno::Reference< css::awt::XWindowPeer > SAL_CALL getPeer() override
Definition: gridcell.hxx:725
void init()
Definition: gridcell.cxx:3202
virtual void SAL_CALL createPeer(const css::uno::Reference< css::awt::XToolkit > &, const css::uno::Reference< css::awt::XWindowPeer > &) override
Definition: gridcell.hxx:723
DECL_LINK(OnMousePress, const MouseEvent &, void)
void SetTextLineColor()
Definition: gridcell.cxx:3234
void ImplInitWindow(vcl::Window const &rParent, const InitWindowFacet _eInitWhat)
Definition: gridcell.hxx:757
void AlignControl(sal_Int16 nAlignment)
Definition: gridcell.hxx:761
::comphelper::OInterfaceContainerHelper3< css::awt::XKeyListener > m_aKeyListeners
Definition: gridcell.hxx:691
virtual void SAL_CALL dispose() override
Definition: gridcell.hxx:716
::comphelper::OInterfaceContainerHelper3< css::awt::XFocusListener > m_aFocusListeners
Definition: gridcell.hxx:690
virtual void SAL_CALL setFocus() override
Definition: gridcell.cxx:3359
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
Definition: gridcell.cxx:3248
DECL_LINK(OnMouseRelease, const MouseEvent &, void)
virtual void SAL_CALL setEnable(sal_Bool Enable) override
Definition: gridcell.cxx:3352
virtual sal_Bool SAL_CALL setModel(const css::uno::Reference< css::awt::XControlModel > &) override
Definition: gridcell.hxx:726
virtual sal_Bool SAL_CALL getLock() override
Definition: gridcell.cxx:3311
virtual void onFocusLost(const css::awt::FocusEvent &_rEvent)
Definition: gridcell.cxx:3451
::comphelper::OInterfaceContainerHelper3< css::awt::XMouseMotionListener > m_aMouseMotionListeners
Definition: gridcell.hxx:693
virtual void SAL_CALL removeWindowListener(const css::uno::Reference< css::awt::XWindowListener > &xListener) override
Definition: gridcell.cxx:3373
FmXGridCell(DbGridColumn *pColumn, std::unique_ptr< DbCellControl > pControl)
Definition: gridcell.cxx:3190
DbGridColumn * m_pColumn
Definition: gridcell.hxx:685
virtual void SAL_CALL addKeyListener(const css::uno::Reference< css::awt::XKeyListener > &xListener) override
Definition: gridcell.cxx:3394
virtual void SAL_CALL removeMouseMotionListener(const css::uno::Reference< css::awt::XMouseMotionListener > &xListener) override
Definition: gridcell.cxx:3429
virtual void SAL_CALL setLock(sal_Bool _bLock) override
Definition: gridcell.cxx:3318
virtual void SAL_CALL removeMouseListener(const css::uno::Reference< css::awt::XMouseListener > &xListener) override
Definition: gridcell.cxx:3415
DECL_LINK(OnFocusLost, LinkParamNone *, void)
virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener > &aListener) override
Definition: gridcell.hxx:717
virtual css::uno::Any SAL_CALL queryAggregation(const css::uno::Type &_rType) override
Definition: gridcell.cxx:3282
virtual ~FmXGridCell() override
Definition: gridcell.cxx:3224
DECL_LINK(OnKeyInput, const KeyEvent &, void)
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL getContext() override
Definition: gridcell.cxx:3297
virtual void onFocusGained(const css::awt::FocusEvent &_rEvent)
Definition: gridcell.cxx:3445
::comphelper::OInterfaceContainerHelper3< css::awt::XMouseListener > m_aMouseListeners
Definition: gridcell.hxx:692
DECL_LINK(OnKeyRelease, const KeyEvent &, void)
virtual void SAL_CALL setContext(const css::uno::Reference< css::uno::XInterface > &) override
Definition: gridcell.hxx:721
::osl::Mutex m_aMutex
Definition: gridcell.hxx:684
virtual void SAL_CALL addMouseMotionListener(const css::uno::Reference< css::awt::XMouseMotionListener > &xListener) override
Definition: gridcell.cxx:3422
DECL_LINK(OnFocusGained, LinkParamNone *, void)
::comphelper::OInterfaceContainerHelper3< css::awt::XWindowListener > m_aWindowListeners
Definition: gridcell.hxx:689
virtual void SAL_CALL removeFocusListener(const css::uno::Reference< css::awt::XFocusListener > &xListener) override
Definition: gridcell.cxx:3387
virtual void SAL_CALL removeKeyListener(const css::uno::Reference< css::awt::XKeyListener > &xListener) override
Definition: gridcell.cxx:3401
virtual css::uno::Reference< css::awt::XControlModel > SAL_CALL getModel() override
Definition: gridcell.cxx:3303
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 void SAL_CALL addFocusListener(const css::uno::Reference< css::awt::XFocusListener > &xListener) override
Definition: gridcell.cxx:3380
bool isAlignedController() const
Definition: gridcell.hxx:760
virtual css::uno::Reference< css::awt::XView > SAL_CALL getView() override
Definition: gridcell.hxx:728
virtual sal_Bool SAL_CALL isDesignMode() override
Definition: gridcell.hxx:730
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
virtual void SAL_CALL addMouseListener(const css::uno::Reference< css::awt::XMouseListener > &xListener) override
Definition: gridcell.cxx:3408
DECL_LINK(OnMouseMove, const MouseEvent &, void)
virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener > &aListener) override
Definition: gridcell.hxx:718
svt::ControlBase * getEventWindow() const
Definition: gridcell.cxx:3217
bool Commit()
Definition: gridcell.hxx:756
virtual sal_Bool SAL_CALL isTransparent() override
Definition: gridcell.hxx:731
virtual void SAL_CALL setVisible(sal_Bool Visible) override
Definition: gridcell.cxx:3345
virtual void SAL_CALL disposing() override
Definition: gridcell.cxx:3267
virtual void SAL_CALL addWindowListener(const css::uno::Reference< css::awt::XWindowListener > &xListener) override
Definition: gridcell.cxx:3366
std::unique_ptr< DbCellControl > m_pCellControl
Definition: gridcell.hxx:686
virtual sal_Bool SAL_CALL isMutipleMode() override
Definition: gridcell.cxx:4238
virtual ~FmXListBoxCell() override
Definition: gridcell.cxx:3990
sal_uInt16 m_nLines
Definition: gridcell.hxx:969
virtual void SAL_CALL selectItemPos(sal_Int16 nPos, sal_Bool bSelect) override
Definition: gridcell.cxx:4191
::comphelper::OInterfaceContainerHelper3< css::awt::XActionListener > m_aActionListeners
Definition: gridcell.hxx:967
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
virtual OUString SAL_CALL getItem(sal_Int16 nPos) override
Definition: gridcell.cxx:4098
virtual css::uno::Any SAL_CALL queryAggregation(const css::uno::Type &_rType) override
Definition: gridcell.cxx:4012
virtual void SAL_CALL removeItems(sal_Int16 nPos, sal_Int16 nCount) override
Definition: gridcell.cxx:4078
virtual void SAL_CALL addItemListener(const css::uno::Reference< css::awt::XItemListener > &l) override
Definition: gridcell.cxx:4032
FmXListBoxCell(DbGridColumn *pColumn, std::unique_ptr< DbCellControl > pControl)
Definition: gridcell.cxx:3979
virtual void SAL_CALL removeItemListener(const css::uno::Reference< css::awt::XItemListener > &l) override
Definition: gridcell.cxx:4037
virtual css::uno::Sequence< sal_Int16 > SAL_CALL getSelectedItemsPos() override
Definition: gridcell.cxx:4141
DECL_LINK(ChangedHdl, bool, void)
virtual sal_Int16 SAL_CALL getDropDownLineCount() override
Definition: gridcell.cxx:4252
virtual void SAL_CALL addItems(const css::uno::Sequence< OUString > &aItems, sal_Int16 nPos) override
Definition: gridcell.cxx:4062
virtual void SAL_CALL setMultipleMode(sal_Bool bMulti) override
Definition: gridcell.cxx:4245
virtual css::uno::Sequence< OUString > SAL_CALL getItems() override
Definition: gridcell.cxx:4107
virtual void SAL_CALL selectItem(const OUString &aItem, sal_Bool bSelect) override
Definition: gridcell.cxx:4223
void OnDoubleClick()
Definition: gridcell.cxx:4292
VclPtr<::svt::ListBoxControl > m_pBox
Definition: gridcell.hxx:968
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
Definition: gridcell.cxx:4022
virtual sal_Int16 SAL_CALL getItemCount() override
Definition: gridcell.cxx:4089
virtual OUString SAL_CALL getSelectedItem() override
Definition: gridcell.cxx:4158
virtual void SAL_CALL addActionListener(const css::uno::Reference< css::awt::XActionListener > &l) override
Definition: gridcell.cxx:4042
virtual sal_Int16 SAL_CALL getSelectedItemPos() override
Definition: gridcell.cxx:4126
virtual void SAL_CALL makeVisible(sal_Int16 nEntry) override
Definition: gridcell.cxx:4265
virtual void SAL_CALL selectItemsPos(const css::uno::Sequence< sal_Int16 > &aPositions, sal_Bool bSelect) override
Definition: gridcell.cxx:4205
virtual void SAL_CALL disposing() override
Definition: gridcell.cxx:4000
::comphelper::OInterfaceContainerHelper3< css::awt::XItemListener > m_aItemListeners
Definition: gridcell.hxx:966
virtual void SAL_CALL addItem(const OUString &aItem, sal_Int16 nPos) override
Definition: gridcell.cxx:4052
virtual void SAL_CALL removeActionListener(const css::uno::Reference< css::awt::XActionListener > &l) override
Definition: gridcell.cxx:4047
virtual css::uno::Sequence< OUString > SAL_CALL getSelectedItems() override
Definition: gridcell.cxx:4174
virtual void SAL_CALL setDropDownLineCount(sal_Int16 nLines) override
Definition: gridcell.cxx:4258
bool m_bIsMultiLineText
Definition: gridcell.hxx:806
FmXTextCell(DbGridColumn *pColumn, std::unique_ptr< DbCellControl > pControl)
Definition: gridcell.cxx:3553
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:3559
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:816
OComponentHelper(::osl::Mutex &rMutex)
#define ENSURE_OR_THROW(c, m)
::cppu::ImplHelper1< css::awt::XListBox > FmXListBoxCell_Base
Definition: gridcell.hxx:920
::cppu::ImplHelper1< css::awt::XTextComponent > FmXFilterCell_Base
Definition: gridcell.hxx:1016
::cppu::ImplHelper2< css::awt::XTextComponent, css::form::XChangeBroadcaster > FmXEditCell_Base
Definition: gridcell.hxx:825
::cppu::ImplHelper1< css::awt::XComboBox > FmXComboBoxCell_Base
Definition: gridcell.hxx:975
::cppu::ImplHelper2< css::awt::XCheckBox, css::awt::XButton > FmXCheckBoxCell_Base
Definition: gridcell.hxx:879
::cppu::ImplHelper2< css::awt::XControl, css::form::XBoundControl > FmXGridCell_Base
Definition: gridcell.hxx:676
::cppu::ImplHelper1< css::awt::XWindow > FmXGridCell_WindowBase
Definition: gridcell.hxx:678
InitWindowFacet
Definition: gridctrl.hxx:116
sal_uInt16 nPos
const sal_uInt32 LEFT
TextAlign
unsigned char sal_Bool
#define DECLARE_UNO3_AGG_DEFAULTS(classname, baseclass)