From e149c4f3dcd08b9331dbbecf31c200d4d3bb02b5 Mon Sep 17 00:00:00 2001 From: Gulsah Kose Date: Tue, 17 Oct 2017 15:09:37 +0300 Subject: tdf#112808 Disable "Edit Region" command while cursor in an index. Change-Id: Icefa1e42831ad0ba7a9f5346545adac0033ce3e0 Signed-off-by: Gulsah Kose Reviewed-on: https://gerrit.libreoffice.org/43456 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt --- sw/source/uibase/shells/basesh.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx index 8dbfd4e91cc8..c053715bd4ad 100644 --- a/sw/source/uibase/shells/basesh.cxx +++ b/sw/source/uibase/shells/basesh.cxx @@ -1398,8 +1398,12 @@ void SwBaseShell::GetState( SfxItemSet &rSet ) break; case FN_EDIT_CURRENT_REGION: - if( !rSh.GetCurrSection() ) + //tdf#112808 if cursor is in an index, don't show the edit section. + if( !rSh.GetCurrSection() || + rSh.GetCurrSection()->GetType() != CONTENT_SECTION ) + { rSet.DisableItem(nWhich); + } break; case FN_INSERT_REGION: -- cgit