summaryrefslogtreecommitdiff
path: root/sw/source/core/doc/DocumentDeviceManager.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-03-28 10:28:25 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-03-29 08:36:18 +0200
commite014ca57fdd40d4e6486cc105d3bb2b32b060b1a (patch)
tree661ad8f3f66d422939522e8745d08dcb0f69b057 /sw/source/core/doc/DocumentDeviceManager.cxx
parent1d13418ce964b827bcdb9b75aa90d4a7a3167a42 (diff)
loplugin:useuniqueptr in DocumentDeviceManager
Change-Id: I051f63173a7b58819d340b00ea237a4164b1dbad Reviewed-on: https://gerrit.libreoffice.org/52030 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/core/doc/DocumentDeviceManager.cxx')
-rw-r--r--sw/source/core/doc/DocumentDeviceManager.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/sw/source/core/doc/DocumentDeviceManager.cxx b/sw/source/core/doc/DocumentDeviceManager.cxx
index f6b93727528b..52b1c9aa7a39 100644
--- a/sw/source/core/doc/DocumentDeviceManager.cxx
+++ b/sw/source/core/doc/DocumentDeviceManager.cxx
@@ -231,7 +231,7 @@ const SwPrintData & DocumentDeviceManager::getPrintData() const
if(!mpPrtData)
{
DocumentDeviceManager * pThis = const_cast< DocumentDeviceManager * >(this);
- pThis->mpPrtData = new SwPrintData;
+ pThis->mpPrtData.reset(new SwPrintData);
// SwPrintData should be initialized from the configuration,
// the respective config item is implemented by SwPrintOptions which
@@ -248,13 +248,13 @@ const SwPrintData & DocumentDeviceManager::getPrintData() const
void DocumentDeviceManager::setPrintData(/*[in]*/ const SwPrintData& rPrtData )
{
if(!mpPrtData)
- mpPrtData = new SwPrintData;
+ mpPrtData.reset(new SwPrintData);
*mpPrtData = rPrtData;
}
DocumentDeviceManager::~DocumentDeviceManager()
{
- delete mpPrtData;
+ mpPrtData.reset();
mpVirDev.disposeAndClear();
mpPrt.disposeAndClear();
}