[Libreoffice-commits] core.git: sw/source
Maxim Monastirsky (via logerrit)
logerrit at kemper.freedesktop.org
Thu Jun 13 21:21:35 UTC 2019
sw/source/uibase/shells/textfld.cxx | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
New commits:
commit 4d11c44673e46b134231ea825c1be36c15f8b263
Author: Maxim Monastirsky <momonasmon at gmail.com>
AuthorDate: Wed Jun 12 01:32:38 2019 +0300
Commit: Maxim Monastirsky <momonasmon at gmail.com>
CommitDate: Thu Jun 13 23:20:43 2019 +0200
tdf#125146 Disable the reply command in UI
... when the focus isn't inside a comment. That's likely
a regression of 6e463381b43d888a632e652a873f2b5abe7e5458
("lok: Allow to reply to comments using postit id"),
which enabled the command also in the text context.
The current solution is to only enable the command when
lok is active, which is where it's used. This is similar
to what is done in the code nearby for FN_REDLINE_COMMENT.
If that turns out to not be enough (e.g. executing the
command useful outside lok), another possible solution
might be to add FastCall = TRUE; to FN_REPLY in
_textsh.sdi. That will allow executing the command via
api even when disabled in ui.
Change-Id: Ibf2248a82599801af63a169fc2d34b27d080c048
Reviewed-on: https://gerrit.libreoffice.org/73972
Tested-by: Jenkins
Reviewed-by: Maxim Monastirsky <momonasmon at gmail.com>
diff --git a/sw/source/uibase/shells/textfld.cxx b/sw/source/uibase/shells/textfld.cxx
index 54b674e6ed38..376fdb2f269c 100644
--- a/sw/source/uibase/shells/textfld.cxx
+++ b/sw/source/uibase/shells/textfld.cxx
@@ -900,12 +900,16 @@ void SwTextShell::StateField( SfxItemSet &rSet )
break;
case FN_REPLY:
+ if (!comphelper::LibreOfficeKit::isActive())
+ rSet.DisableItem(nWhich);
+ break;
+
case FN_POSTIT :
case FN_JAVAEDIT :
{
bool bCurField = false;
pField = rSh.GetCurField();
- if(nWhich == FN_POSTIT || nWhich == FN_REPLY)
+ if(nWhich == FN_POSTIT)
bCurField = pField && pField->GetTyp()->Which() == SwFieldIds::Postit;
else
bCurField = pField && pField->GetTyp()->Which() == SwFieldIds::Script;
More information about the Libreoffice-commits
mailing list