summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGulsah Kose <gulsah.1004@gmail.com>2017-10-17 15:09:37 +0300
committerCaolán McNamara <caolanm@redhat.com>2017-10-18 22:11:57 +0200
commita429282ee0818b8770a9c6d172655178e43c90a4 (patch)
tree15fe63754b296bdded9a441746aabb7f77bef3de
parent366beabc786c004fc7ff1b2bb2f606b0ee257a95 (diff)
tdf#112808 Disable "Edit Region" command while cursor in an index.
Change-Id: Icefa1e42831ad0ba7a9f5346545adac0033ce3e0 Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/43456 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> (cherry picked from commit e149c4f3dcd08b9331dbbecf31c200d4d3bb02b5) Reviewed-on: https://gerrit.libreoffice.org/43511 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--sw/source/uibase/shells/basesh.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx
index 48c4a0d0d7ca..4ed0849265ff 100644
--- a/sw/source/uibase/shells/basesh.cxx
+++ b/sw/source/uibase/shells/basesh.cxx
@@ -1397,8 +1397,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: