summaryrefslogtreecommitdiffstats
path: root/dbaccess/source/ui/misc
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-03-20 11:27:10 +0200
committerMichael Meeks <michael.meeks@collabora.com>2015-04-10 12:37:44 +0100
commit61b224f392eb856bf4cfa0c04c68202a463cbdbf (patch)
tree77a28e38763bc5f9d95e2c278601d31dc6fbf65d /dbaccess/source/ui/misc
parentvclptr: document the architecture, sample debugging, FAQ etc. (diff)
downloadcore-61b224f392eb856bf4cfa0c04c68202a463cbdbf.tar.gz
core-61b224f392eb856bf4cfa0c04c68202a463cbdbf.zip
vclwidget: fixup locally allocated vcl::Window objects
They need to be wrapped in ScopedVclPtr in order to be disposed properly. Change-Id: Ib64dba353774f54711e4de7f5d15d859c6a4dc7e
Diffstat (limited to 'dbaccess/source/ui/misc')
-rw-r--r--dbaccess/source/ui/misc/DExport.cxx4
-rw-r--r--dbaccess/source/ui/misc/RowSetDrop.cxx2
-rw-r--r--dbaccess/source/ui/misc/UITools.cxx8
-rw-r--r--dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx2
4 files changed, 8 insertions, 8 deletions
diff --git a/dbaccess/source/ui/misc/DExport.cxx b/dbaccess/source/ui/misc/DExport.cxx
index 088beb689cc1..ba1352b3c5ae 100644
--- a/dbaccess/source/ui/misc/DExport.cxx
+++ b/dbaccess/source/ui/misc/DExport.cxx
@@ -687,7 +687,7 @@ bool ODatabaseExport::executeWizard(const OUString& _rTableName, const Any& _aTe
{
bool bHaveDefaultTable = !m_sDefaultTableName.isEmpty();
OUString sTableName( bHaveDefaultTable ? m_sDefaultTableName : _rTableName );
- VclPtr<OCopyTableWizard> aWizard(new OCopyTableWizard(
+ ScopedVclPtr<OCopyTableWizard> aWizard(new OCopyTableWizard(
NULL,
sTableName,
bHaveDefaultTable ? CopyTableOperation::AppendData : CopyTableOperation::CopyDefinitionAndData,
@@ -754,7 +754,7 @@ void ODatabaseExport::showErrorDialog(const ::com::sun::star::sdbc::SQLException
OUString aMsg(e.Message);
aMsg += "\n";
aMsg += ModuleRes( STR_QRY_CONTINUE );
- VclPtr<OSQLWarningBox> aBox(new OSQLWarningBox( NULL, aMsg, WB_YES_NO | WB_DEF_NO ) );
+ ScopedVclPtr<OSQLWarningBox> aBox(new OSQLWarningBox( NULL, aMsg, WB_YES_NO | WB_DEF_NO ) );
if (aBox->Execute() == RET_YES)
m_bDontAskAgain = true;
diff --git a/dbaccess/source/ui/misc/RowSetDrop.cxx b/dbaccess/source/ui/misc/RowSetDrop.cxx
index 8a74d80ea268..a107c94e8a5a 100644
--- a/dbaccess/source/ui/misc/RowSetDrop.cxx
+++ b/dbaccess/source/ui/misc/RowSetDrop.cxx
@@ -241,7 +241,7 @@ bool ORowSetImportExport::insertNewRow()
if(!m_bAlreadyAsked)
{
OUString sAskIfContinue = ModuleRes(STR_ERROR_OCCURRED_WHILE_COPYING);
- VclPtr<OSQLWarningBox> aDlg(new OSQLWarningBox( m_pParent, sAskIfContinue, WB_YES_NO | WB_DEF_YES ) );
+ ScopedVclPtr<OSQLWarningBox> aDlg(new OSQLWarningBox( m_pParent, sAskIfContinue, WB_YES_NO | WB_DEF_YES ) );
if(aDlg->Execute() == RET_YES)
m_bAlreadyAsked = true;
else
diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx
index ef31134a06dd..ff9d94a27642 100644
--- a/dbaccess/source/ui/misc/UITools.cxx
+++ b/dbaccess/source/ui/misc/UITools.cxx
@@ -852,7 +852,7 @@ bool callColumnFormatDialog(vcl::Window* _pParent,
}
{ // want the dialog to be destroyed before our set
- VclPtr<SbaSbAttrDlg> aDlg(new SbaSbAttrDlg(_pParent, pFormatDescriptor, _pFormatter, _bHasFormat));
+ ScopedVclPtr<SbaSbAttrDlg> aDlg(new SbaSbAttrDlg(_pParent, pFormatDescriptor, _pFormatter, _bHasFormat));
if (RET_OK == aDlg->Execute())
{
// ItemSet->UNO
@@ -997,7 +997,7 @@ void adjustBrowseBoxColumnWidth( ::svt::EditBrowseBox* _pBox, sal_uInt16 _nColId
Size aDefaultMM = _pBox->PixelToLogic( Size( nDefaultWidth, 0 ), MapMode( MAP_MM ) );
- VclPtr<DlgSize> aColumnSizeDlg(new DlgSize( _pBox, nColSize, false, aDefaultMM.Width() * 10 ) );
+ ScopedVclPtr<DlgSize> aColumnSizeDlg(new DlgSize( _pBox, nColSize, false, aDefaultMM.Width() * 10 ) );
if ( aColumnSizeDlg->Execute() )
{
sal_Int32 nValue = aColumnSizeDlg->GetValue();
@@ -1286,7 +1286,7 @@ sal_Int32 askForUserAction(vcl::Window* _pParent,sal_uInt16 _nTitle,sal_uInt16 _
SolarMutexGuard aGuard;
OUString aMsg = ModuleRes(_nText);
aMsg = aMsg.replaceFirst("%1", _sName);
- VclPtr<OSQLMessageBox> aAsk(new OSQLMessageBox(_pParent, ModuleRes(_nTitle ), aMsg,WB_YES_NO | WB_DEF_YES,OSQLMessageBox::Query));
+ ScopedVclPtr<OSQLMessageBox> aAsk(new OSQLMessageBox(_pParent, ModuleRes(_nTitle ), aMsg,WB_YES_NO | WB_DEF_YES,OSQLMessageBox::Query));
if ( _bAll )
{
aAsk->AddButton(ModuleRes(STR_BUTTON_TEXT_ALL), RET_ALL, 0);
@@ -1431,7 +1431,7 @@ bool insertHierachyElement( vcl::Window* _pParent, const Reference< XComponentCo
// here we have everything needed to create a new query object ...
HierarchicalNameCheck aNameChecker( _xNames.get(), sName );
// ... ehm, except a new name
- VclPtr<OSaveAsDlg> aAskForName(new OSaveAsDlg( _pParent,
+ ScopedVclPtr<OSaveAsDlg> aAskForName(new OSaveAsDlg( _pParent,
_rxContext,
sTargetName,
sLabel,
diff --git a/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx b/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx
index ce98528c4fc5..e9fed42eee82 100644
--- a/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx
+++ b/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx
@@ -308,7 +308,7 @@ namespace dbaui
bool bReConnect = true;
if ( _bUI )
{
- VclPtr<MessageDialog> aQuery(new MessageDialog(getView(), ModuleRes(STR_QUERY_CONNECTION_LOST), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO));
+ ScopedVclPtr<MessageDialog> aQuery(new MessageDialog(getView(), ModuleRes(STR_QUERY_CONNECTION_LOST), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO));
bReConnect = ( RET_YES == aQuery->Execute() );
}