diff options
author | Noel Grandin <noel@peralex.com> | 2015-03-19 13:54:12 +0200 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2015-04-10 12:10:43 +0100 |
commit | 820576af4fd6441a752742b43d804e9837839925 (patch) | |
tree | 205b0a04d1bd5063ad3005b9679c1facea2ca2c8 /svtools/source/dialogs/prnsetup.cxx | |
parent | bf739995fc97ed61a586e949a868ac67fc3b7d95 (diff) |
start wrapping OutputDevice in VclPtr
Change-Id: If3ecbb0599b50d50ce6b3997ca7892200c332ffe
Diffstat (limited to 'svtools/source/dialogs/prnsetup.cxx')
-rw-r--r-- | svtools/source/dialogs/prnsetup.cxx | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/svtools/source/dialogs/prnsetup.cxx b/svtools/source/dialogs/prnsetup.cxx index 42b78542ca87..d6f35ef39fdd 100644 --- a/svtools/source/dialogs/prnsetup.cxx +++ b/svtools/source/dialogs/prnsetup.cxx @@ -73,7 +73,7 @@ Printer* ImplPrnDlgListBoxSelect( ListBox* pBox, PushButton* pPropBtn, if ( (pTempPrinter->GetName() != pInfo->GetPrinterName()) || (pTempPrinter->GetDriverName() != pInfo->GetDriver()) ) { - delete pTempPrinter; + VclPtr<Printer>(pTempPrinter).disposeAndClear(); pTempPrinter = new Printer( *pInfo ); } } @@ -101,8 +101,7 @@ Printer* ImplPrnDlgUpdatePrinter( Printer* pPrinter, Printer* pTempPrinter ) if ( ! Printer::GetQueueInfo( aPrnName, false ) ) { - if ( pTempPrinter ) - delete pTempPrinter; + VclPtr<Printer>(pTempPrinter).disposeAndClear(); pTempPrinter = new Printer; } @@ -251,8 +250,6 @@ PrinterSetupDialog::~PrinterSetupDialog() void PrinterSetupDialog::dispose() { ImplFreePrnDlgListBox(m_pLbName, false); - delete mpTempPrinter; - mpTempPrinter = NULL; m_pLbName.clear(); m_pBtnProperties.clear(); m_pBtnOptions.clear(); @@ -260,11 +257,11 @@ void PrinterSetupDialog::dispose() m_pFiType.clear(); m_pFiLocation.clear(); m_pFiComment.clear(); + mpTempPrinter.disposeAndClear(); + mpPrinter.clear(); ModalDialog::dispose(); } - - void PrinterSetupDialog::SetOptionsHdl( const Link& rLink ) { m_pBtnOptions->SetClickHdl( rLink ); |