summaryrefslogtreecommitdiff
path: root/sw/source/core/unocore/unotext.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-05-28 10:54:48 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-05-29 10:06:31 +0200
commitbc86f6d3583965dd369d0ae73a5d647c43ae38e9 (patch)
tree2c352561766e28a20fc50062e1ef8a983596ce82 /sw/source/core/unocore/unotext.cxx
parentcb48b1524ca875bcd521465b7dbdbcbe4eb670ee (diff)
no need to allocate these on the heap
Change-Id: Id82625ec95720d92353804d1b503b8f71e1db91e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116365 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/core/unocore/unotext.cxx')
-rw-r--r--sw/source/core/unocore/unotext.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx
index 32cadcff761b..953b9667fb26 100644
--- a/sw/source/core/unocore/unotext.cxx
+++ b/sw/source/core/unocore/unotext.cxx
@@ -1538,8 +1538,8 @@ SwXText::convertToTextFrame(
throw uno::RuntimeException();
}
uno::Reference< text::XTextContent > xRet;
- std::unique_ptr<SwUnoInternalPaM> pTempStartPam(new SwUnoInternalPaM(*GetDoc()));
- std::unique_ptr< SwUnoInternalPaM > pEndPam(new SwUnoInternalPaM(*GetDoc()));
+ std::optional<SwUnoInternalPaM> pTempStartPam(*GetDoc());
+ std::optional<SwUnoInternalPaM> pEndPam(*GetDoc());
if (!::sw::XTextRangeToSwPaM(*pTempStartPam, xStart) ||
!::sw::XTextRangeToSwPaM(*pEndPam, xEnd))
{