From ee204f8f54de5bef526f2ad7fc78a425b196bb63 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 31 Oct 2018 09:23:15 +0200 Subject: loplugin:useuniqueptr in SwDoc::GetRowHeight and GetRowSplit fixing a memory leak in the process Change-Id: I1b168159a8aa23e392768c49127f42b72e1ce3b3 Reviewed-on: https://gerrit.libreoffice.org/63128 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sw/source/ui/table/rowht.cxx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'sw/source/ui') diff --git a/sw/source/ui/table/rowht.cxx b/sw/source/ui/table/rowht.cxx index 2a46f3e36629..066209e6389a 100644 --- a/sw/source/ui/table/rowht.cxx +++ b/sw/source/ui/table/rowht.cxx @@ -58,15 +58,12 @@ SwTableHeightDlg::SwTableHeightDlg(weld::Window *pParent, SwWrtShell &rS) ::SetFieldUnit(*m_xHeightEdit, eFieldUnit); m_xHeightEdit->set_min(MINLAY, FieldUnit::TWIP); - SwFormatFrameSize *pSz; - m_rSh.GetRowHeight(pSz); + std::unique_ptr pSz = m_rSh.GetRowHeight(); if (pSz) { auto nHeight = pSz->GetHeight(); m_xAutoHeightCB->set_active(pSz->GetHeightSizeType() != ATT_FIX_SIZE); m_xHeightEdit->set_value(m_xHeightEdit->normalize(nHeight), FieldUnit::TWIP); - - delete pSz; } } -- cgit