#99952# Added Activate and Deactivate methods to gain and lose focus on selected shape.
This commit is contained in:
parent
f006579e12
commit
6da2bb45ed
2 changed files with 53 additions and 6 deletions
|
@ -2,9 +2,9 @@
|
|||
*
|
||||
* $RCSfile: AccessibleDrawDocumentView.cxx,v $
|
||||
*
|
||||
* $Revision: 1.9 $
|
||||
* $Revision: 1.10 $
|
||||
*
|
||||
* last change: $Author: af $ $Date: 2002-05-30 15:59:12 $
|
||||
* last change: $Author: af $ $Date: 2002-06-07 08:05:09 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
|
@ -342,6 +342,8 @@ void SAL_CALL
|
|||
{
|
||||
if (mpChildrenManager != NULL)
|
||||
{
|
||||
// Clear the list of children to avoid unnecessary events and
|
||||
// update the children manager.
|
||||
mpChildrenManager->ClearAccessibleShapeList ();
|
||||
mpChildrenManager->SetInfo (maShapeTreeInfo);
|
||||
mpChildrenManager->ViewForwarderChanged (
|
||||
|
@ -581,4 +583,38 @@ void
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void AccessibleDrawDocumentView::Activated (void)
|
||||
{
|
||||
if (mpChildrenManager != NULL)
|
||||
mpChildrenManager->UpdateSelection();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void AccessibleDrawDocumentView::Deactivated (void)
|
||||
{
|
||||
// Because this method may be called directly before the window is
|
||||
// deactivated the focused state has to be removed from the currently
|
||||
// focused shape by hand.
|
||||
// At the (a) next incompatible build the following implementation
|
||||
// should be moved to the children manager.
|
||||
|
||||
// If we could be sure to track any change of the FOCUSED state we could
|
||||
// use the selection to directly find the currently focused shape.
|
||||
// But, alas, we can not. Therefore iterate over all children and remove
|
||||
// the FOCUSED state.
|
||||
for (sal_Int32 i=0, nCount=getAccessibleChildCount(); i < nCount; ++i)
|
||||
{
|
||||
AccessibleShape* pAccessibleShape = AccessibleShape::getImplementation(
|
||||
getAccessibleChild(i));
|
||||
if (pAccessibleShape != NULL)
|
||||
pAccessibleShape->ResetState (AccessibleStateType::FOCUSED);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} // end of namespace accessibility
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
*
|
||||
* $RCSfile: AccessibleDrawDocumentView.hxx,v $
|
||||
*
|
||||
* $Revision: 1.4 $
|
||||
* $Revision: 1.5 $
|
||||
*
|
||||
* last change: $Author: af $ $Date: 2002-05-17 16:13:13 $
|
||||
* last change: $Author: af $ $Date: 2002-06-07 08:06:48 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
|
@ -181,11 +181,22 @@ protected:
|
|||
CreateAccessibleName ()
|
||||
throw (::com::sun::star::uno::RuntimeException);
|
||||
|
||||
/// Create an accessible description that contains the current
|
||||
/// view mode.
|
||||
/** Create an accessible description that contains the current
|
||||
view mode.
|
||||
*/
|
||||
virtual ::rtl::OUString
|
||||
CreateAccessibleDescription ()
|
||||
throw (::com::sun::star::uno::RuntimeException);
|
||||
|
||||
/** Make sure that the currently focused shape sends a FOCUSED state
|
||||
change event indicating that it has (regained) the focus.
|
||||
*/
|
||||
virtual void Activated (void);
|
||||
|
||||
/** Make sure that the currently focused shape sends a FOCUSED state
|
||||
change event indicating that it has lost the focus.
|
||||
*/
|
||||
virtual void Deactivated (void);
|
||||
};
|
||||
|
||||
} // end of namespace accessibility
|
||||
|
|
Loading…
Reference in a new issue