From 5882b9671608a082454f07fccc9d01822382f8b4 Mon Sep 17 00:00:00 2001 From: Arnaud Versini Date: Sun, 25 Oct 2020 17:10:26 +0100 Subject: editeng: AccessibleImageBullet : avoid recursive SolarMutext Change-Id: I7dc6c2dbeda4f35c609ef154af888480a81f2512 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104777 Tested-by: Jenkins Reviewed-by: Noel Grandin --- editeng/source/accessibility/AccessibleImageBullet.cxx | 14 +++++++++----- editeng/source/accessibility/AccessibleImageBullet.hxx | 2 ++ 2 files changed, 11 insertions(+), 5 deletions(-) (limited to 'editeng/source') diff --git a/editeng/source/accessibility/AccessibleImageBullet.cxx b/editeng/source/accessibility/AccessibleImageBullet.cxx index 6d5b660aa26b..0b319589f4d5 100644 --- a/editeng/source/accessibility/AccessibleImageBullet.cxx +++ b/editeng/source/accessibility/AccessibleImageBullet.cxx @@ -214,7 +214,7 @@ namespace accessibility DBG_ASSERT(GetParagraphIndex() >= 0, "AccessibleEditableTextPara::contains: index value overflow"); - awt::Rectangle aTmpRect = getBounds(); + awt::Rectangle aTmpRect = implGetBounds(); tools::Rectangle aRect( Point(aTmpRect.X, aTmpRect.Y), Size(aTmpRect.Width, aTmpRect.Height) ); Point aPoint( rPoint.X, rPoint.Y ); @@ -230,11 +230,15 @@ namespace accessibility awt::Rectangle SAL_CALL AccessibleImageBullet::getBounds( ) { - SolarMutexGuard aGuard; + return implGetBounds(); + } + awt::Rectangle AccessibleImageBullet::implGetBounds( ) + { + DBG_ASSERT(GetParagraphIndex() >= 0, - "AccessibleEditableTextPara::getBounds: index value overflow"); + "AccessibleEditableTextPara::implGetBounds: index value overflow"); SvxTextForwarder& rCacheTF = GetTextForwarder(); EBulletInfo aBulletInfo = rCacheTF.GetBulletInfo( GetParagraphIndex() ); @@ -271,7 +275,7 @@ namespace accessibility SolarMutexGuard aGuard; - awt::Rectangle aRect = getBounds(); + awt::Rectangle aRect = implGetBounds(); return awt::Point( aRect.X, aRect.Y ); } @@ -307,7 +311,7 @@ namespace accessibility SolarMutexGuard aGuard; - awt::Rectangle aRect = getBounds(); + awt::Rectangle aRect = implGetBounds(); return awt::Size( aRect.Width, aRect.Height ); } diff --git a/editeng/source/accessibility/AccessibleImageBullet.hxx b/editeng/source/accessibility/AccessibleImageBullet.hxx index 8d75494a994b..b1041ce4aa56 100644 --- a/editeng/source/accessibility/AccessibleImageBullet.hxx +++ b/editeng/source/accessibility/AccessibleImageBullet.hxx @@ -171,6 +171,8 @@ namespace accessibility */ SvxViewForwarder& GetViewForwarder() const; + css::awt::Rectangle implGetBounds(); + // the paragraph index in the edit engine (guarded by solar mutex) sal_Int32 mnParagraphIndex; -- cgit