summaryrefslogtreecommitdiff
path: root/svtools
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 /svtools
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 'svtools')
-rw-r--r--svtools/source/filter/exportdialog.hxx7
-rw-r--r--svtools/source/uno/addrtempuno.cxx6
-rw-r--r--svtools/source/uno/genericunodialog.cxx9
-rw-r--r--svtools/source/uno/wizard/unowizard.cxx7
4 files changed, 9 insertions, 20 deletions
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);