summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2015-05-28 21:35:43 +0100
committerAndras Timar <andras.timar@collabora.com>2015-08-06 12:21:54 +0200
commit12278b37cea48e660d7068d67349701d1accbe97 (patch)
treef0da8cd9794888ae6b9da5f656f4b60b0ad823b5 /dbaccess
parent7b45cd849f31637bf64f552cf58f9ef2d0a69831 (diff)
tdf#91702 - fix stack-based MessBox allocation.
Change-Id: I62dd164e281911d9db3de453789a5badc7cd5fd7 Reviewed-on: https://gerrit.libreoffice.org/15954 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/ui/dlg/ConnectionHelper.cxx2
-rw-r--r--dbaccess/source/ui/misc/UITools.cxx2
-rw-r--r--dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx12
-rw-r--r--dbaccess/source/ui/querydesign/querycontroller.cxx2
-rw-r--r--dbaccess/source/ui/relationdesign/RelationController.cxx2
5 files changed, 10 insertions, 10 deletions
diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.cxx b/dbaccess/source/ui/dlg/ConnectionHelper.cxx
index 8bf6989c9ab9..9a3ac81a97d4 100644
--- a/dbaccess/source/ui/dlg/ConnectionHelper.cxx
+++ b/dbaccess/source/ui/dlg/ConnectionHelper.cxx
@@ -689,7 +689,7 @@ namespace dbaui
{
OUString sFile = ModuleRes( STR_FILE_DOES_NOT_EXIST );
sFile = sFile.replaceFirst("$file$", aTransformer.get(OFileNotation::N_SYSTEM));
- OSQLWarningBox( this, sFile ).Execute();
+ ScopedVclPtr<OSQLWarningBox>::Create( this, sFile )->Execute();
setURLNoPrefix(sOldPath);
SetRoadmapStateValue(false);
callModifiedHdl();
diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx
index 71df15d4e64c..c207e30087fb 100644
--- a/dbaccess/source/ui/misc/UITools.cxx
+++ b/dbaccess/source/ui/misc/UITools.cxx
@@ -941,7 +941,7 @@ bool appendToFilter(const Reference<XConnection>& _xConnection,
if(! ::dbaui::checkDataSourceAvailable(::comphelper::getString(xProp->getPropertyValue(PROPERTY_NAME)),_rxContext))
{
OUString aMessage(ModuleRes(STR_TABLEDESIGN_DATASOURCE_DELETED));
- OSQLWarningBox( _pParent, aMessage ).Execute();
+ ScopedVclPtr<OSQLWarningBox>::Create( _pParent, aMessage )->Execute();
bRet = false;
}
else
diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
index 4cddc7d595a9..4db452c88486 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
@@ -524,7 +524,7 @@ void OSelectionBrowseBox::InitController(CellControllerRef& /*rController*/, lon
m_pVisibleCell->GetBox().EnableInput(false);
OUString aMessage(ModuleRes(STR_QRY_ORDERBY_UNRELATED));
OQueryDesignView* paDView = getDesignView();
- InfoBox(paDView, aMessage).Execute();
+ ScopedVclPtr<InfoBox>::Create(paDView, aMessage)->Execute();
}
} break;
case BROW_ORDER_ROW:
@@ -614,7 +614,7 @@ bool OSelectionBrowseBox::fillColumnRef(const OUString& _sColumnName, const OUSt
{
OUString sErrorMsg(ModuleRes(RID_STR_FIELD_DOESNT_EXIST));
sErrorMsg = sErrorMsg.replaceFirst("$name$",_sColumnName);
- OSQLErrorBox( this, sErrorMsg ).Execute();
+ ScopedVclPtr<OSQLErrorBox>::Create( this, sErrorMsg )->Execute();
bError = true;
}
else
@@ -719,7 +719,7 @@ bool OSelectionBrowseBox::saveField(OUString& _sFieldName ,OTableFieldDescRef& _
// something different which we have to check
OUString sErrorMessage( ModuleRes( STR_QRY_COLUMN_NOT_FOUND ) );
sErrorMessage = sErrorMessage.replaceFirst("$name$",_sFieldName);
- OSQLErrorBox( this, sErrorMessage ).Execute();
+ ScopedVclPtr<OSQLErrorBox>::Create( this, sErrorMessage )->Execute();
return true;
}
@@ -876,7 +876,7 @@ bool OSelectionBrowseBox::saveField(OUString& _sFieldName ,OTableFieldDescRef& _
{ // the field could not be inserted
OUString sErrorMessage( ModuleRes( RID_STR_FIELD_DOESNT_EXIST ) );
sErrorMessage = sErrorMessage.replaceFirst("$name$",aSelEntry->GetField());
- OSQLErrorBox( this, sErrorMessage ).Execute();
+ ScopedVclPtr<OSQLErrorBox>::Create( this, sErrorMessage )->Execute();
bError = true;
}
}
@@ -1143,7 +1143,7 @@ bool OSelectionBrowseBox::SaveModified()
{
if ( !m_bDisableErrorBox )
{
- OSQLWarningBox( this, aErrorMsg ).Execute();
+ ScopedVclPtr<OSQLWarningBox>::Create( this, aErrorMsg )->Execute();
}
bError = true;
}
@@ -1152,7 +1152,7 @@ bool OSelectionBrowseBox::SaveModified()
{
if ( !m_bDisableErrorBox )
{
- OSQLWarningBox( this, aErrorMsg ).Execute();
+ ScopedVclPtr<OSQLWarningBox>::Create( this, aErrorMsg )->Execute();
}
bError = true;
}
diff --git a/dbaccess/source/ui/querydesign/querycontroller.cxx b/dbaccess/source/ui/querydesign/querycontroller.cxx
index 841dc331e973..3b85887911a2 100644
--- a/dbaccess/source/ui/querydesign/querycontroller.cxx
+++ b/dbaccess/source/ui/querydesign/querycontroller.cxx
@@ -1425,7 +1425,7 @@ bool OQueryController::doSaveAsDoc(bool _bSaveAs)
if ( !editingCommand() && !haveDataSource() )
{
OUString aMessage(ModuleRes(STR_DATASOURCE_DELETED));
- OSQLWarningBox( getView(), aMessage ).Execute();
+ ScopedVclPtr<OSQLWarningBox>::Create( getView(), aMessage )->Execute();
return false;
}
diff --git a/dbaccess/source/ui/relationdesign/RelationController.cxx b/dbaccess/source/ui/relationdesign/RelationController.cxx
index 6a88ef2f5417..063fe310989a 100644
--- a/dbaccess/source/ui/relationdesign/RelationController.cxx
+++ b/dbaccess/source/ui/relationdesign/RelationController.cxx
@@ -160,7 +160,7 @@ void ORelationController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue
if(!::dbaui::checkDataSourceAvailable(::comphelper::getString(getDataSource()->getPropertyValue(PROPERTY_NAME)), getORB()))
{
OUString aMessage(ModuleRes(STR_DATASOURCE_DELETED));
- OSQLWarningBox( getView(), aMessage ).Execute();
+ ScopedVclPtr<OSQLWarningBox>::Create( getView(), aMessage )->Execute();
}
else
{