diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-12-20 12:23:09 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-12-20 21:07:27 +0100 |
commit | b5ab2d274ab3731eca3e7f9d8cce9de53eb927c4 (patch) | |
tree | 73b825908d8161356d43f384fac350914bbb8484 /sw | |
parent | 6ef28599b227042e3b64075143207af2c674719d (diff) |
no need to use unique_ptr here
Change-Id: I1e7ef79eefa18c39f647749d6f7c94e2bff20462
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161057
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/uibase/utlui/content.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index 72fd76cbe1ce..4ee3c315e4df 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -5738,10 +5738,10 @@ void SwContentTree::GotoContent(const SwContent* pCnt) m_pActiveShell->AssureStdMode(); - std::optional<std::unique_ptr<SwPosition>> oPosition; + std::optional<SwPosition> oPosition; if (m_bSelectTo) - oPosition.emplace(new SwPosition(m_pActiveShell->GetCursor()->GetPoint()->nNode, - m_pActiveShell->GetCursor()->GetPoint()->nContent)); + oPosition.emplace(m_pActiveShell->GetCursor()->GetPoint()->nNode, + m_pActiveShell->GetCursor()->GetPoint()->nContent); switch(m_nLastSelType = pCnt->GetParent()->GetType()) { @@ -5881,8 +5881,8 @@ void SwContentTree::GotoContent(const SwContent* pCnt) m_pActiveShell->AssureStdMode(); m_pActiveShell->SetMark(); - m_pActiveShell->GetCursor()->GetMark()->nNode = oPosition.value()->nNode; - m_pActiveShell->GetCursor()->GetMark()->nContent = oPosition.value()->nContent; + m_pActiveShell->GetCursor()->GetMark()->nNode = oPosition->nNode; + m_pActiveShell->GetCursor()->GetMark()->nContent = oPosition->nContent; m_pActiveShell->UpdateCursor(); m_pActiveShell->GetView().GetEditWin().GrabFocus(); |