From 1b87cdadb88da0ece66c2da1a06c37420e45111c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Thu, 26 Oct 2017 14:13:29 +0100 Subject: [PATCH] support stock text in checkboxes and radiobuttons MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I03b2e125736b7f8a7127174a7a837760f76f8249 Reviewed-on: https://gerrit.libreoffice.org/43893 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- vcl/source/window/builder.cxx | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index e8ab874696c0..9d1fedeebdf5 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -1263,6 +1263,11 @@ VclPtr VclBuilder::makeObject(vcl::Window *pParent, const OString & VclPtr xButton = VclPtr::Create(pParent, nBits); xButton->SetImageAlign(ImageAlign::Left); //default to left xWindow = xButton; + + if (::extractStock(rMap)) + { + xWindow->SetText(getStockText(extractLabel(rMap))); + } } else if (name == "GtkCheckButton") { @@ -1280,7 +1285,13 @@ VclPtr VclBuilder::makeObject(vcl::Window *pParent, const OString & if (bIsTriState) xCheckBox->SetState(TRISTATE_INDET); xCheckBox->SetImageAlign(ImageAlign::Left); //default to left + xWindow = xCheckBox; + + if (::extractStock(rMap)) + { + xWindow->SetText(getStockText(extractLabel(rMap))); + } } else if (name == "GtkSpinButton") {