[Libreoffice-commits] core.git: Branch 'feature/qt5+kde5' - vcl/unx

Katarina Behrens Katarina.Behrens at cib.de
Thu Jun 7 13:49:11 UTC 2018


 vcl/unx/kde5/KDE5FilePicker.cxx  |   14 --------------
 vcl/unx/kde5/KDE5FilePicker2.cxx |   11 +++++++++++
 2 files changed, 11 insertions(+), 14 deletions(-)

New commits:
commit e110ef21224398b68719658340bcfd31fdcbe859
Author: Katarina Behrens <Katarina.Behrens at cib.de>
Date:   Thu Jun 7 15:48:12 2018 +0200

    Show LibO's custom checkboxes in native fpicker
    
    Change-Id: I9cd6b0b393024957c3dec1bd7e381db62f711a24

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:


More information about the Libreoffice-commits mailing list