diff options
author | obo <obo@openoffice.org> | 2010-06-14 15:36:30 +0200 |
---|---|---|
committer | obo <obo@openoffice.org> | 2010-06-14 15:36:30 +0200 |
commit | d90357ca774dd72600c7498045d714375bb670ad (patch) | |
tree | 30b1cdc4d2a348a873f8e702365e7e2b41f52c9f /sfx2 | |
parent | 96168bd89412720e3ee2a37647ff0b8394750f0b (diff) | |
parent | 2ff2cdeb55a0a7a66b26d78eda8f8632d043ed1c (diff) |
CWS-TOOLING: integrate CWS vcl111
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/view/viewprn.cxx | 45 |
1 files changed, 23 insertions, 22 deletions
diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx index 4d9016d81f6b..f62ae4c1ddc7 100644 --- a/sfx2/source/view/viewprn.cxx +++ b/sfx2/source/view/viewprn.cxx @@ -129,28 +129,6 @@ SfxPrinterController::SfxPrinterController( const Any& i_rComplete, StartListening( *mpViewShell ); mpObjectShell = mpViewShell->GetObjectShell(); StartListening( *mpObjectShell ); - m_bOrigStatus = mpObjectShell->IsEnableSetModified(); - - // check configuration: shall update of printing information in DocInfo set the document to "modified"? - if ( m_bOrigStatus && !SvtPrintWarningOptions().IsModifyDocumentOnPrintingAllowed() ) - { - mpObjectShell->EnableSetModified( sal_False ); - m_bNeedsChange = sal_True; - } - - // refresh document info - uno::Reference<document::XDocumentProperties> xDocProps(mpObjectShell->getDocProperties()); - m_aLastPrintedBy = xDocProps->getPrintedBy(); - m_aLastPrinted = xDocProps->getPrintDate(); - - xDocProps->setPrintedBy( mpObjectShell->IsUseUserData() - ? ::rtl::OUString( SvtUserOptions().GetFullName() ) - : ::rtl::OUString() ); - ::DateTime now; - - xDocProps->setPrintDate( util::DateTime( - now.Get100Sec(), now.GetSec(), now.GetMin(), now.GetHour(), - now.GetDay(), now.GetMonth(), now.GetYear() ) ); } // initialize extra ui options @@ -283,6 +261,29 @@ void SfxPrinterController::jobStarted() { if ( mpObjectShell ) { + m_bOrigStatus = mpObjectShell->IsEnableSetModified(); + + // check configuration: shall update of printing information in DocInfo set the document to "modified"? + if ( m_bOrigStatus && !SvtPrintWarningOptions().IsModifyDocumentOnPrintingAllowed() ) + { + mpObjectShell->EnableSetModified( sal_False ); + m_bNeedsChange = sal_True; + } + + // refresh document info + uno::Reference<document::XDocumentProperties> xDocProps(mpObjectShell->getDocProperties()); + m_aLastPrintedBy = xDocProps->getPrintedBy(); + m_aLastPrinted = xDocProps->getPrintDate(); + + xDocProps->setPrintedBy( mpObjectShell->IsUseUserData() + ? ::rtl::OUString( SvtUserOptions().GetFullName() ) + : ::rtl::OUString() ); + ::DateTime now; + + xDocProps->setPrintDate( util::DateTime( + now.Get100Sec(), now.GetSec(), now.GetMin(), now.GetHour(), + now.GetDay(), now.GetMonth(), now.GetYear() ) ); + // FIXME: how to get all print options incl. AdditionalOptions easily? uno::Sequence < beans::PropertyValue > aOpts; mpObjectShell->Broadcast( SfxPrintingHint( view::PrintableState_JOB_STARTED, aOpts ) ); |