diff options
-rw-r--r-- | svtools/source/brwbox/brwbox3.cxx | 11 | ||||
-rw-r--r-- | svtools/source/brwbox/editbrowsebox.cxx | 11 | ||||
-rw-r--r-- | svtools/source/brwbox/editbrowsebox2.cxx | 39 |
3 files changed, 36 insertions, 25 deletions
diff --git a/svtools/source/brwbox/brwbox3.cxx b/svtools/source/brwbox/brwbox3.cxx index d6a2633fc683..aeed34663231 100644 --- a/svtools/source/brwbox/brwbox3.cxx +++ b/svtools/source/brwbox/brwbox3.cxx @@ -2,9 +2,9 @@ * * $RCSfile: brwbox3.cxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: oj $ $Date: 2002-06-21 08:29:15 $ + * last change: $Author: oj $ $Date: 2002-06-21 14:04:32 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -158,6 +158,7 @@ Reference< XAccessible > BrowseBox::CreateAccessible() Reference< XAccessible > BrowseBox::CreateAccessibleCell( sal_Int32 _nRow, sal_uInt16 _nColumnId ) { // BBINDEX_TABLE must be the table + OSL_ENSURE(m_pImpl->m_pAccessible,"Invalid call: Accessible is null"); return new svt::AccessibleBrowseBoxTableCell(m_pImpl->m_pAccessible->getAccessibleChild(::svt::BBINDEX_TABLE),*this,NULL,_nRow,_nColumnId); } // ----------------------------------------------------------------------------- @@ -412,5 +413,9 @@ void BrowseBox::commitBrowseBoxEvent(sal_Int16 _nEventId, m_pImpl->m_pAccessible->commitEvent( _nEventId, _rNewValue, _rOldValue); } // ----------------------------------------------------------------------------- - +sal_Bool BrowseBox::isAccessibleCreated() const +{ + return m_pImpl->m_pAccessible != NULL; +} +// ----------------------------------------------------------------------------- diff --git a/svtools/source/brwbox/editbrowsebox.cxx b/svtools/source/brwbox/editbrowsebox.cxx index fe24a550c8cb..d080cdc19874 100644 --- a/svtools/source/brwbox/editbrowsebox.cxx +++ b/svtools/source/brwbox/editbrowsebox.cxx @@ -2,9 +2,9 @@ * * $RCSfile: editbrowsebox.cxx,v $ * - * $Revision: 1.11 $ + * $Revision: 1.12 $ * - * last change: $Author: oj $ $Date: 2002-06-21 08:29:15 $ + * last change: $Author: oj $ $Date: 2002-06-21 14:04:32 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -1030,13 +1030,13 @@ namespace svt EnableAndShow(); // activate the cell only of the browser has the focus - if (bHasFocus && bCellFocus) + if ( bHasFocus && bCellFocus ) { CreateAccessibleControl(0); AsynchGetFocus(); } } - else + else if ( isAccessibleCreated() ) commitTableEvent(ACCESSIBLE_ACTIVE_DESCENDANT_EVENT, com::sun::star::uno::makeAny(CreateAccessibleCell(nRow,nCol)), com::sun::star::uno::Any()); @@ -1489,6 +1489,9 @@ namespace svt /************************************************************************* * history: * $Log: not supported by cvs2svn $ + * Revision 1.11 2002/06/21 08:29:15 oj + * #99812# correct event notifications to make the browsebox accessible + * * Revision 1.10 2002/06/12 13:41:38 dr * #99812# create an acc. cell before asking for it * diff --git a/svtools/source/brwbox/editbrowsebox2.cxx b/svtools/source/brwbox/editbrowsebox2.cxx index 8abe52f721dd..3b7fd0626f11 100644 --- a/svtools/source/brwbox/editbrowsebox2.cxx +++ b/svtools/source/brwbox/editbrowsebox2.cxx @@ -2,9 +2,9 @@ * * $RCSfile: editbrowsebox2.cxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: oj $ $Date: 2002-06-21 08:29:15 $ + * last change: $Author: oj $ $Date: 2002-06-21 14:04:32 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -99,27 +99,30 @@ sal_Int32 EditBrowseBox::GetAccessibleControlCount() const Reference< XAccessible > EditBrowseBox::CreateAccessibleControl( sal_Int32 _nIndex ) { - if ( !m_aImpl->m_xActiveCell.is() && IsEditing() && bHasFocus ) + if ( isAccessibleCreated() ) { - Reference< XAccessible > xCont = aController->GetWindow().GetAccessible(); - Reference< XAccessible > xMy = GetAccessible(); - if ( xMy.is() && xCont.is() ) + if ( !m_aImpl->m_xActiveCell.is() && IsEditing() && bHasFocus ) { - if ( m_aImpl->m_xActiveCell.is() ) + Reference< XAccessible > xCont = aController->GetWindow().GetAccessible(); + Reference< XAccessible > xMy = GetAccessible(); + if ( xMy.is() && xCont.is() ) { - commitBrowseBoxEvent(ACCESSIBLE_CHILD_EVENT,Any(),makeAny(m_aImpl->m_xActiveCell)); - m_aImpl->disposeCell(); - } + if ( m_aImpl->m_xActiveCell.is() ) + { + commitBrowseBoxEvent(ACCESSIBLE_CHILD_EVENT,Any(),makeAny(m_aImpl->m_xActiveCell)); + m_aImpl->disposeCell(); + } - m_aImpl->m_pFocusCell = new EditBrowseBoxTableCell(xMy->getAccessibleContext()->getAccessibleChild(::svt::BBTYPE_BROWSEBOX), - *this, - VCLUnoHelper::GetInterface(&aController->GetWindow()), - GetCurRow(), - GetCurColumnId(), - xCont->getAccessibleContext()); - m_aImpl->m_xActiveCell = m_aImpl->m_pFocusCell; + m_aImpl->m_pFocusCell = new EditBrowseBoxTableCell(xMy->getAccessibleContext()->getAccessibleChild(::svt::BBTYPE_BROWSEBOX), + *this, + VCLUnoHelper::GetInterface(&aController->GetWindow()), + GetCurRow(), + GetCurColumnId(), + xCont->getAccessibleContext()); + m_aImpl->m_xActiveCell = m_aImpl->m_pFocusCell; - commitBrowseBoxEvent(ACCESSIBLE_CHILD_EVENT,makeAny(m_aImpl->m_xActiveCell),Any()); + commitBrowseBoxEvent(ACCESSIBLE_CHILD_EVENT,makeAny(m_aImpl->m_xActiveCell),Any()); + } } } |