summaryrefslogtreecommitdiff
path: root/sw/source/ui
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-10-31 09:23:15 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-11-09 06:41:05 +0100
commitee204f8f54de5bef526f2ad7fc78a425b196bb63 (patch)
tree76f06140e2b884fec421fba9775cb71cecd5e650 /sw/source/ui
parent939de6a6a262b354a291981f62f00310776d63e7 (diff)
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 <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/ui')
-rw-r--r--sw/source/ui/table/rowht.cxx5
1 files changed, 1 insertions, 4 deletions
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<SwFormatFrameSize> 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;
}
}