summaryrefslogtreecommitdiff
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
commit582b6791e275667b93b0ab45bf9a5811758e9e5d (patch)
treea93376baa932e41e3e23287d43b264807228c522
parent9dde059672329b06222cf0b26fd0710e2928387b (diff)
sw33bf06: #i112566#: SfxViewShell_Impl::pPrinterController -> boost::shared_ptr
-rw-r--r--sfx2/source/view/viewimp.hxx4
-rw-r--r--sfx2/source/view/viewprn.cxx11
2 files changed, 9 insertions, 6 deletions
diff --git a/sfx2/source/view/viewimp.hxx b/sfx2/source/view/viewimp.hxx
index 1f7607ac0b..24dc647130 100644
--- a/sfx2/source/view/viewimp.hxx
+++ b/sfx2/source/view/viewimp.hxx
@@ -75,8 +75,8 @@ 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 b4e6b05f7b..f6854f0f36 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,8 +645,8 @@ 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" ) ),
makeAny( rtl::OUString( pObjShell->GetTitle(0) ) ) );
@@ -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 )