summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/uno
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-10-06 15:54:11 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-10-06 20:54:24 +0200
commit8a63cdd32c4eb348cb6625b4be6739fe391cb0b4 (patch)
tree4ea85a14afcdbf241254cfaa241a910140058805 /dbaccess/source/ui/uno
parente650279db77281fe98aaff28e31c2269611c31e4 (diff)
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@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'dbaccess/source/ui/uno')
-rw-r--r--dbaccess/source/ui/uno/AdvancedSettingsDlg.cxx7
-rw-r--r--dbaccess/source/ui/uno/DBTypeWizDlg.cxx5
-rw-r--r--dbaccess/source/ui/uno/DBTypeWizDlg.hxx2
-rw-r--r--dbaccess/source/ui/uno/DBTypeWizDlgSetup.cxx5
-rw-r--r--dbaccess/source/ui/uno/DBTypeWizDlgSetup.hxx2
-rw-r--r--dbaccess/source/ui/uno/TableFilterDlg.cxx5
-rw-r--r--dbaccess/source/ui/uno/TableFilterDlg.hxx2
-rw-r--r--dbaccess/source/ui/uno/UserSettingsDlg.cxx5
-rw-r--r--dbaccess/source/ui/uno/UserSettingsDlg.hxx2
-rw-r--r--dbaccess/source/ui/uno/admindlg.cxx5
-rw-r--r--dbaccess/source/ui/uno/admindlg.hxx2
-rw-r--r--dbaccess/source/ui/uno/composerdialogs.cxx5
-rw-r--r--dbaccess/source/ui/uno/composerdialogs.hxx2
-rw-r--r--dbaccess/source/ui/uno/copytablewizard.cxx7
-rw-r--r--dbaccess/source/ui/uno/textconnectionsettings_uno.cxx7
-rw-r--r--dbaccess/source/ui/uno/unoDirectSql.cxx4
-rw-r--r--dbaccess/source/ui/uno/unoDirectSql.hxx2
-rw-r--r--dbaccess/source/ui/uno/unosqlmessage.cxx6
18 files changed, 43 insertions, 32 deletions
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));