From d7b3443185b43d3093fd9800a45563cf905ce42a Mon Sep 17 00:00:00 2001 From: Vladimir Glazounov Date: Mon, 19 May 2003 11:50:44 +0000 Subject: INTEGRATION: CWS dba05 (1.60.20); FILE MERGED 2003/05/13 07:35:47 oj 1.60.20.2: RESYNC: (1.60-1.61); FILE MERGED 2003/05/12 10:13:23 oj 1.60.20.1: #109428# add accessible checbox --- svx/source/fmcomp/gridctrl.cxx | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) (limited to 'svx/source/fmcomp/gridctrl.cxx') diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx index 44342b8adf..20d82502a6 100644 --- a/svx/source/fmcomp/gridctrl.cxx +++ b/svx/source/fmcomp/gridctrl.cxx @@ -2,9 +2,9 @@ * * $RCSfile: gridctrl.cxx,v $ * - * $Revision: 1.61 $ + * $Revision: 1.62 $ * - * last change: $Author: vg $ $Date: 2003-04-24 16:58:33 $ + * last change: $Author: vg $ $Date: 2003-05-19 12:50:44 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -3816,5 +3816,34 @@ Reference DbGridControl::CreateAccessibleControl( sal_Int32 _nInde return xRet; } // ----------------------------------------------------------------------------- +Reference< XAccessible > DbGridControl::CreateAccessibleCell( sal_Int32 _nRow, sal_uInt16 _nColumnPos ) +{ + USHORT nColumnId = GetColumnId( _nColumnPos ); + DbGridColumn* pColumn = m_aColumns.GetObject(GetModelColumnPos(nColumnId)); + if ( pColumn ) + { + Reference< ::com::sun::star::awt::XControl> xInt(pColumn->GetCell()); + Reference< ::com::sun::star::awt::XCheckBox> xBox(xInt,UNO_QUERY); + if ( xBox.is() ) + { + TriState eValue = STATE_NOCHECK; + switch( xBox->getState() ) + { + case 0: + eValue = STATE_NOCHECK; + break; + case 1: + eValue = STATE_CHECK; + break; + case 2: + eValue = STATE_DONTKNOW; + break; + } + return DbGridControl_Base::CreateAccessibleCheckBoxCell( _nRow, _nColumnPos,eValue,TRUE ); + } + } + return DbGridControl_Base::CreateAccessibleCell( _nRow, _nColumnPos ); +} +// ----------------------------------------------------------------------------- -- cgit v1.2.3