diff options
author | Caolán McNamara <caolan.mcnamara@collabora.com> | 2025-01-28 19:56:25 +0000 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2025-01-28 22:42:58 +0100 |
commit | f3271cf5adfbe2e00d02417d85ff320763d7e9a5 (patch) | |
tree | 912158ad1a9ca71a3f7e20596854ae8c812fdada | |
parent | 86cc183b5d8080b7ea1b1c96e827875b2a322034 (diff) |
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.mcnamara@collabora.com>
Tested-by: Jenkins
-rw-r--r-- | sw/source/core/unocore/unoobj2.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
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(); } } } |