[Libreoffice-commits] core.git: vcl/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Fri Jan 22 09:02:34 UTC 2021
vcl/source/window/window2.cxx | 2 ++
1 file changed, 2 insertions(+)
New commits:
commit 792a73540dea6fc6ed73ad715632a96aa769502b
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Jan 21 19:41:02 2021 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri Jan 22 10:01:50 2021 +0100
don't let weird xalign/yalign values creep back in
Change-Id: I85906e1c72f4bf2ff3f48a7c2882423c9965621c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109771
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx
index 56c27b22e4a5..2fd523a18b45 100644
--- a/vcl/source/window/window2.cxx
+++ b/vcl/source/window/window2.cxx
@@ -1464,6 +1464,7 @@ bool Window::set_property(const OString &rKey, const OUString &rValue)
nBits &= ~(WB_LEFT | WB_CENTER | WB_RIGHT);
float f = rValue.toFloat();
+ assert(f == 0.0 || f == 1.0 || f == 0.5);
if (f == 0.0)
nBits |= WB_LEFT;
else if (f == 1.0)
@@ -1493,6 +1494,7 @@ bool Window::set_property(const OString &rKey, const OUString &rValue)
nBits &= ~(WB_TOP | WB_VCENTER | WB_BOTTOM);
float f = rValue.toFloat();
+ assert(f == 0.0 || f == 1.0 || f == 0.5);
if (f == 0.0)
nBits |= WB_TOP;
else if (f == 1.0)
More information about the Libreoffice-commits
mailing list