summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorPhilippe Jung <phil.jung@free.fr>2015-05-26 16:26:35 +0200
committerMichael Meeks <michael.meeks@collabora.com>2015-05-28 09:55:08 +0100
commitbe8a02364c82df5252a1ced49db29f855c85677a (patch)
tree71ab14185b350d2a593df55713b6b7f5d4ab5eca /dbaccess
parent71079c49ec377ecca2a4410a41d3de3dcd7e07ff (diff)
Rewrite all calls like Dialog(params).Execute()
Replace all calls looking like ADialog(some params).Execute() by ScopedVclPtrInstance<ADialog>::Create(some parms)->Execute() Change-Id: I0b6f0a9ea5ef0a749ffa30ce131e9dc989604639 Reviewed-on: https://gerrit.libreoffice.org/15915 Tested-by: Jenkins <ci@libreoffice.org> Tested-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/ui/browser/brwctrlr.cxx2
-rw-r--r--dbaccess/source/ui/dlg/TextConnectionHelper.cxx2
-rw-r--r--dbaccess/source/ui/dlg/paramdialog.cxx2
-rw-r--r--dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx2
-rw-r--r--dbaccess/source/ui/querydesign/QueryDesignView.cxx4
5 files changed, 6 insertions, 6 deletions
diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx
index 484e941648c7..8bbc09474704 100644
--- a/dbaccess/source/ui/browser/brwctrlr.cxx
+++ b/dbaccess/source/ui/browser/brwctrlr.cxx
@@ -1386,7 +1386,7 @@ void SbaXDataBrowserController::resetted(const ::com::sun::star::lang::EventObje
sal_Bool SbaXDataBrowserController::confirmDelete(const ::com::sun::star::sdb::RowChangeEvent& /*aEvent*/) throw( RuntimeException, std::exception )
{
- if (MessageDialog(getBrowserView(), ModuleRes(STR_QUERY_BRW_DELETE_ROWS), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO).Execute() != RET_YES)
+ if (ScopedVclPtrInstance<MessageDialog>::Create(getBrowserView(), ModuleRes(STR_QUERY_BRW_DELETE_ROWS), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)->Execute() != RET_YES)
return sal_False;
return sal_True;
diff --git a/dbaccess/source/ui/dlg/TextConnectionHelper.cxx b/dbaccess/source/ui/dlg/TextConnectionHelper.cxx
index 1444b7925955..a103e81718e1 100644
--- a/dbaccess/source/ui/dlg/TextConnectionHelper.cxx
+++ b/dbaccess/source/ui/dlg/TextConnectionHelper.cxx
@@ -328,7 +328,7 @@ namespace dbaui
}
else
return true;
- MessageDialog(NULL, MnemonicGenerator::EraseAllMnemonicChars(aErrorText)).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(nullptr, MnemonicGenerator::EraseAllMnemonicChars(aErrorText))->Execute();
pErrorWin->GrabFocus();
return false;
}
diff --git a/dbaccess/source/ui/dlg/paramdialog.cxx b/dbaccess/source/ui/dlg/paramdialog.cxx
index 3b34eabc3406..6d8762a3a6c7 100644
--- a/dbaccess/source/ui/dlg/paramdialog.cxx
+++ b/dbaccess/source/ui/dlg/paramdialog.cxx
@@ -198,7 +198,7 @@ namespace dbaui
OUString sMessage(ModuleRes(STR_COULD_NOT_CONVERT_PARAM));
sMessage = sMessage.replaceAll( "$name$", sName );
- MessageDialog(NULL, sMessage).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(nullptr, sMessage)->Execute();
m_pParam->GrabFocus();
return 1L;
}
diff --git a/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx b/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx
index 1903b0cd6029..4665a9a882af 100644
--- a/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx
+++ b/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx
@@ -457,7 +457,7 @@ namespace dbaui
if ( !pWin )
pWin = getView()->Window::GetParent();
- MessageDialog(pWin, aMessage, VCL_MESSAGE_INFO).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(pWin, aMessage, VCL_MESSAGE_INFO)->Execute();
}
const Reference< XConnection >& DBSubComponentController::getConnection() const
{
diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
index de79ceb57cc3..8cdb1012d338 100644
--- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
@@ -759,7 +759,7 @@ namespace
{
// only show the messagebox the first time
if (!bCritsOnAsterikWarning)
- MessageDialog(_pView, ModuleRes( STR_QRY_CRITERIA_ON_ASTERISK)).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(_pView, ModuleRes( STR_QRY_CRITERIA_ON_ASTERISK))->Execute();
bCritsOnAsterikWarning = true;
continue;
}
@@ -918,7 +918,7 @@ namespace
{
// only show the MessageBox the first time
if (!bCritsOnAsterikWarning)
- MessageDialog(_pView, ModuleRes( STR_QRY_ORDERBY_ON_ASTERISK)).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(_pView, ModuleRes( STR_QRY_ORDERBY_ON_ASTERISK))->Execute();
bCritsOnAsterikWarning = true;
continue;
}