summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrzej Hunt <andrzej@ahunt.org>2015-05-31 16:14:10 +0100
committerDavid Tardon <dtardon@redhat.com>2015-06-01 07:05:30 +0000
commit60391b4726b6c00950fddb6088ffcc0a1ae142bc (patch)
tree5700e7e06ddd0089a5ecc05f3a2b734e7999d6a6
parentcba920edf88bef06a6689e7847c5789dd3ee67b7 (diff)
Allow unsetting underline attribute
Change-Id: Ib11f6e76a52c0b8c943d46b9f14b3b00642879d1 Reviewed-on: https://gerrit.libreoffice.org/16004 Tested-by: Jenkins <ci@libreoffice.org> Tested-by: David Tardon <dtardon@redhat.com> Reviewed-by: David Tardon <dtardon@redhat.com>
-rw-r--r--vcl/source/window/window2.cxx4
1 files changed, 2 insertions, 2 deletions
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")