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>
51#include <tools/diagnose_ex.h>
52
53class DbCellControl;
54class Edit;
55class FmXGridCell;
56namespace dbtools {
57 class FormattedColumnValue;
58}
59
60// DbGridColumn, column description
61
63{
64 friend class DbGridControl;
65
66 css::uno::Reference< css::beans::XPropertySet > m_xModel;
67 css::uno::Reference< css::beans::XPropertySet > m_xField; // connection to the database field
68 ::svt::CellControllerRef m_xController; // structure for managing the controls for a column
69 // this is positioned by the DbBrowseBox on the respective
70 // cells of a column
73 sal_Int32 m_nLastVisibleWidth; // only valid if m_bHidden == sal_True
74 sal_Int32 m_nFormatKey;
75 sal_Int16 m_nFieldType;
76 sal_Int16 m_nTypeId;
77 sal_uInt16 m_nId;
78 sal_Int16 m_nFieldPos;
79 sal_Int16 m_nAlign; // specified with TXT_ALIGN_LEFT...
80 bool m_bReadOnly : 1;
81 bool m_bAutoValue : 1;
82 bool m_bInSave : 1;
83 bool m_bNumeric : 1;
84 bool m_bObject : 1; // does the column reference an object datatype?
85 bool m_bHidden : 1;
86 bool m_bLocked : 1;
87
88 static ::svt::CellControllerRef s_xEmptyController;
89 // used by locked columns
90public:
91 DbGridColumn(sal_uInt16 _nId, DbGridControl& rParent)
92 :m_rParent(rParent)
94 ,m_nFormatKey(0)
95 ,m_nFieldType(0)
96 ,m_nTypeId(0)
97 ,m_nId(_nId)
98 ,m_nFieldPos(-1)
99 ,m_nAlign(css::awt::TextAlign::LEFT)
100 ,m_bReadOnly(false)
101 ,m_bAutoValue(false)
102 ,m_bInSave(false)
103 ,m_bNumeric(false)
104 ,m_bObject(false)
105 ,m_bHidden(false)
106 ,m_bLocked(false)
107 {
108 }
109
111
112 const css::uno::Reference< css::beans::XPropertySet >& getModel() const { return m_xModel; }
113 void setModel(const css::uno::Reference< css::beans::XPropertySet >& _xModel);
114
115
116 sal_uInt16 GetId() const {return m_nId;}
117 bool IsReadOnly() const {return m_bReadOnly;}
118 bool IsAutoValue() const {return m_bAutoValue;}
119 sal_Int16 GetAlignment() const {return m_nAlign;}
120 sal_Int16 GetFieldPos() const {return m_nFieldPos; }
121 bool IsNumeric() const {return m_bNumeric;}
122 bool IsHidden() const {return m_bHidden;}
123 sal_Int32 GetKey() const {return m_nFormatKey;}
124 const ::svt::CellControllerRef& GetController() const {return m_bLocked ? s_xEmptyController : m_xController;}
125 const css::uno::Reference< css::beans::XPropertySet >& GetField() const {return m_xField;}
127 FmXGridCell* GetCell() const {return m_pCell.get();}
128
129 css::uno::Reference< css::sdb::XColumn > GetCurrentFieldValue() const;
130
131 // Drawing a field at a position. If a view is set, it takes over the drawing,
132 // e.g., for checkboxes.
133 void Paint(OutputDevice& rDev,
134 const tools::Rectangle& rRect,
135 const DbGridRow* pRow,
136 const css::uno::Reference< css::util::XNumberFormatter >& xFormatter);
137
138
139 // Initializing in the alive mode.
140 // If no ColumnController is set, a default initialization is performed.
141 void CreateControl(sal_Int32 _nFieldPos, const css::uno::Reference< css::beans::XPropertySet >& xField, sal_Int32 nTypeId);
143 {
144 css::uno::Reference< css::beans::XPropertySet > xField(m_xField);
146 }
147
148 // Editing a Zelle
149 void UpdateFromField(const DbGridRow* pRow, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter);
150 bool Commit();
151
152 // releasing all the data required for the AliveMode
153 void Clear();
154
155 OUString GetCellText(const DbGridRow* pRow, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) const;
156 OUString GetCellText(const css::uno::Reference< css::sdb::XColumn >& xField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) const;
157
158 void SetReadOnly(bool bRead){m_bReadOnly = bRead;}
159 void SetObject(sal_Int16 nPos) {m_bObject = m_bReadOnly = true; m_nFieldPos = nPos;}
160
161 void ImplInitWindow( vcl::Window const & rParent, const InitWindowFacet _eInitWhat );
162
163 // properties that can bleed through onto the css::frame::Controller
164 sal_Int16 SetAlignment(sal_Int16 _nAlign);
165 // if _nAlign is -1, the alignment is calculated from the type of the field we are bound to
166 // the value really set is returned
167 sal_Int16 SetAlignmentFromModel(sal_Int16 nStandardAlign);
168 // set the alignment according to the "Align"-property of m_xModel, use the given standard
169 // alignment if the property if void, return the really set alignment
170
171 // column locking
172 bool isLocked() const { return m_bLocked; }
173 void setLock(bool _bLock);
174
175private:
179 void impl_toggleScriptManager_nothrow( bool _bAttach );
180};
181
182
183// DbCellControl, provides the data for a CellController.
184// Is usually only required for complex controls such as combo boxes.
185
187 :public cppu::BaseMutex // _before_ the listener, so the listener is to be destroyed first!
189{
190private:
193
194private:
198
199 css::uno::Reference< css::sdbc::XRowSet >
201
202protected:
206
207protected:
208 // attribute access
209 const css::uno::Reference< css::sdbc::XRowSet >& getCursor() const { return m_xCursor; }
210
211 // control transparency
212 bool isTransparent( ) const { return m_bTransparent; }
213 void setTransparent( bool _bSet ) { m_bTransparent = _bSet; }
214
215 // control alignment
216 void setAlignedController( bool _bAlign ) { m_bAlignedController = _bAlign; }
217
218
222 inline bool isValuePropertyLocked() const;
223
232 inline void lockValueProperty();
236 inline void unlockValueProperty();
237
238protected:
239 // adds the given property to the list of properties which we listen for
240 void doPropertyListening( const OUString& _rPropertyName );
241
242 // called whenever a property which affects field settings in general is called
243 // you should overwrite this method for every property you add yourself as listener to
244 // with doPropertyListening
245 virtual void implAdjustGenericFieldSetting( const css::uno::Reference< css::beans::XPropertySet >& _rxModel );
246
247 // called by _propertyChanged if a property which denotes the column value has changed
249
250
251public:
252 DbCellControl(DbGridColumn& _rColumn);
253 virtual ~DbCellControl() override;
254
256 {
257 ENSURE_OR_THROW( m_pWindow, "no window" );
258 return *m_pWindow;
259 }
260
261 // control alignment
263 void AlignControl(sal_Int16 nAlignment);
264
265 void SetTextLineColor();
266 void SetTextLineColor(const Color& _rColor);
267
268 // initializing before a control is displayed
269 virtual void Init( BrowserDataWin& rParent, const css::uno::Reference< css::sdbc::XRowSet >& xCursor );
270 virtual ::svt::CellControllerRef CreateController() const = 0;
271
272 // writing the value into the model
273 bool Commit();
274
275 // Formatting the field data to output text
276 virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, const Color** ppColor = nullptr) = 0;
277
278 virtual void Update(){}
279 // Refresh the control by the field data
280 virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) = 0;
281
282 // painting a cell content in the specified rectangle
283 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);
284 virtual void PaintCell( OutputDevice& _rDev, const tools::Rectangle& _rRect );
285
286 void ImplInitWindow( vcl::Window const & rParent, const InitWindowFacet _eInitWhat );
287
288 double GetValue(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) const;
289
290protected:
292
298 virtual bool commitControl( ) = 0;
299
310 virtual void updateFromModel( css::uno::Reference< css::beans::XPropertySet > _rxModel ) = 0;
311
312protected:
313// OPropertyChangeListener
314 virtual void _propertyChanged(const css::beans::PropertyChangeEvent& evt) override;
315
316private:
317 void implDoPropertyListening( const OUString& _rPropertyName, bool _bWarnIfNotExistent );
318
320 void implAdjustReadOnly( const css::uno::Reference< css::beans::XPropertySet >& _rxModel,bool i_bReadOnly );
321
323 void implAdjustEnabled( const css::uno::Reference< css::beans::XPropertySet >& _rxModel );
324};
325
326
328{
330}
331
332
334{
335 OSL_ENSURE( !isValuePropertyLocked(), "DbCellControl::lockValueProperty: not to be nested!" );
337}
338
339
341{
342 OSL_ENSURE( isValuePropertyLocked(), "DbCellControl::lockValueProperty: not locked so far!" );
344}
345
346
350{
351public:
352
353protected:
355
356protected:
357 // DbCellControl
358 virtual void implAdjustGenericFieldSetting( const css::uno::Reference< css::beans::XPropertySet >& _rxModel ) override;
359
360protected:
361 void implSetMaxTextLen( sal_Int16 _nMaxLen )
362 {
364 }
365 virtual void implSetEffectiveMaxTextLen( sal_Int32 _nMaxLen );
366};
367
368
370{
371 std::unique_ptr<::svt::IEditImplementation> m_pEdit;
372 std::unique_ptr<::svt::IEditImplementation> m_pPainterImplementation;
374
375 virtual ~DbTextField( ) override;
376
377public:
378 DbTextField(DbGridColumn& _rColumn);
379
381 bool IsMultiLineEdit() const { return m_bIsMultiLineEdit; }
382
383 virtual void Init( BrowserDataWin& rParent, const css::uno::Reference< css::sdbc::XRowSet >& xCursor ) override;
384 virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, const Color** ppColor = nullptr) override;
385 virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) override;
386 virtual ::svt::CellControllerRef CreateController() const override;
387 virtual void PaintFieldToCell( OutputDevice& _rDev, const tools::Rectangle& _rRect,
388 const css::uno::Reference< css::sdb::XColumn >& _rxField,
389 const css::uno::Reference< css::util::XNumberFormatter >& _rxFormatter ) override;
390
391private:
392 // DbCellControl
393 virtual bool commitControl( ) override;
394 virtual void updateFromModel( css::uno::Reference< css::beans::XPropertySet > _rxModel ) override;
395 // DbLimitedLengthField
396 virtual void implSetEffectiveMaxTextLen( sal_Int32 _nMaxLen ) override;
397};
398
399
401{
402public:
404 virtual ~DbFormattedField() override;
405
406 virtual void Init( BrowserDataWin& rParent, const css::uno::Reference< css::sdbc::XRowSet >& xCursor ) override;
407 virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, const Color** ppColor = nullptr) override;
408 virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) override;
409 virtual ::svt::CellControllerRef CreateController() const override;
410
411private:
412 // DbCellControl
413 virtual bool commitControl( ) override;
414 virtual void updateFromModel( css::uno::Reference< css::beans::XPropertySet > _rxModel ) override;
415
416 // OPropertyChangeListener
417 virtual void _propertyChanged(const css::beans::PropertyChangeEvent& evt) override;
418
419 css::uno::Reference< css::util::XNumberFormatsSupplier > m_xSupplier;
420};
421
422
423class DbCheckBox final : public DbCellControl
424{
425public:
426 DbCheckBox(DbGridColumn& _rColumn);
427
428 virtual void Init( BrowserDataWin& rParent, const css::uno::Reference< css::sdbc::XRowSet >& xCursor ) override;
429 virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) override;
430 virtual ::svt::CellControllerRef CreateController() const override;
431 virtual void PaintFieldToCell(OutputDevice& rDev, const tools::Rectangle& rRect,
432 const css::uno::Reference< css::sdb::XColumn >& _rxField,
433 const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) override;
434 virtual void PaintCell(OutputDevice& rDev, const tools::Rectangle& rRect) override;
435 virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, const Color** ppColor = nullptr) override;
436
437private:
438 // DbCellControl
439 virtual bool commitControl( ) override;
440 virtual void updateFromModel( css::uno::Reference< css::beans::XPropertySet > _rxModel ) override;
441};
442
443
444class DbComboBox final : public DbCellControl
445{
446
447public:
448 DbComboBox(DbGridColumn& _rColumn);
449
450 virtual void Init( BrowserDataWin& rParent, const css::uno::Reference< css::sdbc::XRowSet >& xCursor ) override;
451 virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, const Color** ppColor = nullptr) override;
452 virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) override;
453 virtual ::svt::CellControllerRef CreateController() const override;
454
455 void SetList(const css::uno::Any& rItems);
456
457private:
458 // DbCellControl
459 virtual bool commitControl( ) override;
460 virtual void updateFromModel( css::uno::Reference< css::beans::XPropertySet > _rxModel ) override;
461
462 virtual void implAdjustGenericFieldSetting( const css::uno::Reference< css::beans::XPropertySet >& _rxModel ) override;
463
464 // OPropertyChangeListener
465 virtual void _propertyChanged(const css::beans::PropertyChangeEvent& evt) override;
466};
467
468
469class DbListBox final : public DbCellControl
470{
471 bool m_bBound : 1;
472 css::uno::Sequence< OUString > m_aValueList;
473
474public:
475 DbListBox(DbGridColumn& _rColumn);
476
477 virtual void Init( BrowserDataWin& rParent, const css::uno::Reference< css::sdbc::XRowSet >& xCursor ) override;
478 virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, const Color** ppColor = nullptr) override;
479 virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) override;
480 virtual ::svt::CellControllerRef CreateController() const override;
481
482 void SetList(const css::uno::Any& rItems);
483
484private:
485 // DbCellControl
486 virtual bool commitControl( ) override;
487 virtual void updateFromModel( css::uno::Reference< css::beans::XPropertySet > _rxModel ) override;
488
489 virtual void implAdjustGenericFieldSetting( const css::uno::Reference< css::beans::XPropertySet >& _rxModel ) override;
490
491 // OPropertyChangeListener
492 virtual void _propertyChanged(const css::beans::PropertyChangeEvent& evt) override;
493};
494
495
496class DbPatternField final : public DbCellControl
497{
498public:
499 DbPatternField( DbGridColumn& _rColumn, const css::uno::Reference<css::uno::XComponentContext>& _rContext );
500 virtual void Init( BrowserDataWin& rParent, const css::uno::Reference< css::sdbc::XRowSet >& xCursor ) override;
501 virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, const Color** ppColor = nullptr) override;
502 virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) override;
503 virtual ::svt::CellControllerRef CreateController() const override;
504
505private:
507 virtual bool commitControl( ) override;
508 virtual void updateFromModel( css::uno::Reference< css::beans::XPropertySet > _rxModel ) override;
509
510 virtual void implAdjustGenericFieldSetting( const css::uno::Reference< css::beans::XPropertySet >& _rxModel ) override;
511
512 OUString impl_formatText(const OUString& _rText);
513
514 ::std::unique_ptr< ::dbtools::FormattedColumnValue > m_pValueFormatter;
515 ::std::unique_ptr< ::dbtools::FormattedColumnValue > m_pPaintFormatter;
516 css::uno::Reference<css::uno::XComponentContext> m_xContext;
517};
518
519
521{
522private:
524
525public:
526
527protected:
528 DbSpinField( DbGridColumn& _rColumn, sal_Int16 _nStandardAlign = css::awt::TextAlign::RIGHT );
529
530public:
531 virtual void Init( BrowserDataWin& rParent, const css::uno::Reference< css::sdbc::XRowSet >& _rxCursor ) override;
532 virtual ::svt::CellControllerRef CreateController() const override;
533
534protected:
536 BrowserDataWin* _pParent,
537 bool bSpinButton,
538 const css::uno::Reference< css::beans::XPropertySet >& _rxModel
539 ) = 0;
540};
541
542class DbDateField final : public DbSpinField
543{
544public:
545 DbDateField(DbGridColumn& _rColumn);
546 virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, const Color** ppColor = nullptr) override;
547 virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) override;
548
549private:
550 // DbCellControl
551 virtual bool commitControl( ) override;
552 virtual void updateFromModel( css::uno::Reference< css::beans::XPropertySet > _rxModel ) override;
553
554 // DbSpinField
556 BrowserDataWin* _pParent,
557 bool bSpinButton,
558 const css::uno::Reference< css::beans::XPropertySet >& _rxModel
559 ) override;
560
562 virtual void implAdjustGenericFieldSetting( const css::uno::Reference< css::beans::XPropertySet >& _rxModel ) override;
563};
564
565class DbTimeField final : public DbSpinField
566{
567public:
568 DbTimeField(DbGridColumn& _rColumn);
569 virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, const Color** ppColor = nullptr) override;
570 virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) override;
571
572private:
573 // DbCellControl
574 virtual bool commitControl( ) override;
575 virtual void updateFromModel( css::uno::Reference< css::beans::XPropertySet > _rxModel ) override;
576
577 // DbSpinField
579 BrowserDataWin* _pParent,
580 bool bSpinButton,
581 const css::uno::Reference< css::beans::XPropertySet >& _rxModel
582 ) override;
583
585 virtual void implAdjustGenericFieldSetting( const css::uno::Reference< css::beans::XPropertySet >& _rxModel ) override;
586};
587
588class DbCurrencyField final : public DbSpinField
589{
590public:
591 DbCurrencyField(DbGridColumn& _rColumn);
592 virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, const Color** ppColor = nullptr) override;
593 virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) override;
594
595private:
596 // DbCellControl
597 virtual bool commitControl( ) override;
598 virtual void updateFromModel( css::uno::Reference< css::beans::XPropertySet > _rxModel ) override;
599
600 // DbSpinField
602 BrowserDataWin* _pParent,
603 bool bSpinButton,
604 const css::uno::Reference< css::beans::XPropertySet >& _rxModel
605 ) override;
606
608 virtual void implAdjustGenericFieldSetting( const css::uno::Reference< css::beans::XPropertySet >& _rxModel ) override;
609};
610
611class DbNumericField final : public DbSpinField
612{
613public:
614 DbNumericField(DbGridColumn& _rColumn);
615
616 virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, const Color** ppColor = nullptr) override;
617 virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) override;
618
619private:
620 // DbCellControl
621 virtual bool commitControl( ) override;
622 virtual void updateFromModel( css::uno::Reference< css::beans::XPropertySet > _rxModel ) override;
623
624 // DbSpinField
626 BrowserDataWin* _pParent,
627 bool bSpinButton,
628 const css::uno::Reference< css::beans::XPropertySet >& _rxModel
629 ) override;
630
632 void implAdjustGenericFieldSetting( const css::uno::Reference< css::beans::XPropertySet >& _rxModel ) override;
633};
634
635class DbFilterField final
636 :public DbCellControl
637 ,public ::svxform::OSQLParserClient
638{
639public:
640 DbFilterField(const css::uno::Reference< css::uno::XComponentContext >& rxContext, DbGridColumn& _rColumn);
641 virtual ~DbFilterField() override;
642
643 virtual void Init( BrowserDataWin& rParent, const css::uno::Reference< css::sdbc::XRowSet >& xCursor ) override;
644 virtual ::svt::CellControllerRef CreateController() const override;
645 virtual void PaintCell(OutputDevice& rDev, const tools::Rectangle& rRect) override;
646 virtual void Update() override;
647 virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, const Color** ppColor = nullptr) override;
648 virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) override;
649
650 const OUString& GetText() const {return m_aText;}
651 void SetText(const OUString& rText);
652
653 void SetCommitHdl( const Link<DbFilterField&,void>& rLink ) { m_aCommitLink = rLink; }
654
655private:
656 // DbCellControl
657 virtual bool commitControl( ) override;
658 virtual void updateFromModel( css::uno::Reference< css::beans::XPropertySet > _rxModel ) override;
659
660 void SetList(const css::uno::Any& rItems, bool bComboBox);
661 void CreateControl(BrowserDataWin* pParent, const css::uno::Reference< css::beans::XPropertySet >& xModel);
662 DECL_LINK(OnToggle, weld::CheckButton&, void);
663
664 css::uno::Sequence< OUString > m_aValueList;
665 OUString m_aText;
670};
671
672
673// Base class providing the access to a grid cell
674
675typedef ::cppu::ImplHelper2 < css::awt::XControl
676 , css::form::XBoundControl
678typedef ::cppu::ImplHelper1 < css::awt::XWindow
681 ,public FmXGridCell_Base
683{
684protected:
685 ::osl::Mutex m_aMutex;
687 std::unique_ptr<DbCellControl> m_pCellControl;
688
689private:
695
696protected:
697 virtual ~FmXGridCell() override;
698
699public:
700 FmXGridCell( DbGridColumn* pColumn, std::unique_ptr<DbCellControl> pControl );
701 void init();
702
704 virtual css::uno::Any SAL_CALL queryAggregation( const css::uno::Type& _rType ) override;
705
706 void SetTextLineColor();
707 void SetTextLineColor(const Color& _rColor);
708
709// XTypeProvider
710 virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override;
711 virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
712
713// OComponentHelper
714 virtual void SAL_CALL disposing() override;
715
716// css::lang::XComponent
717 virtual void SAL_CALL dispose() override {OComponentHelper::dispose();}
718 virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener >& aListener) override { OComponentHelper::addEventListener(aListener);}
719 virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener >& aListener) override { OComponentHelper::removeEventListener(aListener);}
720
721// css::awt::XControl
722 virtual void SAL_CALL setContext(const css::uno::Reference< css::uno::XInterface >& /*Context*/) override {}
723 virtual css::uno::Reference< css::uno::XInterface > SAL_CALL getContext() override;
724 virtual void SAL_CALL createPeer(const css::uno::Reference< css::awt::XToolkit >& /*Toolkit*/, const css::uno::Reference< css::awt::XWindowPeer >& /*Parent*/) override {}
725
726 virtual css::uno::Reference< css::awt::XWindowPeer > SAL_CALL getPeer() override {return css::uno::Reference< css::awt::XWindowPeer > ();}
727 virtual sal_Bool SAL_CALL setModel(const css::uno::Reference< css::awt::XControlModel >& /*Model*/) override {return false;}
728 virtual css::uno::Reference< css::awt::XControlModel > SAL_CALL getModel() override;
729 virtual css::uno::Reference< css::awt::XView > SAL_CALL getView() override {return css::uno::Reference< css::awt::XView > ();}
730 virtual void SAL_CALL setDesignMode(sal_Bool /*bOn*/) override {}
731 virtual sal_Bool SAL_CALL isDesignMode() override {return false;}
732 virtual sal_Bool SAL_CALL isTransparent() override {return false;}
733
734// css::form::XBoundControl
735 virtual sal_Bool SAL_CALL getLock() override;
736 virtual void SAL_CALL setLock(sal_Bool _bLock) override;
737
738 // XWindow
739 virtual void SAL_CALL setPosSize( ::sal_Int32 X, ::sal_Int32 Y, ::sal_Int32 Width, ::sal_Int32 Height, ::sal_Int16 Flags ) override;
740 virtual css::awt::Rectangle SAL_CALL getPosSize( ) override;
741 virtual void SAL_CALL setVisible( sal_Bool Visible ) override;
742 virtual void SAL_CALL setEnable( sal_Bool Enable ) override;
743 virtual void SAL_CALL setFocus( ) override;
744 virtual void SAL_CALL addWindowListener( const css::uno::Reference< css::awt::XWindowListener >& xListener ) override;
745 virtual void SAL_CALL removeWindowListener( const css::uno::Reference< css::awt::XWindowListener >& xListener ) override;
746 virtual void SAL_CALL addFocusListener( const css::uno::Reference< css::awt::XFocusListener >& xListener ) override;
747 virtual void SAL_CALL removeFocusListener( const css::uno::Reference< css::awt::XFocusListener >& xListener ) override;
748 virtual void SAL_CALL addKeyListener( const css::uno::Reference< css::awt::XKeyListener >& xListener ) override;
749 virtual void SAL_CALL removeKeyListener( const css::uno::Reference< css::awt::XKeyListener >& xListener ) override;
750 virtual void SAL_CALL addMouseListener( const css::uno::Reference< css::awt::XMouseListener >& xListener ) override;
751 virtual void SAL_CALL removeMouseListener( const css::uno::Reference< css::awt::XMouseListener >& xListener ) override;
752 virtual void SAL_CALL addMouseMotionListener( const css::uno::Reference< css::awt::XMouseMotionListener >& xListener ) override;
753 virtual void SAL_CALL removeMouseMotionListener( const css::uno::Reference< css::awt::XMouseMotionListener >& xListener ) override;
754 virtual void SAL_CALL addPaintListener( const css::uno::Reference< css::awt::XPaintListener >& xListener ) override;
755 virtual void SAL_CALL removePaintListener( const css::uno::Reference< css::awt::XPaintListener >& xListener ) override;
756
757 bool Commit() {return m_pCellControl->Commit();}
758 void ImplInitWindow( vcl::Window const & rParent, const InitWindowFacet _eInitWhat )
759 { m_pCellControl->ImplInitWindow( rParent, _eInitWhat ); }
760
761 bool isAlignedController() const { return m_pCellControl->isAlignedController(); }
762 void AlignControl(sal_Int16 nAlignment)
763 { m_pCellControl->AlignControl(nAlignment);}
764
765protected:
766 void onWindowEvent(const VclEventId _nEventId, const void* _pEventData);
767
768 // default implementations call our focus listeners, don't forget to call them if you override this
769 virtual void onFocusGained( const css::awt::FocusEvent& _rEvent );
770 virtual void onFocusLost( const css::awt::FocusEvent& _rEvent );
771
772private:
774 DECL_LINK(OnFocusGained, LinkParamNone*, void);
775 DECL_LINK(OnFocusLost, LinkParamNone*, void);
776 DECL_LINK(OnMousePress, const MouseEvent&, void);
777 DECL_LINK(OnMouseRelease, const MouseEvent&, void);
778 DECL_LINK(OnMouseMove, const MouseEvent&, void);
779
780 DECL_LINK( OnWindowEvent, VclWindowEvent&, void );
781};
782
783
785{
786public:
787 FmXDataCell( DbGridColumn* pColumn, std::unique_ptr<DbCellControl> pControl )
788 :FmXGridCell( pColumn, std::move(pControl) )
789 {
790 }
791
792 virtual void PaintFieldToCell(OutputDevice& rDev,
793 const tools::Rectangle& rRect,
794 const css::uno::Reference< css::sdb::XColumn >& xField,
795 const css::uno::Reference< css::util::XNumberFormatter >& xFormatter);
796
797 void UpdateFromField(const css::uno::Reference< css::sdb::XColumn >& xField,
798 const css::uno::Reference< css::util::XNumberFormatter >& xFormatter)
799 { m_pCellControl->UpdateFromField(xField, xFormatter); }
800
801protected:
802 void UpdateFromColumn();
803};
804
805
807{
808protected:
810
811public:
812 FmXTextCell( DbGridColumn* pColumn, std::unique_ptr<DbCellControl> pControl );
813
814 virtual void PaintFieldToCell(OutputDevice& rDev,
815 const tools::Rectangle& rRect,
816 const css::uno::Reference< css::sdb::XColumn >& xField,
817 const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) override;
818
819 OUString GetText(const css::uno::Reference< css::sdb::XColumn >& _rxField,
820 const css::uno::Reference< css::util::XNumberFormatter >& xFormatter,
821 const Color** ppColor = nullptr)
822 {return m_pCellControl->GetFormatText(_rxField, xFormatter, ppColor);}
823};
824
825
826typedef ::cppu::ImplHelper2 < css::awt::XTextComponent
827 , css::form::XChangeBroadcaster
829class FmXEditCell final : public FmXTextCell,
830 public FmXEditCell_Base
831{
832public:
833 FmXEditCell( DbGridColumn* pColumn, std::unique_ptr<DbCellControl> pControl );
834
836 virtual css::uno::Any SAL_CALL queryAggregation( const css::uno::Type& _rType ) override;
837
838// XTypeProvider
839 virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override;
840 virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
841
842// OComponentHelper
843 virtual void SAL_CALL disposing() override;
844
845// css::awt::XTextComponent
846 virtual void SAL_CALL addTextListener(const css::uno::Reference< css::awt::XTextListener >& l) override;
847 virtual void SAL_CALL removeTextListener(const css::uno::Reference< css::awt::XTextListener >& l) override;
848 virtual void SAL_CALL setText(const OUString& aText) override;
849 virtual void SAL_CALL insertText(const css::awt::Selection& Sel, const OUString& Text) override;
850 virtual OUString SAL_CALL getText() override;
851 virtual OUString SAL_CALL getSelectedText() override;
852 virtual void SAL_CALL setSelection(const css::awt::Selection& aSelection) override;
853 virtual css::awt::Selection SAL_CALL getSelection() override;
854 virtual sal_Bool SAL_CALL isEditable() override;
855 virtual void SAL_CALL setEditable(sal_Bool bEditable) override;
856 virtual void SAL_CALL setMaxTextLen(sal_Int16 nLen) override;
857 virtual sal_Int16 SAL_CALL getMaxTextLen() override;
858
859 // XChangeBroadcaster
860 virtual void SAL_CALL addChangeListener( const css::uno::Reference< css::form::XChangeListener >& aListener ) override;
861 virtual void SAL_CALL removeChangeListener( const css::uno::Reference< css::form::XChangeListener >& aListener ) override;
862
863private:
864 virtual ~FmXEditCell() override;
865
866 virtual void onFocusGained( const css::awt::FocusEvent& _rEvent ) override;
867 virtual void onFocusLost( const css::awt::FocusEvent& _rEvent ) override;
868
869 DECL_LINK(ModifyHdl, LinkParamNone*, void);
870
871 void onTextChanged();
872
878};
879
880typedef ::cppu::ImplHelper2 < css::awt::XCheckBox
881 , css::awt::XButton
883class FmXCheckBoxCell final : public FmXDataCell,
885{
890
891 DECL_LINK(ModifyHdl, LinkParamNone*, void);
892
893 virtual ~FmXCheckBoxCell() override;
894
895public:
896 FmXCheckBoxCell( DbGridColumn* pColumn, std::unique_ptr<DbCellControl> pControl );
897
898// UNO
900 virtual css::uno::Any SAL_CALL queryAggregation( const css::uno::Type& _rType ) override;
901 virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override;
902 virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
903
904// OComponentHelper
905 virtual void SAL_CALL disposing() override;
906
907// css::awt::XCheckBox
908 virtual void SAL_CALL addItemListener(const css::uno::Reference< css::awt::XItemListener >& l) override;
909 virtual void SAL_CALL removeItemListener(const css::uno::Reference< css::awt::XItemListener >& l) override;
910 virtual sal_Int16 SAL_CALL getState() override;
911 virtual void SAL_CALL setState(sal_Int16 n) override;
912 virtual void SAL_CALL setLabel(const OUString& Label) override;
913 virtual void SAL_CALL enableTriState(sal_Bool b) override;
914
915 // XButton
916 virtual void SAL_CALL addActionListener( const css::uno::Reference< css::awt::XActionListener >& l ) override;
917 virtual void SAL_CALL removeActionListener( const css::uno::Reference< css::awt::XActionListener >& l ) override;
918 //virtual void SAL_CALL setLabel( const OUString& Label ) throw (css::uno::RuntimeException);
919 virtual void SAL_CALL setActionCommand( const OUString& Command ) override;
920};
921
922typedef ::cppu::ImplHelper1 < css::awt::XListBox
924class FmXListBoxCell final : public FmXTextCell
925 , public FmXListBoxCell_Base
926{
927public:
928 FmXListBoxCell( DbGridColumn* pColumn, std::unique_ptr<DbCellControl> pControl );
929
931 virtual css::uno::Any SAL_CALL queryAggregation( const css::uno::Type& _rType ) override;
932 virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override;
933 virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
934
935// OComponentHelper
936 virtual void SAL_CALL disposing() override;
937
938// css::awt::XListBox
939 virtual void SAL_CALL addItemListener(const css::uno::Reference< css::awt::XItemListener >& l) override;
940 virtual void SAL_CALL removeItemListener(const css::uno::Reference< css::awt::XItemListener >& l) override;
941 virtual void SAL_CALL addActionListener(const css::uno::Reference< css::awt::XActionListener >& l) override;
942 virtual void SAL_CALL removeActionListener(const css::uno::Reference< css::awt::XActionListener >& l) override;
943 virtual void SAL_CALL addItem(const OUString& aItem, sal_Int16 nPos) override;
944 virtual void SAL_CALL addItems(const css::uno::Sequence< OUString >& aItems, sal_Int16 nPos) override;
945 virtual void SAL_CALL removeItems(sal_Int16 nPos, sal_Int16 nCount) override;
946 virtual sal_Int16 SAL_CALL getItemCount() override;
947 virtual OUString SAL_CALL getItem(sal_Int16 nPos) override;
948 virtual css::uno::Sequence< OUString > SAL_CALL getItems() override;
949 virtual sal_Int16 SAL_CALL getSelectedItemPos() override;
950 virtual css::uno::Sequence< sal_Int16 > SAL_CALL getSelectedItemsPos() override;
951 virtual OUString SAL_CALL getSelectedItem() override;
952 virtual css::uno::Sequence< OUString > SAL_CALL getSelectedItems() override;
953 virtual void SAL_CALL selectItemPos(sal_Int16 nPos, sal_Bool bSelect) override;
954 virtual void SAL_CALL selectItemsPos(const css::uno::Sequence< sal_Int16 >& aPositions, sal_Bool bSelect) override;
955 virtual void SAL_CALL selectItem(const OUString& aItem, sal_Bool bSelect) override;
956 virtual sal_Bool SAL_CALL isMutipleMode() override;
957 virtual void SAL_CALL setMultipleMode(sal_Bool bMulti) override;
958 virtual sal_Int16 SAL_CALL getDropDownLineCount() override;
959 virtual void SAL_CALL setDropDownLineCount(sal_Int16 nLines) override;
960 virtual void SAL_CALL makeVisible(sal_Int16 nEntry) override;
961
962private:
963 virtual ~FmXListBoxCell() override;
964
965 DECL_LINK(ChangedHdl, bool, void);
966
967 void OnDoubleClick();
968
972 sal_uInt16 m_nLines;
974};
975
976
977typedef ::cppu::ImplHelper1 < css::awt::XComboBox
979class FmXComboBoxCell final : public FmXTextCell
980 , public FmXComboBoxCell_Base
981{
982private:
986 sal_uInt16 m_nLines;
987
988 DECL_LINK(ChangedHdl, bool, void);
989
990 virtual ~FmXComboBoxCell() override;
991
992public:
993 FmXComboBoxCell( DbGridColumn* pColumn, std::unique_ptr<DbCellControl> pControl );
994
996 virtual css::uno::Any SAL_CALL queryAggregation( const css::uno::Type& _rType ) override;
997 virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override;
998 virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
999
1000 // OComponentHelper
1001 virtual void SAL_CALL disposing() override;
1002
1003 // XComboBox
1004 virtual void SAL_CALL addItemListener( const css::uno::Reference< css::awt::XItemListener >& Listener ) override;
1005 virtual void SAL_CALL removeItemListener( const css::uno::Reference< css::awt::XItemListener >& Listener ) override;
1006 virtual void SAL_CALL addActionListener( const css::uno::Reference< css::awt::XActionListener >& Listener ) override;
1007 virtual void SAL_CALL removeActionListener( const css::uno::Reference< css::awt::XActionListener >& Listener ) override;
1008 virtual void SAL_CALL addItem( const OUString& Item, ::sal_Int16 Pos ) override;
1009 virtual void SAL_CALL addItems( const css::uno::Sequence< OUString >& Items, ::sal_Int16 Pos ) override;
1010 virtual void SAL_CALL removeItems( ::sal_Int16 nPos, ::sal_Int16 nCount ) override;
1011 virtual ::sal_Int16 SAL_CALL getItemCount( ) override;
1012 virtual OUString SAL_CALL getItem( ::sal_Int16 Pos ) override;
1013 virtual css::uno::Sequence< OUString > SAL_CALL getItems( ) override;
1014 virtual ::sal_Int16 SAL_CALL getDropDownLineCount( ) override;
1015 virtual void SAL_CALL setDropDownLineCount( ::sal_Int16 Lines ) override;
1016};
1017
1018typedef ::cppu::ImplHelper2 < css::awt::XTextComponent
1019 , css::lang::XUnoTunnel
1021class FmXFilterCell final : public FmXGridCell
1022 ,public FmXFilterCell_Base
1023{
1024public:
1025 FmXFilterCell(DbGridColumn* pColumn, std::unique_ptr<DbFilterField> pControl);
1026
1027
1029 virtual css::uno::Any SAL_CALL queryAggregation( const css::uno::Type& _rType ) override;
1030 virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override;
1031 virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
1032
1033// XUnoTunnel
1034 virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;
1035
1036// helpers for XUnoTunnel
1037 static const css::uno::Sequence<sal_Int8>& getUnoTunnelId();
1038
1039// painting the filter text
1040 void PaintCell(OutputDevice& rDev, const tools::Rectangle& rRect);
1041 void Update(){m_pCellControl->Update();}
1042
1043// OComponentHelper
1044 virtual void SAL_CALL disposing() override;
1045
1046// css::awt::XTextComponent
1047 virtual void SAL_CALL addTextListener(const css::uno::Reference< css::awt::XTextListener >& l) override;
1048 virtual void SAL_CALL removeTextListener(const css::uno::Reference< css::awt::XTextListener >& l) override;
1049 virtual void SAL_CALL setText(const OUString& aText) override;
1050 virtual void SAL_CALL insertText(const css::awt::Selection& Sel, const OUString& Text) override;
1051 virtual OUString SAL_CALL getText() override;
1052 virtual OUString SAL_CALL getSelectedText() override;
1053 virtual void SAL_CALL setSelection(const css::awt::Selection& aSelection) override;
1054 virtual css::awt::Selection SAL_CALL getSelection() override;
1055 virtual sal_Bool SAL_CALL isEditable() override;
1056 virtual void SAL_CALL setEditable(sal_Bool bEditable) override;
1057 virtual void SAL_CALL setMaxTextLen(sal_Int16 nLen) override;
1058 virtual sal_Int16 SAL_CALL getMaxTextLen() override;
1059
1060private:
1061 DECL_LINK( OnCommit, DbFilterField&, void );
1062 virtual ~FmXFilterCell() override;
1063
1065};
1066
1067#endif // INCLUDED_SVX_SOURCE_INC_GRIDCELL_HXX
1068
1069/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
bool m_bTransparent
Definition: gridcell.hxx:195
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:203
svt::ControlBase & GetWindow() const
Definition: gridcell.hxx:255
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:212
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:213
bool m_bAccessingValueProperty
Definition: gridcell.hxx:197
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:192
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:340
const css::uno::Reference< css::sdbc::XRowSet > & getCursor() const
Definition: gridcell.hxx:209
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:278
void doPropertyListening(const OUString &_rPropertyName)
Definition: gridcell.cxx:594
css::uno::Reference< css::sdbc::XRowSet > m_xCursor
Definition: gridcell.hxx:200
VclPtr< svt::ControlBase > m_pWindow
Definition: gridcell.hxx:205
VclPtr< svt::ControlBase > m_pPainter
Definition: gridcell.hxx:204
void setAlignedController(bool _bAlign)
Definition: gridcell.hxx:216
bool isAlignedController() const
Definition: gridcell.hxx:262
bool isValuePropertyLocked() const
determined whether or not the value property is locked
Definition: gridcell.hxx:327
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:196
void SetTextLineColor()
Definition: gridcell.cxx:888
rtl::Reference<::comphelper::OPropertyChangeMultiplexer > m_pModelChangeBroadcaster
Definition: gridcell.hxx:191
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:333
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:669
css::uno::Sequence< OUString > m_aValueList
Definition: gridcell.hxx:664
virtual bool commitControl() override
commits the content of the control (e.g.
Definition: gridcell.cxx:2901
const OUString & GetText() const
Definition: gridcell.hxx:650
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:668
void SetList(const css::uno::Any &rItems, bool bComboBox)
Definition: gridcell.cxx:2758
Link< DbFilterField &, void > m_aCommitLink
Definition: gridcell.hxx:666
OUString m_aText
Definition: gridcell.hxx:665
virtual ~DbFilterField() override
Definition: gridcell.cxx:2726
void SetText(const OUString &rText)
Definition: gridcell.cxx:2990
sal_Int16 m_nControlClass
Definition: gridcell.hxx:667
void SetCommitHdl(const Link< DbFilterField &, void > &rLink)
Definition: gridcell.hxx:653
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:419
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:123
DbGridControl & GetParent() const
Definition: gridcell.hxx:126
sal_uInt16 m_nId
Definition: gridcell.hxx:77
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:159
sal_Int16 SetAlignmentFromModel(sal_Int16 nStandardAlign)
Definition: gridcell.cxx:372
void UpdateControl()
Definition: gridcell.hxx:142
void SetReadOnly(bool bRead)
Definition: gridcell.hxx:158
void UpdateFromField(const DbGridRow *pRow, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter)
Definition: gridcell.cxx:258
bool IsNumeric() const
Definition: gridcell.hxx:121
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:119
::svt::CellControllerRef s_xEmptyController
Definition: gridcell.hxx:88
bool m_bNumeric
Definition: gridcell.hxx:83
bool m_bLocked
Definition: gridcell.hxx:86
sal_uInt16 GetId() const
Definition: gridcell.hxx:116
bool IsAutoValue() const
Definition: gridcell.hxx:118
bool IsHidden() const
Definition: gridcell.hxx:122
bool m_bAutoValue
Definition: gridcell.hxx:81
FmXGridCell * GetCell() const
Definition: gridcell.hxx:127
sal_Int16 m_nFieldType
Definition: gridcell.hxx:75
rtl::Reference< FmXGridCell > m_pCell
Definition: gridcell.hxx:71
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:85
sal_Int16 GetFieldPos() const
Definition: gridcell.hxx:120
const ::svt::CellControllerRef & GetController() const
Definition: gridcell.hxx:124
css::uno::Reference< css::beans::XPropertySet > m_xModel
Definition: gridcell.hxx:66
sal_Int32 m_nLastVisibleWidth
Definition: gridcell.hxx:73
bool m_bObject
Definition: gridcell.hxx:84
DbGridControl & m_rParent
Definition: gridcell.hxx:72
void setLock(bool _bLock)
Definition: gridcell.cxx:385
sal_Int16 m_nFieldPos
Definition: gridcell.hxx:78
sal_Int16 m_nTypeId
Definition: gridcell.hxx:76
bool m_bReadOnly
Definition: gridcell.hxx:80
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:82
sal_Int32 m_nFormatKey
Definition: gridcell.hxx:74
bool isLocked() const
Definition: gridcell.hxx:172
sal_Int16 m_nAlign
Definition: gridcell.hxx:79
bool IsReadOnly() const
Definition: gridcell.hxx:117
const css::uno::Reference< css::beans::XPropertySet > & GetField() const
Definition: gridcell.hxx:125
::svt::CellControllerRef m_xController
Definition: gridcell.hxx:68
css::uno::Reference< css::beans::XPropertySet > m_xField
Definition: gridcell.hxx:67
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:91
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:112
a field which is bound to a column which supports the MaxTextLen property
Definition: gridcell.hxx:350
virtual void implSetEffectiveMaxTextLen(sal_Int32 _nMaxLen)
Definition: gridcell.cxx:1022
void implSetMaxTextLen(sal_Int16 _nMaxLen)
Definition: gridcell.hxx:361
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:471
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:472
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:516
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:515
::std::unique_ptr< ::dbtools::FormattedColumnValue > m_pValueFormatter
Definition: gridcell.hxx:514
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:523
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:380
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:373
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:381
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:371
std::unique_ptr<::svt::IEditImplementation > m_pPainterImplementation
Definition: gridcell.hxx:372
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:3944
::comphelper::OInterfaceContainerHelper3< css::awt::XItemListener > m_aItemListeners
Definition: gridcell.hxx:886
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
Definition: gridcell.cxx:3886
OUString m_aActionCommand
Definition: gridcell.hxx:888
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
virtual void SAL_CALL disposing() override
Definition: gridcell.cxx:3862
virtual css::uno::Any SAL_CALL queryAggregation(const css::uno::Type &_rType) override
Definition: gridcell.cxx:3875
virtual void SAL_CALL addItemListener(const css::uno::Reference< css::awt::XItemListener > &l) override
Definition: gridcell.cxx:3897
VclPtr<::svt::CheckBoxControl > m_pBox
Definition: gridcell.hxx:889
virtual ~FmXCheckBoxCell() override
Definition: gridcell.cxx:3852
virtual void SAL_CALL removeItemListener(const css::uno::Reference< css::awt::XItemListener > &l) override
Definition: gridcell.cxx:3902
::comphelper::OInterfaceContainerHelper3< css::awt::XActionListener > m_aActionListeners
Definition: gridcell.hxx:887
FmXCheckBoxCell(DbGridColumn *pColumn, std::unique_ptr< DbCellControl > pControl)
Definition: gridcell.cxx:3843
virtual void SAL_CALL enableTriState(sal_Bool b) override
Definition: gridcell.cxx:3930
virtual void SAL_CALL setLabel(const OUString &Label) override
Definition: gridcell.cxx:3949
virtual sal_Int16 SAL_CALL getState() override
Definition: gridcell.cxx:3918
DECL_LINK(ModifyHdl, LinkParamNone *, void)
virtual void SAL_CALL addActionListener(const css::uno::Reference< css::awt::XActionListener > &l) override
Definition: gridcell.cxx:3938
virtual void SAL_CALL setState(sal_Int16 n) override
Definition: gridcell.cxx:3907
virtual void SAL_CALL setActionCommand(const OUString &Command) override
Definition: gridcell.cxx:3959
virtual void SAL_CALL addItems(const css::uno::Sequence< OUString > &Items, ::sal_Int16 Pos) override
Definition: gridcell.cxx:4394
::comphelper::OInterfaceContainerHelper3< css::awt::XActionListener > m_aActionListeners
Definition: gridcell.hxx:984
DECL_LINK(ChangedHdl, bool, void)
virtual void SAL_CALL removeActionListener(const css::uno::Reference< css::awt::XActionListener > &Listener) override
Definition: gridcell.cxx:4380
virtual void SAL_CALL addItem(const OUString &Item, ::sal_Int16 Pos) override
Definition: gridcell.cxx:4385
virtual void SAL_CALL removeItems(::sal_Int16 nPos, ::sal_Int16 nCount) override
Definition: gridcell.cxx:4409
virtual css::uno::Sequence< OUString > SAL_CALL getItems() override
Definition: gridcell.cxx:4437
virtual ~FmXComboBoxCell() override
Definition: gridcell.cxx:4322
virtual void SAL_CALL addActionListener(const css::uno::Reference< css::awt::XActionListener > &Listener) override
Definition: gridcell.cxx:4374
virtual css::uno::Any SAL_CALL queryAggregation(const css::uno::Type &_rType) override
Definition: gridcell.cxx:4344
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
Definition: gridcell.cxx:4354
virtual ::sal_Int16 SAL_CALL getDropDownLineCount() override
Definition: gridcell.cxx:4454
::comphelper::OInterfaceContainerHelper3< css::awt::XItemListener > m_aItemListeners
Definition: gridcell.hxx:983
VclPtr<::svt::ComboBoxControl > m_pComboBox
Definition: gridcell.hxx:985
FmXComboBoxCell(DbGridColumn *pColumn, std::unique_ptr< DbCellControl > pControl)
Definition: gridcell.cxx:4312
sal_uInt16 m_nLines
Definition: gridcell.hxx:986
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
virtual void SAL_CALL disposing() override
Definition: gridcell.cxx:4332
virtual void SAL_CALL removeItemListener(const css::uno::Reference< css::awt::XItemListener > &Listener) override
Definition: gridcell.cxx:4369
virtual ::sal_Int16 SAL_CALL getItemCount() override
Definition: gridcell.cxx:4419
virtual OUString SAL_CALL getItem(::sal_Int16 Pos) override
Definition: gridcell.cxx:4428
virtual void SAL_CALL addItemListener(const css::uno::Reference< css::awt::XItemListener > &Listener) override
Definition: gridcell.cxx:4364
virtual void SAL_CALL setDropDownLineCount(::sal_Int16 Lines) override
Definition: gridcell.cxx:4460
void UpdateFromColumn()
Definition: gridcell.cxx:3554
void UpdateFromField(const css::uno::Reference< css::sdb::XColumn > &xField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter)
Definition: gridcell.hxx:797
FmXDataCell(DbGridColumn *pColumn, std::unique_ptr< DbCellControl > pControl)
Definition: gridcell.hxx:787
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:3546
virtual css::uno::Any SAL_CALL queryAggregation(const css::uno::Type &_rType) override
Definition: gridcell.cxx:3661
virtual void SAL_CALL setText(const OUString &aText) override
Definition: gridcell.cxx:3693
virtual void SAL_CALL addTextListener(const css::uno::Reference< css::awt::XTextListener > &l) override
Definition: gridcell.cxx:3682
virtual void onFocusGained(const css::awt::FocusEvent &_rEvent) override
Definition: gridcell.cxx:3820
void onTextChanged()
Definition: gridcell.cxx:3813
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:3615
virtual void SAL_CALL setEditable(sal_Bool bEditable) override
Definition: gridcell.cxx:3780
virtual void SAL_CALL setSelection(const css::awt::Selection &aSelection) override
Definition: gridcell.cxx:3754
virtual sal_Int16 SAL_CALL getMaxTextLen() override
Definition: gridcell.cxx:3788
virtual void SAL_CALL insertText(const css::awt::Selection &Sel, const OUString &Text) override
Definition: gridcell.cxx:3707
virtual void onFocusLost(const css::awt::FocusEvent &_rEvent) override
Definition: gridcell.cxx:3826
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
Definition: gridcell.cxx:3671
virtual OUString SAL_CALL getText() override
Definition: gridcell.cxx:3718
bool m_bOwnEditImplementation
Definition: gridcell.hxx:877
virtual OUString SAL_CALL getSelectedText() override
Definition: gridcell.cxx:3741
virtual void SAL_CALL removeTextListener(const css::uno::Reference< css::awt::XTextListener > &l) override
Definition: gridcell.cxx:3688
::comphelper::OInterfaceContainerHelper3< css::awt::XTextListener > m_aTextListeners
Definition: gridcell.hxx:874
virtual void SAL_CALL removeChangeListener(const css::uno::Reference< css::form::XChangeListener > &aListener) override
Definition: gridcell.cxx:3808
virtual ~FmXEditCell() override
Definition: gridcell.cxx:3638
::svt::IEditImplementation * m_pEditImplementation
Definition: gridcell.hxx:876
virtual sal_Bool SAL_CALL isEditable() override
Definition: gridcell.cxx:3773
virtual void SAL_CALL setMaxTextLen(sal_Int16 nLen) override
Definition: gridcell.cxx:3795
virtual void SAL_CALL addChangeListener(const css::uno::Reference< css::form::XChangeListener > &aListener) override
Definition: gridcell.cxx:3803
virtual void SAL_CALL disposing() override
Definition: gridcell.cxx:3648
OUString m_sValueOnEnter
Definition: gridcell.hxx:873
virtual css::awt::Selection SAL_CALL getSelection() override
Definition: gridcell.cxx:3762
::comphelper::OInterfaceContainerHelper3< css::form::XChangeListener > m_aChangeListeners
Definition: gridcell.hxx:875
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId()
Definition: gridcell.cxx:4510
::comphelper::OInterfaceContainerHelper3< css::awt::XTextListener > m_aTextListeners
Definition: gridcell.hxx:1064
virtual ~FmXFilterCell() override
Definition: gridcell.cxx:4494
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
Definition: gridcell.cxx:4546
virtual void SAL_CALL disposing() override
Definition: gridcell.cxx:4524
virtual void SAL_CALL addTextListener(const css::uno::Reference< css::awt::XTextListener > &l) override
Definition: gridcell.cxx:4559
virtual void SAL_CALL setMaxTextLen(sal_Int16 nLen) override
Definition: gridcell.cxx:4614
virtual void SAL_CALL setEditable(sal_Bool bEditable) override
Definition: gridcell.cxx:4605
virtual sal_Int16 SAL_CALL getMaxTextLen() override
Definition: gridcell.cxx:4609
virtual void SAL_CALL setSelection(const css::awt::Selection &aSelection) override
Definition: gridcell.cxx:4591
virtual void SAL_CALL setText(const OUString &aText) override
Definition: gridcell.cxx:4570
virtual OUString SAL_CALL getSelectedText() override
Definition: gridcell.cxx:4586
virtual void SAL_CALL insertText(const css::awt::Selection &Sel, const OUString &Text) override
Definition: gridcell.cxx:4576
virtual OUString SAL_CALL getText() override
Definition: gridcell.cxx:4580
void PaintCell(OutputDevice &rDev, const tools::Rectangle &rRect)
Definition: gridcell.cxx:4517
DECL_LINK(OnCommit, DbFilterField &, void)
virtual sal_Int64 SAL_CALL getSomething(const css::uno::Sequence< sal_Int8 > &aIdentifier) override
Definition: gridcell.cxx:4505
FmXFilterCell(DbGridColumn *pColumn, std::unique_ptr< DbFilterField > pControl)
Definition: gridcell.cxx:4487
virtual void SAL_CALL removeTextListener(const css::uno::Reference< css::awt::XTextListener > &l) override
Definition: gridcell.cxx:4565
virtual sal_Bool SAL_CALL isEditable() override
Definition: gridcell.cxx:4600
virtual css::uno::Any SAL_CALL queryAggregation(const css::uno::Type &_rType) override
Definition: gridcell.cxx:4535
virtual css::awt::Selection SAL_CALL getSelection() override
Definition: gridcell.cxx:4595
virtual void SAL_CALL removePaintListener(const css::uno::Reference< css::awt::XPaintListener > &xListener) override
Definition: gridcell.cxx:3439
virtual void SAL_CALL setDesignMode(sal_Bool) override
Definition: gridcell.hxx:730
virtual css::awt::Rectangle SAL_CALL getPosSize() override
Definition: gridcell.cxx:3337
virtual void SAL_CALL addPaintListener(const css::uno::Reference< css::awt::XPaintListener > &xListener) override
Definition: gridcell.cxx:3434
virtual css::uno::Reference< css::awt::XWindowPeer > SAL_CALL getPeer() override
Definition: gridcell.hxx:726
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:724
DECL_LINK(OnMousePress, const MouseEvent &, void)
void SetTextLineColor()
Definition: gridcell.cxx:3233
void ImplInitWindow(vcl::Window const &rParent, const InitWindowFacet _eInitWhat)
Definition: gridcell.hxx:758
void AlignControl(sal_Int16 nAlignment)
Definition: gridcell.hxx:762
::comphelper::OInterfaceContainerHelper3< css::awt::XKeyListener > m_aKeyListeners
Definition: gridcell.hxx:692
virtual void SAL_CALL dispose() override
Definition: gridcell.hxx:717
::comphelper::OInterfaceContainerHelper3< css::awt::XFocusListener > m_aFocusListeners
Definition: gridcell.hxx:691
virtual void SAL_CALL setFocus() override
Definition: gridcell.cxx:3358
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
Definition: gridcell.cxx:3247
DECL_LINK(OnMouseRelease, const MouseEvent &, void)
virtual void SAL_CALL setEnable(sal_Bool Enable) override
Definition: gridcell.cxx:3351
virtual sal_Bool SAL_CALL setModel(const css::uno::Reference< css::awt::XControlModel > &) override
Definition: gridcell.hxx:727
virtual sal_Bool SAL_CALL getLock() override
Definition: gridcell.cxx:3310
virtual void onFocusLost(const css::awt::FocusEvent &_rEvent)
Definition: gridcell.cxx:3456
::comphelper::OInterfaceContainerHelper3< css::awt::XMouseMotionListener > m_aMouseMotionListeners
Definition: gridcell.hxx:694
virtual void SAL_CALL removeWindowListener(const css::uno::Reference< css::awt::XWindowListener > &xListener) override
Definition: gridcell.cxx:3372
FmXGridCell(DbGridColumn *pColumn, std::unique_ptr< DbCellControl > pControl)
Definition: gridcell.cxx:3190
DbGridColumn * m_pColumn
Definition: gridcell.hxx:686
virtual void SAL_CALL addKeyListener(const css::uno::Reference< css::awt::XKeyListener > &xListener) override
Definition: gridcell.cxx:3393
virtual void SAL_CALL removeMouseMotionListener(const css::uno::Reference< css::awt::XMouseMotionListener > &xListener) override
Definition: gridcell.cxx:3428
virtual void SAL_CALL setLock(sal_Bool _bLock) override
Definition: gridcell.cxx:3317
virtual void SAL_CALL removeMouseListener(const css::uno::Reference< css::awt::XMouseListener > &xListener) override
Definition: gridcell.cxx:3414
DECL_LINK(OnFocusLost, LinkParamNone *, void)
virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener > &aListener) override
Definition: gridcell.hxx:718
virtual css::uno::Any SAL_CALL queryAggregation(const css::uno::Type &_rType) override
Definition: gridcell.cxx:3281
virtual ~FmXGridCell() override
Definition: gridcell.cxx:3223
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL getContext() override
Definition: gridcell.cxx:3296
virtual void onFocusGained(const css::awt::FocusEvent &_rEvent)
Definition: gridcell.cxx:3450
::comphelper::OInterfaceContainerHelper3< css::awt::XMouseListener > m_aMouseListeners
Definition: gridcell.hxx:693
virtual void SAL_CALL setContext(const css::uno::Reference< css::uno::XInterface > &) override
Definition: gridcell.hxx:722
::osl::Mutex m_aMutex
Definition: gridcell.hxx:685
DECL_LINK(OnWindowEvent, VclWindowEvent &, void)
virtual void SAL_CALL addMouseMotionListener(const css::uno::Reference< css::awt::XMouseMotionListener > &xListener) override
Definition: gridcell.cxx:3421
DECL_LINK(OnFocusGained, LinkParamNone *, void)
::comphelper::OInterfaceContainerHelper3< css::awt::XWindowListener > m_aWindowListeners
Definition: gridcell.hxx:690
virtual void SAL_CALL removeFocusListener(const css::uno::Reference< css::awt::XFocusListener > &xListener) override
Definition: gridcell.cxx:3386
virtual void SAL_CALL removeKeyListener(const css::uno::Reference< css::awt::XKeyListener > &xListener) override
Definition: gridcell.cxx:3400
virtual css::uno::Reference< css::awt::XControlModel > SAL_CALL getModel() override
Definition: gridcell.cxx:3302
virtual void SAL_CALL setPosSize(::sal_Int32 X, ::sal_Int32 Y, ::sal_Int32 Width, ::sal_Int32 Height, ::sal_Int16 Flags) override
Definition: gridcell.cxx:3330
virtual void SAL_CALL addFocusListener(const css::uno::Reference< css::awt::XFocusListener > &xListener) override
Definition: gridcell.cxx:3379
void onWindowEvent(const VclEventId _nEventId, const void *_pEventData)
Definition: gridcell.cxx:3526
bool isAlignedController() const
Definition: gridcell.hxx:761
virtual css::uno::Reference< css::awt::XView > SAL_CALL getView() override
Definition: gridcell.hxx:729
virtual sal_Bool SAL_CALL isDesignMode() override
Definition: gridcell.hxx:731
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:3407
DECL_LINK(OnMouseMove, const MouseEvent &, void)
virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener > &aListener) override
Definition: gridcell.hxx:719
svt::ControlBase * getEventWindow() const
Definition: gridcell.cxx:3216
bool Commit()
Definition: gridcell.hxx:757
virtual sal_Bool SAL_CALL isTransparent() override
Definition: gridcell.hxx:732
virtual void SAL_CALL setVisible(sal_Bool Visible) override
Definition: gridcell.cxx:3344
virtual void SAL_CALL disposing() override
Definition: gridcell.cxx:3266
virtual void SAL_CALL addWindowListener(const css::uno::Reference< css::awt::XWindowListener > &xListener) override
Definition: gridcell.cxx:3365
std::unique_ptr< DbCellControl > m_pCellControl
Definition: gridcell.hxx:687
virtual sal_Bool SAL_CALL isMutipleMode() override
Definition: gridcell.cxx:4248
virtual ~FmXListBoxCell() override
Definition: gridcell.cxx:4000
sal_uInt16 m_nLines
Definition: gridcell.hxx:972
virtual void SAL_CALL selectItemPos(sal_Int16 nPos, sal_Bool bSelect) override
Definition: gridcell.cxx:4201
::comphelper::OInterfaceContainerHelper3< css::awt::XActionListener > m_aActionListeners
Definition: gridcell.hxx:970
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
virtual OUString SAL_CALL getItem(sal_Int16 nPos) override
Definition: gridcell.cxx:4108
virtual css::uno::Any SAL_CALL queryAggregation(const css::uno::Type &_rType) override
Definition: gridcell.cxx:4022
virtual void SAL_CALL removeItems(sal_Int16 nPos, sal_Int16 nCount) override
Definition: gridcell.cxx:4088
virtual void SAL_CALL addItemListener(const css::uno::Reference< css::awt::XItemListener > &l) override
Definition: gridcell.cxx:4042
FmXListBoxCell(DbGridColumn *pColumn, std::unique_ptr< DbCellControl > pControl)
Definition: gridcell.cxx:3989
virtual void SAL_CALL removeItemListener(const css::uno::Reference< css::awt::XItemListener > &l) override
Definition: gridcell.cxx:4047
virtual css::uno::Sequence< sal_Int16 > SAL_CALL getSelectedItemsPos() override
Definition: gridcell.cxx:4151
DECL_LINK(ChangedHdl, bool, void)
virtual sal_Int16 SAL_CALL getDropDownLineCount() override
Definition: gridcell.cxx:4262
virtual void SAL_CALL addItems(const css::uno::Sequence< OUString > &aItems, sal_Int16 nPos) override
Definition: gridcell.cxx:4072
virtual void SAL_CALL setMultipleMode(sal_Bool bMulti) override
Definition: gridcell.cxx:4255
virtual css::uno::Sequence< OUString > SAL_CALL getItems() override
Definition: gridcell.cxx:4117
virtual void SAL_CALL selectItem(const OUString &aItem, sal_Bool bSelect) override
Definition: gridcell.cxx:4233
void OnDoubleClick()
Definition: gridcell.cxx:4302
VclPtr<::svt::ListBoxControl > m_pBox
Definition: gridcell.hxx:971
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
Definition: gridcell.cxx:4032
virtual sal_Int16 SAL_CALL getItemCount() override
Definition: gridcell.cxx:4099
virtual OUString SAL_CALL getSelectedItem() override
Definition: gridcell.cxx:4168
virtual void SAL_CALL addActionListener(const css::uno::Reference< css::awt::XActionListener > &l) override
Definition: gridcell.cxx:4052
virtual sal_Int16 SAL_CALL getSelectedItemPos() override
Definition: gridcell.cxx:4136
virtual void SAL_CALL makeVisible(sal_Int16 nEntry) override
Definition: gridcell.cxx:4275
virtual void SAL_CALL selectItemsPos(const css::uno::Sequence< sal_Int16 > &aPositions, sal_Bool bSelect) override
Definition: gridcell.cxx:4215
virtual void SAL_CALL disposing() override
Definition: gridcell.cxx:4010
::comphelper::OInterfaceContainerHelper3< css::awt::XItemListener > m_aItemListeners
Definition: gridcell.hxx:969
virtual void SAL_CALL addItem(const OUString &aItem, sal_Int16 nPos) override
Definition: gridcell.cxx:4062
virtual void SAL_CALL removeActionListener(const css::uno::Reference< css::awt::XActionListener > &l) override
Definition: gridcell.cxx:4057
virtual css::uno::Sequence< OUString > SAL_CALL getSelectedItems() override
Definition: gridcell.cxx:4184
virtual void SAL_CALL setDropDownLineCount(sal_Int16 nLines) override
Definition: gridcell.cxx:4268
bool m_bIsMultiLineText
Definition: gridcell.hxx:809
FmXTextCell(DbGridColumn *pColumn, std::unique_ptr< DbCellControl > pControl)
Definition: gridcell.cxx:3562
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:3569
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:819
OComponentHelper(::osl::Mutex &rMutex)
#define ENSURE_OR_THROW(c, m)
::cppu::ImplHelper1< css::awt::XListBox > FmXListBoxCell_Base
Definition: gridcell.hxx:923
::cppu::ImplHelper2< css::awt::XTextComponent, css::form::XChangeBroadcaster > FmXEditCell_Base
Definition: gridcell.hxx:828
::cppu::ImplHelper2< css::awt::XTextComponent, css::lang::XUnoTunnel > FmXFilterCell_Base
Definition: gridcell.hxx:1020
::cppu::ImplHelper1< css::awt::XComboBox > FmXComboBoxCell_Base
Definition: gridcell.hxx:978
::cppu::ImplHelper2< css::awt::XCheckBox, css::awt::XButton > FmXCheckBoxCell_Base
Definition: gridcell.hxx:882
::cppu::ImplHelper2< css::awt::XControl, css::form::XBoundControl > FmXGridCell_Base
Definition: gridcell.hxx:677
::cppu::ImplHelper1< css::awt::XWindow > FmXGridCell_WindowBase
Definition: gridcell.hxx:679
InitWindowFacet
Definition: gridctrl.hxx:116
sal_uInt16 nPos
const sal_uInt32 LEFT
TextAlign
unsigned char sal_Bool
#define DECLARE_UNO3_AGG_DEFAULTS(classname, baseclass)
VclEventId