LCOV - code coverage report
Current view: top level - svx/source/inc - gridcell.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 34 91 37.4 %
Date: 2012-08-25 Functions: 30 96 31.2 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 5 46 10.9 %

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

Generated by: LCOV version 1.10