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

Generated by: LCOV version 1.10