vcl/qt5/QtFilePicker.cxx                   |   17 +++--------------
 vcl/unx/gtk3_kde5/gtk3_kde5_filepicker.cxx |   16 ++--------------
 vcl/unx/kf5/KFFilePicker.cxx               |   18 ++++--------------
 3 files changed, 9 insertions(+), 42 deletions(-)

New commits:
commit d58487de929fef9ea02c1a835923331161696bad
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Fri Apr 25 19:22:26 2025 +0200
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Fri Apr 25 21:37:04 2025 +0200

    qt/kf/gtk3_kde5: Merge FilePicker_getSupportedServiceNames into callers
    
    Change-Id: Id83690b974c76e3a1feaac345b6145f3ea384f67
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184637
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>
    Tested-by: Jenkins

diff --git a/vcl/qt5/QtFilePicker.cxx b/vcl/qt5/QtFilePicker.cxx
index 6322aaf34dd8..0085c51d898f 100644
--- a/vcl/qt5/QtFilePicker.cxx
+++ b/vcl/qt5/QtFilePicker.cxx
@@ -78,16 +78,6 @@ using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::uno;
 
-namespace
-{
-uno::Sequence<OUString> FilePicker_getSupportedServiceNames()
-{
-    return { u"com.sun.star.ui.dialogs.FilePicker"_ustr,
-             u"com.sun.star.ui.dialogs.SystemFilePicker"_ustr,
-             u"com.sun.star.ui.dialogs.QtFilePicker"_ustr };
-}
-}
-
 QtFilePicker::QtFilePicker(css::uno::Reference<css::uno::XComponentContext> 
context,
                            QFileDialog::FileMode eMode, bool bUseNative)
     : QtFilePicker_Base(m_aHelperMutex)
@@ -916,7 +906,9 @@ sal_Bool SAL_CALL QtFilePicker::supportsService(const 
OUString& ServiceName)
 
 uno::Sequence<OUString> SAL_CALL QtFilePicker::getSupportedServiceNames()
 {
-    return FilePicker_getSupportedServiceNames();
+    return { u"com.sun.star.ui.dialogs.FilePicker"_ustr,
+             u"com.sun.star.ui.dialogs.SystemFilePicker"_ustr,
+             u"com.sun.star.ui.dialogs.QtFilePicker"_ustr };
 }
 
 void QtFilePicker::updateAutomaticFileExtension()
diff --git a/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker.cxx 
b/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker.cxx
index 827b1fa263f2..445e557bd9c3 100644
--- a/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker.cxx
+++ b/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker.cxx
@@ -45,19 +45,6 @@ using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::uno;
 
-// helper functions
-
-namespace
-{
-uno::Sequence<OUString> FilePicker_getSupportedServiceNames()
-{
-    return { "com.sun.star.ui.dialogs.FilePicker", 
"com.sun.star.ui.dialogs.SystemFilePicker",
-             "com.sun.star.ui.dialogs.Gtk3KDE5FilePicker" };
-}
-}
-
-// Gtk3KDE5FilePicker
-
 Gtk3KDE5FilePicker::Gtk3KDE5FilePicker(const 
uno::Reference<uno::XComponentContext>&)
     : Gtk3KDE5FilePicker_Base(_helperMutex)
 {
@@ -438,7 +425,8 @@ sal_Bool SAL_CALL Gtk3KDE5FilePicker::supportsService(const 
OUString& ServiceNam
 
 uno::Sequence<OUString> SAL_CALL Gtk3KDE5FilePicker::getSupportedServiceNames()
 {
-    return FilePicker_getSupportedServiceNames();
+    return { "com.sun.star.ui.dialogs.FilePicker", 
"com.sun.star.ui.dialogs.SystemFilePicker",
+             "com.sun.star.ui.dialogs.Gtk3KDE5FilePicker" };
 }
 
 void Gtk3KDE5FilePicker::filterChanged()
diff --git a/vcl/unx/kf5/KFFilePicker.cxx b/vcl/unx/kf5/KFFilePicker.cxx
index cb744f54038a..cb968420accc 100644
--- a/vcl/unx/kf5/KFFilePicker.cxx
+++ b/vcl/unx/kf5/KFFilePicker.cxx
@@ -34,19 +34,6 @@
 using namespace ::com::sun::star;
 using 
::com::sun::star::ui::dialogs::ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION;
 
-namespace
-{
-uno::Sequence<OUString> FilePicker_getSupportedServiceNames()
-{
-    return { u"com.sun.star.ui.dialogs.FilePicker"_ustr,
-             u"com.sun.star.ui.dialogs.SystemFilePicker"_ustr,
-             u"com.sun.star.ui.dialogs.KFFilePicker"_ustr,
-             u"com.sun.star.ui.dialogs.KFFolderPicker"_ustr };
-}
-}
-
-// KFFilePicker
-
 KFFilePicker::KFFilePicker(css::uno::Reference<css::uno::XComponentContext> 
const& context,
                            QFileDialog::FileMode eMode)
     // Native KF5/KF6 filepicker does not add file extension automatically
@@ -156,7 +143,10 @@ sal_Bool SAL_CALL KFFilePicker::supportsService(const 
OUString& ServiceName)
 
 uno::Sequence<OUString> SAL_CALL KFFilePicker::getSupportedServiceNames()
 {
-    return FilePicker_getSupportedServiceNames();
+    return { u"com.sun.star.ui.dialogs.FilePicker"_ustr,
+             u"com.sun.star.ui.dialogs.SystemFilePicker"_ustr,
+             u"com.sun.star.ui.dialogs.KFFilePicker"_ustr,
+             u"com.sun.star.ui.dialogs.KFFolderPicker"_ustr };
 }
 
 bool KFFilePicker::eventFilter(QObject* o, QEvent* e)
commit f84c93ca74c515d45aa6627a0e834ab755a64cc3
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Fri Apr 25 19:14:36 2025 +0200
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Fri Apr 25 21:36:56 2025 +0200

    qt: Drop unused includes
    
    Unused since
    
        commit edc9277e0f8de3f32502db41a3167ce03fff2b50
        Author: Michael Weghorn <m.wegh...@posteo.de>
        Date:   Fri Apr 25 15:19:57 2025 +0200
    
            tdf#166334 qt: More reliably detect native file dlg parent
    
    Change-Id: Ie61f9883a3e8c47a6ea1bd096b21f9bb218c067b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184636
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>

diff --git a/vcl/qt5/QtFilePicker.cxx b/vcl/qt5/QtFilePicker.cxx
index 373c5b51d161..6322aaf34dd8 100644
--- a/vcl/qt5/QtFilePicker.cxx
+++ b/vcl/qt5/QtFilePicker.cxx
@@ -29,15 +29,12 @@
 #include <QtInstance.hxx>
 #include <QtXWindow.hxx>
 
-#include <com/sun/star/awt/SystemDependentXWindow.hpp>
-#include <com/sun/star/awt/XSystemDependentWindowPeer.hpp>
 #include <com/sun/star/awt/XWindow.hpp>
 #include <com/sun/star/frame/Desktop.hpp>
 #include <com/sun/star/frame/TerminationVetoException.hpp>
 #include <com/sun/star/frame/XDesktop.hpp>
 #include <com/sun/star/lang/DisposedException.hpp>
 #include <com/sun/star/lang/IllegalArgumentException.hpp>
-#include <com/sun/star/lang/SystemDependent.hpp>
 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
 #include <com/sun/star/ui/dialogs/CommonFilePickerElementIds.hpp>
 #include <com/sun/star/ui/dialogs/ControlActions.hpp>

Reply via email to