[Libreoffice-commits] core.git: vcl/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Thu Sep 20 07:56:47 UTC 2018
vcl/source/control/edit.cxx | 11 +----------
vcl/source/window/window2.cxx | 4 +++-
2 files changed, 4 insertions(+), 11 deletions(-)
New commits:
commit da9a539999fc8ae47a78542ce646005f3a9be868
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Sep 19 15:35:36 2018 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu Sep 20 09:56:15 2018 +0200
use can-focus for TB_TABSTOP|WB_NOTABSTOP, not editable
Change-Id: I56e60b98151c5dfcf8148ddafb6224bed734d039
Reviewed-on: https://gerrit.libreoffice.org/60773
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index b40b3df51c6c..3688f9c3374d 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -191,16 +191,7 @@ bool Edit::set_property(const OString &rKey, const OUString &rValue)
}
else if (rKey == "editable")
{
- bool bReadOnly = !toBool(rValue);
- SetReadOnly(bReadOnly);
- //disable tab to traverse into readonly editables
- WinBits nBits = GetStyle();
- nBits &= ~(WB_TABSTOP|WB_NOTABSTOP);
- if (!bReadOnly)
- nBits |= WB_TABSTOP;
- else
- nBits |= WB_NOTABSTOP;
- SetStyle(nBits);
+ SetReadOnly(!toBool(rValue));
}
else if (rKey == "visibility")
{
diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx
index 829f7e3f5b27..bce47fc40a00 100644
--- a/vcl/source/window/window2.cxx
+++ b/vcl/source/window/window2.cxx
@@ -1553,9 +1553,11 @@ bool Window::set_property(const OString &rKey, const OUString &rValue)
else if (rKey == "can-focus")
{
WinBits nBits = GetStyle();
- nBits &= ~WB_TABSTOP;
+ nBits &= ~(WB_TABSTOP|WB_NOTABSTOP);
if (toBool(rValue))
nBits |= WB_TABSTOP;
+ else
+ nBits |= WB_NOTABSTOP;
SetStyle(nBits);
}
else
More information about the Libreoffice-commits
mailing list