svx/source/form/fmundo.cxx | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-)
New commits: commit b5f8a4e20a248e7966b49bf973c481cb44fe1273 Author: Caolán McNamara <[email protected]> AuthorDate: Sat Oct 7 15:57:19 2023 +0100 Commit: Noel Grandin <[email protected]> CommitDate: Sun Oct 8 17:31:34 2023 +0200 cid#1547086 Logically dead code since: commit 757a73379dba01fde853443a09583d862c404531 Date: Fri Oct 6 09:31:28 2023 +0100 Related: cool#7373 add an SfxHintId::ThisIsAnSfxEventHint luckily this is the only use of SfxHintId::NONE so easy to audit Change-Id: Id593eb3b2c2d26c9552aa7bf6033afd4f3112120 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157626 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Noel Grandin <[email protected]> diff --git a/svx/source/form/fmundo.cxx b/svx/source/form/fmundo.cxx index facf627a7b1c..cd742ef0f3b5 100644 --- a/svx/source/form/fmundo.cxx +++ b/svx/source/form/fmundo.cxx @@ -307,26 +307,26 @@ void FmXUndoEnvironment::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint ) break; } } - else if (rHint.GetId() != SfxHintId::NONE) + else if (rHint.GetId() == SfxHintId::ThisIsAnSfxEventHint) { - switch (rHint.GetId()) + switch (static_cast<const SfxEventHint&>(rHint).GetEventId()) { - case SfxHintId::Dying: - dispose(); - rModel.SetObjectShell( nullptr ); - break; - case SfxHintId::ModeChanged: + case SfxEventHintId::CreateDoc: + case SfxEventHintId::OpenDoc: ModeChanged(); break; default: break; } } - else if (rHint.GetId() == SfxHintId::ThisIsAnSfxEventHint) + else if (rHint.GetId() != SfxHintId::NONE) { - switch (static_cast<const SfxEventHint&>(rHint).GetEventId()) + switch (rHint.GetId()) { - case SfxEventHintId::CreateDoc: - case SfxEventHintId::OpenDoc: + case SfxHintId::Dying: + dispose(); + rModel.SetObjectShell( nullptr ); + break; + case SfxHintId::ModeChanged: ModeChanged(); break; default: break;
