From d61f5db2129ed6fe0d412d6247be4dc237fee328 Mon Sep 17 00:00:00 2001 From: Katarina Behrens Date: Thu, 7 Jun 2018 15:48:12 +0200 Subject: Show LibO's custom checkboxes in native fpicker Change-Id: I9cd6b0b393024957c3dec1bd7e381db62f711a24 --- vcl/unx/kde5/KDE5FilePicker.cxx | 14 -------------- vcl/unx/kde5/KDE5FilePicker2.cxx | 11 +++++++++++ 2 files changed, 11 insertions(+), 14 deletions(-) (limited to 'vcl') diff --git a/vcl/unx/kde5/KDE5FilePicker.cxx b/vcl/unx/kde5/KDE5FilePicker.cxx index 9891439ae0ee..d3939e1d7e1f 100644 --- a/vcl/unx/kde5/KDE5FilePicker.cxx +++ b/vcl/unx/kde5/KDE5FilePicker.cxx @@ -153,20 +153,6 @@ QString KDE5FilePicker::getLabel(sal_Int16 controlId) const return label; }*/ -/*void KDE5FilePicker::addCheckBox(sal_Int16 controlId, const QString& label, bool hidden) -{ - auto resString = label; - resString.replace('~', '&'); - - auto widget = new QCheckBox(resString, _extraControls); - widget->setHidden(hidden); - if (!hidden) - { - _layout->addWidget(widget); - } - _customWidgets.insert(controlId, widget); -}*/ - /*void KDE5FilePicker::initialize(bool saveDialog) { //default is opening diff --git a/vcl/unx/kde5/KDE5FilePicker2.cxx b/vcl/unx/kde5/KDE5FilePicker2.cxx index 759b2fccf790..96b6a0fe3c4f 100644 --- a/vcl/unx/kde5/KDE5FilePicker2.cxx +++ b/vcl/unx/kde5/KDE5FilePicker2.cxx @@ -303,6 +303,17 @@ void KDE5FilePicker::addCustomControl(sal_Int16 controlId) // the checkbox is created even for CHECKBOX_AUTOEXTENSION to simplify // code, but the checkbox is hidden and ignored bool hidden = controlId == CHECKBOX_AUTOEXTENSION; + auto resString = toQString(VclResId(resId)); + resString.replace('~', '&'); + + auto widget = new QCheckBox(resString, _extraControls); + widget->setHidden(hidden); + if (!hidden) + { + _layout->addWidget(widget); + } + _customWidgets.insert(controlId, widget); + break; } case PUSHBUTTON_PLAY: -- cgit