sw/source/core/unocore/unoobj2.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit f3271cf5adfbe2e00d02417d85ff320763d7e9a5 Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Tue Jan 28 19:56:25 2025 +0000 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Tue Jan 28 22:42:58 2025 +0100 SwXTextDocument::getBodyText can be used instead of getText here and that's already a rtl::Reference to SwXBodyText which is derived from SwXText Change-Id: I071c0711fef911deec4258ef9e6719b721a39de2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180859 Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> Tested-by: Jenkins diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx index 5875a17c8e90..0327e13c6161 100644 --- a/sw/source/core/unocore/unoobj2.cxx +++ b/sw/source/core/unocore/unoobj2.cxx @@ -1378,7 +1378,7 @@ CreateParentXText(SwDoc & rDoc, const SwPosition& rPos) { // then it is the body text const rtl::Reference<SwXTextDocument> xModel = pDocSh->GetBaseModel(); - xParentText = dynamic_cast<SwXText*>(xModel->getText().get()); + xParentText = xModel->getBodyText(); } } }