From 76df547f1790b3bd7cca013b7002575c8c766384 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 26 Jun 2020 20:55:53 +0100 Subject: map has-frame to WB_BORDER MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I3f0aeceb3015bb09d6b82a631f3b001f9061d090 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97265 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- vcl/source/window/builder.cxx | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'vcl/source/window/builder.cxx') diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index d88c98528394..f718f1659b4b 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -897,6 +897,18 @@ void VclBuilder::disposeBuilder() namespace { + bool extractHasFrame(VclBuilder::stringmap& rMap) + { + bool bHasFrame = true; + VclBuilder::stringmap::iterator aFind = rMap.find("has-frame"); + if (aFind != rMap.end()) + { + bHasFrame = toBool(aFind->second); + rMap.erase(aFind); + } + return bHasFrame; + } + bool extractDrawValue(VclBuilder::stringmap& rMap) { bool bDrawValue = true; @@ -2142,7 +2154,10 @@ VclPtr VclBuilder::makeObject(vcl::Window *pParent, const OString & } else if (name == "GtkEntry") { - xWindow = VclPtr::Create(pParent, WB_LEFT|WB_VCENTER|WB_BORDER|WB_3DLOOK); + WinBits nWinStyle = WB_LEFT|WB_VCENTER|WB_3DLOOK; + if (extractHasFrame(rMap)) + nWinStyle |= WB_BORDER; + xWindow = VclPtr::Create(pParent, nWinStyle); BuilderUtils::ensureDefaultWidthChars(rMap); } else if (name == "GtkNotebook") -- cgit