summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/sfx2/sfxbasemodel.hxx2
-rw-r--r--sfx2/source/doc/sfxbasemodel.cxx12
-rw-r--r--sfx2/source/view/viewprn.cxx1
3 files changed, 10 insertions, 5 deletions
diff --git a/include/sfx2/sfxbasemodel.hxx b/include/sfx2/sfxbasemodel.hxx
index b55705b57e1d..8ccd59292e58 100644
--- a/include/sfx2/sfxbasemodel.hxx
+++ b/include/sfx2/sfxbasemodel.hxx
@@ -721,7 +721,7 @@ private:
SAL_DLLPRIVATE void ListenForStorage_Impl( const css::uno::Reference< css::embed::XStorage >& xStorage );
SAL_DLLPRIVATE OUString GetMediumFilterName_Impl() const;
- SAL_DLLPRIVATE void postEvent_Impl( const OUString& aName, const css::uno::Reference< css::frame::XController2 >& xController = css::uno::Reference< css::frame::XController2 >() );
+ SAL_DLLPRIVATE void postEvent_Impl( const OUString& aName, const css::uno::Reference< css::frame::XController2 >& xController = css::uno::Reference< css::frame::XController2 >(), const css::uno::Any& aSupplement = css::uno::Any());
SAL_DLLPRIVATE css::uno::Reference< css::frame::XTitle > impl_getTitleHelper ();
SAL_DLLPRIVATE css::uno::Reference< css::frame::XUntitledNumbers > impl_getUntitledHelper ();
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index 28afbd7e5bad..44cd4216bece 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -2896,7 +2896,13 @@ void SfxBaseModel::Notify( SfxBroadcaster& rBC ,
}
const SfxViewEventHint* pViewHint = dynamic_cast<const SfxViewEventHint*>(&rHint);
- postEvent_Impl( pNamedHint->GetEventName(), pViewHint ? pViewHint->GetController() : Reference< frame::XController2 >() );
+ if (pViewHint)
+ {
+ const SfxPrintingHint* pPrintingHint = dynamic_cast<const SfxPrintingHint*>(&rHint);
+ postEvent_Impl( pNamedHint->GetEventName(), pViewHint->GetController(), pPrintingHint? Any(pPrintingHint->GetWhich()) : Any() );
+ }
+ else
+ postEvent_Impl( pNamedHint->GetEventName(), Reference< frame::XController2 >() );
}
if ( rHint.GetId() == SfxHintId::TitleChanged )
@@ -3223,7 +3229,7 @@ public:
};
} // anonymous namespace
-void SfxBaseModel::postEvent_Impl( const OUString& aName, const Reference< frame::XController2 >& xController )
+void SfxBaseModel::postEvent_Impl( const OUString& aName, const Reference< frame::XController2 >& xController, const Any& supplement )
{
// object already disposed?
if ( impl_isDisposed() )
@@ -3245,7 +3251,7 @@ void SfxBaseModel::postEvent_Impl( const OUString& aName, const Reference< frame
{
SAL_INFO("sfx.doc", "SfxDocumentEvent: " + aName);
- document::DocumentEvent aDocumentEvent( static_cast<frame::XModel*>(this), aName, xController, Any() );
+ document::DocumentEvent aDocumentEvent( static_cast<frame::XModel*>(this), aName, xController, supplement );
pIC->forEach< document::XDocumentEventListener, NotifySingleListenerIgnoreRE< document::XDocumentEventListener, document::DocumentEvent > >(
NotifySingleListenerIgnoreRE< document::XDocumentEventListener, document::DocumentEvent >(
diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx
index dbf84dde0d3c..f6cd8936ee84 100644
--- a/sfx2/source/view/viewprn.cxx
+++ b/sfx2/source/view/viewprn.cxx
@@ -313,7 +313,6 @@ void SfxPrinterController::jobStarted()
xDocProps->setPrintDate( now.GetUNODateTime() );
- SfxGetpApp()->NotifyEvent( SfxEventHint(SfxEventHintId::PrintDoc, GlobalEventConfig::GetEventName( GlobalEventId::PRINTDOC ), mpObjectShell ) );
uno::Sequence < beans::PropertyValue > aOpts;
aOpts = getJobProperties( aOpts );