Kaydet (Commit) 942f50e7 authored tarafından Michael Stahl's avatar Michael Stahl

sw: fix invalid downcast in sw::UndoManager::Repeat()

(regression from 64ea8306)

Change-Id: Ie5343b9911feea329fc176f0abe31edc9e68a33e
üst 7a47058e
......@@ -661,7 +661,15 @@ bool UndoManager::Repeat(::sw::RepeatContext & rContext,
OUString const comment(pRepeatAction->GetComment());
OUString const rcomment(pRepeatAction->GetRepeatComment(rContext));
SwUndoId const nId(static_cast<const SwUndo*>(pRepeatAction)->GetId());
auto const*const pListAction(dynamic_cast<SfxListUndoAction *>(pRepeatAction));
auto const*const pSwAction(dynamic_cast<SwUndo *>(pRepeatAction));
if (!pListAction && !pSwAction)
{
return false;
}
SwUndoId const nId((pSwAction)
? pSwAction->GetId()
: static_cast<SwUndoId>(pListAction->GetId()));
if (DoesUndo())
{
ViewShellId nViewShellId(-1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment