summaryrefslogtreecommitdiff
path: root/sd/source/ui/docshell
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-06-13 18:03:18 +0200
committerStephan Bergmann <sbergman@redhat.com>2017-06-13 18:03:18 +0200
commitcbdd3c32703fd21b6911b5a6fc5803faeed9befb (patch)
tree34d88820a086096e8f36c00c0c68dad1269ffc41 /sd/source/ui/docshell
parent423dacde87cbb3cba466c9701ed10dadc2b8b4e0 (diff)
Use unique_ptr for SfxPrinter::pOptions
Change-Id: I46be77225c0323f8b7f293de9c022f0de6f425b7
Diffstat (limited to 'sd/source/ui/docshell')
-rw-r--r--sd/source/ui/docshell/docshel4.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx
index 1e4c7c885d94..3f680f6871f2 100644
--- a/sd/source/ui/docshell/docshel4.cxx
+++ b/sd/source/ui/docshell/docshel4.cxx
@@ -20,6 +20,7 @@
#include <sal/config.h>
#include <memory>
+#include <utility>
#include "DrawDocShell.hxx"
#include <com/sun/star/document/PrinterIndependentLayout.hpp>
@@ -98,7 +99,7 @@ SfxPrinter* DrawDocShell::GetPrinter(bool bCreate)
if (bCreate && !mpPrinter)
{
// create ItemSet with special pool area
- SfxItemSet* pSet = new SfxItemSet( GetPool(),
+ auto pSet = o3tl::make_unique<SfxItemSet>( GetPool(),
SID_PRINTER_NOTFOUND_WARN, SID_PRINTER_NOTFOUND_WARN,
SID_PRINTER_CHANGESTODOC, SID_PRINTER_CHANGESTODOC,
ATTR_OPTIONS_PRINT, ATTR_OPTIONS_PRINT,
@@ -115,7 +116,7 @@ SfxPrinter* DrawDocShell::GetPrinter(bool bCreate)
pSet->Put( SfxBoolItem( SID_PRINTER_NOTFOUND_WARN, aPrintItem.GetOptionsPrint().IsWarningPrinter() ) );
pSet->Put( aFlagItem );
- mpPrinter = VclPtr<SfxPrinter>::Create(pSet);
+ mpPrinter = VclPtr<SfxPrinter>::Create(std::move(pSet));
mbOwnPrinter = true;
// set output quality