[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - sw/source

Gulsah Kose gulsah.1004 at gmail.com
Wed Oct 18 20:12:20 UTC 2017


 sw/source/uibase/shells/basesh.cxx |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit a429282ee0818b8770a9c6d172655178e43c90a4
Author: Gulsah Kose <gulsah.1004 at gmail.com>
Date:   Tue Oct 17 15:09:37 2017 +0300

    tdf#112808 Disable "Edit Region" command while cursor in an index.
    
    Change-Id: Icefa1e42831ad0ba7a9f5346545adac0033ce3e0
    Signed-off-by: Gulsah Kose <gulsah.1004 at gmail.com>
    Reviewed-on: https://gerrit.libreoffice.org/43456
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
    (cherry picked from commit e149c4f3dcd08b9331dbbecf31c200d4d3bb02b5)
    Reviewed-on: https://gerrit.libreoffice.org/43511
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

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:


More information about the Libreoffice-commits mailing list