Kaydet (Commit) 2051f938 authored tarafından Jens-Heiner Rechtien's avatar Jens-Heiner Rechtien

INTEGRATION: CWS tl40 (1.45.98); FILE MERGED

2007/07/23 15:06:10 tl 1.45.98.2: RESYNC: (1.45-1.46); FILE MERGED
2007/07/23 09:21:47 tl 1.45.98.1: #i61812# accessiblity: event notification for EditEngine fixed
üst 1d828e57
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
* *
* $RCSfile: AccessibleTextHelper.cxx,v $ * $RCSfile: AccessibleTextHelper.cxx,v $
* *
* $Revision: 1.46 $ * $Revision: 1.47 $
* *
* last change: $Author: hr $ $Date: 2007-06-27 16:40:25 $ * last change: $Author: hr $ $Date: 2007-08-02 13:59:06 $
* *
* The Contents of this file are made available subject to * The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1. * the terms of GNU Lesser General Public License Version 2.1.
...@@ -1300,12 +1300,14 @@ namespace accessibility ...@@ -1300,12 +1300,14 @@ namespace accessibility
::accessibility::AccessibleParaManager::VectorOfChildren::const_iterator end = begin; ::accessibility::AccessibleParaManager::VectorOfChildren::const_iterator end = begin;
::std::advance( end, 1 ); ::std::advance( end, 1 );
// send remove event // #i61812# remember para to be removed for later notification
AccessibleTextHelper_LostChildEvent aLooseFunctor( *this ); // AFTER the new state is applied (that after the para got removed)
::std::for_each( begin, end, aLooseFunctor ); ::uno::Reference< XAccessible > xPara;
::accessibility::AccessibleParaManager::WeakPara::HardRefType aHardRef( begin->first.get() );
if( aHardRef.is() )
xPara = ::uno::Reference< XAccessible >( aHardRef.getRef(), ::uno::UNO_QUERY );
// release everything from the remove position until the end // release everything from the remove position until the end
// #102235# Perform the release after the CHILD_EVENT notification
maParaManager.Release(aFunctor.GetParaIndex(), nCurrParas); maParaManager.Release(aFunctor.GetParaIndex(), nCurrParas);
// update num of paras // update num of paras
...@@ -1316,6 +1318,10 @@ namespace accessibility ...@@ -1316,6 +1318,10 @@ namespace accessibility
// update children, _don't_ broadcast // update children, _don't_ broadcast
UpdateVisibleChildren( false ); UpdateVisibleChildren( false );
UpdateBoundRect(); UpdateBoundRect();
// #i61812# notification for removed para
if (xPara.is())
FireEvent(AccessibleEventId::CHILD, uno::Any(), uno::makeAny( xPara) );
} }
#ifdef DBG_UTIL #ifdef DBG_UTIL
else else
...@@ -1324,11 +1330,6 @@ namespace accessibility ...@@ -1324,11 +1330,6 @@ namespace accessibility
} }
else if( nNewParas != nCurrParas ) else if( nNewParas != nCurrParas )
{ {
// number of paragraphs somehow changed - but we have no
// chance determining how. Thus, throw away everything and
// create from scratch.
FireEvent(AccessibleEventId::INVALIDATE_ALL_CHILDREN);
// release all paras // release all paras
maParaManager.Release(0, nCurrParas); maParaManager.Release(0, nCurrParas);
...@@ -1339,6 +1340,12 @@ namespace accessibility ...@@ -1339,6 +1340,12 @@ namespace accessibility
UpdateVisibleChildren( false ); UpdateVisibleChildren( false );
UpdateBoundRect(); UpdateBoundRect();
// number of paragraphs somehow changed - but we have no
// chance determining how. Thus, throw away everything and
// create from scratch.
// (child events should be broadcast after the changes are done...)
FireEvent(AccessibleEventId::INVALIDATE_ALL_CHILDREN);
// no need for further updates later on // no need for further updates later on
bEverythingUpdated = true; bEverythingUpdated = true;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment