From 9bba3a604d12566bfb5e8ab8d2788fe8d3690a96 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 8 Nov 2023 18:24:07 +0200 Subject: use more concrete type in ImpEditEngine::SetUndoManager instead of dynamic_cast'ing to the type we want, and __ignoring__ the parameter if it is not, just adjust the type that we want, which luckily everything is already sending Change-Id: If083e11c9818cdcae199afc1261efbdb652e1c76 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159295 Tested-by: Jenkins Reviewed-by: Noel Grandin --- cui/source/dialogs/SpellDialog.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'cui') diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx index 67de5235d1ad..80e1301dcaf8 100644 --- a/cui/source/dialogs/SpellDialog.cxx +++ b/cui/source/dialogs/SpellDialog.cxx @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -2078,7 +2079,7 @@ svx::SpellPortions SentenceEditWindow_Impl::CreateSpellPortions() const void SentenceEditWindow_Impl::Undo() { - SfxUndoManager& rUndoMgr = m_xEditEngine->GetUndoManager(); + EditUndoManager& rUndoMgr = m_xEditEngine->GetUndoManager(); DBG_ASSERT(GetUndoActionCount(), "no undo actions available" ); if(!GetUndoActionCount()) return; @@ -2097,13 +2098,13 @@ void SentenceEditWindow_Impl::Undo() void SentenceEditWindow_Impl::ResetUndo() { - SfxUndoManager& rUndo = m_xEditEngine->GetUndoManager(); + EditUndoManager& rUndo = m_xEditEngine->GetUndoManager(); rUndo.Clear(); } void SentenceEditWindow_Impl::AddUndoAction( std::unique_ptr pAction ) { - SfxUndoManager& rUndoMgr = m_xEditEngine->GetUndoManager(); + EditUndoManager& rUndoMgr = m_xEditEngine->GetUndoManager(); rUndoMgr.AddUndoAction(std::move(pAction)); GetSpellDialog()->m_xUndoPB->set_sensitive(true); } -- cgit