summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeiko Tietze <heiko.tietze@documentfoundation.org>2023-07-17 16:03:41 +0200
committerHeiko Tietze <heiko.tietze@documentfoundation.org>2023-07-18 15:05:34 +0200
commit4adc868328e958a4a9cead3731bd3468497c97c8 (patch)
treea1811bfaf82c44b366ddd89213aedea474b18979
parenta8a7fb58398047ad4b146b96a13567ed9e256100 (diff)
Resolves tdf#112876 - Make use of scroll lock configurable
Change-Id: I8e2f238e59601fcc1d92fc0593c3d20e75396cc5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154528 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
-rw-r--r--officecfg/registry/schema/org/openoffice/Office/Calc.xcs7
-rw-r--r--sc/source/ui/view/cellsh4.cxx12
2 files changed, 15 insertions, 4 deletions
diff --git a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
index d861f56e81d7..eff7ac7aa80a 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
@@ -690,6 +690,13 @@
</info>
<value>true</value>
</prop>
+ <prop oor:name="UseScrollLock" oor:type="xs:boolean" oor:nillable="false">
+ <info>
+ <desc>Toggles the scroll lock behavior allowing to disable it for special keyboards</desc>
+ <label>Toggles the scroll lock behavior allowing to disable it for special keyboards</label>
+ </info>
+ <value>true</value>
+ </prop>
<prop oor:name="LastFunctions" oor:type="oor:int-list" oor:nillable="false">
<info>
<desc>Specifies the functions last used.</desc>
diff --git a/sc/source/ui/view/cellsh4.cxx b/sc/source/ui/view/cellsh4.cxx
index 13d6993634dd..e44dbe599dba 100644
--- a/sc/source/ui/view/cellsh4.cxx
+++ b/sc/source/ui/view/cellsh4.cxx
@@ -27,6 +27,7 @@
#include <inputhdl.hxx>
#include <inputwin.hxx>
#include <document.hxx>
+#include <officecfg/Office/Calc.hxx>
#include <sc.hrc>
void ScCellShell::ExecuteCursor( SfxRequest& rReq )
@@ -121,10 +122,13 @@ void ScCellShell::ExecuteCursor( SfxRequest& rReq )
// If ScrollLock key is active, cell cursor stays on the current cell while
// scrolling the grid.
bool bScrollLock = false;
- KeyIndicatorState eState = pFrameWin->GetIndicatorState();
- if (eState & KeyIndicatorState::SCROLLLOCK)
- bScrollLock = true;
-
+ // tdf#112876 - allow to disable for special keyboards
+ if (officecfg::Office::Calc::Input::UseScrollLock::get())
+ {
+ KeyIndicatorState eState = pFrameWin->GetIndicatorState();
+ if (eState & KeyIndicatorState::SCROLLLOCK)
+ bScrollLock = true;
+ }
//OS: once for all should do, however!
pTabViewShell->ExecuteInputDirect();
switch ( nSlotId )