summaryrefslogtreecommitdiff
path: root/sw/inc/flddat.hxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-07-04 10:07:46 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-07-10 12:27:54 +0200
commit1a33947a91685808fd5f6d4903b6ae896686066d (patch)
tree2a9454c3df148a16c3d4b14c3cfd1c9e10916da3 /sw/inc/flddat.hxx
parentb7e75f974962db49d29d2f5261dce4de5cd42d3e (diff)
pass SwField around by std::unique_ptr
Fix leak in SwFieldPage::InsertField, where it interacts badly with SwFieldMgr::UpdateCurField The awkward return std::unique_ptr<SwField>(pTmp.release()); code is because clang 3.8.0 doesn't seem able to do auto-upcast of std::unique_ptr. Change-Id: I05b748e9cda145fd972a01bfa343239df32368b9 Reviewed-on: https://gerrit.libreoffice.org/57197 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/inc/flddat.hxx')
-rw-r--r--sw/inc/flddat.hxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/inc/flddat.hxx b/sw/inc/flddat.hxx
index dc5d2d6ee0db..9ffdc71c63ed 100644
--- a/sw/inc/flddat.hxx
+++ b/sw/inc/flddat.hxx
@@ -46,7 +46,7 @@ class SW_DLLPUBLIC SwDateTimeField : public SwValueField
long nOffset; // Offset in minutes.
virtual OUString Expand() const override;
- virtual SwField* Copy() const override;
+ virtual std::unique_ptr<SwField> Copy() const override;
public:
SwDateTimeField(SwDateTimeFieldType* pType, sal_uInt16 nSubType = DATEFLD,