summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2020-01-18 12:01:24 +0300
committerEike Rathke <erack@redhat.com>2020-02-12 17:58:15 +0100
commit2c9dc34b332b6cb4c121e85989e4e8e2ab822ea5 (patch)
tree2bb2374cb04a83d7c17e24fe7e8fd922e2221169 /sc
parent10dac1012b065e5e37ebb42f13d7fbdbda376786 (diff)
tdf#130054: consider all row/col bars in ScTabView::EnableRefInput
Left col bar and bottom row bar were ignored - apparently overlooked at least since commit 9ae5a91f7955e44d3b24a3f7741f9bca02ac7f24. Change-Id: I5c2386b0aa1fdbb42f352c0b654e268dc62c7e66 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87007 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit bda31b1a95b284749cd5e4d9596aab8e1aa93714) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87022 Reviewed-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/view/tabview.cxx21
1 files changed, 9 insertions, 12 deletions
diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx
index ec52581dad23..53e03e61de07 100644
--- a/sc/source/ui/view/tabview.cxx
+++ b/sc/source/ui/view/tabview.cxx
@@ -2245,18 +2245,15 @@ void ScTabView::EnableRefInput(bool bFlag)
if(pTabControl!=nullptr) pTabControl->EnableInput(bFlag);
- if(pGridWin[SC_SPLIT_BOTTOMLEFT]!=nullptr)
- pGridWin[SC_SPLIT_BOTTOMLEFT]->EnableInput(bFlag,false);
- if(pGridWin[SC_SPLIT_BOTTOMRIGHT]!=nullptr)
- pGridWin[SC_SPLIT_BOTTOMRIGHT]->EnableInput(bFlag,false);
- if(pGridWin[SC_SPLIT_TOPLEFT]!=nullptr)
- pGridWin[SC_SPLIT_TOPLEFT]->EnableInput(bFlag,false);
- if(pGridWin[SC_SPLIT_TOPRIGHT]!=nullptr)
- pGridWin[SC_SPLIT_TOPRIGHT]->EnableInput(bFlag,false);
- if(pColBar[SC_SPLIT_RIGHT]!=nullptr)
- pColBar[SC_SPLIT_RIGHT]->EnableInput(bFlag,false);
- if(pRowBar[SC_SPLIT_TOP]!=nullptr)
- pRowBar[SC_SPLIT_TOP]->EnableInput(bFlag,false);
+ for (auto& p : pGridWin)
+ if (p)
+ p->EnableInput(bFlag, false);
+ for (auto& p : pColBar)
+ if (p)
+ p->EnableInput(bFlag, false);
+ for (auto& p : pRowBar)
+ if (p)
+ p->EnableInput(bFlag, false);
}
bool ScTabView::ContinueOnlineSpelling()