LCOV - code coverage report
Current view: top level - svx/source/inc - gridcell.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 33 91 36.3 %
Date: 2015-06-13 12:38:46 Functions: 29 96 30.2 %
Legend: Lines: hit not hit

          Line data    Source code
       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 <svx/gridctrl.hxx>
      24             : 
      25             : #include "sqlparserclient.hxx"
      26             : 
      27             : #include <com/sun/star/sdb/XColumn.hpp>
      28             : #include <com/sun/star/form/XBoundControl.hpp>
      29             : #include <com/sun/star/awt/XTextComponent.hpp>
      30             : #include <com/sun/star/awt/XListBox.hpp>
      31             : #include <com/sun/star/awt/XComboBox.hpp>
      32             : #include <com/sun/star/awt/TextAlign.hpp>
      33             : #include <com/sun/star/awt/XControlModel.hpp>
      34             : #include <com/sun/star/awt/XControl.hpp>
      35             : #include <com/sun/star/awt/XCheckBox.hpp>
      36             : #include <com/sun/star/awt/XButton.hpp>
      37             : #include <com/sun/star/beans/XFastPropertySet.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             : 
      42             : #include <comphelper/propmultiplex.hxx>
      43             : #include <cppuhelper/component.hxx>
      44             : #include <cppuhelper/implbase1.hxx>
      45             : #include <cppuhelper/implbase2.hxx>
      46             : #include <tools/diagnose_ex.h>
      47             : #include <tools/rtti.hxx>
      48             : 
      49             : class DbCellControl;
      50             : class Edit;
      51             : class FmXGridCell;
      52             : namespace dbtools {
      53             :     class FormattedColumnValue;
      54             : }
      55             : 
      56          62 : class FmMutexHelper
      57             : {
      58             : protected:
      59             :     ::osl::Mutex    m_aMutex;
      60             : };
      61             : 
      62             : 
      63             : // DbGridColumn, Spaltenbeschreibung
      64             : 
      65             : class DbGridColumn
      66             : {
      67             :     friend class DbGridControl;
      68             : 
      69             :     ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >       m_xModel;
      70             :     ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >       m_xField;       // Verbindung zum Datenbankfeld
      71             :     ::svt::CellControllerRef m_xController; // Struktur zum Verwalten der Controls fuer eine Spalte
      72             :                                         // diese wird von der DbBrowseBox auf die jeweiligen Zellen
      73             :                                         // einer Spalte positioniert
      74             :     FmXGridCell*                m_pCell;
      75             : 
      76             : protected:
      77             :     DbGridControl&      m_rParent;
      78             : 
      79             : private:
      80             :     sal_Int32               m_nLastVisibleWidth;    // nur gueltig, wenn m_bHidden == sal_True
      81             :     sal_Int32               m_nFormatKey;
      82             :     sal_Int16               m_nFieldType;
      83             :     sal_Int16               m_nTypeId;
      84             :     sal_uInt16              m_nId;
      85             :     sal_Int16               m_nFieldPos;
      86             :     sal_Int16               m_nAlign;                       // wird mit TXT_ALIGN_LEFT .... angegeben
      87             :     bool                m_bReadOnly : 1;
      88             :     bool                m_bAutoValue : 1;
      89             :     bool                m_bInSave : 1;
      90             :     bool                m_bNumeric : 1;
      91             :     bool                m_bObject : 1;  // Verweist die Column auf ein Object Datentyp?
      92             :     bool                m_bHidden : 1;
      93             :     bool                m_bLocked : 1;
      94             :     bool                m_bDateTime : 1;
      95             : 
      96             :     static ::svt::CellControllerRef s_xEmptyController;
      97             :         // used by locked columns
      98             : public:
      99          69 :     DbGridColumn(sal_uInt16 _nId, DbGridControl& rParent)
     100             :         :m_pCell(NULL)
     101             :         ,m_rParent(rParent)
     102             :         ,m_nLastVisibleWidth(-1)
     103             :         ,m_nFormatKey(0)
     104             :         ,m_nFieldType(0)
     105             :         ,m_nTypeId(0)
     106             :         ,m_nId(_nId)
     107             :         ,m_nFieldPos(-1)
     108             :         ,m_nAlign(::com::sun::star::awt::TextAlign::LEFT)
     109             :         ,m_bReadOnly(false)
     110             :         ,m_bAutoValue(false)
     111             :         ,m_bInSave(false)
     112             :         ,m_bNumeric(false)
     113             :         ,m_bObject(false)
     114             :         ,m_bHidden(false)
     115             :         ,m_bLocked(false)
     116          69 :         ,m_bDateTime(false)
     117             :     {
     118          69 :     }
     119             : 
     120             :     ~DbGridColumn();
     121             : 
     122         419 :     const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& getModel() const { return m_xModel; }
     123             :     void  setModel(::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >  _xModel);
     124             : 
     125             : 
     126        5991 :     sal_uInt16  GetId() const {return m_nId;}
     127          31 :     bool    IsReadOnly() const {return m_bReadOnly;}
     128           0 :     bool    IsAutoValue() const {return m_bAutoValue;}
     129             :     bool    IsUpdating() const {return m_bInSave;}
     130          77 :     sal_Int16   GetAlignment() const {return m_nAlign;}
     131             :     sal_Int16   GetType() const {return m_nFieldType;}
     132           0 :     sal_Int16   GetFieldPos() const {return m_nFieldPos; }
     133          88 :     bool    IsNumeric() const {return m_bNumeric;}
     134             :     bool    IsDateTime() const {return m_bDateTime;}
     135             :     bool    IsObject() const {return m_bObject;}
     136         483 :     bool    IsHidden() const {return m_bHidden;}
     137           0 :     sal_Int32   GetKey() const {return m_nFormatKey;}
     138           1 :     const   ::svt::CellControllerRef& GetController() const {return m_bLocked ? s_xEmptyController : m_xController;}
     139          31 :     const   ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& GetField() const {return m_xField;}
     140           0 :     DbGridControl& GetParent() const {return m_rParent;}
     141           0 :     FmXGridCell* GetCell() const {return m_pCell;}
     142             : 
     143             :     ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >  GetCurrentFieldValue() const;
     144             : 
     145             :     //      Zeichnen eines Feldes an einer Position, ist ein View gesetzt
     146             :     //      uebernimmt dieser das Zeichnen, z.B. fuer CheckBoxen
     147             :     void    Paint(OutputDevice& rDev,
     148             :                   const Rectangle& rRect,
     149             :                   const DbGridRow* pRow,
     150             :                   const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter);
     151             : 
     152             : 
     153             :     //      Inititialierung im alive mode
     154             :     //      Ist kein ColumnController gesetzt, wird eine DefaultInitialisierung
     155             :     //      vorgenommen
     156             :     void    CreateControl(sal_Int32 _nFieldPos, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xField, sal_Int32 nTypeId);
     157           0 :     void    UpdateControl()
     158             :             {
     159           0 :                 ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >  xField(m_xField);
     160           0 :                 CreateControl(m_nFieldPos, xField, m_nTypeId);
     161           0 :             }
     162             : 
     163             :     //      Editieren einer Zelle
     164             :     void    UpdateFromField(const DbGridRow* pRow, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter);
     165             :     bool    Commit();
     166             : 
     167             :     //      freigeben aller Daten, die fuer den AliveMode noetig sind
     168             :     void    Clear();
     169             : 
     170             :     OUString  GetCellText(const DbGridRow* pRow, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter) const;
     171             :     OUString  GetCellText(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& xField, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter) const;
     172             : 
     173           0 :     void    SetReadOnly(bool bRead){m_bReadOnly = bRead;}
     174           0 :     void    SetObject(sal_Int16 nPos) {m_bObject = m_bReadOnly = true; m_nFieldPos = nPos;}
     175             : 
     176             :     void    ImplInitWindow( vcl::Window& rParent, const InitWindowFacet _eInitWhat );
     177             : 
     178             :     // Properties, die auf den ::com::sun::star::frame::Controller durchschlagen koennen
     179             :     sal_Int16   SetAlignment(sal_Int16 _nAlign);
     180             :         // if _nAlign is -1, the alignment is calculated from the type of the field we are bound to
     181             :         // the value really set is returned
     182             :     sal_Int16   SetAlignmentFromModel(sal_Int16 nStandardAlign);
     183             :         // set the alignment according to the "Align"-property of m_xModel, use the given standard
     184             :         // alignment if the property if void, return the really set alignment
     185             : 
     186             :     // column locking
     187           0 :     bool    isLocked() const { return m_bLocked; }
     188             :     void    setLock(bool _bLock);
     189             : 
     190             : private:
     191             :     /** attaches or detaches our cell object to the SctriptEventAttacherManager implemented
     192             :         by our model's parent
     193             :     */
     194             :     void    impl_toggleScriptManager_nothrow( bool _bAttach );
     195             : };
     196             : 
     197             : 
     198             : // DbCellControl, liefert die Daten fuer einen CellController
     199             : // wird in der Regel nur f\FCr komplexe Controls wie z.B ComboBoxen
     200             : // benoetigt
     201             : 
     202             : class DbCellControl
     203             :         :public FmMutexHelper           // _before_ the listener, so the listener is to be destroyed first!
     204             :         ,public ::comphelper::OPropertyChangeListener
     205             : {
     206             : private:
     207             :     ::comphelper::OPropertyChangeMultiplexer*   m_pModelChangeBroadcaster;
     208             :     ::comphelper::OPropertyChangeMultiplexer*   m_pFieldChangeBroadcaster;
     209             : 
     210             : private:
     211             :     bool                    m_bTransparent : 1;
     212             :     bool                    m_bAlignedController : 1;
     213             :     bool                    m_bAccessingValueProperty : 1;
     214             : 
     215             :     ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet >
     216             :                                 m_xCursor;
     217             : 
     218             : protected:
     219             :     DbGridColumn&               m_rColumn;
     220             :     VclPtr<vcl::Window>         m_pPainter;
     221             :     VclPtr<vcl::Window>         m_pWindow;
     222             : 
     223             : protected:
     224             :     // attribute access
     225           0 :     const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet >& getCursor() const { return m_xCursor; }
     226             : 
     227             :     // control transparency
     228         124 :     inline  bool    isTransparent( ) const { return m_bTransparent; }
     229           0 :     inline  void        setTransparent( bool _bSet ) { m_bTransparent = _bSet; }
     230             : 
     231             :     // control alignment
     232           0 :     inline  void        setAlignedController( bool _bAlign = true ) { m_bAlignedController = _bAlign; }
     233             : 
     234             : 
     235             :     /** determined whether or not the value property is locked
     236             :     @see lockValueProperty
     237             :     */
     238             :     inline  bool    isValuePropertyLocked() const;
     239             : 
     240             :     /** locks the listening at the value property.
     241             :         <p>This means that every subsequent change now done on the value property of the model ("Text", or "Value",
     242             :         or whatever) is then ignored.<br/>
     243             :         This base class uses this setting in <method>Commit</method>.</p>
     244             :     @precond
     245             :         Value locking can't be nested
     246             :     @see unlockValueProperty
     247             :     */
     248             :     inline  void        lockValueProperty();
     249             :     /** unlocks the listening at the value property
     250             :     @see lockValueProperty
     251             :     */
     252             :     inline  void        unlockValueProperty();
     253             : 
     254             : protected:
     255             :     // adds the given property to the list of properties which we listen for
     256             :     void    doPropertyListening( const OUString& _rPropertyName );
     257             : 
     258             :     // called whenever a property which affects field settings in general is called
     259             :     // you should overwrite this method for every property you add yourself as listener to
     260             :     // with doPropertyListening
     261             :     virtual void    implAdjustGenericFieldSetting( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxModel );
     262             : 
     263             :     // called by _propertyChanged if a property which denotes the column value has changed
     264             :     void    implValuePropertyChanged( );
     265             : 
     266             : 
     267             : public:
     268             :     TYPEINFO();
     269             :     DbCellControl(DbGridColumn& _rColumn, bool _bText = true);
     270             :     virtual ~DbCellControl();
     271             : 
     272             : 
     273          45 :     vcl::Window& GetWindow() const
     274             :     {
     275          45 :         ENSURE_OR_THROW( m_pWindow, "no window" );
     276          45 :         return *m_pWindow;
     277             :     }
     278             : 
     279             :     // control alignment
     280          31 :     inline  bool    isAlignedController() const { return m_bAlignedController; }
     281             :             void        AlignControl(sal_Int16 nAlignment);
     282             : 
     283             :     void SetTextLineColor();
     284             :     void SetTextLineColor(const Color& _rColor);
     285             : 
     286             :     // Initialisieren bevor ein Control angezeigt wird
     287             :     virtual void Init( vcl::Window& rParent, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet >& xCursor );
     288             :     virtual ::svt::CellControllerRef CreateController() const = 0;
     289             : 
     290             :     // Schreiben des Wertes in das Model
     291             :     bool Commit();
     292             : 
     293             :     // Formatting the field data to output text
     294             :     virtual OUString GetFormatText(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _rxField, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter, Color** ppColor = NULL) = 0;
     295             : 
     296           0 :     virtual void Update(){}
     297             :     // Refresh the control by the field data
     298             :     virtual void UpdateFromField(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _rxField, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter) = 0;
     299             : 
     300             :     // Painten eines Zellinhalts im vorgegeben Rechteck
     301             :     virtual void PaintFieldToCell( OutputDevice& rDev, const Rectangle& rRect, const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _rxField, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter);
     302             :     virtual void PaintCell( OutputDevice& _rDev, const Rectangle& _rRect );
     303             : 
     304             :     void  ImplInitWindow( vcl::Window& rParent, const InitWindowFacet _eInitWhat );
     305             : 
     306             :     double GetValue(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _rxField, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter) const;
     307             : 
     308             : protected:
     309             :     void    invalidatedController();
     310             : 
     311             :     /** commits the content of the control (e.g. the text of an edit field) into the column model
     312             :         (e.g. the "Text" property of the model).
     313             :         <p>To be overwritten in derived classes.</p>
     314             :     @see updateFromModel
     315             :     */
     316             :     virtual bool commitControl( ) = 0;
     317             : 
     318             :     /** updates the current content of the control (e.g. the text of an edit field) from the column model
     319             :         (e.g. the "Text" property of the model).
     320             :         <p>To be overwritten in derived classes.</p>
     321             :     @precond
     322             :         NULL != _rxModel
     323             :     @precond
     324             :         NULL != m_pWindow
     325             : 
     326             :     @see commitControl
     327             :     */
     328             :     virtual void    updateFromModel( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > _rxModel ) = 0;
     329             : 
     330             : protected:
     331             : // OPropertyChangeListener
     332             :     virtual void _propertyChanged(const ::com::sun::star::beans::PropertyChangeEvent& evt) throw(::com::sun::star::uno::RuntimeException) SAL_OVERRIDE;
     333             : 
     334             : private:
     335             :     void implDoPropertyListening( const OUString& _rPropertyName, bool _bWarnIfNotExistent = true );
     336             : 
     337             :     /// updates the "readonly" setting on m_pWindow, according to the respective property value in the given model
     338             :     void implAdjustReadOnly( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxModel,bool i_bReadOnly );
     339             : 
     340             :     /// updates the "enabled" setting on m_pWindow, according to the respective property value in the given model
     341             :     void implAdjustEnabled( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxModel );
     342             : };
     343             : 
     344             : 
     345             : 
     346           0 : inline  bool    DbCellControl::isValuePropertyLocked() const
     347             : {
     348           0 :     return m_bAccessingValueProperty;
     349             : }
     350             : 
     351             : 
     352           0 : inline  void        DbCellControl::lockValueProperty()
     353             : {
     354             :     OSL_ENSURE( !isValuePropertyLocked(), "DbCellControl::lockValueProperty: not to be nested!" );
     355           0 :     m_bAccessingValueProperty = true;
     356           0 : }
     357             : 
     358             : 
     359           0 : inline  void        DbCellControl::unlockValueProperty()
     360             : {
     361             :     OSL_ENSURE( isValuePropertyLocked(), "DbCellControl::lockValueProperty: not locked so far!" );
     362           0 :     m_bAccessingValueProperty = false;
     363           0 : }
     364             : 
     365             : 
     366             : /** a field which is bound to a column which supports the MaxTextLen property
     367             : */
     368          31 : class DbLimitedLengthField : public DbCellControl
     369             : {
     370             : public:
     371             :     TYPEINFO_OVERRIDE();
     372             : 
     373             : protected:
     374             :     DbLimitedLengthField( DbGridColumn& _rColumn );
     375             : 
     376             : protected:
     377             :     // DbCellControl
     378             :     virtual void implAdjustGenericFieldSetting( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxModel ) SAL_OVERRIDE;
     379             : 
     380             : protected:
     381          31 :     void implSetMaxTextLen( sal_Int16 _nMaxLen )
     382             :     {
     383          31 :         implSetEffectiveMaxTextLen( _nMaxLen ? _nMaxLen : EDIT_NOLIMIT );
     384          31 :     }
     385             :     virtual void implSetEffectiveMaxTextLen( sal_Int32 _nMaxLen );
     386             : };
     387             : 
     388             : 
     389             : class DbTextField : public DbLimitedLengthField
     390             : {
     391             :     ::svt::IEditImplementation* m_pEdit;
     392             :     ::svt::IEditImplementation* m_pPainterImplementation;
     393             :     bool                    m_bIsSimpleEdit;
     394             : 
     395             : protected:
     396             :     virtual ~DbTextField( );
     397             : 
     398             : public:
     399             :     TYPEINFO_OVERRIDE();
     400             :     DbTextField(DbGridColumn& _rColumn);
     401             : 
     402          17 :     ::svt::IEditImplementation* GetEditImplementation() { return m_pEdit; }
     403          17 :     bool                    IsSimpleEdit() const { return m_bIsSimpleEdit; }
     404             : 
     405             :     virtual void Init( vcl::Window& rParent, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet >& xCursor ) SAL_OVERRIDE;
     406             :     virtual OUString GetFormatText(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _rxField, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter, Color** ppColor = NULL) SAL_OVERRIDE;
     407             :     virtual void UpdateFromField(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _rxField, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter) SAL_OVERRIDE;
     408             :     virtual ::svt::CellControllerRef CreateController() const SAL_OVERRIDE;
     409             :     virtual void PaintFieldToCell( OutputDevice& _rDev, const Rectangle& _rRect,
     410             :                         const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _rxField,
     411             :                         const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& _rxFormatter ) SAL_OVERRIDE;
     412             : 
     413             : protected:
     414             :     // DbCellControl
     415             :     virtual bool        commitControl( ) SAL_OVERRIDE;
     416             :     virtual void        updateFromModel( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > _rxModel ) SAL_OVERRIDE;
     417             :     // DbLimitedLengthField
     418             :     virtual void        implSetEffectiveMaxTextLen( sal_Int32 _nMaxLen ) SAL_OVERRIDE;
     419             : };
     420             : 
     421             : 
     422             : class DbFormattedField : public DbLimitedLengthField
     423             : {
     424             : protected:
     425             :     ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatsSupplier >  m_xSupplier;
     426             :     sal_Int16                       m_nKeyType;
     427             : 
     428             : 
     429             : public:
     430             :     TYPEINFO_OVERRIDE();
     431             :     DbFormattedField(DbGridColumn& _rColumn);
     432             :     virtual ~DbFormattedField();
     433             : 
     434             : 
     435             :     virtual void Init( vcl::Window& rParent, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet >& xCursor ) SAL_OVERRIDE;
     436             :     virtual OUString GetFormatText(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _rxField, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter, Color** ppColor = NULL) SAL_OVERRIDE;
     437             :     virtual void UpdateFromField(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _rxField, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter) SAL_OVERRIDE;
     438             :     virtual ::svt::CellControllerRef CreateController() const SAL_OVERRIDE;
     439             : 
     440             : protected:
     441             :     // DbCellControl
     442             :     virtual bool        commitControl( ) SAL_OVERRIDE;
     443             :     virtual void        updateFromModel( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > _rxModel ) SAL_OVERRIDE;
     444             : 
     445             :     // OPropertyChangeListener
     446             :     virtual void _propertyChanged(const ::com::sun::star::beans::PropertyChangeEvent& evt) throw(::com::sun::star::uno::RuntimeException) SAL_OVERRIDE;
     447             : };
     448             : 
     449             : 
     450           0 : class DbCheckBox : public DbCellControl
     451             : {
     452             : public:
     453             :     TYPEINFO_OVERRIDE();
     454             :     DbCheckBox(DbGridColumn& _rColumn);
     455             : 
     456             :     virtual void Init( vcl::Window& rParent, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet >& xCursor ) SAL_OVERRIDE;
     457             :     virtual void UpdateFromField(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _rxField, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter) SAL_OVERRIDE;
     458             :     virtual ::svt::CellControllerRef CreateController() const SAL_OVERRIDE;
     459             :     virtual void PaintFieldToCell(OutputDevice& rDev, const Rectangle& rRect,
     460             :                           const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _rxField,
     461             :                           const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter) SAL_OVERRIDE;
     462             :     virtual OUString GetFormatText(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _rxField, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter, Color** ppColor = NULL) SAL_OVERRIDE;
     463             : 
     464             : protected:
     465             :     // DbCellControl
     466             :     virtual bool        commitControl( ) SAL_OVERRIDE;
     467             :     virtual void        updateFromModel( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > _rxModel ) SAL_OVERRIDE;
     468             : };
     469             : 
     470             : 
     471           0 : class DbComboBox : public DbCellControl
     472             : {
     473             : 
     474             : public:
     475             :     TYPEINFO_OVERRIDE();
     476             :     DbComboBox(DbGridColumn& _rColumn);
     477             : 
     478             :     virtual void Init( vcl::Window& rParent, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet >& xCursor ) SAL_OVERRIDE;
     479             :     virtual OUString GetFormatText(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _rxField, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter, Color** ppColor = NULL) SAL_OVERRIDE;
     480             :     virtual void UpdateFromField(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _rxField, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter) SAL_OVERRIDE;
     481             :     virtual ::svt::CellControllerRef CreateController() const SAL_OVERRIDE;
     482             : 
     483             :     void SetList(const ::com::sun::star::uno::Any& rItems);
     484             : 
     485             : protected:
     486             :     // DbCellControl
     487             :     virtual bool        commitControl( ) SAL_OVERRIDE;
     488             :     virtual void        updateFromModel( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > _rxModel ) SAL_OVERRIDE;
     489             : 
     490             :     virtual void        implAdjustGenericFieldSetting( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxModel ) SAL_OVERRIDE;
     491             : 
     492             :     // OPropertyChangeListener
     493             :     virtual void _propertyChanged(const ::com::sun::star::beans::PropertyChangeEvent& evt) throw(::com::sun::star::uno::RuntimeException) SAL_OVERRIDE;
     494             : };
     495             : 
     496             : 
     497           0 : class DbListBox     :public DbCellControl
     498             : {
     499             :     bool              m_bBound  : 1;
     500             :     ::com::sun::star::uno::Sequence< OUString > m_aValueList;
     501             : 
     502             : public:
     503             :     TYPEINFO_OVERRIDE();
     504             :     DbListBox(DbGridColumn& _rColumn);
     505             : 
     506             :     virtual void Init( vcl::Window& rParent, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet >& xCursor ) SAL_OVERRIDE;
     507             :     virtual OUString GetFormatText(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _rxField, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter, Color** ppColor = NULL) SAL_OVERRIDE;
     508             :     virtual void UpdateFromField(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _rxField, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter) SAL_OVERRIDE;
     509             :     virtual ::svt::CellControllerRef CreateController() const SAL_OVERRIDE;
     510             : 
     511             :     void SetList(const ::com::sun::star::uno::Any& rItems);
     512             : 
     513             : protected:
     514             :     // DbCellControl
     515             :     virtual bool        commitControl( ) SAL_OVERRIDE;
     516             :     virtual void        updateFromModel( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > _rxModel ) SAL_OVERRIDE;
     517             : 
     518             :     virtual void        implAdjustGenericFieldSetting( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxModel ) SAL_OVERRIDE;
     519             : 
     520             :     // OPropertyChangeListener
     521             :     virtual void _propertyChanged(const ::com::sun::star::beans::PropertyChangeEvent& evt) throw(::com::sun::star::uno::RuntimeException) SAL_OVERRIDE;
     522             : };
     523             : 
     524             : 
     525           0 : class DbPatternField : public DbCellControl
     526             : {
     527             : public:
     528             :     TYPEINFO_OVERRIDE();
     529             :     DbPatternField( DbGridColumn& _rColumn, const css::uno::Reference<css::uno::XComponentContext>& _rContext );
     530             :     virtual void Init( vcl::Window& rParent, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet >& xCursor ) SAL_OVERRIDE;
     531             :     virtual OUString GetFormatText(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _rxField, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter, Color** ppColor = NULL) SAL_OVERRIDE;
     532             :     virtual void UpdateFromField(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _rxField, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter) SAL_OVERRIDE;
     533             :     virtual ::svt::CellControllerRef CreateController() const SAL_OVERRIDE;
     534             : 
     535             : protected:
     536             :     /// DbCellControl
     537             :     virtual bool        commitControl( ) SAL_OVERRIDE;
     538             :     virtual void        updateFromModel( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > _rxModel ) SAL_OVERRIDE;
     539             : 
     540             :     virtual void        implAdjustGenericFieldSetting( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxModel ) SAL_OVERRIDE;
     541             : 
     542             : private:
     543             :     OUString  impl_formatText(const OUString& _rText);
     544             : 
     545             : private:
     546             :     ::std::unique_ptr< ::dbtools::FormattedColumnValue >  m_pValueFormatter;
     547             :     ::std::unique_ptr< ::dbtools::FormattedColumnValue >  m_pPaintFormatter;
     548             :     css::uno::Reference<css::uno::XComponentContext>    m_xContext;
     549             : };
     550             : 
     551             : 
     552           0 : class DbSpinField : public DbCellControl
     553             : {
     554             : private:
     555             :     sal_Int16   m_nStandardAlign;
     556             : 
     557             : public:
     558             :     TYPEINFO_OVERRIDE();
     559             : 
     560             : protected:
     561             :     DbSpinField( DbGridColumn& _rColumn, sal_Int16 _nStandardAlign = com::sun::star::awt::TextAlign::RIGHT );
     562             : 
     563             : public:
     564             :     virtual void                        Init( vcl::Window& rParent, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet >& _rxCursor ) SAL_OVERRIDE;
     565             :     virtual ::svt::CellControllerRef    CreateController() const SAL_OVERRIDE;
     566             : 
     567             : protected:
     568             :     virtual VclPtr<SpinField> createField(
     569             :                             vcl::Window* _pParent,
     570             :                             WinBits _nFieldStyle,
     571             :                             const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxModel
     572             :                         ) = 0;
     573             : };
     574             : 
     575             : 
     576           0 : class DbDateField : public DbSpinField
     577             : {
     578             : public:
     579             :     TYPEINFO_OVERRIDE();
     580             :     DbDateField(DbGridColumn& _rColumn);
     581             :     virtual OUString GetFormatText(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _rxField, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter, Color** ppColor = NULL) SAL_OVERRIDE;
     582             :     virtual void UpdateFromField(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _rxField, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter) SAL_OVERRIDE;
     583             : 
     584             : protected:
     585             :     // DbCellControl
     586             :     virtual bool        commitControl( ) SAL_OVERRIDE;
     587             :     virtual void        updateFromModel( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > _rxModel ) SAL_OVERRIDE;
     588             : 
     589             :     // DbSpinField
     590             :     virtual VclPtr<SpinField> createField(
     591             :                             vcl::Window* _pParent,
     592             :                             WinBits _nFieldStyle,
     593             :                             const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxModel
     594             :                         ) SAL_OVERRIDE;
     595             : 
     596             :     /// initializes everything which relates to the properties describing the numeric behaviour
     597             :     virtual void    implAdjustGenericFieldSetting( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxModel ) SAL_OVERRIDE;
     598             : };
     599             : 
     600             : 
     601           0 : class DbTimeField : public DbSpinField
     602             : {
     603             : public:
     604             :     TYPEINFO_OVERRIDE();
     605             :     DbTimeField(DbGridColumn& _rColumn);
     606             :     virtual OUString GetFormatText(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _rxField, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter, Color** ppColor = NULL) SAL_OVERRIDE;
     607             :     virtual void UpdateFromField(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _rxField, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter) SAL_OVERRIDE;
     608             : 
     609             : protected:
     610             :     // DbCellControl
     611             :     virtual bool        commitControl( ) SAL_OVERRIDE;
     612             :     virtual void        updateFromModel( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > _rxModel ) SAL_OVERRIDE;
     613             : 
     614             :     // DbSpinField
     615             :     virtual VclPtr<SpinField> createField(
     616             :                             vcl::Window* _pParent,
     617             :                             WinBits _nFieldStyle,
     618             :                             const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxModel
     619             :                         ) SAL_OVERRIDE;
     620             : 
     621             :     /// initializes everything which relates to the properties describing the numeric behaviour
     622             :     virtual void    implAdjustGenericFieldSetting( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxModel ) SAL_OVERRIDE;
     623             : };
     624             : 
     625             : 
     626           0 : class DbCurrencyField : public DbSpinField
     627             : {
     628             :     sal_Int16  m_nScale;
     629             : 
     630             : public:
     631             :     TYPEINFO_OVERRIDE();
     632             :     DbCurrencyField(DbGridColumn& _rColumn);
     633             :     virtual OUString GetFormatText(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _rxField, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter, Color** ppColor = NULL) SAL_OVERRIDE;
     634             :     virtual void UpdateFromField(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _rxField, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter) SAL_OVERRIDE;
     635             : 
     636             :     double GetCurrency(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _rxField, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter) const;
     637             : 
     638             : protected:
     639             :     // DbCellControl
     640             :     virtual bool        commitControl( ) SAL_OVERRIDE;
     641             :     virtual void        updateFromModel( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > _rxModel ) SAL_OVERRIDE;
     642             : 
     643             :     // DbSpinField
     644             :     virtual VclPtr<SpinField> createField(
     645             :                             vcl::Window* _pParent,
     646             :                             WinBits _nFieldStyle,
     647             :                             const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxModel
     648             :                         ) SAL_OVERRIDE;
     649             : 
     650             :     /// initializes everything which relates to the properties describing the numeric behaviour
     651             :     virtual void    implAdjustGenericFieldSetting( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxModel ) SAL_OVERRIDE;
     652             : };
     653             : 
     654             : 
     655           0 : class DbNumericField : public DbSpinField
     656             : {
     657             : public:
     658             :     TYPEINFO_OVERRIDE();
     659             :     DbNumericField(DbGridColumn& _rColumn);
     660             :     virtual OUString GetFormatText(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _rxField, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter, Color** ppColor = NULL) SAL_OVERRIDE;
     661             :     virtual void UpdateFromField(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _rxField, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter) SAL_OVERRIDE;
     662             : 
     663             : protected:
     664             :     // DbCellControl
     665             :     virtual bool        commitControl( ) SAL_OVERRIDE;
     666             :     virtual void        updateFromModel( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > _rxModel ) SAL_OVERRIDE;
     667             : 
     668             :     // DbSpinField
     669             :     virtual VclPtr<SpinField> createField(
     670             :                             vcl::Window* _pParent,
     671             :                             WinBits _nFieldStyle,
     672             :                             const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxModel
     673             :                         ) SAL_OVERRIDE;
     674             : 
     675             :     /// initializes everything which relates to the properties describing the numeric behaviour
     676             :     void    implAdjustGenericFieldSetting( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxModel ) SAL_OVERRIDE;
     677             : };
     678             : 
     679             : 
     680             : class DbFilterField
     681             :         :public DbCellControl
     682             :         ,public ::svxform::OSQLParserClient
     683             : {
     684             :     ::com::sun::star::uno::Sequence< OUString >  m_aValueList;
     685             :     OUString   m_aText;
     686             :     Link<>  m_aCommitLink;
     687             :     sal_Int16   m_nControlClass;
     688             :     bool    m_bFilterList : 1;
     689             :     bool    m_bFilterListFilled : 1;
     690             :     bool    m_bBound : 1;
     691             : 
     692             : public:
     693             :     TYPEINFO_OVERRIDE();
     694             :     DbFilterField(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext, DbGridColumn& _rColumn);
     695             :     virtual ~DbFilterField();
     696             : 
     697             :     virtual void Init( vcl::Window& rParent, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet >& xCursor ) SAL_OVERRIDE;
     698             :     virtual ::svt::CellControllerRef CreateController() const SAL_OVERRIDE;
     699             :     virtual void PaintCell(OutputDevice& rDev, const Rectangle& rRect) SAL_OVERRIDE;
     700             :     virtual void Update() SAL_OVERRIDE;
     701             :     virtual OUString GetFormatText(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _rxField, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter, Color** ppColor = NULL) SAL_OVERRIDE;
     702             :     virtual void UpdateFromField(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _rxField, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter) SAL_OVERRIDE;
     703             : 
     704           0 :     const OUString& GetText() const {return m_aText;}
     705             :     void SetText(const OUString& rText);
     706             : 
     707           0 :     void SetCommitHdl( const Link<>& rLink ) { m_aCommitLink = rLink; }
     708             :     const Link<>& GetCommitHdl() const { return m_aCommitLink; }
     709             : 
     710             : protected:
     711             : 
     712             :     // DbCellControl
     713             :     virtual bool        commitControl( ) SAL_OVERRIDE;
     714             :     virtual void        updateFromModel( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > _rxModel ) SAL_OVERRIDE;
     715             : 
     716             : protected:
     717             :     void SetList(const ::com::sun::star::uno::Any& rItems, bool bComboBox);
     718             :     void CreateControl(vcl::Window* pParent, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xModel);
     719             :     DECL_LINK( OnClick, void* );
     720             : };
     721             : 
     722             : 
     723             : // Base class providing the access to a grid cell
     724             : 
     725             : typedef ::cppu::ImplHelper2 <   ::com::sun::star::awt::XControl
     726             :                             ,   ::com::sun::star::form::XBoundControl
     727             :                             >   FmXGridCell_Base;
     728             : typedef ::cppu::ImplHelper1 <   ::com::sun::star::awt::XWindow
     729             :                             >   FmXGridCell_WindowBase;
     730             : class FmXGridCell   :public ::cppu::OComponentHelper
     731             :                     ,public FmXGridCell_Base
     732             :                     ,public FmXGridCell_WindowBase
     733             : {
     734             : protected:
     735             :     ::osl::Mutex        m_aMutex;
     736             :     DbGridColumn*       m_pColumn;
     737             :     DbCellControl*      m_pCellControl;
     738             : 
     739             : private:
     740             :     ::cppu::OInterfaceContainerHelper   m_aWindowListeners;
     741             :     ::cppu::OInterfaceContainerHelper   m_aFocusListeners;
     742             :     ::cppu::OInterfaceContainerHelper   m_aKeyListeners;
     743             :     ::cppu::OInterfaceContainerHelper   m_aMouseListeners;
     744             :     ::cppu::OInterfaceContainerHelper   m_aMouseMotionListeners;
     745             : 
     746             : protected:
     747             :     virtual ~FmXGridCell();
     748             : 
     749             : public:
     750             :     TYPEINFO();
     751             :     FmXGridCell( DbGridColumn* pColumn, DbCellControl* pControl );
     752             :     void init();
     753             : 
     754        1240 :     DECLARE_UNO3_AGG_DEFAULTS(FmXGridCell, OComponentHelper)
     755             :     virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type& _rType ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     756             : 
     757             :     void SetTextLineColor();
     758             :     void SetTextLineColor(const Color& _rColor);
     759             : 
     760             : // XTypeProvider
     761             :     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes(  ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     762             :     virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     763             : 
     764             : // OComponentHelper
     765             :     virtual void SAL_CALL disposing() SAL_OVERRIDE;
     766             : 
     767             : // ::com::sun::star::lang::XComponent
     768          31 :     virtual void SAL_CALL dispose() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE {OComponentHelper::dispose();}
     769           0 :     virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener)throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE       { OComponentHelper::addEventListener(aListener);}
     770           0 :     virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener)throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE        { OComponentHelper::removeEventListener(aListener);}
     771             : 
     772             : // ::com::sun::star::awt::XControl
     773           0 :     virtual void SAL_CALL setContext(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& /*Context*/) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE {}
     774             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >  SAL_CALL getContext() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     775           0 :     virtual void SAL_CALL createPeer(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit >& /*Toolkit*/, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& /*Parent*/) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE {}
     776             : 
     777           0 :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > SAL_CALL getPeer() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE {return ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > ();}
     778           0 :     virtual sal_Bool SAL_CALL setModel(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& /*Model*/) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE {return sal_False;}
     779             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > SAL_CALL getModel() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     780           0 :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XView > SAL_CALL getView() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE {return ::com::sun::star::uno::Reference< ::com::sun::star::awt::XView > ();}
     781           0 :     virtual void SAL_CALL setDesignMode(sal_Bool /*bOn*/) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE {}
     782           0 :     virtual sal_Bool SAL_CALL isDesignMode() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE {return sal_False;}
     783           0 :     virtual sal_Bool SAL_CALL isTransparent() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE {return sal_False;}
     784             : 
     785             : // ::com::sun::star::form::XBoundControl
     786             :     virtual sal_Bool SAL_CALL getLock() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     787             :     virtual void SAL_CALL setLock(sal_Bool _bLock) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     788             : 
     789             :     // XWindow
     790             :     virtual void SAL_CALL setPosSize( ::sal_Int32 X, ::sal_Int32 Y, ::sal_Int32 Width, ::sal_Int32 Height, ::sal_Int16 Flags ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     791             :     virtual ::com::sun::star::awt::Rectangle SAL_CALL getPosSize(  ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     792             :     virtual void SAL_CALL setVisible( sal_Bool Visible ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     793             :     virtual void SAL_CALL setEnable( sal_Bool Enable ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     794             :     virtual void SAL_CALL setFocus(  ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     795             :     virtual void SAL_CALL addWindowListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowListener >& xListener ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     796             :     virtual void SAL_CALL removeWindowListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowListener >& xListener ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     797             :     virtual void SAL_CALL addFocusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFocusListener >& xListener ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     798             :     virtual void SAL_CALL removeFocusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFocusListener >& xListener ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     799             :     virtual void SAL_CALL addKeyListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XKeyListener >& xListener ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     800             :     virtual void SAL_CALL removeKeyListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XKeyListener >& xListener ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     801             :     virtual void SAL_CALL addMouseListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMouseListener >& xListener ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     802             :     virtual void SAL_CALL removeMouseListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMouseListener >& xListener ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     803             :     virtual void SAL_CALL addMouseMotionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMouseMotionListener >& xListener ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     804             :     virtual void SAL_CALL removeMouseMotionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMouseMotionListener >& xListener ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     805             :     virtual void SAL_CALL addPaintListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPaintListener >& xListener ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     806             :     virtual void SAL_CALL removePaintListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPaintListener >& xListener ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     807             : 
     808           0 :     bool Commit() {return m_pCellControl->Commit();}
     809           0 :     void ImplInitWindow( vcl::Window& rParent, const InitWindowFacet _eInitWhat )
     810           0 :         { m_pCellControl->ImplInitWindow( rParent, _eInitWhat ); }
     811             : 
     812           0 :     bool isAlignedController() const { return m_pCellControl->isAlignedController(); }
     813           0 :     void AlignControl(sal_Int16 nAlignment)
     814           0 :         { m_pCellControl->AlignControl(nAlignment);}
     815             : 
     816             : protected:
     817             :     virtual vcl::Window* getEventWindow() const;
     818             :     virtual void onWindowEvent( const sal_uLong _nEventId, const vcl::Window& _rWindow, const void* _pEventData );
     819             : 
     820             :     // default implementations call our focus listeners, don't forget to call them if you override this
     821             :     virtual void onFocusGained( const ::com::sun::star::awt::FocusEvent& _rEvent );
     822             :     virtual void onFocusLost( const ::com::sun::star::awt::FocusEvent& _rEvent );
     823             : 
     824             : private:
     825             :     DECL_LINK( OnWindowEvent, VclWindowEvent* );
     826             : };
     827             : 
     828             : 
     829          31 : class FmXDataCell : public FmXGridCell
     830             : {
     831             : public:
     832             :     TYPEINFO_OVERRIDE();
     833          31 :     FmXDataCell( DbGridColumn* pColumn, DbCellControl& _rControl )
     834          31 :         :FmXGridCell( pColumn, &_rControl )
     835             :     {
     836          31 :     }
     837             : 
     838             :     virtual void PaintFieldToCell(OutputDevice& rDev,
     839             :                const Rectangle& rRect,
     840             :                const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& xField,
     841             :                const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter);
     842             : 
     843           0 :     void UpdateFromField(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& xField,
     844             :                          const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter)
     845           0 :                 { m_pCellControl->UpdateFromField(xField, xFormatter); }
     846             : 
     847             : protected:
     848             :     void UpdateFromColumn();
     849             : };
     850             : 
     851             : 
     852          31 : class FmXTextCell : public FmXDataCell
     853             : {
     854             : protected:
     855             :     /** determines whether the text of this cell can be painted directly, without
     856             :         using the painter control
     857             : 
     858             :         If this is <TRUE/>, the <member>PaintCell</member> method will simply use the text as returned
     859             :         by <member>GetText</member>, and draw it onto the device passed to <member>PaintFieldToCell</member>,
     860             :         while respecting the current alignment settings.
     861             : 
     862             :         If this is <FALSE/>, the <member>PaintFieldToCell</member> request will be forwarded to the painter
     863             :         control (<member>m_pPainter</member>). This is more expensive, but the only option
     864             :         if your painting involves more that a simple DrawText.
     865             : 
     866             :         This member is <TRUE/> by default, and can be modified by derived classes.
     867             :     */
     868             :     bool    m_bFastPaint;
     869             : 
     870             : public:
     871             :     TYPEINFO_OVERRIDE();
     872             :     FmXTextCell( DbGridColumn* pColumn, DbCellControl& _rControl );
     873             : 
     874             :     virtual void PaintFieldToCell(OutputDevice& rDev,
     875             :                const Rectangle& rRect,
     876             :                const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& xField,
     877             :                const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter) SAL_OVERRIDE;
     878             : 
     879          46 :     OUString GetText(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _rxField,
     880             :                    const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter,
     881             :                    Color** ppColor = NULL)
     882          46 :             {return m_pCellControl->GetFormatText(_rxField, xFormatter, ppColor);}
     883             : };
     884             : 
     885             : 
     886             : typedef ::cppu::ImplHelper2 <   ::com::sun::star::awt::XTextComponent
     887             :                             ,   ::com::sun::star::form::XChangeBroadcaster
     888             :                             >   FmXEditCell_Base;
     889             : class FmXEditCell : public FmXTextCell,
     890             :                     public FmXEditCell_Base
     891             : {
     892             : private:
     893             :     OUString                     m_sValueOnEnter;
     894             : 
     895             : protected:
     896             :     ::cppu::OInterfaceContainerHelper   m_aTextListeners;
     897             :     ::cppu::OInterfaceContainerHelper   m_aChangeListeners;
     898             :     ::svt::IEditImplementation*         m_pEditImplementation;
     899             :     bool                                m_bOwnEditImplementation;
     900             : 
     901             :     virtual ~FmXEditCell();
     902             : public:
     903             :     FmXEditCell( DbGridColumn* pColumn, DbCellControl& _rControl );
     904             : 
     905        1240 :     DECLARE_UNO3_AGG_DEFAULTS(FmXEditCell, FmXTextCell)
     906             :     virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type& _rType ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     907             : 
     908             : // XTypeProvider
     909             :     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     910             :     virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     911             : 
     912             : // OComponentHelper
     913             :     virtual void SAL_CALL disposing() SAL_OVERRIDE;
     914             : 
     915             : // ::com::sun::star::awt::XTextComponent
     916             :     virtual void SAL_CALL addTextListener(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTextListener >& l) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     917             :     virtual void SAL_CALL removeTextListener(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTextListener >& l) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     918             :     virtual void SAL_CALL setText(const OUString& aText) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     919             :     virtual void SAL_CALL insertText(const ::com::sun::star::awt::Selection& Sel, const OUString& Text) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     920             :     virtual OUString SAL_CALL getText() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     921             :     virtual OUString SAL_CALL getSelectedText() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     922             :     virtual void SAL_CALL setSelection(const ::com::sun::star::awt::Selection& aSelection) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     923             :     virtual ::com::sun::star::awt::Selection SAL_CALL getSelection() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     924             :     virtual sal_Bool SAL_CALL isEditable() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     925             :     virtual void SAL_CALL setEditable(sal_Bool bEditable) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     926             :     virtual void SAL_CALL setMaxTextLen(sal_Int16 nLen) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     927             :     virtual sal_Int16 SAL_CALL getMaxTextLen() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     928             : 
     929             :     // XChangeBroadcaster
     930             :     virtual void SAL_CALL addChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::form::XChangeListener >& aListener ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     931             :     virtual void SAL_CALL removeChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::form::XChangeListener >& aListener ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     932             : 
     933             : protected:
     934             :     virtual void onWindowEvent( const sal_uLong _nEventId, const vcl::Window& _rWindow, const void* _pEventData ) SAL_OVERRIDE;
     935             : 
     936             :     virtual void onFocusGained( const ::com::sun::star::awt::FocusEvent& _rEvent ) SAL_OVERRIDE;
     937             :     virtual void onFocusLost( const ::com::sun::star::awt::FocusEvent& _rEvent ) SAL_OVERRIDE;
     938             : 
     939             : private:
     940             :     void onTextChanged();
     941             : };
     942             : 
     943             : 
     944             : typedef ::cppu::ImplHelper2 <   ::com::sun::star::awt::XCheckBox
     945             :                             ,   ::com::sun::star::awt::XButton
     946             :                             >   FmXCheckBoxCell_Base;
     947             : class FmXCheckBoxCell : public FmXDataCell,
     948             :                         public FmXCheckBoxCell_Base
     949             : {
     950             :     ::cppu::OInterfaceContainerHelper   m_aItemListeners;
     951             :     ::cppu::OInterfaceContainerHelper   m_aActionListeners;
     952             :     OUString                            m_aActionCommand;
     953             :     VclPtr<CheckBox>                    m_pBox;
     954             : 
     955             : protected:
     956             :     virtual ~FmXCheckBoxCell();
     957             : 
     958             : public:
     959             :     FmXCheckBoxCell( DbGridColumn* pColumn, DbCellControl& _rControl );
     960             : 
     961             : // UNO
     962           0 :     DECLARE_UNO3_AGG_DEFAULTS(FmXCheckBoxCell, FmXDataCell)
     963             :     virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type& _rType ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     964             :     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     965             :     virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     966             : 
     967             : // OComponentHelper
     968             :     virtual void SAL_CALL disposing() SAL_OVERRIDE;
     969             : 
     970             : // ::com::sun::star::awt::XCheckBox
     971             :     virtual void SAL_CALL addItemListener(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListener >& l) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     972             :     virtual void SAL_CALL removeItemListener(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListener >& l) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     973             :     virtual sal_Int16 SAL_CALL getState() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     974             :     virtual void SAL_CALL setState(sal_Int16 n) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     975             :     virtual void SAL_CALL setLabel(const OUString& Label) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     976             :     virtual void SAL_CALL enableTriState(sal_Bool b) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     977             : 
     978             :     // XButton
     979             :     virtual void SAL_CALL addActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener >& l ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     980             :     virtual void SAL_CALL removeActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener >& l ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     981             :     //virtual void SAL_CALL setLabel( const OUString& Label ) throw (::com::sun::star::uno::RuntimeException);
     982             :     virtual void SAL_CALL setActionCommand( const OUString& Command ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     983             : 
     984             : protected:
     985             :     virtual vcl::Window* getEventWindow() const SAL_OVERRIDE;
     986             :     virtual void onWindowEvent( const sal_uLong _nEventId, const vcl::Window& _rWindow, const void* _pEventData ) SAL_OVERRIDE;
     987             : };
     988             : 
     989             : 
     990             : typedef ::cppu::ImplHelper1 <   ::com::sun::star::awt::XListBox
     991             :                             >   FmXListBoxCell_Base;
     992             : class FmXListBoxCell    :public FmXTextCell
     993             :                         ,public FmXListBoxCell_Base
     994             : {
     995             :     ::cppu::OInterfaceContainerHelper   m_aItemListeners,
     996             :                                         m_aActionListeners;
     997             :     VclPtr<ListBox>                     m_pBox;
     998             : 
     999             : protected:
    1000             :     virtual ~FmXListBoxCell();
    1001             : 
    1002             : public:
    1003             :     FmXListBoxCell( DbGridColumn* pColumn, DbCellControl& _rControl );
    1004             : 
    1005           0 :     DECLARE_UNO3_AGG_DEFAULTS(FmXListBoxCell, FmXTextCell)
    1006             :     virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type& _rType ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
    1007             :     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
    1008             :     virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
    1009             : 
    1010             : // OComponentHelper
    1011             :     virtual void SAL_CALL disposing() SAL_OVERRIDE;
    1012             : 
    1013             : // ::com::sun::star::awt::XListBox
    1014             :     virtual void SAL_CALL addItemListener(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListener >& l) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
    1015             :     virtual void SAL_CALL removeItemListener(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListener >& l) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
    1016             :     virtual void SAL_CALL addActionListener(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener >& l) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
    1017             :     virtual void SAL_CALL removeActionListener(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener >& l) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
    1018             :     virtual void SAL_CALL addItem(const OUString& aItem, sal_Int16 nPos) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
    1019             :     virtual void SAL_CALL addItems(const ::com::sun::star::uno::Sequence< OUString >& aItems, sal_Int16 nPos) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
    1020             :     virtual void SAL_CALL removeItems(sal_Int16 nPos, sal_Int16 nCount) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
    1021             :     virtual sal_Int16 SAL_CALL getItemCount() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
    1022             :     virtual OUString SAL_CALL getItem(sal_Int16 nPos) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
    1023             :     virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getItems() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
    1024             :     virtual sal_Int16 SAL_CALL getSelectedItemPos() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
    1025             :     virtual ::com::sun::star::uno::Sequence< sal_Int16 > SAL_CALL getSelectedItemsPos() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
    1026             :     virtual OUString SAL_CALL getSelectedItem() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
    1027             :     virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSelectedItems() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
    1028             :     virtual void SAL_CALL SAL_CALL selectItemPos(sal_Int16 nPos, sal_Bool bSelect) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
    1029             :     virtual void SAL_CALL SAL_CALL selectItemsPos(const ::com::sun::star::uno::Sequence< sal_Int16 >& aPositions, sal_Bool bSelect) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
    1030             :     virtual void SAL_CALL SAL_CALL selectItem(const OUString& aItem, sal_Bool bSelect) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
    1031             :     virtual sal_Bool SAL_CALL isMutipleMode() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
    1032             :     virtual void SAL_CALL SAL_CALL setMultipleMode(sal_Bool bMulti) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
    1033             :     virtual sal_Int16 SAL_CALL getDropDownLineCount() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
    1034             :     virtual void SAL_CALL SAL_CALL setDropDownLineCount(sal_Int16 nLines) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
    1035             :     virtual void SAL_CALL SAL_CALL makeVisible(sal_Int16 nEntry) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
    1036             : 
    1037             : protected:
    1038             :     virtual void onWindowEvent( const sal_uLong _nEventId, const vcl::Window& _rWindow, const void* _pEventData ) SAL_OVERRIDE;
    1039             : 
    1040             :     DECL_LINK( OnDoubleClick, void* );
    1041             : };
    1042             : 
    1043             : 
    1044             : typedef ::cppu::ImplHelper1 <   ::com::sun::star::awt::XComboBox
    1045             :                             >   FmXComboBoxCell_Base;
    1046             : class FmXComboBoxCell   :public FmXTextCell
    1047             :                         ,public FmXComboBoxCell_Base
    1048             : {
    1049             : private:
    1050             :     ::cppu::OInterfaceContainerHelper   m_aItemListeners,
    1051             :                                         m_aActionListeners;
    1052             :     VclPtr<ComboBox>                    m_pComboBox;
    1053             : 
    1054             : protected:
    1055             :     virtual ~FmXComboBoxCell();
    1056             : 
    1057             : public:
    1058             :     FmXComboBoxCell( DbGridColumn* pColumn, DbCellControl& _rControl );
    1059             : 
    1060           0 :     DECLARE_UNO3_AGG_DEFAULTS(FmXListBoxCell, FmXTextCell)
    1061             :     virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type& _rType ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
    1062             :     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
    1063             :     virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
    1064             : 
    1065             :     // OComponentHelper
    1066             :     virtual void SAL_CALL disposing() SAL_OVERRIDE;
    1067             : 
    1068             :     // XComboBox
    1069             :     virtual void SAL_CALL addItemListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListener >& _Listener ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
    1070             :     virtual void SAL_CALL removeItemListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListener >& _Listener ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
    1071             :     virtual void SAL_CALL addActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener >& _Listener ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
    1072             :     virtual void SAL_CALL removeActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener >& _Listener ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
    1073             :     virtual void SAL_CALL addItem( const OUString& _Item, ::sal_Int16 _Pos ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
    1074             :     virtual void SAL_CALL addItems( const ::com::sun::star::uno::Sequence< OUString >& _Items, ::sal_Int16 _Pos ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
    1075             :     virtual void SAL_CALL removeItems( ::sal_Int16 nPos, ::sal_Int16 nCount ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
    1076             :     virtual ::sal_Int16 SAL_CALL getItemCount(  ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
    1077             :     virtual OUString SAL_CALL getItem( ::sal_Int16 _Pos ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
    1078             :     virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getItems(  ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
    1079             :     virtual ::sal_Int16 SAL_CALL getDropDownLineCount(  ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
    1080             :     virtual void SAL_CALL setDropDownLineCount( ::sal_Int16 _Lines ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
    1081             : 
    1082             : protected:
    1083             :     virtual void onWindowEvent( const sal_uLong _nEventId, const vcl::Window& _rWindow, const void* _pEventData ) SAL_OVERRIDE;
    1084             : };
    1085             : 
    1086             : 
    1087             : typedef ::cppu::ImplHelper2 <   ::com::sun::star::awt::XTextComponent
    1088             :                             ,   ::com::sun::star::lang::XUnoTunnel
    1089             :                             >   FmXFilterCell_Base;
    1090             : class FmXFilterCell :public FmXGridCell
    1091             :                     ,public FmXFilterCell_Base
    1092             : {
    1093             :     ::cppu::OInterfaceContainerHelper m_aTextListeners;
    1094             : protected:
    1095             :     virtual ~FmXFilterCell();
    1096             : public:
    1097             :     TYPEINFO_OVERRIDE();
    1098             :     FmXFilterCell(DbGridColumn* pColumn = NULL, DbCellControl* pControl = NULL);
    1099             : 
    1100             : 
    1101           0 :     DECLARE_UNO3_AGG_DEFAULTS(FmXFilterCell, FmXGridCell)
    1102             :     virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type& _rType ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
    1103             :     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
    1104             :     virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
    1105             : 
    1106             : // XUnoTunnel
    1107             :     virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
    1108             : 
    1109             : // helpers for XUnoTunnel
    1110             :     static const ::com::sun::star::uno::Sequence<sal_Int8>& getUnoTunnelId();
    1111             : 
    1112             : //  painting the filter text
    1113             :     void PaintCell(OutputDevice& rDev, const Rectangle& rRect);
    1114           0 :     void Update(){m_pCellControl->Update();}
    1115             : 
    1116             : // OComponentHelper
    1117             :     virtual void SAL_CALL disposing() SAL_OVERRIDE;
    1118             : 
    1119             : // ::com::sun::star::awt::XTextComponent
    1120             :     virtual void SAL_CALL addTextListener(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTextListener >& l) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
    1121             :     virtual void SAL_CALL removeTextListener(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTextListener >& l) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
    1122             :     virtual void SAL_CALL setText(const OUString& aText) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
    1123             :     virtual void SAL_CALL insertText(const ::com::sun::star::awt::Selection& Sel, const OUString& Text) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
    1124             :     virtual OUString SAL_CALL getText() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
    1125             :     virtual OUString SAL_CALL getSelectedText() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
    1126             :     virtual void SAL_CALL setSelection(const ::com::sun::star::awt::Selection& aSelection) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
    1127             :     virtual ::com::sun::star::awt::Selection SAL_CALL getSelection() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
    1128             :     virtual sal_Bool SAL_CALL isEditable() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
    1129             :     virtual void SAL_CALL setEditable(sal_Bool bEditable) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
    1130             :     virtual void SAL_CALL setMaxTextLen(sal_Int16 nLen) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
    1131             :     virtual sal_Int16 SAL_CALL getMaxTextLen() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
    1132             : 
    1133             : protected:
    1134             :     DECL_LINK( OnCommit, void* );
    1135             : };
    1136             : 
    1137             : #endif // INCLUDED_SVX_SOURCE_INC_GRIDCELL_HXX
    1138             : 
    1139             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11