diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-01-21 19:41:02 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-01-22 10:01:50 +0100 |
commit | 792a73540dea6fc6ed73ad715632a96aa769502b (patch) | |
tree | b1999c6fc0ceeab6b2ef07733aa78ddf5174991b /vcl | |
parent | 497591d8e5cf664b4b85d0b464653f174a6b83e8 (diff) |
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@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/window/window2.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
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) |