diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-09-21 13:37:17 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-09-21 19:34:16 +0000 |
commit | 599fab44ad2ca626f046b9e9e4924110950a897c (patch) | |
tree | 4304f1e7f0ab68f88b105f5779b8ec619e176c12 /basctl | |
parent | da4c217ac49ff05e352c0e6e46a46a4e9a0b78cc (diff) |
hide ScopedPtr::reset and add disposeAndClear
Change-Id: I55d6e789abd408b8478a2b9ae141d8899af2c309
Reviewed-on: https://gerrit.libreoffice.org/18745
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'basctl')
-rw-r--r-- | basctl/source/basicide/basdoc.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
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<SfxPrinter>::Create(new SfxItemSet( + pPrinter.disposeAndReset(VclPtr<SfxPrinter>::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); } } |