summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Monastirsky <momonasmon@gmail.com>2019-06-12 01:32:38 +0300
committerMaxim Monastirsky <momonasmon@gmail.com>2019-06-13 23:20:43 +0200
commit4d11c44673e46b134231ea825c1be36c15f8b263 (patch)
treec7957ec2cebc1e6ed6d893660fb9a537a9b2a1d0
parentdc326926b0adc35b6ebefa7705ee5a3f133f5c88 (diff)
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@gmail.com>
-rw-r--r--sw/source/uibase/shells/textfld.cxx6
1 files changed, 5 insertions, 1 deletions
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;