From 60391b4726b6c00950fddb6088ffcc0a1ae142bc Mon Sep 17 00:00:00 2001 From: Andrzej Hunt Date: Sun, 31 May 2015 16:14:10 +0100 Subject: Allow unsetting underline attribute Change-Id: Ib11f6e76a52c0b8c943d46b9f14b3b00642879d1 Reviewed-on: https://gerrit.libreoffice.org/16004 Tested-by: Jenkins Tested-by: David Tardon Reviewed-by: David Tardon --- vcl/source/window/window2.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'vcl/source/window') diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx index fc3b1ff8fc61..be4409ce5a54 100644 --- a/vcl/source/window/window2.cxx +++ b/vcl/source/window/window2.cxx @@ -1558,10 +1558,10 @@ bool Window::set_font_attribute(const OString &rKey, const OString &rValue) aFont.SetItalic(ITALIC_NORMAL); SetControlFont(aFont); } - else if (rKey == "underline" && toBool(rValue)) + else if (rKey == "underline") { vcl::Font aFont(GetControlFont()); - aFont.SetUnderline(UNDERLINE_SINGLE); + aFont.SetUnderline(toBool(rValue) ? UNDERLINE_SINGLE : UNDERLINE_NONE); SetControlFont(aFont); } else if (rKey == "size") -- cgit v1.2.3