diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-10-06 15:54:11 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-10-06 20:54:24 +0200 |
commit | 8a63cdd32c4eb348cb6625b4be6739fe391cb0b4 (patch) | |
tree | 4ea85a14afcdbf241254cfaa241a910140058805 /extensions | |
parent | e650279db77281fe98aaff28e31c2269611c31e4 (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 'extensions')
-rw-r--r-- | extensions/Library_dbp.mk | 1 | ||||
-rw-r--r-- | extensions/source/abpilot/unodialogabp.cxx | 5 | ||||
-rw-r--r-- | extensions/source/abpilot/unodialogabp.hxx | 2 | ||||
-rw-r--r-- | extensions/source/dbpilots/unoautopilot.hxx | 5 | ||||
-rw-r--r-- | extensions/source/propctrlr/MasterDetailLinkDialog.cxx | 12 | ||||
-rw-r--r-- | extensions/source/propctrlr/MasterDetailLinkDialog.hxx | 2 | ||||
-rw-r--r-- | extensions/source/propctrlr/controlfontdialog.cxx | 4 | ||||
-rw-r--r-- | extensions/source/propctrlr/controlfontdialog.hxx | 2 | ||||
-rw-r--r-- | extensions/source/propctrlr/pcrunodialogs.cxx | 6 | ||||
-rw-r--r-- | extensions/source/propctrlr/pcrunodialogs.hxx | 2 |
10 files changed, 22 insertions, 19 deletions
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; }; |