From e2230f7706cc74ae05a0bc044dee75fa7984b10e Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Tue, 29 Apr 2025 23:48:52 +0200 Subject: [PATCH] svx a11y: Rely on operator!= for awt::Rectangle comparison Don't reimplement the logic. Change-Id: Id89245e909cebd79955a5f5b42d4652b9f42a9fd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184805 Tested-by: Jenkins Reviewed-by: Michael Weghorn --- svx/source/accessibility/AccessibleTextHelper.cxx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/svx/source/accessibility/AccessibleTextHelper.cxx b/svx/source/accessibility/AccessibleTextHelper.cxx index 543262740b23..44488bfbf6cb 100644 --- a/svx/source/accessibility/AccessibleTextHelper.cxx +++ b/svx/source/accessibility/AccessibleTextHelper.cxx @@ -798,11 +798,7 @@ void AccessibleTextHelper_Impl::UpdateBoundRect() { awt::Rectangle aNewRect = aHardRef->getBounds(); const awt::Rectangle& aOldRect = rChild.second; - - if( aNewRect.X != aOldRect.X || - aNewRect.Y != aOldRect.Y || - aNewRect.Width != aOldRect.Width || - aNewRect.Height != aOldRect.Height ) + if (aNewRect != aOldRect) { // visible data changed aHardRef->FireEvent( AccessibleEventId::BOUNDRECT_CHANGED );