[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - sw/source
Maxim Monastirsky (via logerrit)
logerrit at kemper.freedesktop.org
Fri Jun 14 05:39:40 UTC 2019
sw/source/uibase/shells/textfld.cxx | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
New commits:
commit 6a1248e86feb2722843133c1d75be82c811b9d30
Author: Maxim Monastirsky <momonasmon at gmail.com>
AuthorDate: Wed Jun 12 01:32:38 2019 +0300
Commit: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
CommitDate: Fri Jun 14 07:38:52 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>
(cherry picked from commit 4d11c44673e46b134231ea825c1be36c15f8b263)
Reviewed-on: https://gerrit.libreoffice.org/73994
Reviewed-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
diff --git a/sw/source/uibase/shells/textfld.cxx b/sw/source/uibase/shells/textfld.cxx
index a71969f6acfb..cc5887255159 100644
--- a/sw/source/uibase/shells/textfld.cxx
+++ b/sw/source/uibase/shells/textfld.cxx
@@ -899,12 +899,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