[Libreoffice-commits] core.git: 2 commits - helpcontent2 vcl/inc vcl/qt5 vcl/unx

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Feb 20 15:57:42 UTC 2019


 helpcontent2                     |    2 
 vcl/inc/qt5/Qt5FilePicker.hxx    |    2 
 vcl/qt5/Qt5FilePicker.cxx        |    6 +
 vcl/unx/kde5/KDE5FilePicker.hxx  |    5 -
 vcl/unx/kde5/KDE5FilePicker2.cxx |  120 ---------------------------------------
 5 files changed, 9 insertions(+), 126 deletions(-)

New commits:
commit 77d5795f9e79a996fa6ee8153f7bc565c4440b02
Author:     Michael Weghorn <m.weghorn at posteo.de>
AuthorDate: Thu Feb 7 17:23:02 2019 +0100
Commit:     Katarina Behrens <Katarina.Behrens at cib.de>
CommitDate: Wed Feb 20 16:57:29 2019 +0100

    kde5 fpicker: Reuse 'initialize()' from base class
    
    Take over missing case from 'KDE5FilePicker::initialize' to
    'Qt5FilePicker::initialize' and make
    'Qt5FilePicker::addCustomControl' virtual, so that the
    subclass's implementation is called in the 'initialize()'
    method (in particular to avoid adding another autoextension
    checkbox).
    
    Drop the 'KDE5FilePicker::initialize' so that the
    base class implementation is used, which now does the
    same thing.
    
    Add 'override' keyword in KDE5Filepicker.hxx.
    
    Change-Id: Id151a4d4862af4275f6c21c6537a79c52e3ed513
    Reviewed-on: https://gerrit.libreoffice.org/68059
    Tested-by: Jenkins
    Reviewed-by: Katarina Behrens <Katarina.Behrens at cib.de>

diff --git a/vcl/inc/qt5/Qt5FilePicker.hxx b/vcl/inc/qt5/Qt5FilePicker.hxx
index 1bb6974ab83e..2f795a88d274 100644
--- a/vcl/inc/qt5/Qt5FilePicker.hxx
+++ b/vcl/inc/qt5/Qt5FilePicker.hxx
@@ -155,7 +155,7 @@ protected:
     static css::uno::Any handleGetListValue(QComboBox* pWidget, sal_Int16 nControlAction);
     static void handleSetListValue(QComboBox* pQComboBox, sal_Int16 nAction,
                                    const css::uno::Any& rValue);
-    void addCustomControl(sal_Int16 controlId);
+    virtual void addCustomControl(sal_Int16 controlId);
     void setCustomControlWidgetLayout(QGridLayout* pLayout) { m_pLayout = pLayout; }
 
 private Q_SLOTS:
diff --git a/vcl/qt5/Qt5FilePicker.cxx b/vcl/qt5/Qt5FilePicker.cxx
index dcfcc68f0888..9df730351bca 100644
--- a/vcl/qt5/Qt5FilePicker.cxx
+++ b/vcl/qt5/Qt5FilePicker.cxx
@@ -763,6 +763,12 @@ void SAL_CALL Qt5FilePicker::initialize(const uno::Sequence<uno::Any>& args)
             addCustomControl(LISTBOX_IMAGE_TEMPLATE);
             break;
 
+        case FILEOPEN_LINK_PREVIEW_IMAGE_ANCHOR:
+            addCustomControl(CHECKBOX_LINK);
+            addCustomControl(CHECKBOX_PREVIEW);
+            addCustomControl(LISTBOX_IMAGE_ANCHOR);
+            break;
+
         case FILEOPEN_PLAY:
             addCustomControl(PUSHBUTTON_PLAY);
             break;
diff --git a/vcl/unx/kde5/KDE5FilePicker.hxx b/vcl/unx/kde5/KDE5FilePicker.hxx
index dcde5a372fb0..fb73fbe3b9af 100644
--- a/vcl/unx/kde5/KDE5FilePicker.hxx
+++ b/vcl/unx/kde5/KDE5FilePicker.hxx
@@ -81,9 +81,6 @@ public:
     virtual sal_Bool SAL_CALL   getShowState(  );
     */
 
-    // XInitialization
-    virtual void SAL_CALL initialize(const css::uno::Sequence<css::uno::Any>& rArguments) override;
-
     // XServiceInfo
     virtual OUString SAL_CALL getImplementationName() override;
     virtual sal_Bool SAL_CALL supportsService(const OUString& rServiceName) override;
@@ -91,7 +88,7 @@ public:
 
 private:
     //add a custom control widget to the file dialog
-    void addCustomControl(sal_Int16 controlId);
+    void addCustomControl(sal_Int16 controlId) override;
 
 protected:
     bool eventFilter(QObject* watched, QEvent* event) override;
diff --git a/vcl/unx/kde5/KDE5FilePicker2.cxx b/vcl/unx/kde5/KDE5FilePicker2.cxx
index 2e855bac7c6b..403c522e1210 100644
--- a/vcl/unx/kde5/KDE5FilePicker2.cxx
+++ b/vcl/unx/kde5/KDE5FilePicker2.cxx
@@ -199,126 +199,6 @@ void KDE5FilePicker::addCustomControl(sal_Int16 controlId)
     Qt5FilePicker::addCustomControl(controlId);
 }
 
-// XInitialization
-void SAL_CALL KDE5FilePicker::initialize(const uno::Sequence<uno::Any>& args)
-{
-    // parameter checking
-    uno::Any arg;
-    if (args.getLength() == 0)
-    {
-        throw lang::IllegalArgumentException("no arguments", static_cast<XFilePicker2*>(this), 1);
-    }
-
-    arg = args[0];
-
-    if ((arg.getValueType() != cppu::UnoType<sal_Int16>::get())
-        && (arg.getValueType() != cppu::UnoType<sal_Int8>::get()))
-    {
-        throw lang::IllegalArgumentException("invalid argument type",
-                                             static_cast<XFilePicker2*>(this), 1);
-    }
-
-    sal_Int16 templateId = -1;
-    arg >>= templateId;
-
-    bool saveDialog = false;
-    switch (templateId)
-    {
-        case FILEOPEN_SIMPLE:
-            break;
-
-        case FILESAVE_SIMPLE:
-            saveDialog = true;
-            break;
-
-        case FILESAVE_AUTOEXTENSION:
-            saveDialog = true;
-            addCustomControl(CHECKBOX_AUTOEXTENSION);
-            break;
-
-        case FILESAVE_AUTOEXTENSION_PASSWORD:
-        {
-            saveDialog = true;
-            addCustomControl(CHECKBOX_PASSWORD);
-            addCustomControl(CHECKBOX_GPGENCRYPTION);
-            break;
-        }
-        case FILESAVE_AUTOEXTENSION_PASSWORD_FILTEROPTIONS:
-        {
-            saveDialog = true;
-            addCustomControl(CHECKBOX_AUTOEXTENSION);
-            addCustomControl(CHECKBOX_PASSWORD);
-            addCustomControl(CHECKBOX_GPGENCRYPTION);
-            addCustomControl(CHECKBOX_FILTEROPTIONS);
-            break;
-        }
-        case FILESAVE_AUTOEXTENSION_SELECTION:
-            saveDialog = true;
-            addCustomControl(CHECKBOX_AUTOEXTENSION);
-            addCustomControl(CHECKBOX_SELECTION);
-            break;
-
-        case FILESAVE_AUTOEXTENSION_TEMPLATE:
-            saveDialog = true;
-            addCustomControl(CHECKBOX_AUTOEXTENSION);
-            addCustomControl(LISTBOX_TEMPLATE);
-            break;
-
-        case FILEOPEN_LINK_PREVIEW_IMAGE_TEMPLATE:
-            addCustomControl(CHECKBOX_LINK);
-            addCustomControl(CHECKBOX_PREVIEW);
-            addCustomControl(LISTBOX_IMAGE_TEMPLATE);
-            break;
-
-        case FILEOPEN_LINK_PREVIEW_IMAGE_ANCHOR:
-            addCustomControl(CHECKBOX_LINK);
-            addCustomControl(CHECKBOX_PREVIEW);
-            addCustomControl(LISTBOX_IMAGE_ANCHOR);
-            break;
-
-        case FILEOPEN_PLAY:
-            addCustomControl(PUSHBUTTON_PLAY);
-            break;
-
-        case FILEOPEN_LINK_PLAY:
-            addCustomControl(CHECKBOX_LINK);
-            addCustomControl(PUSHBUTTON_PLAY);
-            break;
-
-        case FILEOPEN_READONLY_VERSION:
-            addCustomControl(CHECKBOX_READONLY);
-            addCustomControl(LISTBOX_VERSION);
-            break;
-
-        case FILEOPEN_LINK_PREVIEW:
-            addCustomControl(CHECKBOX_LINK);
-            addCustomControl(CHECKBOX_PREVIEW);
-            break;
-
-        case FILEOPEN_PREVIEW:
-            addCustomControl(CHECKBOX_PREVIEW);
-            break;
-
-        default:
-            OSL_TRACE("Unknown templates %d", templateId);
-            return;
-    }
-
-    //default is opening
-    QFileDialog::AcceptMode operationMode
-        = saveDialog ? QFileDialog::AcceptSave : QFileDialog::AcceptOpen;
-
-    m_pFileDialog->setAcceptMode(operationMode);
-
-    if (saveDialog)
-    {
-        m_pFileDialog->setConfirmOverwrite(true);
-        m_pFileDialog->setFileMode(QFileDialog::AnyFile);
-    }
-
-    setTitle(VclResId(saveDialog ? STR_FPICKER_SAVE : STR_FPICKER_OPEN));
-}
-
 // XServiceInfo
 OUString SAL_CALL KDE5FilePicker::getImplementationName()
 {
commit de4b60d00000cf772ee181708df161d2fd99df13
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Feb 20 15:57:06 2019 +0000
Commit:     Gerrit Code Review <gerrit at gerrit.libreoffice.org>
CommitDate: Wed Feb 20 16:57:18 2019 +0100

    Update git submodules
    
    * Update helpcontent2 from branch 'master'
      - each CUI_HID_HANGULDLG_SUGGESTIONS child has an help id already
    
        Change-Id: I5b565843c2ae6a53974588abdeac795b5b5f0890

diff --git a/helpcontent2 b/helpcontent2
index 665bdc726335..794ae7722052 160000
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 665bdc726335d0a9c8a3342c614a299b8680928e
+Subproject commit 794ae7722052440c8ea19b039cd229542d1f0ea5


More information about the Libreoffice-commits mailing list