[Libreoffice-commits] core.git: chart2/source dbaccess/Library_dbmm.mk dbaccess/source extensions/Library_dbp.mk extensions/source filter/Library_flash.mk filter/source include/svtools svtools/source svx/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sat Oct 6 18:54:44 UTC 2018


 chart2/source/controller/dialogs/dlg_ChartType_UNO.cxx      |    5 +++--
 chart2/source/controller/inc/dlg_ChartType_UNO.hxx          |    2 +-
 dbaccess/Library_dbmm.mk                                    |    1 +
 dbaccess/source/ext/macromigration/macromigrationwizard.cxx |    5 +++--
 dbaccess/source/ext/macromigration/macromigrationwizard.hxx |    2 +-
 dbaccess/source/ui/inc/unosqlmessage.hxx                    |    2 +-
 dbaccess/source/ui/uno/AdvancedSettingsDlg.cxx              |    7 ++++---
 dbaccess/source/ui/uno/DBTypeWizDlg.cxx                     |    5 +++--
 dbaccess/source/ui/uno/DBTypeWizDlg.hxx                     |    2 +-
 dbaccess/source/ui/uno/DBTypeWizDlgSetup.cxx                |    5 +++--
 dbaccess/source/ui/uno/DBTypeWizDlgSetup.hxx                |    2 +-
 dbaccess/source/ui/uno/TableFilterDlg.cxx                   |    5 +++--
 dbaccess/source/ui/uno/TableFilterDlg.hxx                   |    2 +-
 dbaccess/source/ui/uno/UserSettingsDlg.cxx                  |    5 +++--
 dbaccess/source/ui/uno/UserSettingsDlg.hxx                  |    2 +-
 dbaccess/source/ui/uno/admindlg.cxx                         |    5 +++--
 dbaccess/source/ui/uno/admindlg.hxx                         |    2 +-
 dbaccess/source/ui/uno/composerdialogs.cxx                  |    5 +++--
 dbaccess/source/ui/uno/composerdialogs.hxx                  |    2 +-
 dbaccess/source/ui/uno/copytablewizard.cxx                  |    7 ++++---
 dbaccess/source/ui/uno/textconnectionsettings_uno.cxx       |    7 ++++---
 dbaccess/source/ui/uno/unoDirectSql.cxx                     |    4 +++-
 dbaccess/source/ui/uno/unoDirectSql.hxx                     |    2 +-
 dbaccess/source/ui/uno/unosqlmessage.cxx                    |    6 +++---
 extensions/Library_dbp.mk                                   |    1 +
 extensions/source/abpilot/unodialogabp.cxx                  |    5 +++--
 extensions/source/abpilot/unodialogabp.hxx                  |    2 +-
 extensions/source/dbpilots/unoautopilot.hxx                 |    5 +++--
 extensions/source/propctrlr/MasterDetailLinkDialog.cxx      |   12 ++++++------
 extensions/source/propctrlr/MasterDetailLinkDialog.hxx      |    2 +-
 extensions/source/propctrlr/controlfontdialog.cxx           |    4 ++--
 extensions/source/propctrlr/controlfontdialog.hxx           |    2 +-
 extensions/source/propctrlr/pcrunodialogs.cxx               |    6 +++---
 extensions/source/propctrlr/pcrunodialogs.hxx               |    2 +-
 filter/Library_flash.mk                                     |    1 +
 filter/source/flash/swfdialog.cxx                           |    5 +++--
 filter/source/flash/swfdialog.hxx                           |    2 +-
 filter/source/pdf/pdfdialog.cxx                             |    4 ++--
 filter/source/pdf/pdfdialog.hxx                             |    2 +-
 include/svtools/genericunodialog.hxx                        |    2 +-
 svtools/source/filter/exportdialog.hxx                      |    7 -------
 svtools/source/uno/addrtempuno.cxx                          |    6 ++++--
 svtools/source/uno/genericunodialog.cxx                     |    9 +--------
 svtools/source/uno/wizard/unowizard.cxx                     |    7 ++++---
 svx/source/form/xfm_addcondition.cxx                        |    5 +++--
 svx/source/inc/xfm_addcondition.hxx                         |    2 +-
 46 files changed, 97 insertions(+), 88 deletions(-)

New commits:
commit 8a63cdd32c4eb348cb6625b4be6739fe391cb0b4
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sat Oct 6 15:54:11 2018 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Sat Oct 6 20:54:24 2018 +0200

    make OGenericUnoDialog take an awt::XWindow
    
    Change-Id: I7c63397d0579306f4ade1947ce5bf9e1866bf876
    Reviewed-on: https://gerrit.libreoffice.org/61469
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/chart2/source/controller/dialogs/dlg_ChartType_UNO.cxx b/chart2/source/controller/dialogs/dlg_ChartType_UNO.cxx
index 78497a0d8a1b..c9f3c57565e7 100644
--- a/chart2/source/controller/dialogs/dlg_ChartType_UNO.cxx
+++ b/chart2/source/controller/dialogs/dlg_ChartType_UNO.cxx
@@ -21,6 +21,7 @@
 #include <dlg_ChartType.hxx>
 #include <servicenames.hxx>
 #include <osl/mutex.hxx>
+#include <toolkit/helper/vclunohelper.hxx>
 
 namespace chart
 {
@@ -67,9 +68,9 @@ void ChartTypeUnoDlg::implInitialize(const uno::Any& _rValue)
     else
         ChartTypeUnoDlg_BASE::implInitialize(_rValue);
 }
-svt::OGenericUnoDialog::Dialog ChartTypeUnoDlg::createDialog(vcl::Window* _pParent)
+svt::OGenericUnoDialog::Dialog ChartTypeUnoDlg::createDialog(const css::uno::Reference<css::awt::XWindow>& rParent)
 {
-    return svt::OGenericUnoDialog::Dialog(VclPtr<ChartTypeDialog>::Create(_pParent, m_xChartModel));
+    return svt::OGenericUnoDialog::Dialog(VclPtr<ChartTypeDialog>::Create(VCLUnoHelper::GetWindow(rParent), m_xChartModel));
 }
 uno::Reference<beans::XPropertySetInfo>  SAL_CALL ChartTypeUnoDlg::getPropertySetInfo()
 {
diff --git a/chart2/source/controller/inc/dlg_ChartType_UNO.hxx b/chart2/source/controller/inc/dlg_ChartType_UNO.hxx
index 465d66748903..bc6c211205bc 100644
--- a/chart2/source/controller/inc/dlg_ChartType_UNO.hxx
+++ b/chart2/source/controller/inc/dlg_ChartType_UNO.hxx
@@ -40,7 +40,7 @@ private:
 
     // OGenericUnoDialog overridables
     virtual void implInitialize(const css::uno::Any& _rValue) override;
-    virtual svt::OGenericUnoDialog::Dialog createDialog(vcl::Window* _pParent) override;
+    virtual svt::OGenericUnoDialog::Dialog createDialog(const css::uno::Reference<css::awt::XWindow>& rParent) override;
 
     // XTypeProvider
     virtual css::uno::Sequence<sal_Int8> SAL_CALL getImplementationId(  ) override;
diff --git a/dbaccess/Library_dbmm.mk b/dbaccess/Library_dbmm.mk
index 95aa4502645c..0d78aa00bea9 100644
--- a/dbaccess/Library_dbmm.mk
+++ b/dbaccess/Library_dbmm.mk
@@ -31,6 +31,7 @@ $(eval $(call gb_Library_use_libraries,dbmm,\
     svxcore \
     svx \
     tl \
+    tk \
     ucbhelper \
     utl \
     vcl \
diff --git a/dbaccess/source/ext/macromigration/macromigrationwizard.cxx b/dbaccess/source/ext/macromigration/macromigrationwizard.cxx
index 2a2be921e7ff..3edc266c71cf 100644
--- a/dbaccess/source/ext/macromigration/macromigrationwizard.cxx
+++ b/dbaccess/source/ext/macromigration/macromigrationwizard.cxx
@@ -18,6 +18,7 @@
  */
 
 #include "macromigrationwizard.hxx"
+#include <toolkit/helper/vclunohelper.hxx>
 #include <core_resource.hxx>
 #include <strings.hrc>
 
@@ -47,9 +48,9 @@ namespace dbmm
         return *(new MacroMigrationDialogService( _rxContext ) );
     }
 
-    svt::OGenericUnoDialog::Dialog MacroMigrationDialogService::createDialog(vcl::Window* _pParent)
+    svt::OGenericUnoDialog::Dialog MacroMigrationDialogService::createDialog(const css::uno::Reference<css::awt::XWindow>& rParent)
     {
-        return svt::OGenericUnoDialog::Dialog(VclPtr<MacroMigrationDialog>::Create(_pParent, m_aContext, m_xDocument));
+        return svt::OGenericUnoDialog::Dialog(VclPtr<MacroMigrationDialog>::Create(VCLUnoHelper::GetWindow(rParent), m_aContext, m_xDocument));
     }
 
     Sequence< sal_Int8 > SAL_CALL MacroMigrationDialogService::getImplementationId()
diff --git a/dbaccess/source/ext/macromigration/macromigrationwizard.hxx b/dbaccess/source/ext/macromigration/macromigrationwizard.hxx
index 1ba2e973cb63..389da3c01802 100644
--- a/dbaccess/source/ext/macromigration/macromigrationwizard.hxx
+++ b/dbaccess/source/ext/macromigration/macromigrationwizard.hxx
@@ -85,7 +85,7 @@ namespace dbmm
         virtual ~MacroMigrationDialogService() override;
 
     protected:
-        virtual svt::OGenericUnoDialog::Dialog createDialog(vcl::Window* _pParent) override;
+        virtual svt::OGenericUnoDialog::Dialog createDialog(const css::uno::Reference<css::awt::XWindow>& rParent) override;
 
     private:
         Reference< XOfficeDatabaseDocument >    m_xDocument;
diff --git a/dbaccess/source/ui/inc/unosqlmessage.hxx b/dbaccess/source/ui/inc/unosqlmessage.hxx
index 948803be278e..3f9f960dd01a 100644
--- a/dbaccess/source/ui/inc/unosqlmessage.hxx
+++ b/dbaccess/source/ui/inc/unosqlmessage.hxx
@@ -70,7 +70,7 @@ private:
     virtual sal_Bool SAL_CALL convertFastPropertyValue( css::uno::Any& _rConvertedValue, css::uno::Any& _rOldValue, sal_Int32 _nHandle, const css::uno::Any& _rValue) override;
 
     // OGenericUnoDialog overridables
-    virtual svt::OGenericUnoDialog::Dialog createDialog(vcl::Window* _pParent) override;
+    virtual svt::OGenericUnoDialog::Dialog createDialog(const css::uno::Reference<css::awt::XWindow>& rParent) override;
 };
 
 }   // namespace dbaui
diff --git a/dbaccess/source/ui/uno/AdvancedSettingsDlg.cxx b/dbaccess/source/ui/uno/AdvancedSettingsDlg.cxx
index 9166f0a5c10c..1631456520a4 100644
--- a/dbaccess/source/ui/uno/AdvancedSettingsDlg.cxx
+++ b/dbaccess/source/ui/uno/AdvancedSettingsDlg.cxx
@@ -25,6 +25,7 @@
 #include <advancedsettingsdlg.hxx>
 #include <comphelper/processfactory.hxx>
 #include <comphelper/proparrhlp.hxx>
+#include <toolkit/helper/vclunohelper.hxx>
 
 namespace dbaui
 {
@@ -66,7 +67,7 @@ namespace dbaui
         virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const override;
     protected:
     // OGenericUnoDialog overridables
-        virtual svt::OGenericUnoDialog::Dialog createDialog(vcl::Window* _pParent) override;
+        virtual svt::OGenericUnoDialog::Dialog createDialog(const css::uno::Reference<css::awt::XWindow>& rParent) override;
     };
 
     OAdvancedSettingsDialog::OAdvancedSettingsDialog(const Reference< XComponentContext >& _rxORB)
@@ -122,9 +123,9 @@ namespace dbaui
         return new ::cppu::OPropertyArrayHelper(aProps);
     }
 
-    svt::OGenericUnoDialog::Dialog OAdvancedSettingsDialog::createDialog(vcl::Window* _pParent)
+    svt::OGenericUnoDialog::Dialog OAdvancedSettingsDialog::createDialog(const css::uno::Reference<css::awt::XWindow>& rParent)
     {
-        return svt::OGenericUnoDialog::Dialog(VclPtr<AdvancedSettingsDialog>::Create(_pParent, m_pDatasourceItems.get(), m_aContext, m_aInitialSelection));
+        return svt::OGenericUnoDialog::Dialog(VclPtr<AdvancedSettingsDialog>::Create(VCLUnoHelper::GetWindow(rParent), m_pDatasourceItems.get(), m_aContext, m_aInitialSelection));
     }
 
 }   // namespace dbaui
diff --git a/dbaccess/source/ui/uno/DBTypeWizDlg.cxx b/dbaccess/source/ui/uno/DBTypeWizDlg.cxx
index 51c075f9d263..44cac4ccf614 100644
--- a/dbaccess/source/ui/uno/DBTypeWizDlg.cxx
+++ b/dbaccess/source/ui/uno/DBTypeWizDlg.cxx
@@ -22,6 +22,7 @@
 #include "DBTypeWizDlg.hxx"
 #include <dbwiz.hxx>
 #include <comphelper/processfactory.hxx>
+#include <toolkit/helper/vclunohelper.hxx>
 
 using namespace dbaui;
 
@@ -91,9 +92,9 @@ Reference<XPropertySetInfo>  SAL_CALL ODBTypeWizDialog::getPropertySetInfo()
     return new ::cppu::OPropertyArrayHelper(aProps);
 }
 
-svt::OGenericUnoDialog::Dialog ODBTypeWizDialog::createDialog(vcl::Window* _pParent)
+svt::OGenericUnoDialog::Dialog ODBTypeWizDialog::createDialog(const css::uno::Reference<css::awt::XWindow>& rParent)
 {
-    return svt::OGenericUnoDialog::Dialog(VclPtr<ODbTypeWizDialog>::Create(_pParent, m_pDatasourceItems.get(), m_aContext, m_aInitialSelection));
+    return svt::OGenericUnoDialog::Dialog(VclPtr<ODbTypeWizDialog>::Create(VCLUnoHelper::GetWindow(rParent), m_pDatasourceItems.get(), m_aContext, m_aInitialSelection));
 }
 
 }   // namespace dbaui
diff --git a/dbaccess/source/ui/uno/DBTypeWizDlg.hxx b/dbaccess/source/ui/uno/DBTypeWizDlg.hxx
index 7177ace3845b..85a1eabfbca0 100644
--- a/dbaccess/source/ui/uno/DBTypeWizDlg.hxx
+++ b/dbaccess/source/ui/uno/DBTypeWizDlg.hxx
@@ -57,7 +57,7 @@ public:
     virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const override;
 private:
     // OGenericUnoDialog overridables
-    virtual svt::OGenericUnoDialog::Dialog  createDialog(vcl::Window* _pParent) override;
+    virtual svt::OGenericUnoDialog::Dialog  createDialog(const css::uno::Reference<css::awt::XWindow>& rParent) override;
 };
 
 }   // namespace dbaui
diff --git a/dbaccess/source/ui/uno/DBTypeWizDlgSetup.cxx b/dbaccess/source/ui/uno/DBTypeWizDlgSetup.cxx
index 6f7cb96026ea..2fcf2752eb96 100644
--- a/dbaccess/source/ui/uno/DBTypeWizDlgSetup.cxx
+++ b/dbaccess/source/ui/uno/DBTypeWizDlgSetup.cxx
@@ -26,6 +26,7 @@
 #include <com/sun/star/sdb/XOfficeDatabaseDocument.hpp>
 #include <com/sun/star/sdbc/XDataSource.hpp>
 #include <comphelper/processfactory.hxx>
+#include <toolkit/helper/vclunohelper.hxx>
 
 using namespace dbaui;
 
@@ -104,9 +105,9 @@ Reference<XPropertySetInfo>  SAL_CALL ODBTypeWizDialogSetup::getPropertySetInfo(
     return new ::cppu::OPropertyArrayHelper(aProps);
 }
 
-svt::OGenericUnoDialog::Dialog ODBTypeWizDialogSetup::createDialog(vcl::Window* _pParent)
+svt::OGenericUnoDialog::Dialog ODBTypeWizDialogSetup::createDialog(const css::uno::Reference<css::awt::XWindow>& rParent)
 {
-    return svt::OGenericUnoDialog::Dialog(VclPtr<ODbTypeWizDialogSetup>::Create(_pParent, m_pDatasourceItems.get(), m_aContext, m_aInitialSelection));
+    return svt::OGenericUnoDialog::Dialog(VclPtr<ODbTypeWizDialogSetup>::Create(VCLUnoHelper::GetWindow(rParent), m_pDatasourceItems.get(), m_aContext, m_aInitialSelection));
 }
 
 void ODBTypeWizDialogSetup::executedDialog(sal_Int16 _nExecutionResult)
diff --git a/dbaccess/source/ui/uno/DBTypeWizDlgSetup.hxx b/dbaccess/source/ui/uno/DBTypeWizDlgSetup.hxx
index a65062ce083e..80d185190f3c 100644
--- a/dbaccess/source/ui/uno/DBTypeWizDlgSetup.hxx
+++ b/dbaccess/source/ui/uno/DBTypeWizDlgSetup.hxx
@@ -59,7 +59,7 @@ public:
     virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const override;
 private:
     // OGenericUnoDialog overridables
-    virtual svt::OGenericUnoDialog::Dialog createDialog(vcl::Window* _pParent) override;
+    virtual svt::OGenericUnoDialog::Dialog createDialog(const css::uno::Reference<css::awt::XWindow>& rParent) override;
     virtual void executedDialog(sal_Int16 _nExecutionResult) override;
 };
 
diff --git a/dbaccess/source/ui/uno/TableFilterDlg.cxx b/dbaccess/source/ui/uno/TableFilterDlg.cxx
index b749e9cb573c..ca24f744b0f7 100644
--- a/dbaccess/source/ui/uno/TableFilterDlg.cxx
+++ b/dbaccess/source/ui/uno/TableFilterDlg.cxx
@@ -22,6 +22,7 @@
 #include "TableFilterDlg.hxx"
 #include <TablesSingleDlg.hxx>
 #include <comphelper/processfactory.hxx>
+#include <toolkit/helper/vclunohelper.hxx>
 
 using namespace dbaui;
 
@@ -91,9 +92,9 @@ Reference<XPropertySetInfo>  SAL_CALL OTableFilterDialog::getPropertySetInfo()
     return new ::cppu::OPropertyArrayHelper(aProps);
 }
 
-svt::OGenericUnoDialog::Dialog OTableFilterDialog::createDialog(vcl::Window* _pParent)
+svt::OGenericUnoDialog::Dialog OTableFilterDialog::createDialog(const css::uno::Reference<css::awt::XWindow>& rParent)
 {
-    return svt::OGenericUnoDialog::Dialog(VclPtr<OTableSubscriptionDialog>::Create(_pParent, m_pDatasourceItems.get(), m_aContext, m_aInitialSelection));
+    return svt::OGenericUnoDialog::Dialog(VclPtr<OTableSubscriptionDialog>::Create(VCLUnoHelper::GetWindow(rParent), m_pDatasourceItems.get(), m_aContext, m_aInitialSelection));
 }
 
 }   // namespace dbaui
diff --git a/dbaccess/source/ui/uno/TableFilterDlg.hxx b/dbaccess/source/ui/uno/TableFilterDlg.hxx
index 075f703f4c2b..88216ca0d7e7 100644
--- a/dbaccess/source/ui/uno/TableFilterDlg.hxx
+++ b/dbaccess/source/ui/uno/TableFilterDlg.hxx
@@ -58,7 +58,7 @@ public:
     virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const override;
 private:
     // OGenericUnoDialog overridables
-    virtual svt::OGenericUnoDialog::Dialog createDialog(vcl::Window* _pParent) override;
+    virtual svt::OGenericUnoDialog::Dialog createDialog(const css::uno::Reference<css::awt::XWindow>& rParent) override;
 };
 
 }   // namespace dbaui
diff --git a/dbaccess/source/ui/uno/UserSettingsDlg.cxx b/dbaccess/source/ui/uno/UserSettingsDlg.cxx
index 9dac195f4bd4..dd10edbdb92d 100644
--- a/dbaccess/source/ui/uno/UserSettingsDlg.cxx
+++ b/dbaccess/source/ui/uno/UserSettingsDlg.cxx
@@ -22,6 +22,7 @@
 #include "UserSettingsDlg.hxx"
 #include <UserAdminDlg.hxx>
 #include <comphelper/processfactory.hxx>
+#include <toolkit/helper/vclunohelper.hxx>
 
 using namespace dbaui;
 
@@ -91,9 +92,9 @@ Reference<XPropertySetInfo>  SAL_CALL OUserSettingsDialog::getPropertySetInfo()
     return new ::cppu::OPropertyArrayHelper(aProps);
 }
 
-svt::OGenericUnoDialog::Dialog OUserSettingsDialog::createDialog(vcl::Window* _pParent)
+svt::OGenericUnoDialog::Dialog OUserSettingsDialog::createDialog(const css::uno::Reference<css::awt::XWindow>& rParent)
 {
-    return svt::OGenericUnoDialog::Dialog(VclPtr<OUserAdminDlg>::Create(_pParent, m_pDatasourceItems.get(), m_aContext, m_aInitialSelection, m_xActiveConnection));
+    return svt::OGenericUnoDialog::Dialog(VclPtr<OUserAdminDlg>::Create(VCLUnoHelper::GetWindow(rParent), m_pDatasourceItems.get(), m_aContext, m_aInitialSelection, m_xActiveConnection));
 }
 
 }   // namespace dbaui
diff --git a/dbaccess/source/ui/uno/UserSettingsDlg.hxx b/dbaccess/source/ui/uno/UserSettingsDlg.hxx
index 3d54cc9e3940..316940611f4e 100644
--- a/dbaccess/source/ui/uno/UserSettingsDlg.hxx
+++ b/dbaccess/source/ui/uno/UserSettingsDlg.hxx
@@ -58,7 +58,7 @@ public:
     virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const override;
 private:
     // OGenericUnoDialog overridables
-    virtual svt::OGenericUnoDialog::Dialog createDialog(vcl::Window* _pParent) override;
+    virtual svt::OGenericUnoDialog::Dialog createDialog(const css::uno::Reference<css::awt::XWindow>& rParent) override;
 };
 
 }   // namespace dbaui
diff --git a/dbaccess/source/ui/uno/admindlg.cxx b/dbaccess/source/ui/uno/admindlg.cxx
index a711537e1a4c..7c4ab1f18d1f 100644
--- a/dbaccess/source/ui/uno/admindlg.cxx
+++ b/dbaccess/source/ui/uno/admindlg.cxx
@@ -22,6 +22,7 @@
 #include "admindlg.hxx"
 #include <dbadmin.hxx>
 #include <comphelper/processfactory.hxx>
+#include <toolkit/helper/vclunohelper.hxx>
 
 using namespace dbaui;
 
@@ -91,9 +92,9 @@ Reference<XPropertySetInfo>  SAL_CALL ODataSourcePropertyDialog::getPropertySetI
     return new ::cppu::OPropertyArrayHelper(aProps);
 }
 
-svt::OGenericUnoDialog::Dialog ODataSourcePropertyDialog::createDialog(vcl::Window* _pParent)
+svt::OGenericUnoDialog::Dialog ODataSourcePropertyDialog::createDialog(const css::uno::Reference<css::awt::XWindow>& rParent)
 {
-    VclPtrInstance<ODbAdminDialog> pDialog(_pParent, m_pDatasourceItems.get(), m_aContext);
+    VclPtrInstance<ODbAdminDialog> pDialog(VCLUnoHelper::GetWindow(rParent), m_pDatasourceItems.get(), m_aContext);
 
     // the initial selection
     if ( m_aInitialSelection.hasValue() )
diff --git a/dbaccess/source/ui/uno/admindlg.hxx b/dbaccess/source/ui/uno/admindlg.hxx
index 394ad2db53c2..4f367d298ba1 100644
--- a/dbaccess/source/ui/uno/admindlg.hxx
+++ b/dbaccess/source/ui/uno/admindlg.hxx
@@ -57,7 +57,7 @@ public:
     virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const override;
 private:
     // OGenericUnoDialog overridables
-    virtual svt::OGenericUnoDialog::Dialog createDialog(vcl::Window* _pParent) override;
+    virtual svt::OGenericUnoDialog::Dialog createDialog(const css::uno::Reference<css::awt::XWindow>& rParent) override;
 };
 
 }   // namespace dbaui
diff --git a/dbaccess/source/ui/uno/composerdialogs.cxx b/dbaccess/source/ui/uno/composerdialogs.cxx
index 48d3ce5a6a79..9bbb3c072485 100644
--- a/dbaccess/source/ui/uno/composerdialogs.cxx
+++ b/dbaccess/source/ui/uno/composerdialogs.cxx
@@ -27,6 +27,7 @@
 #include <queryorder.hxx>
 #include <comphelper/processfactory.hxx>
 #include <connectivity/dbtools.hxx>
+#include <toolkit/helper/vclunohelper.hxx>
 #include <tools/diagnose_ex.h>
 #include <osl/diagnose.h>
 
@@ -76,7 +77,7 @@ namespace dbaui
 
     IMPLEMENT_PROPERTYCONTAINER_DEFAULTS( ComposerDialog )
 
-    svt::OGenericUnoDialog::Dialog ComposerDialog::createDialog(vcl::Window* _pParent)
+    svt::OGenericUnoDialog::Dialog ComposerDialog::createDialog(const css::uno::Reference<css::awt::XWindow>& rParent)
     {
         // obtain all the objects needed for the dialog
         Reference< XConnection > xConnection;
@@ -122,7 +123,7 @@ namespace dbaui
             return svt::OGenericUnoDialog::Dialog();
         }
 
-        return svt::OGenericUnoDialog::Dialog(createComposerDialog(_pParent, xConnection, xColumns));
+        return svt::OGenericUnoDialog::Dialog(createComposerDialog(VCLUnoHelper::GetWindow(rParent), xConnection, xColumns));
     }
 
     // RowsetFilterDialog
diff --git a/dbaccess/source/ui/uno/composerdialogs.hxx b/dbaccess/source/ui/uno/composerdialogs.hxx
index 5ceef84c9fb9..865752ff2dd7 100644
--- a/dbaccess/source/ui/uno/composerdialogs.hxx
+++ b/dbaccess/source/ui/uno/composerdialogs.hxx
@@ -68,7 +68,7 @@ namespace dbaui
 
     private:
         // OGenericUnoDialog overridables
-        virtual svt::OGenericUnoDialog::Dialog createDialog(vcl::Window* _pParent) override;
+        virtual svt::OGenericUnoDialog::Dialog createDialog(const css::uno::Reference<css::awt::XWindow>& rParent) override;
     };
 
     // RowsetFilterDialog
diff --git a/dbaccess/source/ui/uno/copytablewizard.cxx b/dbaccess/source/ui/uno/copytablewizard.cxx
index c129679211bc..40c6eee976bb 100644
--- a/dbaccess/source/ui/uno/copytablewizard.cxx
+++ b/dbaccess/source/ui/uno/copytablewizard.cxx
@@ -68,6 +68,7 @@
 #include <rtl/ustrbuf.hxx>
 #include <sal/log.hxx>
 #include <svtools/genericunodialog.hxx>
+#include <toolkit/helper/vclunohelper.hxx>
 #include <tools/diagnose_ex.h>
 #include <unotools/sharedunocomponent.hxx>
 #include <vcl/waitobj.hxx>
@@ -193,7 +194,7 @@ namespace dbaui
         virtual ~CopyTableWizard() override;
 
         // OGenericUnoDialog overridables
-        virtual svt::OGenericUnoDialog::Dialog createDialog(vcl::Window* _pParent) override;
+        virtual svt::OGenericUnoDialog::Dialog createDialog(const css::uno::Reference<css::awt::XWindow>& rParent) override;
         virtual void executedDialog( sal_Int16 _nExecutionResult ) override;
 
     private:
@@ -1509,13 +1510,13 @@ void SAL_CALL CopyTableWizard::initialize( const Sequence< Any >& _rArguments )
     return new ::cppu::OPropertyArrayHelper( aProps );
 }
 
-svt::OGenericUnoDialog::Dialog CopyTableWizard::createDialog( vcl::Window* _pParent )
+svt::OGenericUnoDialog::Dialog CopyTableWizard::createDialog(const css::uno::Reference<css::awt::XWindow>& rParent)
 {
     OSL_PRECOND( isInitialized(), "CopyTableWizard::createDialog: not initialized!" );
         // this should have been prevented in ::execute already
 
     VclPtrInstance<OCopyTableWizard> pWizard(
-        _pParent,
+        VCLUnoHelper::GetWindow(rParent),
         m_sDestinationTable,
         m_nOperation,
         *m_pSourceObject,
diff --git a/dbaccess/source/ui/uno/textconnectionsettings_uno.cxx b/dbaccess/source/ui/uno/textconnectionsettings_uno.cxx
index 46f17eb47a45..987b095c6e88 100644
--- a/dbaccess/source/ui/uno/textconnectionsettings_uno.cxx
+++ b/dbaccess/source/ui/uno/textconnectionsettings_uno.cxx
@@ -32,6 +32,7 @@
 #include <comphelper/processfactory.hxx>
 #include <comphelper/proparrhlp.hxx>
 #include <svtools/genericunodialog.hxx>
+#include <toolkit/helper/vclunohelper.hxx>
 #include <cppuhelper/implbase.hxx>
 
 namespace dbaui
@@ -105,7 +106,7 @@ namespace dbaui
 
     protected:
         // OGenericUnoDialog overridables
-        virtual svt::OGenericUnoDialog::Dialog createDialog(vcl::Window* _pParent) override;
+        virtual svt::OGenericUnoDialog::Dialog createDialog(const css::uno::Reference<css::awt::XWindow>& rParent) override;
         using OTextConnectionSettingsDialog_BASE::getFastPropertyValue;
     };
 
@@ -202,9 +203,9 @@ namespace dbaui
         return new ::cppu::OPropertyArrayHelper( aProps );
     }
 
-    svt::OGenericUnoDialog::Dialog OTextConnectionSettingsDialog::createDialog(vcl::Window* _pParent)
+    svt::OGenericUnoDialog::Dialog OTextConnectionSettingsDialog::createDialog(const css::uno::Reference<css::awt::XWindow>& rParent)
     {
-        return svt::OGenericUnoDialog::Dialog(VclPtr<TextConnectionSettingsDialog>::Create(_pParent, *m_pDatasourceItems));
+        return svt::OGenericUnoDialog::Dialog(VclPtr<TextConnectionSettingsDialog>::Create(VCLUnoHelper::GetWindow(rParent), *m_pDatasourceItems));
     }
 
     void SAL_CALL OTextConnectionSettingsDialog::setFastPropertyValue_NoBroadcast( sal_Int32 _nHandle, const Any& _rValue )
diff --git a/dbaccess/source/ui/uno/unoDirectSql.cxx b/dbaccess/source/ui/uno/unoDirectSql.cxx
index eb9b92f9159b..859e6760f22a 100644
--- a/dbaccess/source/ui/uno/unoDirectSql.cxx
+++ b/dbaccess/source/ui/uno/unoDirectSql.cxx
@@ -29,6 +29,7 @@
 #include <directsql.hxx>
 #include <stringconstants.hxx>
 #include <datasourceconnector.hxx>
+#include <toolkit/helper/vclunohelper.hxx>
 #include <tools/diagnose_ex.h>
 #include <comphelper/processfactory.hxx>
 
@@ -77,10 +78,11 @@ namespace dbaui
 
     IMPLEMENT_PROPERTYCONTAINER_DEFAULTS( ODirectSQLDialog )
 
-    svt::OGenericUnoDialog::Dialog ODirectSQLDialog::createDialog(vcl::Window* _pParent)
+    svt::OGenericUnoDialog::Dialog ODirectSQLDialog::createDialog(const css::uno::Reference<css::awt::XWindow>& rParent)
     {
         // obtain all the objects needed for the dialog
         Reference< XConnection > xConnection = m_xActiveConnection;
+        auto _pParent = VCLUnoHelper::GetWindow(rParent);
         if ( !xConnection.is() )
         {
             try
diff --git a/dbaccess/source/ui/uno/unoDirectSql.hxx b/dbaccess/source/ui/uno/unoDirectSql.hxx
index 9855e31cf1bf..f7a3a6ab0b17 100644
--- a/dbaccess/source/ui/uno/unoDirectSql.hxx
+++ b/dbaccess/source/ui/uno/unoDirectSql.hxx
@@ -61,7 +61,7 @@ namespace dbaui
 
     protected:
         // OGenericUnoDialog overridables
-        virtual svt::OGenericUnoDialog::Dialog createDialog(vcl::Window* _pParent) override;
+        virtual svt::OGenericUnoDialog::Dialog createDialog(const css::uno::Reference<css::awt::XWindow>& rParent) override;
         virtual void implInitialize(const css::uno::Any& _rValue) override;
     };
 
diff --git a/dbaccess/source/ui/uno/unosqlmessage.cxx b/dbaccess/source/ui/uno/unosqlmessage.cxx
index b7d0a5ce4fe0..2fc5c0a0982a 100644
--- a/dbaccess/source/ui/uno/unosqlmessage.cxx
+++ b/dbaccess/source/ui/uno/unosqlmessage.cxx
@@ -27,7 +27,7 @@
 #include <comphelper/propertysequence.hxx>
 #include <cppuhelper/typeprovider.hxx>
 #include <connectivity/dbexception.hxx>
-#include <vcl/dialog.hxx>
+#include <vcl/svapp.hxx>
 
 using namespace dbaui;
 using namespace dbtools;
@@ -144,9 +144,9 @@ Reference<XPropertySetInfo>  SAL_CALL OSQLMessageDialog::getPropertySetInfo()
     return new ::cppu::OPropertyArrayHelper(aProps);
 }
 
-svt::OGenericUnoDialog::Dialog OSQLMessageDialog::createDialog(vcl::Window* _pParent)
+svt::OGenericUnoDialog::Dialog OSQLMessageDialog::createDialog(const css::uno::Reference<css::awt::XWindow>& rParent)
 {
-    weld::Window* pParent = _pParent ? _pParent->GetFrameWeld() : nullptr;
+    weld::Window* pParent = Application::GetFrameWeld(rParent);
     if ( m_aException.hasValue() )
         return svt::OGenericUnoDialog::Dialog(o3tl::make_unique<OSQLMessageBox>(pParent, SQLExceptionInfo(m_aException), MessBoxStyle::Ok | MessBoxStyle::DefaultOk, m_sHelpURL));
 
diff --git a/extensions/Library_dbp.mk b/extensions/Library_dbp.mk
index 83c44a9d7d33..ccf7151eb2bb 100644
--- a/extensions/Library_dbp.mk
+++ b/extensions/Library_dbp.mk
@@ -40,6 +40,7 @@ $(eval $(call gb_Library_use_libraries,dbp,\
 	svt \
 	vcl \
 	tl \
+	tk \
 	svl \
 	sfx \
 	dbtools \
diff --git a/extensions/source/abpilot/unodialogabp.cxx b/extensions/source/abpilot/unodialogabp.cxx
index cddac1a81240..17bbd76ca36f 100644
--- a/extensions/source/abpilot/unodialogabp.cxx
+++ b/extensions/source/abpilot/unodialogabp.cxx
@@ -21,6 +21,7 @@
 #include <cppuhelper/typeprovider.hxx>
 #include "abspilot.hxx"
 #include <comphelper/sequence.hxx>
+#include <toolkit/helper/vclunohelper.hxx>
 
 #define PROPERTY_ID_DATASOURCENAME  3
 
@@ -110,9 +111,9 @@ namespace abp
         }
     }
 
-    svt::OGenericUnoDialog::Dialog OABSPilotUno::createDialog(vcl::Window* _pParent)
+    svt::OGenericUnoDialog::Dialog OABSPilotUno::createDialog(const css::uno::Reference<css::awt::XWindow>& rParent)
     {
-        return svt::OGenericUnoDialog::Dialog(VclPtr<OAddressBookSourcePilot>::Create(_pParent, m_aContext));
+        return svt::OGenericUnoDialog::Dialog(VclPtr<OAddressBookSourcePilot>::Create(VCLUnoHelper::GetWindow(rParent), m_aContext));
     }
 
 
diff --git a/extensions/source/abpilot/unodialogabp.hxx b/extensions/source/abpilot/unodialogabp.hxx
index 01f3bad92e55..f8f959585805 100644
--- a/extensions/source/abpilot/unodialogabp.hxx
+++ b/extensions/source/abpilot/unodialogabp.hxx
@@ -71,7 +71,7 @@ namespace abp
 
         using svt::OGenericUnoDialog::execute;
         // OGenericUnoDialog overridables
-        virtual svt::OGenericUnoDialog::Dialog createDialog(vcl::Window* _pParent) override;
+        virtual svt::OGenericUnoDialog::Dialog createDialog(const css::uno::Reference<css::awt::XWindow>& rParent) override;
         virtual void executedDialog(sal_Int16 _nExecutionResult) override;
     };
 
diff --git a/extensions/source/dbpilots/unoautopilot.hxx b/extensions/source/dbpilots/unoautopilot.hxx
index fe8b7058f70b..20a430999df8 100644
--- a/extensions/source/dbpilots/unoautopilot.hxx
+++ b/extensions/source/dbpilots/unoautopilot.hxx
@@ -21,6 +21,7 @@
 #define INCLUDED_EXTENSIONS_SOURCE_DBPILOTS_UNOAUTOPILOT_HXX
 
 #include <svtools/genericunodialog.hxx>
+#include <toolkit/helper/vclunohelper.hxx>
 #include <comphelper/processfactory.hxx>
 #include <comphelper/proparrhlp.hxx>
 #include <componentmodule.hxx>
@@ -104,9 +105,9 @@ namespace dbp
 
     private:
         // OGenericUnoDialog overridables
-        virtual svt::OGenericUnoDialog::Dialog createDialog(vcl::Window* _pParent) override
+        virtual svt::OGenericUnoDialog::Dialog createDialog(const css::uno::Reference<css::awt::XWindow>& rParent) override
         {
-            return svt::OGenericUnoDialog::Dialog(VclPtr<TYPE>::Create(_pParent, m_xObjectModel, m_aContext));
+            return svt::OGenericUnoDialog::Dialog(VclPtr<TYPE>::Create(VCLUnoHelper::GetWindow(rParent), m_xObjectModel, m_aContext));
         }
 
         virtual void implInitialize(const css::uno::Any& _rValue) override
diff --git a/extensions/source/propctrlr/MasterDetailLinkDialog.cxx b/extensions/source/propctrlr/MasterDetailLinkDialog.cxx
index e6af23a138a6..f561d46c9336 100644
--- a/extensions/source/propctrlr/MasterDetailLinkDialog.cxx
+++ b/extensions/source/propctrlr/MasterDetailLinkDialog.cxx
@@ -17,16 +17,16 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
- #include "MasterDetailLinkDialog.hxx"
- #include "formlinkdialog.hxx"
+#include <toolkit/helper/vclunohelper.hxx>
+#include "MasterDetailLinkDialog.hxx"
+#include "formlinkdialog.hxx"
 #include "pcrservices.hxx"
 
- extern "C" void createRegistryInfo_MasterDetailLinkDialog()
+extern "C" void createRegistryInfo_MasterDetailLinkDialog()
 {
     ::pcr::OAutoRegistration< ::pcr::MasterDetailLinkDialog > aAutoRegistration;
 }
 
-
 namespace pcr
 {
 
@@ -97,9 +97,9 @@ namespace pcr
         return new ::cppu::OPropertyArrayHelper(aProps);
     }
 
-    svt::OGenericUnoDialog::Dialog MasterDetailLinkDialog::createDialog(vcl::Window* _pParent)
+    svt::OGenericUnoDialog::Dialog MasterDetailLinkDialog::createDialog(const css::uno::Reference<css::awt::XWindow>& rParent)
     {
-        return svt::OGenericUnoDialog::Dialog(VclPtr<FormLinkDialog>::Create(_pParent,m_xDetail,m_xMaster, m_aContext
+        return svt::OGenericUnoDialog::Dialog(VclPtr<FormLinkDialog>::Create(VCLUnoHelper::GetWindow(rParent),m_xDetail,m_xMaster, m_aContext
             ,m_sExplanation,m_sDetailLabel,m_sMasterLabel));
     }
 
diff --git a/extensions/source/propctrlr/MasterDetailLinkDialog.hxx b/extensions/source/propctrlr/MasterDetailLinkDialog.hxx
index 75668b430abf..cfc779459bdf 100644
--- a/extensions/source/propctrlr/MasterDetailLinkDialog.hxx
+++ b/extensions/source/propctrlr/MasterDetailLinkDialog.hxx
@@ -60,7 +60,7 @@ namespace pcr
         virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const override;
 
         // OGenericUnoDialog overridables
-        virtual svt::OGenericUnoDialog::Dialog createDialog(vcl::Window* _pParent) override;
+        virtual svt::OGenericUnoDialog::Dialog createDialog(const css::uno::Reference<css::awt::XWindow>& rParent) override;
         virtual void implInitialize(const css::uno::Any& _rValue) override;
 
         css::uno::Reference< css::beans::XPropertySet> m_xDetail;
diff --git a/extensions/source/propctrlr/controlfontdialog.cxx b/extensions/source/propctrlr/controlfontdialog.cxx
index 51a3a1dc356e..82e777d18dee 100644
--- a/extensions/source/propctrlr/controlfontdialog.cxx
+++ b/extensions/source/propctrlr/controlfontdialog.cxx
@@ -137,7 +137,7 @@ namespace pcr
         return new ::cppu::OPropertyArrayHelper(aProps);
     }
 
-    svt::OGenericUnoDialog::Dialog OControlFontDialog::createDialog(vcl::Window* pParent)
+    svt::OGenericUnoDialog::Dialog OControlFontDialog::createDialog(const css::uno::Reference<css::awt::XWindow>& rParent)
     {
         ControlCharacterDialog::createItemSet(m_pFontItems, m_pItemPool, m_pItemPoolDefaults);
 
@@ -148,7 +148,7 @@ namespace pcr
         // sets a new introspectee and re-executes us. In this case, the dialog returned here (upon the first
         // execute) will be re-used upon the second execute, and thus it won't be initialized correctly.
 
-        return svt::OGenericUnoDialog::Dialog(o3tl::make_unique<ControlCharacterDialog>(pParent ? pParent->GetFrameWeld() : nullptr, *m_pFontItems));
+        return svt::OGenericUnoDialog::Dialog(o3tl::make_unique<ControlCharacterDialog>(Application::GetFrameWeld(rParent), *m_pFontItems));
     }
 
     void OControlFontDialog::executedDialog(sal_Int16 _nExecutionResult)
diff --git a/extensions/source/propctrlr/controlfontdialog.hxx b/extensions/source/propctrlr/controlfontdialog.hxx
index 8a110b99db35..ab57691ee798 100644
--- a/extensions/source/propctrlr/controlfontdialog.hxx
+++ b/extensions/source/propctrlr/controlfontdialog.hxx
@@ -81,7 +81,7 @@ namespace pcr
 
     protected:
         // OGenericUnoDialog overridables
-        virtual svt::OGenericUnoDialog::Dialog createDialog(vcl::Window* _pParent) override;
+        virtual svt::OGenericUnoDialog::Dialog createDialog(const css::uno::Reference<css::awt::XWindow>& rParent) override;
         virtual void    executedDialog(sal_Int16 _nExecutionResult) override;
     };
 
diff --git a/extensions/source/propctrlr/pcrunodialogs.cxx b/extensions/source/propctrlr/pcrunodialogs.cxx
index 9f80ea2b37d8..d927d1d9b4ac 100644
--- a/extensions/source/propctrlr/pcrunodialogs.cxx
+++ b/extensions/source/propctrlr/pcrunodialogs.cxx
@@ -20,7 +20,7 @@
 #include <sal/config.h>
 
 #include <com/sun/star/beans/NamedValue.hpp>
-
+#include <toolkit/helper/vclunohelper.hxx>
 #include "pcrservices.hxx"
 #include "pcrunodialogs.hxx"
 #include "formstrings.hxx"
@@ -124,9 +124,9 @@ namespace pcr
         return new ::cppu::OPropertyArrayHelper( aProps );
     }
 
-    svt::OGenericUnoDialog::Dialog OTabOrderDialog::createDialog( vcl::Window* _pParent )
+    svt::OGenericUnoDialog::Dialog OTabOrderDialog::createDialog(const css::uno::Reference<css::awt::XWindow>& rParent)
     {
-        return svt::OGenericUnoDialog::Dialog(VclPtr<TabOrderDialog>::Create( _pParent, m_xTabbingModel, m_xControlContext, m_aContext));
+        return svt::OGenericUnoDialog::Dialog(VclPtr<TabOrderDialog>::Create(VCLUnoHelper::GetWindow(rParent), m_xTabbingModel, m_xControlContext, m_aContext));
     }
 
     void OTabOrderDialog::initialize( const Sequence< Any >& aArguments )
diff --git a/extensions/source/propctrlr/pcrunodialogs.hxx b/extensions/source/propctrlr/pcrunodialogs.hxx
index 6f4224e9e2dc..0bf03f4ee7ad 100644
--- a/extensions/source/propctrlr/pcrunodialogs.hxx
+++ b/extensions/source/propctrlr/pcrunodialogs.hxx
@@ -79,7 +79,7 @@ namespace pcr
 
     protected:
         // OGenericUnoDialog overridables
-        virtual svt::OGenericUnoDialog::Dialog createDialog(vcl::Window* _pParent) override;
+        virtual svt::OGenericUnoDialog::Dialog createDialog(const css::uno::Reference<css::awt::XWindow>& rParent) override;
     };
 
 
diff --git a/filter/Library_flash.mk b/filter/Library_flash.mk
index 7abba3682a56..ccf161b011e0 100644
--- a/filter/Library_flash.mk
+++ b/filter/Library_flash.mk
@@ -28,6 +28,7 @@ $(eval $(call gb_Library_use_libraries,flash,\
 	vcl \
 	utl \
 	tl \
+	tk \
 	i18nlangtag \
 	comphelper \
 	basegfx \
diff --git a/filter/source/flash/swfdialog.cxx b/filter/source/flash/swfdialog.cxx
index 4116900ee29b..92940f111f00 100644
--- a/filter/source/flash/swfdialog.cxx
+++ b/filter/source/flash/swfdialog.cxx
@@ -29,6 +29,7 @@
 #include <com/sun/star/view/XRenderable.hpp>
 #include <com/sun/star/frame/XController.hpp>
 #include <com/sun/star/view/XSelectionSupplier.hpp>
+#include <toolkit/helper/vclunohelper.hxx>
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
@@ -117,7 +118,7 @@ Sequence< OUString > SAL_CALL SWFDialog::getSupportedServiceNames()
 }
 
 
-svt::OGenericUnoDialog::Dialog SWFDialog::createDialog( vcl::Window* pParent )
+svt::OGenericUnoDialog::Dialog SWFDialog::createDialog(const css::uno::Reference<css::awt::XWindow>& rParent)
 {
     VclPtr<::Dialog> pRet;
 
@@ -143,7 +144,7 @@ svt::OGenericUnoDialog::Dialog SWFDialog::createDialog( vcl::Window* pParent )
         {
         }
 */
-        pRet.reset( VclPtr<ImpSWFDialog>::Create( pParent, maFilterData ) );
+        pRet.reset(VclPtr<ImpSWFDialog>::Create(VCLUnoHelper::GetWindow(rParent), maFilterData));
     }
 
     return svt::OGenericUnoDialog::Dialog(pRet);
diff --git a/filter/source/flash/swfdialog.hxx b/filter/source/flash/swfdialog.hxx
index 3315ab088832..c48a13198f2c 100644
--- a/filter/source/flash/swfdialog.hxx
+++ b/filter/source/flash/swfdialog.hxx
@@ -51,7 +51,7 @@ private:
     virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
     virtual OUString SAL_CALL getImplementationName() override;
     virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
-    virtual svt::OGenericUnoDialog::Dialog createDialog( vcl::Window* pParent ) override;
+    virtual svt::OGenericUnoDialog::Dialog createDialog(const css::uno::Reference<css::awt::XWindow>& rParent) override;
     virtual void executedDialog( sal_Int16 nExecutionResult ) override;
     virtual css::uno::Reference< css::beans::XPropertySetInfo>  SAL_CALL getPropertySetInfo() override;
     virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() override;
diff --git a/filter/source/pdf/pdfdialog.cxx b/filter/source/pdf/pdfdialog.cxx
index 4c87cca84dff..b6219e5be777 100644
--- a/filter/source/pdf/pdfdialog.cxx
+++ b/filter/source/pdf/pdfdialog.cxx
@@ -83,10 +83,10 @@ Sequence< OUString > SAL_CALL PDFDialog::getSupportedServiceNames()
     return PDFDialog_getSupportedServiceNames();
 }
 
-svt::OGenericUnoDialog::Dialog PDFDialog::createDialog(vcl::Window* pParent)
+svt::OGenericUnoDialog::Dialog PDFDialog::createDialog(const css::uno::Reference<css::awt::XWindow>& rParent)
 {
     if( mxSrcDoc.is() )
-        return svt::OGenericUnoDialog::Dialog(o3tl::make_unique<ImpPDFTabDialog>(pParent ? pParent->GetFrameWeld() : nullptr, maFilterData, mxSrcDoc));
+        return svt::OGenericUnoDialog::Dialog(o3tl::make_unique<ImpPDFTabDialog>(Application::GetFrameWeld(rParent), maFilterData, mxSrcDoc));
     return svt::OGenericUnoDialog::Dialog();
 }
 
diff --git a/filter/source/pdf/pdfdialog.hxx b/filter/source/pdf/pdfdialog.hxx
index 278d887e9753..953555668b0f 100644
--- a/filter/source/pdf/pdfdialog.hxx
+++ b/filter/source/pdf/pdfdialog.hxx
@@ -44,7 +44,7 @@ private:
     virtual Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
     virtual OUString SAL_CALL getImplementationName() override;
     virtual Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
-    virtual svt::OGenericUnoDialog::Dialog createDialog(vcl::Window* pParent) override;
+    virtual svt::OGenericUnoDialog::Dialog createDialog(const css::uno::Reference<css::awt::XWindow>& rParent) override;
     virtual void executedDialog( sal_Int16 nExecutionResult ) override;
     virtual Reference< XPropertySetInfo>  SAL_CALL getPropertySetInfo() override;
     virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() override;
diff --git a/include/svtools/genericunodialog.hxx b/include/svtools/genericunodialog.hxx
index c8e26b937f82..46c56a0d781a 100644
--- a/include/svtools/genericunodialog.hxx
+++ b/include/svtools/genericunodialog.hxx
@@ -166,7 +166,7 @@ namespace svt
             but the application-wide solar mutex is (to guard the not thread-safe ctor of the dialog).
             @param      pParent     the parent window for the new dialog
         */
-        virtual OGenericUnoDialog::Dialog createDialog(vcl::Window* _pParent) = 0;
+        virtual OGenericUnoDialog::Dialog createDialog(const css::uno::Reference<css::awt::XWindow>& rParent) = 0;
 
         /// called to destroy the dialog used. deletes m_pDialog and resets it to NULL
         void destroyDialog();
diff --git a/svtools/source/filter/exportdialog.hxx b/svtools/source/filter/exportdialog.hxx
index 4634e1b327b3..0b275beed358 100644
--- a/svtools/source/filter/exportdialog.hxx
+++ b/svtools/source/filter/exportdialog.hxx
@@ -22,13 +22,6 @@
 #define INCLUDED_SVTOOLS_SOURCE_FILTER_EXPORTDIALOG_HXX
 
 #include <FltCallDialogParameter.hxx>
-#include <vcl/dialog.hxx>
-#include <vcl/button.hxx>
-#include <vcl/fixed.hxx>
-#include <vcl/field.hxx>
-#include <vcl/layout.hxx>
-#include <vcl/lstbox.hxx>
-#include <vcl/slider.hxx>
 #include <vcl/weld.hxx>
 #include <com/sun/star/document/XExporter.hpp>
 #include <com/sun/star/drawing/XShape.hpp>
diff --git a/svtools/source/uno/addrtempuno.cxx b/svtools/source/uno/addrtempuno.cxx
index d76cd16491fc..e6d1bc4b056e 100644
--- a/svtools/source/uno/addrtempuno.cxx
+++ b/svtools/source/uno/addrtempuno.cxx
@@ -23,6 +23,7 @@
 #include <comphelper/proparrhlp.hxx>
 #include <comphelper/propertysequence.hxx>
 #include <com/sun/star/sdbc/XDataSource.hpp>
+#include <toolkit/helper/vclunohelper.hxx>
 #include <rtl/ref.hxx>
 
 using namespace svt;
@@ -69,7 +70,7 @@ namespace {
 
     protected:
     // OGenericUnoDialog overridables
-        virtual svt::OGenericUnoDialog::Dialog createDialog(vcl::Window* _pParent) override;
+        virtual svt::OGenericUnoDialog::Dialog createDialog(const css::uno::Reference<css::awt::XWindow>& rParent) override;
 
         virtual void implInitialize(const css::uno::Any& _rValue) override;
 
@@ -197,8 +198,9 @@ namespace {
     }
 
 
-    svt::OGenericUnoDialog::Dialog OAddressBookSourceDialogUno::createDialog(vcl::Window* _pParent)
+    svt::OGenericUnoDialog::Dialog OAddressBookSourceDialogUno::createDialog(const css::uno::Reference<css::awt::XWindow>& rParent)
     {
+        auto _pParent = VCLUnoHelper::GetWindow(rParent);
         if ( m_xDataSource.is() && !m_sTable.isEmpty() )
             return svt::OGenericUnoDialog::Dialog(VclPtr<AddressBookSourceDialog>::Create(_pParent, m_aContext, m_xDataSource, m_sDataSourceName, m_sTable, m_aAliases));
         else
diff --git a/svtools/source/uno/genericunodialog.cxx b/svtools/source/uno/genericunodialog.cxx
index ff61474ca994..d4f0f97f42d1 100644
--- a/svtools/source/uno/genericunodialog.cxx
+++ b/svtools/source/uno/genericunodialog.cxx
@@ -30,7 +30,6 @@
 #include <osl/diagnose.h>
 #include <tools/diagnose_ex.h>
 #include <osl/mutex.hxx>
-#include <vcl/dialog.hxx>
 #include <vcl/svapp.hxx>
 
 using namespace css::uno;
@@ -164,16 +163,10 @@ bool OGenericUnoDialog::impl_ensureDialog_lck()
 
     // get the parameters for the dialog from the current settings
 
-    // the parent window
-    VclPtr<vcl::Window> pParent;
-    VCLXWindow* pImplementation = VCLXWindow::GetImplementation(m_xParent);
-    if (pImplementation)
-        pParent = pImplementation->GetWindow();
-
     // the title
     OUString sTitle = m_sTitle;
 
-    OGenericUnoDialog::Dialog aDialog(createDialog(pParent));
+    OGenericUnoDialog::Dialog aDialog(createDialog(m_xParent));
     OSL_ENSURE(aDialog, "OGenericUnoDialog::impl_ensureDialog_lck: createDialog returned nonsense!");
     if (!aDialog)
         return false;
diff --git a/svtools/source/uno/wizard/unowizard.cxx b/svtools/source/uno/wizard/unowizard.cxx
index 1d66b67932bc..d230dc3c5825 100644
--- a/svtools/source/uno/wizard/unowizard.cxx
+++ b/svtools/source/uno/wizard/unowizard.cxx
@@ -33,6 +33,7 @@
 #include <comphelper/proparrhlp.hxx>
 #include <cppuhelper/implbase.hxx>
 #include <svtools/genericunodialog.hxx>
+#include <toolkit/helper/vclunohelper.hxx>
 #include <tools/diagnose_ex.h>
 #include <rtl/ref.hxx>
 #include <rtl/strbuf.hxx>
@@ -131,7 +132,7 @@ namespace {
         virtual ~Wizard() override;
 
     protected:
-        virtual OGenericUnoDialog::Dialog createDialog(vcl::Window* _pParent) override;
+        virtual OGenericUnoDialog::Dialog createDialog(const css::uno::Reference<css::awt::XWindow>& rParent) override;
 
     private:
         css::uno::Sequence< css::uno::Sequence< sal_Int16 > >         m_aWizardSteps;
@@ -252,9 +253,9 @@ namespace {
             return OUStringToOString( _rHelpURL, RTL_TEXTENCODING_UTF8 );
     }
 
-    svt::OGenericUnoDialog::Dialog Wizard::createDialog( vcl::Window* i_pParent )
+    svt::OGenericUnoDialog::Dialog Wizard::createDialog(const css::uno::Reference<css::awt::XWindow>& rParent)
     {
-        VclPtrInstance<WizardShell> pDialog( i_pParent, m_xController, m_aWizardSteps );
+        VclPtrInstance<WizardShell> pDialog(VCLUnoHelper::GetWindow(rParent), m_xController, m_aWizardSteps);
         pDialog->SetHelpId(  lcl_getHelpId( m_sHelpURL ) );
         pDialog->setTitleBase( m_sTitle );
         return OGenericUnoDialog::Dialog(pDialog);
diff --git a/svx/source/form/xfm_addcondition.cxx b/svx/source/form/xfm_addcondition.cxx
index 4d6b8f579acd..e4061337986f 100644
--- a/svx/source/form/xfm_addcondition.cxx
+++ b/svx/source/form/xfm_addcondition.cxx
@@ -22,6 +22,7 @@
 
 #include <comphelper/processfactory.hxx>
 #include <cppuhelper/typeprovider.hxx>
+#include <toolkit/helper/vclunohelper.hxx>
 #include <datanavi.hxx>
 #include <fmservs.hxx>
 
@@ -137,12 +138,12 @@ namespace svxform
         return new ::cppu::OPropertyArrayHelper( aProperties );
     }
 
-    svt::OGenericUnoDialog::Dialog OAddConditionDialog::createDialog(vcl::Window* _pParent)
+    svt::OGenericUnoDialog::Dialog OAddConditionDialog::createDialog(const css::uno::Reference<css::awt::XWindow>& rParent)
     {
         if ( !m_xBinding.is() || m_sFacetName.isEmpty() )
             throw RuntimeException( OUString(), *this );
 
-        return svt::OGenericUnoDialog::Dialog(VclPtr<AddConditionDialog>::Create(_pParent, m_sFacetName, m_xBinding));
+        return svt::OGenericUnoDialog::Dialog(VclPtr<AddConditionDialog>::Create(VCLUnoHelper::GetWindow(rParent), m_sFacetName, m_xBinding));
     }
 
     void OAddConditionDialog::executedDialog( sal_Int16 _nExecutionResult )
diff --git a/svx/source/inc/xfm_addcondition.hxx b/svx/source/inc/xfm_addcondition.hxx
index 01f97fe8a064..34d6a06b9ad4 100644
--- a/svx/source/inc/xfm_addcondition.hxx
+++ b/svx/source/inc/xfm_addcondition.hxx
@@ -56,7 +56,7 @@ namespace svxform
         virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const override;
 
         // OGenericUnoDialog overridables
-        virtual svt::OGenericUnoDialog::Dialog createDialog(vcl::Window* _pParent) override;
+        virtual svt::OGenericUnoDialog::Dialog createDialog(const css::uno::Reference<css::awt::XWindow>& rParent) override;
         virtual void executedDialog(sal_Int16 _nExecutionResult) override;
 
         css::uno::Reference< css::beans::XPropertySet >


More information about the Libreoffice-commits mailing list