diff options
author | Noel <noel.grandin@collabora.co.uk> | 2021-02-19 14:33:17 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-02-20 10:21:07 +0100 |
commit | 7d7d4cf217e82db8839dbc49dcab1ab72c203b4e (patch) | |
tree | 02bf7659d9bb3fce41a54407ea890313ad9d6a30 /sw/source/filter/xml | |
parent | 6aecd49aa6de7c7f65c3c240ee3b7db36497df4d (diff) |
loplugin:refcounting in sw
Change-Id: I56f2f5aa4d9105e93f28701b8352d1fb97829ead
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111215
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/filter/xml')
-rw-r--r-- | sw/source/filter/xml/XMLRedlineImportHelper.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/filter/xml/XMLRedlineImportHelper.cxx b/sw/source/filter/xml/XMLRedlineImportHelper.cxx index d368b812a199..aae8843adc59 100644 --- a/sw/source/filter/xml/XMLRedlineImportHelper.cxx +++ b/sw/source/filter/xml/XMLRedlineImportHelper.cxx @@ -476,11 +476,11 @@ Reference<XTextCursor> XMLRedlineImportHelper::CreateRedlineTextSection( // create (UNO-) cursor SwPosition aPos(*pRedlineNode); - SwXTextCursor *const pXCursor = + rtl::Reference<SwXTextCursor> pXCursor = new SwXTextCursor(*pDoc, pXText, CursorType::Redline, aPos); pXCursor->GetCursor().Move(fnMoveForward, GoInNode); // cast to avoid ambiguity - xReturn = static_cast<text::XWordCursor*>(pXCursor); + xReturn = static_cast<text::XWordCursor*>(pXCursor.get()); } // else: unknown redline -> Ignore |