summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorMichael Stahl <mst@openoffice.org>2010-07-01 18:24:05 +0200
committerMichael Stahl <mst@openoffice.org>2010-07-01 18:24:05 +0200
commitd73100a4f9999f144ce5d9a8b64428fd9830da5e (patch)
tree108ecf61a8f5581185557a0a4c3960450de2214a /sfx2
parent808ca71f90448749170530d561394407dadfb076 (diff)
sw33bf06: #i112566#: SfxViewShell_Impl::pPrinterController -> boost::shared_ptr
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/view/viewimp.hxx2
-rw-r--r--sfx2/source/view/viewprn.cxx9
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 )