diff options
Diffstat (limited to 'sfx2/source/view/viewprn.cxx')
-rw-r--r-- | sfx2/source/view/viewprn.cxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx index 2d5403b72abd..4d9016d81f6b 100644 --- a/sfx2/source/view/viewprn.cxx +++ b/sfx2/source/view/viewprn.cxx @@ -329,6 +329,9 @@ void SfxPrinterController::jobFinished( com::sun::star::view::PrintableState nSt if ( m_bNeedsChange ) mpObjectShell->EnableSetModified( m_bOrigStatus ); + + if ( mpViewShell ) + mpViewShell->pImp->pPrinterController = 0; } } @@ -639,6 +642,8 @@ void SfxViewShell::ExecPrint( const uno::Sequence < beans::PropertyValue >& rPro this, rProps ) ); + pImp->pPrinterController = pController.get(); + SfxObjectShell *pObjShell = GetObjectShell(); pController->setValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "JobName" ) ), makeAny( rtl::OUString( pObjShell->GetTitle(0) ) ) ); @@ -653,6 +658,11 @@ void SfxViewShell::ExecPrint( const uno::Sequence < beans::PropertyValue >& rPro Printer::PrintJob( pController, aJobSetup ); } +Printer* SfxViewShell::GetActivePrinter() const +{ + return pImp->pPrinterController ? pImp->pPrinterController->getPrinter().get() : 0; +} + void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq ) { // USHORT nCopies=1; |