[Libreoffice-commits] core.git: Branch 'distro/nisz/libreoffice-7-1' - sc/source

Tünde Tóth (via logerrit) logerrit at kemper.freedesktop.org
Fri Jul 2 09:00:02 UTC 2021


 sc/source/ui/view/cellsh.cxx   |    3 ++-
 sc/source/ui/view/viewfunc.cxx |    3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

New commits:
commit eab10905a0cb1082ccbe85bfb82b61c0203f9236
Author:     Tünde Tóth <toth.tunde at nisz.hu>
AuthorDate: Tue May 11 11:21:35 2021 +0200
Commit:     Gabor Kelemen <kelemen.gabor2 at nisz.hu>
CommitDate: Fri Jul 2 10:59:23 2021 +0200

    tdf#57351 sc UI: fix disabled Insert Columns options
    
    In a sheet with active autofilter or standard filter,
    Insert Columns Before/After weren't available in the
    context menu of the column header and in Sheet->Insert
    Columns...
    
    Change-Id: I746d7d5a451848306d67d57e42d3981c471c66f2
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115400
    Tested-by: László Németh <nemeth at numbertext.org>
    Reviewed-by: László Németh <nemeth at numbertext.org>
    (cherry picked from commit a2c4a033d49c23d20761b2881135ec3a72f25b01)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118259
    Tested-by: Gabor Kelemen <kelemen.gabor2 at nisz.hu>
    Reviewed-by: Gabor Kelemen <kelemen.gabor2 at nisz.hu>

diff --git a/sc/source/ui/view/cellsh.cxx b/sc/source/ui/view/cellsh.cxx
index 40ef53336bd4..d77fd5a8f470 100644
--- a/sc/source/ui/view/cellsh.cxx
+++ b/sc/source/ui/view/cellsh.cxx
@@ -254,7 +254,8 @@ void ScCellShell::GetBlockState( SfxItemSet& rSet )
                 if (nWhich == FID_INS_COLUMNS_AFTER)
                     eAction = sc::ColRowEditAction::InsertColumnsAfter;
 
-                bDisable = (!bSimpleArea) || GetViewData()->SimpleRowMarked();
+                bDisable = (!bSimpleArea && eMarkType != SC_MARK_SIMPLE_FILTERED)
+                           || GetViewData()->SimpleRowMarked();
                 if (!bEditable && nRow1 == 0 && nRow2 == rDoc.MaxRow())
                 {
                     // See if row insertions are allowed.
diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx
index 14e80c98cd16..2b0d0ff76a48 100644
--- a/sc/source/ui/view/viewfunc.cxx
+++ b/sc/source/ui/view/viewfunc.cxx
@@ -1600,7 +1600,8 @@ void ScViewFunc::OnLOKSetWidthOrHeight(SCCOLROW nStart, bool bWidth)
 bool ScViewFunc::InsertCells( InsCellCmd eCmd, bool bRecord, bool bPartOfPaste )
 {
     ScRange aRange;
-    if (GetViewData().GetSimpleArea(aRange) == SC_MARK_SIMPLE)
+    ScMarkType eMarkType = GetViewData().GetSimpleArea(aRange);
+    if (eMarkType == SC_MARK_SIMPLE || eMarkType == SC_MARK_SIMPLE_FILTERED)
     {
         ScDocShell* pDocSh = GetViewData().GetDocShell();
         const ScMarkData& rMark = GetViewData().GetMarkData();


More information about the Libreoffice-commits mailing list