summaryrefslogtreecommitdiff
path: root/extensions/source
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/source')
-rw-r--r--extensions/source/abpilot/abspilot.cxx13
-rw-r--r--extensions/source/abpilot/admininvokationimpl.cxx5
-rw-r--r--extensions/source/abpilot/datasourcehandling.cxx3
-rw-r--r--extensions/source/abpilot/datasourcehandling.hxx4
-rw-r--r--extensions/source/abpilot/typeselectionpage.cxx9
-rw-r--r--extensions/source/dbpilots/commonpagesdbp.cxx4
-rw-r--r--extensions/source/dbpilots/controlwizard.cxx4
-rw-r--r--extensions/source/dbpilots/controlwizard.hxx3
-rw-r--r--extensions/source/scanner/sanedlg.cxx26
-rw-r--r--extensions/source/update/ui/updatecheckui.cxx7
10 files changed, 50 insertions, 28 deletions
diff --git a/extensions/source/abpilot/abspilot.cxx b/extensions/source/abpilot/abspilot.cxx
index 270025e986c1..1236cac6decf 100644
--- a/extensions/source/abpilot/abspilot.cxx
+++ b/extensions/source/abpilot/abspilot.cxx
@@ -26,9 +26,10 @@
#include "typeselectionpage.hxx"
#include "admininvokationpage.hxx"
#include "tableselectionpage.hxx"
-#include <vcl/waitobj.hxx>
-#include <vcl/layout.hxx>
#include <vcl/settings.hxx>
+#include <vcl/svapp.hxx>
+#include <vcl/waitobj.hxx>
+#include <vcl/weld.hxx>
#include "abpfinalpage.hxx"
#include "fieldmappingpage.hxx"
#include "fieldmappingimpl.hxx"
@@ -263,7 +264,11 @@ namespace abp
if ( aTables.empty() )
{
- if (RET_YES != ScopedVclPtrInstance<MessageDialog>(this, compmodule::ModuleRes(getSettings().eType == AST_EVOLUTION_GROUPWISE ? RID_STR_QRY_NO_EVO_GW : RID_STR_QRY_NOTABLES), VclMessageType::Question, VclButtonsType::YesNo)->Execute())
+ std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(GetFrameWeld(),
+ VclMessageType::Question, VclButtonsType::YesNo,
+ compmodule::ModuleRes(getSettings().eType == AST_EVOLUTION_GROUPWISE ? RID_STR_QRY_NO_EVO_GW : RID_STR_QRY_NOTABLES)));
+
+ if (RET_YES != xBox->run())
{
// cannot ask the user, or the user chose to use this data source, though there are no tables
bAllow = false;
@@ -383,7 +388,7 @@ namespace abp
if ( _bForceReConnect && m_aNewDataSource.isConnected( ) )
m_aNewDataSource.disconnect( );
- return m_aNewDataSource.connect( this );
+ return m_aNewDataSource.connect(GetFrameWeld());
}
diff --git a/extensions/source/abpilot/admininvokationimpl.cxx b/extensions/source/abpilot/admininvokationimpl.cxx
index 9f1706f2c086..fbb25e46853a 100644
--- a/extensions/source/abpilot/admininvokationimpl.cxx
+++ b/extensions/source/abpilot/admininvokationimpl.cxx
@@ -28,6 +28,7 @@
#include <toolkit/helper/vclunohelper.hxx>
#include <strings.hrc>
#include <componentmodule.hxx>
+#include <vcl/weld.hxx>
#include <vcl/waitobj.hxx>
@@ -51,7 +52,7 @@ namespace abp
{
DBG_ASSERT(m_xContext.is(), "OAdminDialogInvokation::OAdminDialogInvokation: invalid service factory!");
DBG_ASSERT(m_xDataSource.is(), "OAdminDialogInvokation::OAdminDialogInvokation: invalid preferred name!");
- DBG_ASSERT(m_pMessageParent, "OAdminDialogInvokation::OAdminDialogInvokation: invalid message parent!");
+ assert(m_pMessageParent && "OAdminDialogInvokation::OAdminDialogInvokation: invalid message parent!");
}
@@ -101,7 +102,7 @@ namespace abp
return true;
}
else
- ShowServiceNotAvailableError(m_pMessageParent, s_sAdministrationServiceName, true);
+ ShowServiceNotAvailableError(m_pMessageParent->GetFrameWeld(), s_sAdministrationServiceName, true);
}
catch(const Exception&)
{
diff --git a/extensions/source/abpilot/datasourcehandling.cxx b/extensions/source/abpilot/datasourcehandling.cxx
index 75f2685ea13b..2194f158cb00 100644
--- a/extensions/source/abpilot/datasourcehandling.cxx
+++ b/extensions/source/abpilot/datasourcehandling.cxx
@@ -48,6 +48,7 @@
#include <unotools/confignode.hxx>
#include <unotools/sharedunocomponent.hxx>
#include <vcl/stdtext.hxx>
+#include <vcl/weld.hxx>
#include <sfx2/objsh.hxx>
#include <sfx2/docfile.hxx>
#include <sfx2/viewfrm.hxx>
@@ -514,7 +515,7 @@ namespace abp
}
- bool ODataSource::connect( vcl::Window* _pMessageParent )
+ bool ODataSource::connect(weld::Window* _pMessageParent)
{
if ( isConnected( ) )
// nothing to do
diff --git a/extensions/source/abpilot/datasourcehandling.hxx b/extensions/source/abpilot/datasourcehandling.hxx
index 7cde550a6e0b..f7f794fd41cf 100644
--- a/extensions/source/abpilot/datasourcehandling.hxx
+++ b/extensions/source/abpilot/datasourcehandling.hxx
@@ -33,7 +33,7 @@ namespace com { namespace sun { namespace star {
}
} } }
-namespace vcl { class Window; }
+namespace weld { class Window; }
namespace abp
@@ -144,7 +144,7 @@ namespace abp
at all.
@see isConnected
*/
- bool connect( vcl::Window* _pMessageParent );
+ bool connect(weld::Window* _pMessageParent);
/// returns <TRUE/> if the object has a valid connection, obtained from its data source
bool isConnected( ) const;
diff --git a/extensions/source/abpilot/typeselectionpage.cxx b/extensions/source/abpilot/typeselectionpage.cxx
index 1a730477b6ea..627f735f3fbc 100644
--- a/extensions/source/abpilot/typeselectionpage.cxx
+++ b/extensions/source/abpilot/typeselectionpage.cxx
@@ -20,7 +20,8 @@
#include "typeselectionpage.hxx"
#include "addresssettings.hxx"
#include "abspilot.hxx"
-#include <vcl/layout.hxx>
+#include <vcl/svapp.hxx>
+#include <vcl/weld.hxx>
#include <com/sun/star/sdbc/XDriver.hpp>
#include <com/sun/star/sdbc/DriverManager.hpp>
#include <comphelper/processfactory.hxx>
@@ -228,8 +229,10 @@ namespace abp
if (AST_INVALID == getSelectedType( ))
{
- ScopedVclPtrInstance< MessageDialog > aError(this, compmodule::ModuleRes(RID_STR_NEEDTYPESELECTION));
- aError->Execute();
+ std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(GetFrameWeld(),
+ VclMessageType::Warning, VclButtonsType::Ok,
+ compmodule::ModuleRes(RID_STR_NEEDTYPESELECTION)));
+ xBox->run();
return false;
}
diff --git a/extensions/source/dbpilots/commonpagesdbp.cxx b/extensions/source/dbpilots/commonpagesdbp.cxx
index 08beda2a170b..4c2d7890c9c1 100644
--- a/extensions/source/dbpilots/commonpagesdbp.cxx
+++ b/extensions/source/dbpilots/commonpagesdbp.cxx
@@ -293,7 +293,7 @@ namespace dbp
if (m_xDSContext->getByName(sCurrentDatasource) >>= xDatasource)
{ // connect
// get the default SDB interaction handler
- Reference< XInteractionHandler > xHandler = getDialog()->getInteractionHandler(this);
+ Reference< XInteractionHandler > xHandler = getDialog()->getInteractionHandler(GetFrameWeld());
if (!xHandler.is() )
return;
xConn = xDatasource->connectWithCompletion(xHandler);
@@ -353,7 +353,7 @@ namespace dbp
try
{
// get the default SDB interaction handler
- Reference< XInteractionHandler > xHandler = getDialog()->getInteractionHandler(this);
+ Reference< XInteractionHandler > xHandler = getDialog()->getInteractionHandler(GetFrameWeld());
if ( xHandler.is() )
xHandler->handle(xRequest);
}
diff --git a/extensions/source/dbpilots/controlwizard.cxx b/extensions/source/dbpilots/controlwizard.cxx
index 54d10fd2c036..8577aa14c80a 100644
--- a/extensions/source/dbpilots/controlwizard.cxx
+++ b/extensions/source/dbpilots/controlwizard.cxx
@@ -459,7 +459,7 @@ namespace dbp
return initContext();
}
- Reference< XInteractionHandler > OControlWizard::getInteractionHandler(vcl::Window* _pWindow) const
+ Reference< XInteractionHandler > OControlWizard::getInteractionHandler(weld::Window* _pWindow) const
{
Reference< XInteractionHandler > xHandler;
try
@@ -613,7 +613,7 @@ namespace dbp
aContext.NextException = aSQLException;
// create an interaction handler to display this exception
- Reference< XInteractionHandler > xHandler = getInteractionHandler(this);
+ Reference< XInteractionHandler > xHandler = getInteractionHandler(GetFrameWeld());
if ( !xHandler.is() )
return false;
diff --git a/extensions/source/dbpilots/controlwizard.hxx b/extensions/source/dbpilots/controlwizard.hxx
index 54453fcc071c..8b072eb1827e 100644
--- a/extensions/source/dbpilots/controlwizard.hxx
+++ b/extensions/source/dbpilots/controlwizard.hxx
@@ -30,6 +30,7 @@
#include <vcl/button.hxx>
#include <vcl/lstbox.hxx>
#include <vcl/combobox.hxx>
+#include <vcl/weld.hxx>
#include "dbptypes.hxx"
#include <strings.hrc>
#include <componentmodule.hxx>
@@ -119,7 +120,7 @@ namespace dbp
/** returns the com.sun.star.task.InteractionHandler
@param _pWindow The window will be used when an error message has to be shown.
*/
- css::uno::Reference< css::task::XInteractionHandler > getInteractionHandler(vcl::Window* _pWindow) const;
+ css::uno::Reference< css::task::XInteractionHandler > getInteractionHandler(weld::Window* _pWindow) const;
protected:
// initialize the derivees settings (which have to be derived from OControlWizardSettings)
diff --git a/extensions/source/scanner/sanedlg.cxx b/extensions/source/scanner/sanedlg.cxx
index 13553c7b6f76..d435b836f588 100644
--- a/extensions/source/scanner/sanedlg.cxx
+++ b/extensions/source/scanner/sanedlg.cxx
@@ -22,7 +22,7 @@
#include <tools/config.hxx>
#include <unotools/resmgr.hxx>
#include <vcl/dibtools.hxx>
-#include <vcl/layout.hxx>
+#include <vcl/weld.hxx>
#include <vcl/settings.hxx>
#include <vcl/svapp.hxx>
#include <vcl/builderfactory.hxx>
@@ -330,8 +330,10 @@ short SaneDlg::Execute()
{
if( ! Sane::IsSane() )
{
- ScopedVclPtrInstance< MessageDialog > aErrorBox(nullptr, SaneResId(STR_COULD_NOT_BE_INIT));
- aErrorBox->Execute();
+ std::unique_ptr<weld::MessageDialog> xErrorBox(Application::CreateMessageDialog(nullptr,
+ VclMessageType::Warning, VclButtonsType::Ok,
+ SaneResId(STR_COULD_NOT_BE_INIT)));
+ xErrorBox->run();
return RET_CANCEL;
}
LoadState();
@@ -610,8 +612,10 @@ IMPL_LINK( SaneDlg, ClickBtnHdl, Button*, pButton, void )
aString = aString.replaceFirst( "%s", Sane::GetVendor( mrSane.GetDeviceNumber() ) );
aString = aString.replaceFirst( "%s", Sane::GetModel( mrSane.GetDeviceNumber() ) );
aString = aString.replaceFirst( "%s", Sane::GetType( mrSane.GetDeviceNumber() ) );
- ScopedVclPtrInstance< MessageDialog > aInfoBox(this, aString, VclMessageType::Info);
- aInfoBox->Execute();
+ std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(GetFrameWeld(),
+ VclMessageType::Info, VclButtonsType::Ok,
+ aString));
+ xInfoBox->run();
}
else if( pButton == mpPreviewButton )
AcquirePreview();
@@ -881,8 +885,10 @@ void SaneDlg::AcquirePreview()
if( nOption == -1 )
{
OUString aString(SaneResId(STR_SLOW_PREVIEW));
- ScopedVclPtrInstance< MessageDialog > aBox(this, aString, VclMessageType::Warning, VclButtonsType::OkCancel);
- if (aBox->Execute() == RET_CANCEL)
+ std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(GetFrameWeld(),
+ VclMessageType::Warning, VclButtonsType::OkCancel,
+ aString));
+ if (xBox->run() == RET_CANCEL)
return;
}
else
@@ -891,8 +897,10 @@ void SaneDlg::AcquirePreview()
rtl::Reference<BitmapTransporter> xTransporter(new BitmapTransporter);
if( ! mrSane.Start( *xTransporter.get() ) )
{
- ScopedVclPtrInstance< MessageDialog > aErrorBox(this, SaneResId(STR_ERROR_SCAN));
- aErrorBox->Execute();
+ std::unique_ptr<weld::MessageDialog> xErrorBox(Application::CreateMessageDialog(GetFrameWeld(),
+ VclMessageType::Warning, VclButtonsType::Ok,
+ SaneResId(STR_ERROR_SCAN)));
+ xErrorBox->run();
}
else
{
diff --git a/extensions/source/update/ui/updatecheckui.cxx b/extensions/source/update/ui/updatecheckui.cxx
index f6d9c1f2c1be..82e8e55a750a 100644
--- a/extensions/source/update/ui/updatecheckui.cxx
+++ b/extensions/source/update/ui/updatecheckui.cxx
@@ -40,7 +40,7 @@
#include <vcl/idle.hxx>
#include <vcl/menu.hxx>
#include <vcl/outdev.hxx>
-#include <vcl/layout.hxx>
+#include <vcl/weld.hxx>
#include <vcl/msgbox.hxx>
#include <vcl/lineinfo.hxx>
#include <vcl/button.hxx>
@@ -544,7 +544,10 @@ IMPL_LINK_NOARG(UpdateCheckUI, ClickHdl, MenuBar::MenuBarButtonCallbackArg&, boo
mrJob->execute( aEmpty );
}
catch(const uno::Exception&) {
- ScopedVclPtrInstance<MessageDialog>(nullptr, Translate::get(STR_NO_WEBBROWSER_FOUND, maSfxLocale))->Execute();
+ std::unique_ptr<weld::MessageDialog> xErrorBox(Application::CreateMessageDialog(nullptr,
+ VclMessageType::Warning, VclButtonsType::Ok,
+ Translate::get(STR_NO_WEBBROWSER_FOUND, maSfxLocale)));
+ xErrorBox->run();
}
}