cui/source/dialogs/SpellDialog.cxx | 14 +-
1 file changed, 9 insertions(+), 5 deletions(-)
New commits:
commit 7d526bd5b97ce6c627f1e0d6ec540d9acb820621
Author: Jan Holesovsky ke...@collabora.com
Date: Thu Dec 18 21:42:13 2014 +0100
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
diff --git a/cui/source/dialogs/SpellDialog.cxx
b/cui/source/dialogs/SpellDialog.cxx
index 5eb92a3..0602223 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 )
{
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits