summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2015-03-31 20:57:16 +0100
committerMichael Meeks <michael.meeks@collabora.com>2015-04-10 13:27:16 +0100
commit5d133eb62187ae910772ff5dfeb8f2c3276e8481 (patch)
treede10fa41a70071dfb3e36ed061e19328e883d206 /dbaccess/source/ui
parent28a863756b5891e6074a2ce432f97a1ff0271aed (diff)
first half of non-scriptable, Instance constructor conversion.
Change-Id: If73bb41bfa805e22609748f25971724b4778edb3
Diffstat (limited to 'dbaccess/source/ui')
-rw-r--r--dbaccess/source/ui/app/AppControllerDnD.cxx5
-rw-r--r--dbaccess/source/ui/browser/brwctrlr.cxx6
-rw-r--r--dbaccess/source/ui/dlg/indexdialog.cxx4
-rw-r--r--dbaccess/source/ui/misc/DExport.cxx6
-rw-r--r--dbaccess/source/ui/misc/UITools.cxx5
-rw-r--r--dbaccess/source/ui/querydesign/querycontroller.cxx8
-rw-r--r--dbaccess/source/ui/relationdesign/RelationController.cxx4
-rw-r--r--dbaccess/source/ui/tabledesign/TableController.cxx14
8 files changed, 27 insertions, 25 deletions
diff --git a/dbaccess/source/ui/app/AppControllerDnD.cxx b/dbaccess/source/ui/app/AppControllerDnD.cxx
index a4dff8c95b42..8b9d89cec649 100644
--- a/dbaccess/source/ui/app/AppControllerDnD.cxx
+++ b/dbaccess/source/ui/app/AppControllerDnD.cxx
@@ -686,13 +686,14 @@ bool OApplicationController::paste( ElementType _eType, const ::svx::ODataAccess
has a /table/ with that name) */
if ( bNeedAskForName )
{
- ScopedVclPtr<OSaveAsDlg> aAskForName(new OSaveAsDlg( getView(),
+ ScopedVclPtrInstance<OSaveAsDlg> aAskForName(
+ getView(),
CommandType::QUERY,
getORB(),
getConnection(),
sTargetName,
aNameChecker,
- SAD_ADDITIONAL_DESCRIPTION | SAD_TITLE_PASTE_AS));
+ SAD_ADDITIONAL_DESCRIPTION | SAD_TITLE_PASTE_AS );
if ( RET_OK != aAskForName->Execute() )
// cancelled by the user
return false;
diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx
index 4c857cf2f3d4..8ade09ffccee 100644
--- a/dbaccess/source/ui/browser/brwctrlr.cxx
+++ b/dbaccess/source/ui/browser/brwctrlr.cxx
@@ -2172,9 +2172,9 @@ bool SbaXDataBrowserController::SaveModified(bool bAskFor)
{
getBrowserView()->getVclControl()->GrabFocus();
- ScopedVclPtr<MessageDialog> aQry(new MessageDialog(getBrowserView()->getVclControl(),
- "SaveModifiedDialog",
- "dbaccess/ui/savemodifieddialog.ui"));
+ ScopedVclPtrInstance<MessageDialog> aQry( getBrowserView()->getVclControl(),
+ "SaveModifiedDialog",
+ "dbaccess/ui/savemodifieddialog.ui" );
switch (aQry->Execute())
{
diff --git a/dbaccess/source/ui/dlg/indexdialog.cxx b/dbaccess/source/ui/dlg/indexdialog.cxx
index 7b71e75093a2..d1a4981da386 100644
--- a/dbaccess/source/ui/dlg/indexdialog.cxx
+++ b/dbaccess/source/ui/dlg/indexdialog.cxx
@@ -586,8 +586,8 @@ namespace dbaui
if (aSelected->isModified() || aSelected->isNew())
{
- ScopedVclPtr<MessageDialog> aQuestion(new MessageDialog(this, "SaveIndexDialog",
- "dbaccess/ui/saveindexdialog.ui"));
+ ScopedVclPtrInstance<MessageDialog> aQuestion(this, "SaveIndexDialog",
+ "dbaccess/ui/saveindexdialog.ui" );
nResponse = aQuestion->Execute();
}
}
diff --git a/dbaccess/source/ui/misc/DExport.cxx b/dbaccess/source/ui/misc/DExport.cxx
index ba1352b3c5ae..7f7f51a5f9e2 100644
--- a/dbaccess/source/ui/misc/DExport.cxx
+++ b/dbaccess/source/ui/misc/DExport.cxx
@@ -687,8 +687,8 @@ bool ODatabaseExport::executeWizard(const OUString& _rTableName, const Any& _aTe
{
bool bHaveDefaultTable = !m_sDefaultTableName.isEmpty();
OUString sTableName( bHaveDefaultTable ? m_sDefaultTableName : _rTableName );
- ScopedVclPtr<OCopyTableWizard> aWizard(new OCopyTableWizard(
- NULL,
+ ScopedVclPtrInstance<OCopyTableWizard> aWizard(
+ nullptr,
sTableName,
bHaveDefaultTable ? CopyTableOperation::AppendData : CopyTableOperation::CopyDefinitionAndData,
m_aDestColumns,
@@ -698,7 +698,7 @@ bool ODatabaseExport::executeWizard(const OUString& _rTableName, const Any& _aTe
getTypeSelectionPageFactory(),
m_rInputStream,
m_xContext
- ));
+ );
bool bError = false;
try
diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx
index ff9d94a27642..e03f8084bd95 100644
--- a/dbaccess/source/ui/misc/UITools.cxx
+++ b/dbaccess/source/ui/misc/UITools.cxx
@@ -1431,12 +1431,13 @@ 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
- ScopedVclPtr<OSaveAsDlg> aAskForName(new OSaveAsDlg( _pParent,
+ ScopedVclPtrInstance<OSaveAsDlg> aAskForName(
+ _pParent,
_rxContext,
sTargetName,
sLabel,
aNameChecker,
- SAD_ADDITIONAL_DESCRIPTION | SAD_TITLE_PASTE_AS));
+ SAD_ADDITIONAL_DESCRIPTION | SAD_TITLE_PASTE_AS );
if ( RET_OK != aAskForName->Execute() )
// cancelled by the user
return false;
diff --git a/dbaccess/source/ui/querydesign/querycontroller.cxx b/dbaccess/source/ui/querydesign/querycontroller.cxx
index f5aabbb95d44..0506a3e1cb34 100644
--- a/dbaccess/source/ui/querydesign/querycontroller.cxx
+++ b/dbaccess/source/ui/querydesign/querycontroller.cxx
@@ -1238,8 +1238,8 @@ void OQueryController::loadViewSettings( const ::comphelper::NamedValueCollectio
void OQueryController::execute_QueryPropDlg()
{
- ScopedVclPtr<QueryPropertiesDialog> aQueryPropDlg(new QueryPropertiesDialog(
- getContainer(), m_bDistinct, m_nLimit ));
+ ScopedVclPtrInstance<QueryPropertiesDialog> aQueryPropDlg(
+ getContainer(), m_bDistinct, m_nLimit );
if( aQueryPropDlg->Execute() == RET_OK )
{
@@ -1398,14 +1398,14 @@ bool OQueryController::askForNewName(const Reference<XNameAccess>& _xElements, b
}
DynamicTableOrQueryNameCheck aNameChecker( getConnection(), CommandType::QUERY );
- ScopedVclPtr<OSaveAsDlg> aDlg(new OSaveAsDlg(
+ ScopedVclPtrInstance<OSaveAsDlg> aDlg(
getView(),
m_nCommandType,
getORB(),
getConnection(),
aDefaultName,
aNameChecker,
- SAD_DEFAULT ));
+ SAD_DEFAULT );
bRet = ( aDlg->Execute() == RET_OK );
if ( bRet )
diff --git a/dbaccess/source/ui/relationdesign/RelationController.cxx b/dbaccess/source/ui/relationdesign/RelationController.cxx
index 8415437ce6ba..f9a9dcf6cf6b 100644
--- a/dbaccess/source/ui/relationdesign/RelationController.cxx
+++ b/dbaccess/source/ui/relationdesign/RelationController.cxx
@@ -255,8 +255,8 @@ short ORelationController::saveModified()
short nSaved = RET_YES;
if(haveDataSource() && isModified())
{
- ScopedVclPtr<MessageDialog> aQry(new MessageDialog(getView(), "DesignSaveModifiedDialog",
- "dbaccess/ui/designsavemodifieddialog.ui"));
+ ScopedVclPtrInstance<MessageDialog> aQry(getView(), "DesignSaveModifiedDialog",
+ "dbaccess/ui/designsavemodifieddialog.ui");
nSaved = aQry->Execute();
if(nSaved == RET_YES)
Execute(ID_BROWSER_SAVEDOC,Sequence<PropertyValue>());
diff --git a/dbaccess/source/ui/tabledesign/TableController.cxx b/dbaccess/source/ui/tabledesign/TableController.cxx
index 0adce50dce79..81c8e5970ab2 100644
--- a/dbaccess/source/ui/tabledesign/TableController.cxx
+++ b/dbaccess/source/ui/tabledesign/TableController.cxx
@@ -285,7 +285,7 @@ bool OTableController::doSaveDoc(bool _bSaveAs)
if (!xTablesSup.is())
{
OUString aMessage(ModuleRes(STR_TABLEDESIGN_CONNECTION_MISSING));
- ScopedVclPtr<OSQLWarningBox>(new OSQLWarningBox( getView(), aMessage ) )->Execute();
+ ScopedVclPtrInstance<OSQLWarningBox>(getView(), aMessage )->Execute();
return false;
}
@@ -522,7 +522,7 @@ void OTableController::impl_initialize()
}
catch(const SQLException&)
{
- ScopedVclPtr<OSQLWarningBox>(new OSQLWarningBox( getView(), ModuleRes( STR_NO_TYPE_INFO_AVAILABLE ) ) )->Execute();
+ ScopedVclPtrInstance<OSQLWarningBox>(getView(), ModuleRes( STR_NO_TYPE_INFO_AVAILABLE ))->Execute();
throw;
}
try
@@ -563,8 +563,8 @@ sal_Bool SAL_CALL OTableController::suspend(sal_Bool /*_bSuspend*/) throw( Runti
::boost::mem_fn(&OTableRow::isValid));
if ( aIter != m_vRowList.end() )
{
- ScopedVclPtr<MessageDialog> aQry(new MessageDialog(getView(), "TableDesignSaveModifiedDialog",
- "dbaccess/ui/tabledesignsavemodifieddialog.ui"));
+ ScopedVclPtrInstance<MessageDialog> aQry(getView(), "TableDesignSaveModifiedDialog",
+ "dbaccess/ui/tabledesignsavemodifieddialog.ui");
switch (aQry->Execute())
{
case RET_YES:
@@ -580,8 +580,8 @@ sal_Bool SAL_CALL OTableController::suspend(sal_Bool /*_bSuspend*/) throw( Runti
}
else if ( !m_bNew )
{
- ScopedVclPtr<MessageDialog> aQry(new MessageDialog(getView(), "DeleteAllRowsDialog",
- "dbaccess/ui/deleteallrowsdialog.ui"));
+ ScopedVclPtrInstance<MessageDialog> aQry(getView(), "DeleteAllRowsDialog",
+ "dbaccess/ui/deleteallrowsdialog.ui");
switch (aQry->Execute())
{
case RET_YES:
@@ -936,7 +936,7 @@ bool OTableController::checkColumns(bool _bNew)
{
OUString strMessage = ModuleRes(STR_TABLEDESIGN_DUPLICATE_NAME);
strMessage = strMessage.replaceFirst("$column$", pFieldDesc->GetName());
- ScopedVclPtr<OSQLWarningBox>(new OSQLWarningBox( getView(), strMessage ) )->Execute();
+ ScopedVclPtrInstance<OSQLWarningBox>(getView(), strMessage)->Execute();
return false;
}
}