summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/querydesign
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-07-26 10:21:41 +0100
committerCaolán McNamara <caolanm@redhat.com>2016-07-26 11:26:52 +0100
commita860df25dd7bf62ecb6b3d3ed38803b981f56d52 (patch)
tree591e39d4fc9b3da4d3b84882e69baf88baa05507 /dbaccess/source/ui/querydesign
parent87e2b0142a1724b9075f31acfc44011082ce8e12 (diff)
masses of MessBoxes not being disposed promptly
since... commit ba81e5c6bd420b41a84ade6ccd774011a8089f7f Date: Thu May 28 21:35:43 2015 +0100 tdf#91702 - fix stack-based MessBox allocation. There is no special ScopedVclPtr<X>::Create or ScopedVclPtrInstance<X>::Create just VclPtr<X>::Create and a raw VclPtr<X>::Create()->foo doesn't call dispose on the owned X Change-Id: Ifacc8d5e742820701307c3c37b9b86487667d84f
Diffstat (limited to 'dbaccess/source/ui/querydesign')
-rw-r--r--dbaccess/source/ui/querydesign/QueryDesignView.cxx4
-rw-r--r--dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx12
-rw-r--r--dbaccess/source/ui/querydesign/querycontroller.cxx4
3 files changed, 10 insertions, 10 deletions
diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
index b7d4fac51ec0..8f8748c5312e 100644
--- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
@@ -755,7 +755,7 @@ namespace
{
// only show the messagebox the first time
if (!bCritsOnAsterikWarning)
- ScopedVclPtrInstance<MessageDialog>::Create(_pView, ModuleRes( STR_QRY_CRITERIA_ON_ASTERISK))->Execute();
+ ScopedVclPtrInstance<MessageDialog>(_pView, ModuleRes( STR_QRY_CRITERIA_ON_ASTERISK))->Execute();
bCritsOnAsterikWarning = true;
continue;
}
@@ -912,7 +912,7 @@ namespace
{
// only show the MessageBox the first time
if (!bCritsOnAsterikWarning)
- ScopedVclPtrInstance<MessageDialog>::Create(_pView, ModuleRes( STR_QRY_ORDERBY_ON_ASTERISK))->Execute();
+ ScopedVclPtrInstance<MessageDialog>(_pView, ModuleRes( STR_QRY_ORDERBY_ON_ASTERISK))->Execute();
bCritsOnAsterikWarning = true;
continue;
}
diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
index e9d14ebfd121..8a823a0b61c3 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
@@ -523,7 +523,7 @@ void OSelectionBrowseBox::InitController(CellControllerRef& /*rController*/, lon
m_pVisibleCell->GetBox().EnableInput(false);
OUString aMessage(ModuleRes(STR_QRY_ORDERBY_UNRELATED));
OQueryDesignView* paDView = getDesignView();
- ScopedVclPtr<InfoBox>::Create(paDView, aMessage)->Execute();
+ ScopedVclPtrInstance<InfoBox>(paDView, aMessage)->Execute();
}
} break;
case BROW_ORDER_ROW:
@@ -613,7 +613,7 @@ bool OSelectionBrowseBox::fillColumnRef(const OUString& _sColumnName, const OUSt
{
OUString sErrorMsg(ModuleRes(RID_STR_FIELD_DOESNT_EXIST));
sErrorMsg = sErrorMsg.replaceFirst("$name$",_sColumnName);
- ScopedVclPtr<OSQLErrorBox>::Create( this, sErrorMsg )->Execute();
+ ScopedVclPtrInstance<OSQLErrorBox>(this, sErrorMsg)->Execute();
bError = true;
}
else
@@ -718,7 +718,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);
- ScopedVclPtr<OSQLErrorBox>::Create( this, sErrorMessage )->Execute();
+ ScopedVclPtrInstance<OSQLErrorBox>(this, sErrorMessage)->Execute();
return true;
}
@@ -874,7 +874,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());
- ScopedVclPtr<OSQLErrorBox>::Create( this, sErrorMessage )->Execute();
+ ScopedVclPtrInstance<OSQLErrorBox>(this, sErrorMessage)->Execute();
bError = true;
}
}
@@ -1141,7 +1141,7 @@ bool OSelectionBrowseBox::SaveModified()
{
if ( !m_bDisableErrorBox )
{
- ScopedVclPtr<OSQLWarningBox>::Create( this, aErrorMsg )->Execute();
+ ScopedVclPtrInstance<OSQLWarningBox>(this, aErrorMsg)->Execute();
}
bError = true;
}
@@ -1150,7 +1150,7 @@ bool OSelectionBrowseBox::SaveModified()
{
if ( !m_bDisableErrorBox )
{
- ScopedVclPtr<OSQLWarningBox>::Create( this, aErrorMsg )->Execute();
+ ScopedVclPtrInstance<OSQLWarningBox>(this, aErrorMsg)->Execute();
}
bError = true;
}
diff --git a/dbaccess/source/ui/querydesign/querycontroller.cxx b/dbaccess/source/ui/querydesign/querycontroller.cxx
index 66a203b18314..f56bcab8c05e 100644
--- a/dbaccess/source/ui/querydesign/querycontroller.cxx
+++ b/dbaccess/source/ui/querydesign/querycontroller.cxx
@@ -1046,7 +1046,7 @@ void OQueryController::impl_initialize()
m_bGraphicalDesign = false;
getContainer()->initialize();
ODataView* pWindow = getView();
- ScopedVclPtr<OSQLMessageBox>::Create(pWindow,e)->Execute();
+ ScopedVclPtrInstance<OSQLMessageBox>(pWindow,e)->Execute();
}
throw;
}
@@ -1398,7 +1398,7 @@ bool OQueryController::doSaveAsDoc(bool _bSaveAs)
if ( !editingCommand() && !haveDataSource() )
{
OUString aMessage(ModuleRes(STR_DATASOURCE_DELETED));
- ScopedVclPtr<OSQLWarningBox>::Create( getView(), aMessage )->Execute();
+ ScopedVclPtrInstance<OSQLWarningBox>(getView(), aMessage)->Execute();
return false;
}