diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-05-04 10:06:14 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-05-04 13:56:46 +0200 |
commit | 3b7db802731826b6cc3b55100470b0c61c1f2dfa (patch) | |
tree | 8b972dd3697e88a1d306626f28a177366b8de27a /svx | |
parent | fd02cdd4b5ef0fc96225501ba8f6758af8b6c69e (diff) |
tdf#105404 [API CHANGE] add index to accessiblity change event
Which shaves 80% off the time off breaking up a vector image on Linux.
Change-Id: Id8e7daad001b6120d1fb98e382357da5b55e92ca
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151352
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/accessibility/AccessibleShape.cxx | 6 | ||||
-rw-r--r-- | svx/source/accessibility/AccessibleTextHelper.cxx | 4 | ||||
-rw-r--r-- | svx/source/accessibility/ChildrenManagerImpl.cxx | 21 | ||||
-rw-r--r-- | svx/source/accessibility/GraphCtlAccessibleContext.cxx | 4 | ||||
-rw-r--r-- | svx/source/table/accessiblecell.cxx | 2 | ||||
-rw-r--r-- | svx/source/table/accessibletableshape.cxx | 8 |
6 files changed, 23 insertions, 22 deletions
diff --git a/svx/source/accessibility/AccessibleShape.cxx b/svx/source/accessibility/AccessibleShape.cxx index e5d937094d17..ec9ba6efa410 100644 --- a/svx/source/accessibility/AccessibleShape.cxx +++ b/svx/source/accessibility/AccessibleShape.cxx @@ -906,7 +906,7 @@ void SAL_CALL CommitChange ( AccessibleEventId::VISIBLE_DATA_CHANGED, uno::Any(), - uno::Any()); + uno::Any(), -1); // Name and Description may have changed. Update the local // values accordingly. @@ -923,7 +923,7 @@ void AccessibleShape::ViewForwarderChanged() // and/or position) of the shape has changed. CommitChange (AccessibleEventId::VISIBLE_DATA_CHANGED, uno::Any(), - uno::Any()); + uno::Any(), -1); // Tell children manager of the modified view forwarder. if (mpChildrenManager != nullptr) @@ -976,7 +976,7 @@ OUString AccessibleShape::GetFullAccessibleName (AccessibleShape *shape) CommitChange( AccessibleEventId::NAME_CHANGED, aNewValue, - aOldValue); + aOldValue, -1); } aAccName = sName; return sName; diff --git a/svx/source/accessibility/AccessibleTextHelper.cxx b/svx/source/accessibility/AccessibleTextHelper.cxx index 27ad6747500b..d836f2ee4970 100644 --- a/svx/source/accessibility/AccessibleTextHelper.cxx +++ b/svx/source/accessibility/AccessibleTextHelper.cxx @@ -1406,10 +1406,10 @@ namespace accessibility if (mxFrontEnd.is()) aEvent = AccessibleEventObject(mxFrontEnd->getAccessibleContext(), nEventId, - rNewValue, rOldValue); + rNewValue, rOldValue, -1); else aEvent = AccessibleEventObject(uno::Reference<uno::XInterface>(), nEventId, - rNewValue, rOldValue); + rNewValue, rOldValue, -1); // no locking necessary, FireEvent internally copies listeners // if someone removes/adds in between Further locking, diff --git a/svx/source/accessibility/ChildrenManagerImpl.cxx b/svx/source/accessibility/ChildrenManagerImpl.cxx index 36390c7a033b..8a54822796ee 100644 --- a/svx/source/accessibility/ChildrenManagerImpl.cxx +++ b/svx/source/accessibility/ChildrenManagerImpl.cxx @@ -447,7 +447,7 @@ void ChildrenManagerImpl::CreateAccessibilityObjects ( mrContext.CommitChange ( AccessibleEventId::CHILD, uno::Any(uno::Reference<XAccessible>(rChild.mxAccessibleShape)), - uno::Any()); + uno::Any(), -1); } ++nPos; } @@ -499,7 +499,8 @@ void ChildrenManagerImpl::AddShape (const Reference<drawing::XShape>& rxShape) mrContext.CommitChange ( AccessibleEventId::CHILD, aNewShape, - uno::Any()); + uno::Any(), + maVisibleChildren.size() - 1); RegisterAsDisposeListener(rxShape); } @@ -559,7 +560,7 @@ void ChildrenManagerImpl::ClearAccessibleShapeList() mrContext.CommitChange ( AccessibleEventId::INVALIDATE_ALL_CHILDREN, uno::Any(), - uno::Any()); + uno::Any(), -1); // Now the objects in the local lists can be safely disposed without // having problems with callers that want to update their child lists. @@ -770,7 +771,7 @@ bool ChildrenManagerImpl::ReplaceChild ( mrContext.CommitChange ( AccessibleEventId::CHILD, uno::Any(), - uno::Any (uno::Reference<XAccessible>(I->mxAccessibleShape))); + uno::Any (uno::Reference<XAccessible>(I->mxAccessibleShape)), -1); // Replace with replacement and send an event about existence // of the new child. @@ -787,7 +788,7 @@ bool ChildrenManagerImpl::ReplaceChild ( mrContext.CommitChange ( AccessibleEventId::CHILD, uno::Any (uno::Reference<XAccessible>(I->mxAccessibleShape)), - uno::Any()); + uno::Any(), -1); return true; } @@ -961,7 +962,7 @@ void ChildrenManagerImpl::UpdateSelection() if (nAddSelect >= 10 )//fire selection within { - mrContext.CommitChange(AccessibleEventId::SELECTION_CHANGED_WITHIN,uno::Any(),uno::Any()); + mrContext.CommitChange(AccessibleEventId::SELECTION_CHANGED_WITHIN,uno::Any(),uno::Any(), -1); nAddSelect =0 ;//not fire selection event } for (VEC_SHAPE::reverse_iterator vi = vecSelect.rbegin(), aEndVecSelect = vecSelect.rend(); vi != aEndVecSelect ;++vi) @@ -977,7 +978,7 @@ void ChildrenManagerImpl::UpdateSelection() { if ( nAddSelect > 0 ) { - mrContext.CommitChange(AccessibleEventId::SELECTION_CHANGED_ADD,anyShape,uno::Any()); + mrContext.CommitChange(AccessibleEventId::SELECTION_CHANGED_ADD,anyShape,uno::Any(), -1); } } else @@ -985,7 +986,7 @@ void ChildrenManagerImpl::UpdateSelection() //if has not selected shape ,first selected shape is fire selection event; if (nAddSelect > 0 ) { - mrContext.CommitChange(AccessibleEventId::SELECTION_CHANGED,anyShape,uno::Any()); + mrContext.CommitChange(AccessibleEventId::SELECTION_CHANGED,anyShape,uno::Any(), -1); } if (nAddSelect > 1 )//check other selected shape fire selection add event { @@ -995,7 +996,7 @@ void ChildrenManagerImpl::UpdateSelection() } else //selection remove { - mrContext.CommitChange(AccessibleEventId::SELECTION_CHANGED_REMOVE,anyShape,uno::Any()); + mrContext.CommitChange(AccessibleEventId::SELECTION_CHANGED_REMOVE,anyShape,uno::Any(), -1); } } @@ -1077,7 +1078,7 @@ void ChildDescriptor::disposeAccessibleObject (AccessibleContextBase& rParent) rParent.CommitChange ( AccessibleEventId::CHILD, uno::Any(), - aOldValue); + aOldValue, -1); // Dispose and remove the object. if (mxAccessibleShape.is()) diff --git a/svx/source/accessibility/GraphCtlAccessibleContext.cxx b/svx/source/accessibility/GraphCtlAccessibleContext.cxx index 5662e1fdffc6..989d5b4650cd 100644 --- a/svx/source/accessibility/GraphCtlAccessibleContext.cxx +++ b/svx/source/accessibility/GraphCtlAccessibleContext.cxx @@ -305,7 +305,7 @@ void SvxGraphCtrlAccessibleContext::CommitChange ( static_cast<uno::XWeak*>(this), nEventId, rNewValue, - rOldValue); + rOldValue, -1); if (mnClientId) comphelper::AccessibleEventNotifier::addEvent( mnClientId, aEvent ); @@ -712,7 +712,7 @@ void SvxGraphCtrlAccessibleContext::Notify( SfxBroadcaster& /*rBC*/, const SfxHi rtl::Reference<AccessibleShape> pShape((*iter).second); if( pShape.is() ) - pShape->CommitChange( AccessibleEventId::VISIBLE_DATA_CHANGED, uno::Any(), uno::Any() ); + pShape->CommitChange( AccessibleEventId::VISIBLE_DATA_CHANGED, uno::Any(), uno::Any(), -1 ); } } break; diff --git a/svx/source/table/accessiblecell.cxx b/svx/source/table/accessiblecell.cxx index fc401d29fbfb..1bb1ca78482a 100644 --- a/svx/source/table/accessiblecell.cxx +++ b/svx/source/table/accessiblecell.cxx @@ -461,7 +461,7 @@ void AccessibleCell::ViewForwarderChanged() { // Inform all listeners that the graphical representation (i.e. size // and/or position) of the shape has changed. - CommitChange(AccessibleEventId::VISIBLE_DATA_CHANGED, Any(), Any()); + CommitChange(AccessibleEventId::VISIBLE_DATA_CHANGED, Any(), Any(), -1); // update our children that our screen position might have changed if( mpText ) diff --git a/svx/source/table/accessibletableshape.cxx b/svx/source/table/accessibletableshape.cxx index 24880596af69..cc3a8e90b7f3 100644 --- a/svx/source/table/accessibletableshape.cxx +++ b/svx/source/table/accessibletableshape.cxx @@ -305,7 +305,7 @@ void SAL_CALL AccessibleTableShapeImpl::modified( const EventObject& /*aEvent*/ //notify bridge to update the acc cache. AccessibleTableShape *pAccTable = dynamic_cast <AccessibleTableShape *> (mxAccessible.get()); if (pAccTable) - pAccTable->CommitChange(AccessibleEventId::INVALIDATE_ALL_CHILDREN, Any(), Any()); + pAccTable->CommitChange(AccessibleEventId::INVALIDATE_ALL_CHILDREN, Any(), Any(), -1); } catch( const Exception& ) { @@ -911,17 +911,17 @@ void SAL_CALL AccessibleTableShape::selectionChanged (const EventObject& rEvent if (mnPreviousSelectionCount == 0 && nCount > 0 && bSelected) { xAccCell->SetState(AccessibleStateType::SELECTED); - xAccCell->CommitChange(AccessibleEventId::SELECTION_CHANGED, Any(), Any()); + xAccCell->CommitChange(AccessibleEventId::SELECTION_CHANGED, Any(), Any(), -1); } else if (bSelected) { xAccCell->SetState(AccessibleStateType::SELECTED); - xAccCell->CommitChange(AccessibleEventId::SELECTION_CHANGED_ADD, Any(), Any()); + xAccCell->CommitChange(AccessibleEventId::SELECTION_CHANGED_ADD, Any(), Any(), -1); } else { xAccCell->ResetState(AccessibleStateType::SELECTED); - xAccCell->CommitChange(AccessibleEventId::SELECTION_CHANGED_REMOVE, Any(), Any()); + xAccCell->CommitChange(AccessibleEventId::SELECTION_CHANGED_REMOVE, Any(), Any(), -1); } mnPreviousSelectionCount = nCount; } |