summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2014-12-18 21:42:13 +0100
committerAndras Timar <andras.timar@collabora.com>2014-12-18 22:44:17 +0100
commit7d526bd5b97ce6c627f1e0d6ec540d9acb820621 (patch)
treebbfd5a35e248f990bba01cc366a01511d01e54e5
parentd156a160a45337fdcdca25515cb8c723d799cb21 (diff)
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). (cherry picked from commit 08e0a79aeba6fd41cbb51de3be48659619f27206) Conflicts: cui/source/dialogs/SpellDialog.cxx Change-Id: I1c310c028aaaf774431d0b1e6bba10e901a8166d
-rw-r--r--cui/source/dialogs/SpellDialog.cxx14
1 files changed, 9 insertions, 5 deletions
diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx
index 5eb92a36cd8a..060222386cda 100644
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -736,16 +736,20 @@ IMPL_LINK_NOARG(SpellDialog, IgnoreHdl)
return 1;
}
-// -----------------------------------------------------------------------
+
sal_Bool SpellDialog::Close()
{
- GetBindings().GetDispatcher()->
- Execute(rParent.GetType(),
- SFX_CALLMODE_ASYNCHRON|SFX_CALLMODE_RECORD);
+ // 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).
+ SfxViewFrame::Current()->ToggleChildWindow(rParent.GetType());
+
return sal_True;
}
-// -----------------------------------------------------------------------
+
void SpellDialog::SetSelectedLang_Impl( LanguageType nLang )
{