diff options
author | Katarina Behrens <Katarina.Behrens@cib.de> | 2018-06-07 15:48:12 +0200 |
---|---|---|
committer | Katarina Behrens <Katarina.Behrens@cib.de> | 2018-06-18 15:27:58 +0200 |
commit | d61f5db2129ed6fe0d412d6247be4dc237fee328 (patch) | |
tree | fdbe45f1f01a363a9f562543f5a57f2387e8b68d /vcl | |
parent | 611346f3e222a923d2eeafa7cf7e18420fcfee5b (diff) |
Show LibO's custom checkboxes in native fpicker
Change-Id: I9cd6b0b393024957c3dec1bd7e381db62f711a24
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/unx/kde5/KDE5FilePicker.cxx | 14 | ||||
-rw-r--r-- | vcl/unx/kde5/KDE5FilePicker2.cxx | 11 |
2 files changed, 11 insertions, 14 deletions
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: |