sw/source/uibase/docvw/PostItMgr.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
New commits: commit e70b7edfb1bb8bcbde272f0152c51ae193e115d7 Author: Noel Grandin <noelgran...@gmail.com> AuthorDate: Mon May 27 21:17:39 2024 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Tue May 28 16:13:12 2024 +0200 no need to dynamic_cast here Change-Id: I636f29e253d4fa9f0263d0ec79580e96b432cd3b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168122 Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> Tested-by: Jenkins diff --git a/sw/source/uibase/docvw/PostItMgr.cxx b/sw/source/uibase/docvw/PostItMgr.cxx index 8a2ab40317ed..ebd1223c586d 100644 --- a/sw/source/uibase/docvw/PostItMgr.cxx +++ b/sw/source/uibase/docvw/PostItMgr.cxx @@ -447,8 +447,9 @@ void SwPostItMgr::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) } } } - else if ( const SfxStyleSheetModifiedHint * pStyleHint = dynamic_cast<const SfxStyleSheetModifiedHint*>(&rHint) ) + else if ( rHint.GetId() == SfxHintId::StyleSheetModifiedExtended ) { + const SfxStyleSheetModifiedHint * pStyleHint = static_cast<const SfxStyleSheetModifiedHint*>(&rHint); for (const auto& postItField : mvPostItFields) { auto pField = static_cast<SwPostItField*>(postItField->GetFormatField().GetField());