summaryrefslogtreecommitdiff
path: root/uui
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2015-04-16 22:18:45 +0100
committerMichael Meeks <michael.meeks@collabora.com>2015-04-16 22:21:04 +0100
commit5d5f447e738f159297b3d7bf10220c3cdfe7e2fa (patch)
tree3468a9712ac78b7db78dc129fa9a47ea5f117372 /uui
parenta461467a3edc1452835447ff075fda7420aaf153 (diff)
UnoControls, toolkit, uuoi, xmlsecurity: convert new to ::Create.
Change-Id: I7b8c7ece656589c50fb066e9fa1565fd59f930da
Diffstat (limited to 'uui')
-rw-r--r--uui/source/iahndl-authentication.cxx12
-rw-r--r--uui/source/iahndl-errorhandler.cxx10
-rw-r--r--uui/source/iahndl-locking.cxx6
3 files changed, 14 insertions, 14 deletions
diff --git a/uui/source/iahndl-authentication.cxx b/uui/source/iahndl-authentication.cxx
index 89847aa41be3..43f0f29a409b 100644
--- a/uui/source/iahndl-authentication.cxx
+++ b/uui/source/iahndl-authentication.cxx
@@ -89,7 +89,7 @@ executeLoginDialog(
nFlags |= LF_NO_USESYSCREDS;
VclPtr< LoginDialog > xDialog(
- new LoginDialog(pParent, nFlags, rInfo.GetServer(), rRealm));
+ VclPtr<LoginDialog>::Create(pParent, nFlags, rInfo.GetServer(), rRealm));
if (!rInfo.GetErrorText().isEmpty())
xDialog->SetErrorText(rInfo.GetErrorText());
xDialog->SetName(rInfo.GetUserName());
@@ -418,7 +418,7 @@ executeMasterPasswordDialog(
if( nMode == task::PasswordRequestMode_PASSWORD_CREATE )
{
VclPtr< MasterPasswordCreateDialog > xDialog(
- new MasterPasswordCreateDialog(pParent, xManager.get()));
+ VclPtr<MasterPasswordCreateDialog>::Create(pParent, xManager.get()));
rInfo.SetResult(xDialog->Execute()
== RET_OK ? ERRCODE_BUTTON_OK : ERRCODE_BUTTON_CANCEL);
aMaster = OUStringToOString(
@@ -427,7 +427,7 @@ executeMasterPasswordDialog(
else
{
VclPtr< MasterPasswordDialog > xDialog(
- new MasterPasswordDialog(pParent, nMode, xManager.get()));
+ VclPtr<MasterPasswordDialog>::Create(pParent, nMode, xManager.get()));
rInfo.SetResult(xDialog->Execute()
== RET_OK ? ERRCODE_BUTTON_OK : ERRCODE_BUTTON_CANCEL);
aMaster = OUStringToOString(
@@ -518,7 +518,7 @@ executePasswordDialog(
if (bIsSimplePasswordRequest)
{
VclPtr< PasswordDialog > pDialog(
- new PasswordDialog( pParent, nMode, xManager.get(), aDocName,
+ VclPtr<PasswordDialog>::Create( pParent, nMode, xManager.get(), aDocName,
bIsPasswordToModify, bIsSimplePasswordRequest ) );
pDialog->SetMinLen(0);
@@ -542,7 +542,7 @@ executePasswordDialog(
else // enter password or reenter password
{
VclPtr< PasswordDialog > pDialog(
- new PasswordDialog( pParent, nMode, xManager.get(), aDocName,
+ VclPtr<PasswordDialog>::Create( pParent, nMode, xManager.get(), aDocName,
bIsPasswordToModify, bIsSimplePasswordRequest ) );
pDialog->SetMinLen(0);
@@ -752,7 +752,7 @@ UUIInteractionHelper::handleAuthFallbackRequest( OUString & instructions,
uno::Sequence< uno::Reference< task::XInteractionContinuation > > const & rContinuations )
{
vcl::Window * pParent = getParentProperty( );
- AuthFallbackDlg *dlg = new AuthFallbackDlg( pParent, instructions, url );
+ VclPtrInstance<AuthFallbackDlg> dlg( pParent, instructions, url );
int retCode = dlg->Execute( );
uno::Reference< task::XInteractionAbort > xAbort;
uno::Reference< ucb::XInteractionAuthFallback > xAuthFallback;
diff --git a/uui/source/iahndl-errorhandler.cxx b/uui/source/iahndl-errorhandler.cxx
index db209cb8a665..3b12c7ba011c 100644
--- a/uui/source/iahndl-errorhandler.cxx
+++ b/uui/source/iahndl-errorhandler.cxx
@@ -61,13 +61,13 @@ executeErrorDialog(
switch (eClassification)
{
case task::InteractionClassification_ERROR:
- xBox.reset(new ErrorBox(pParent,
+ xBox.reset(VclPtr<ErrorBox>::Create(pParent,
nButtonMask,
aText.makeStringAndClear()));
break;
case task::InteractionClassification_WARNING:
- xBox.reset(new WarningBox(pParent,
+ xBox.reset(VclPtr<WarningBox>::Create(pParent,
nButtonMask,
aText.makeStringAndClear()));
break;
@@ -76,16 +76,16 @@ executeErrorDialog(
# define WB_DEF_BUTTONS (WB_DEF_OK | WB_DEF_CANCEL | WB_DEF_RETRY)
//(want to ignore any default button settings)...
if ((nButtonMask & WB_DEF_BUTTONS) == WB_DEF_OK)
- xBox.reset(new InfoBox(pParent,
+ xBox.reset(VclPtr<InfoBox>::Create(pParent,
aText.makeStringAndClear()));
else
- xBox.reset(new ErrorBox(pParent,
+ xBox.reset(VclPtr<ErrorBox>::Create(pParent,
nButtonMask,
aText.makeStringAndClear()));
break;
case task::InteractionClassification_QUERY:
- xBox.reset(new QueryBox(pParent,
+ xBox.reset(VclPtr<QueryBox>::Create(pParent,
nButtonMask,
aText.makeStringAndClear()));
break;
diff --git a/uui/source/iahndl-locking.cxx b/uui/source/iahndl-locking.cxx
index aac4cd87c960..0b7c5cfd5fea 100644
--- a/uui/source/iahndl-locking.cxx
+++ b/uui/source/iahndl-locking.cxx
@@ -121,7 +121,7 @@ handleLockedDocumentRequest_(
aMessage, aArguments );
VclPtr< AlreadyOpenQueryBox > xDialog(
- new AlreadyOpenQueryBox( pParent,
+ VclPtr<AlreadyOpenQueryBox>::Create( pParent,
xManager.get(),
aMessage,
nMode == UUI_DOC_OWN_SAVE_LOCK ) );
@@ -162,7 +162,7 @@ handleChangedByOthersRequest_(
return;
VclPtr< FileChangedQueryBox > xDialog(
- new FileChangedQueryBox( pParent, xManager.get() ) );
+ VclPtr<FileChangedQueryBox>::Create( pParent, xManager.get() ) );
sal_Int32 nResult = xDialog->Execute();
if ( nResult == RET_YES )
@@ -197,7 +197,7 @@ handleLockFileIgnoreRequest_(
return;
VclPtr< LockFailedQueryBox > xDialog(
- new LockFailedQueryBox( pParent, xManager.get() ) );
+ VclPtr<LockFailedQueryBox>::Create( pParent, xManager.get() ) );
sal_Int32 nResult = xDialog->Execute();
if ( nResult == RET_OK )