sw/source/core/access/accpara.cxx | 5 +++-- sw/source/core/access/accpara.hxx | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-)
New commits: commit e85e89cb423a2262fd4e54ff71eb50eeba321ff6 Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Thu Apr 24 10:49:56 2025 +0200 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Fri Apr 25 07:29:18 2025 +0200 sw a11y: Move text frame assert to better place Asserting that the frame in question is actually a text frame makes more sense in SwAccessibleParagraph::GetTextFrame before doing a static_cast to SwTextFrame. Change-Id: I7d160b002036f1cd2df2c5d6cd65e48dc1f5b803 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184559 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx index 5fb9344b32c8..b5dd2d54f3cc 100644 --- a/sw/source/core/access/accpara.cxx +++ b/sw/source/core/access/accpara.cxx @@ -111,7 +111,9 @@ constexpr OUStringLiteral sImplementationName = u"com.sun.star.comp.Writer.SwAcc const SwTextFrame* SwAccessibleParagraph::GetTextFrame() const { - return static_cast<const SwTextFrame*>(GetFrame()); + const SwFrame* pFrame = GetFrame(); + assert(!pFrame || pFrame->IsTextFrame()); + return static_cast<const SwTextFrame*>(pFrame); } OUString const & SwAccessibleParagraph::GetString() @@ -386,7 +388,6 @@ void SwAccessibleParagraph::UpdatePortionData() // obtain the text frame const SwTextFrame* pFrame = GetTextFrame(); assert(pFrame && "The text frame has vanished!"); - assert(pFrame->IsTextFrame() && "The text frame has mutated!"); // build new portion data m_pPortionData.reset( new SwAccessiblePortionData(pFrame, GetMap()->GetShell().GetViewOptions())); commit da311e43e9a49782180c4d22851933c5745c2962 Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Thu Apr 24 10:47:28 2025 +0200 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Fri Apr 25 07:29:09 2025 +0200 sw a11y: Fix typo in comment Change-Id: I3d31491173d59e3783c15f0ef1b5c2f84ca4f3a0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184558 Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> Tested-by: Jenkins diff --git a/sw/source/core/access/accpara.hxx b/sw/source/core/access/accpara.hxx index 1399837f62c5..4cf5f24be86d 100644 --- a/sw/source/core/access/accpara.hxx +++ b/sw/source/core/access/accpara.hxx @@ -94,7 +94,7 @@ class SwAccessibleParagraph : /// get the (accessible) text string (requires frame; check before) OUString const & GetString(); - // get the current care position + // get the current caret position sal_Int32 GetCaretPos(); // determine the current selection. Fill the values with