summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
Diffstat (limited to 'svx')
-rw-r--r--svx/source/accessibility/ChildrenManagerImpl.cxx17
1 files changed, 17 insertions, 0 deletions
diff --git a/svx/source/accessibility/ChildrenManagerImpl.cxx b/svx/source/accessibility/ChildrenManagerImpl.cxx
index cc107bc4b0df..96e27c079e9b 100644
--- a/svx/source/accessibility/ChildrenManagerImpl.cxx
+++ b/svx/source/accessibility/ChildrenManagerImpl.cxx
@@ -1008,6 +1008,23 @@ void ChildrenManagerImpl::UpdateSelection()
}
}
+ // We need to know when text content is no more edited but shape is still selected.
+ // For instance when ESC is pressed.
+ // The only difference is provided by nSelectedChildCount: on editing is equal to 1.
+ // In the following a shape get selected, but it was already selected, anyway editing is no more active.
+ if (comphelper::LibreOfficeKit::isActive() && pNewFocusedShape && nAddSelect == 0)
+ {
+ sal_Int64 nChildCount = pNewFocusedShape->getAccessibleChildCount();
+ sal_Int64 nSelectedChildCount = pNewFocusedShape->getSelectedAccessibleChildCount();
+ if (nChildCount > 0 && nSelectedChildCount == 0)
+ {
+ Reference< XAccessible > xShape(pNewFocusedShape);
+ uno::Any anyShape;
+ anyShape <<= xShape;
+ mrContext.CommitChange(AccessibleEventId::SELECTION_CHANGED,anyShape,uno::Any(), -1);
+ }
+ }
+
// Remember whether there is a shape that now has the focus.
mpFocusedShape = pNewFocusedShape;
}