Kaydet (Commit) 08e0a79a authored tarafından Jan Holesovsky's avatar Jan Holesovsky

spell dialog: Make [Close] work in protected documents with editable fields.

We have to call ToggleChildWindow directly; calling SfxDispatcher's Execute()
does not work here when we are in a document with protected section - in that
case, the cursor can move from the editable field to the protected area, and
the slots get disabled because of SW_DISABLE_ON_PROTECTED_CURSOR (see
FN_SPELL_GRAMMAR_DIALOG in .sdi).

Change-Id: I1c310c028aaaf774431d0b1e6bba10e901a8166d
üst 7ac1522d
...@@ -736,9 +736,13 @@ IMPL_LINK_NOARG(SpellDialog, IgnoreHdl) ...@@ -736,9 +736,13 @@ IMPL_LINK_NOARG(SpellDialog, IgnoreHdl)
bool SpellDialog::Close() bool SpellDialog::Close()
{ {
GetBindings().GetDispatcher()-> // We have to call ToggleChildWindow directly; calling SfxDispatcher's
Execute(rParent.GetType(), // Execute() does not work here when we are in a document with protected
SfxCallMode::ASYNCHRON|SfxCallMode::RECORD); // section - in that case, the cursor can move from the editable field to
// the protected area, and the slots get disabled because of
// SW_DISABLE_ON_PROTECTED_CURSOR (see FN_SPELL_GRAMMAR_DIALOG in .sdi).
SfxViewFrame::Current()->ToggleChildWindow(rParent.GetType());
return true; return true;
} }
......
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