diff options
-rw-r--r-- | sfx2/source/view/viewimp.hxx | 2 | ||||
-rw-r--r-- | sfx2/source/view/viewprn.cxx | 9 |
2 files changed, 7 insertions, 4 deletions
diff --git a/sfx2/source/view/viewimp.hxx b/sfx2/source/view/viewimp.hxx index 1c9e219cf180..be20cd2f2a47 100644 --- a/sfx2/source/view/viewimp.hxx +++ b/sfx2/source/view/viewimp.hxx @@ -75,7 +75,7 @@ struct SfxViewShell_Impl ::svt::AcceleratorExecute* pAccExec; com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue > aPrintOpts; ::rtl::Reference< SfxClipboardChangeListener > xClipboardListener; - vcl::PrinterController* pPrinterController; + ::boost::shared_ptr< vcl::PrinterController > m_pPrinterController; SfxViewShell_Impl(); }; diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx index f62ae4c1ddc7..5b317e4b770b 100644 --- a/sfx2/source/view/viewprn.cxx +++ b/sfx2/source/view/viewprn.cxx @@ -332,7 +332,9 @@ void SfxPrinterController::jobFinished( com::sun::star::view::PrintableState nSt mpObjectShell->EnableSetModified( m_bOrigStatus ); if ( mpViewShell ) - mpViewShell->pImp->pPrinterController = 0; + { + mpViewShell->pImp->m_pPrinterController.reset(); + } } } @@ -643,7 +645,7 @@ void SfxViewShell::ExecPrint( const uno::Sequence < beans::PropertyValue >& rPro this, rProps ) ); - pImp->pPrinterController = pController.get(); + pImp->m_pPrinterController = pController; SfxObjectShell *pObjShell = GetObjectShell(); pController->setValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "JobName" ) ), @@ -661,7 +663,8 @@ void SfxViewShell::ExecPrint( const uno::Sequence < beans::PropertyValue >& rPro Printer* SfxViewShell::GetActivePrinter() const { - return pImp->pPrinterController ? pImp->pPrinterController->getPrinter().get() : 0; + return (pImp->m_pPrinterController) + ? pImp->m_pPrinterController->getPrinter().get() : 0; } void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq ) |