summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2021-11-29 22:41:51 +0200
committerMike Kaganski <mike.kaganski@collabora.com>2021-11-29 22:50:33 +0100
commit84783cc90b504b114f9adc94955253a5cf382abb (patch)
tree11f876101bcce7db311ca22ad3c75eec013f1bea /sfx2
parentf7a628f8efe037c1fd7e594eb4b8fc6a44573384 (diff)
A small simplification
Change-Id: I222cb2cfcbd9d82c78fc17936f35ced0b21691b9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126089 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/doc/sfxbasemodel.cxx11
1 files changed, 4 insertions, 7 deletions
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index 44cd4216bece..a0587f9bb079 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -2895,14 +2895,11 @@ void SfxBaseModel::Notify( SfxBroadcaster& rBC ,
default: break;
}
+ Any aSupplement;
+ if (const SfxPrintingHint* pPrintingHint = dynamic_cast<const SfxPrintingHint*>(&rHint))
+ aSupplement <<= pPrintingHint->GetWhich();
const SfxViewEventHint* pViewHint = dynamic_cast<const SfxViewEventHint*>(&rHint);
- 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 >() );
+ postEvent_Impl( pNamedHint->GetEventName(), pViewHint ? pViewHint->GetController() : Reference< frame::XController2 >(), aSupplement );
}
if ( rHint.GetId() == SfxHintId::TitleChanged )