sw/source/uibase/utlui/content.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
New commits: commit b5ab2d274ab3731eca3e7f9d8cce9de53eb927c4 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Wed Dec 20 12:23:09 2023 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Wed Dec 20 21:07:27 2023 +0100 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.gran...@collabora.co.uk> 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();