From 599fab44ad2ca626f046b9e9e4924110950a897c Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 21 Sep 2015 13:37:17 +0100 Subject: hide ScopedPtr::reset and add disposeAndClear MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I55d6e789abd408b8478a2b9ae141d8899af2c309 Reviewed-on: https://gerrit.libreoffice.org/18745 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- basctl/source/basicide/basdoc.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'basctl') diff --git a/basctl/source/basicide/basdoc.cxx b/basctl/source/basicide/basdoc.cxx index 1c878d826cc4..b969c27e382f 100644 --- a/basctl/source/basicide/basdoc.cxx +++ b/basctl/source/basicide/basdoc.cxx @@ -58,7 +58,7 @@ DocShell::~DocShell() SfxPrinter* DocShell::GetPrinter( bool bCreate ) { if ( !pPrinter && bCreate ) - pPrinter.reset(VclPtr::Create(new SfxItemSet( + pPrinter.disposeAndReset(VclPtr::Create(new SfxItemSet( GetPool(), SID_PRINTER_NOTFOUND_WARN, SID_PRINTER_NOTFOUND_WARN ))); @@ -69,8 +69,7 @@ void DocShell::SetPrinter( SfxPrinter* pPr ) { if (pPr != pPrinter.get()) { - pPrinter.disposeAndClear(); - pPrinter.reset(pPr); + pPrinter.disposeAndReset(pPr); } } -- cgit