summaryrefslogtreecommitdiff
path: root/sw/inc
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/inc
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/inc')
-rw-r--r--sw/inc/doc.hxx4
-rw-r--r--sw/inc/fesh.hxx4
2 files changed, 4 insertions, 4 deletions
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index 6688f19ae77e..1ab0b0775f4c 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -1431,9 +1431,9 @@ public:
const bool _bPosCorr );
void SetRowHeight( const SwCursor& rCursor, const SwFormatFrameSize &rNew );
- static void GetRowHeight( const SwCursor& rCursor, SwFormatFrameSize *& rpSz );
+ static std::unique_ptr<SwFormatFrameSize> GetRowHeight( const SwCursor& rCursor );
void SetRowSplit( const SwCursor& rCursor, const SwFormatRowSplit &rNew );
- static void GetRowSplit( const SwCursor& rCursor, SwFormatRowSplit *& rpSz );
+ static std::unique_ptr<SwFormatRowSplit> GetRowSplit( const SwCursor& rCursor );
/// Adjustment of Rowheights. Determine via bTstOnly if more than one row is selected.
/// bOptimize: distribute current table height, instead of using the largest row.
diff --git a/sw/inc/fesh.hxx b/sw/inc/fesh.hxx
index 6bf34ba62f2c..5d45fa3e6621 100644
--- a/sw/inc/fesh.hxx
+++ b/sw/inc/fesh.hxx
@@ -647,10 +647,10 @@ public:
void SetRowHeight( const SwFormatFrameSize &rSz );
/// Pointer must be destroyed by caller != 0.
- void GetRowHeight( SwFormatFrameSize *&rpSz ) const;
+ std::unique_ptr<SwFormatFrameSize> GetRowHeight() const;
void SetRowSplit( const SwFormatRowSplit &rSz );
- void GetRowSplit( SwFormatRowSplit *&rpSz ) const;
+ std::unique_ptr<SwFormatRowSplit> GetRowSplit() const;
void SetBoxAlign( sal_uInt16 nOrient );
sal_uInt16 GetBoxAlign() const; ///< USHRT_MAX if ambiguous.