diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2015-03-31 23:04:14 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2015-04-10 13:40:25 +0100 |
commit | 8a65284fe31e6c0a927cb88b75df7845cd248572 (patch) | |
tree | 0427685579288f412d1890619e8bc224339bb228 /xmlsecurity | |
parent | d46e0d9656670dcd7dcca2f32062606400ff6246 (diff) |
Automated conversion of VclPtr construction to use Instance template.
Change-Id: I8be9141b9653e73ebd23a5a3d810f240c376f97e
Diffstat (limited to 'xmlsecurity')
5 files changed, 13 insertions, 10 deletions
diff --git a/xmlsecurity/source/component/documentdigitalsignatures.cxx b/xmlsecurity/source/component/documentdigitalsignatures.cxx index 8f5a0362c9e0..57c338dfe81a 100644 --- a/xmlsecurity/source/component/documentdigitalsignatures.cxx +++ b/xmlsecurity/source/component/documentdigitalsignatures.cxx @@ -246,7 +246,7 @@ bool DocumentDigitalSignatures::ImplViewSignatures( } else { - ScopedVclPtr<MessageDialog> aBox(new MessageDialog(NULL, XMLSEC_RES(RID_XMLSECWB_NO_MOZILLA_PROFILE), VCL_MESSAGE_WARNING)); + ScopedVclPtrInstance< MessageDialog > aBox(nullptr, XMLSEC_RES(RID_XMLSECWB_NO_MOZILLA_PROFILE), VCL_MESSAGE_WARNING); aBox->Execute(); } @@ -386,7 +386,7 @@ void DocumentDigitalSignatures::manageTrustedSources( ) throw (RuntimeException if ( aSignatureHelper.Init() ) xSecEnv = aSignatureHelper.GetSecurityEnvironment(); - ScopedVclPtr<MacroSecurity> aDlg(new MacroSecurity( NULL, mxCtx, xSecEnv ) ); + ScopedVclPtrInstance< MacroSecurity > aDlg( nullptr, mxCtx, xSecEnv ); aDlg->Execute(); } @@ -401,7 +401,7 @@ void DocumentDigitalSignatures::showCertificate( if ( bInit ) { - ScopedVclPtr<CertificateViewer> aViewer(new CertificateViewer( NULL, aSignatureHelper.GetSecurityEnvironment(), _Certificate, false ) ); + ScopedVclPtrInstance< CertificateViewer > aViewer( nullptr, aSignatureHelper.GetSecurityEnvironment(), _Certificate, false ); aViewer->Execute(); } @@ -441,7 +441,7 @@ Reference< css::security::XCertificate > DocumentDigitalSignatures::chooseCertif if ( aSignatureHelper.Init() ) xSecEnv = aSignatureHelper.GetSecurityEnvironment(); - ScopedVclPtr<CertificateChooser> aChooser(new CertificateChooser( NULL, mxCtx, xSecEnv, aSignatureHelper.GetSignatureInformations()) ); + ScopedVclPtrInstance< CertificateChooser > aChooser( nullptr, mxCtx, xSecEnv, aSignatureHelper.GetSignatureInformations()); if (aChooser->Execute() != RET_OK) return Reference< css::security::XCertificate >(0); diff --git a/xmlsecurity/source/dialogs/certificatechooser.cxx b/xmlsecurity/source/dialogs/certificatechooser.cxx index fde97b92e0e3..4d1f11a91104 100644 --- a/xmlsecurity/source/dialogs/certificatechooser.cxx +++ b/xmlsecurity/source/dialogs/certificatechooser.cxx @@ -225,7 +225,7 @@ void CertificateChooser::ImplShowCertificateDetails() uno::Reference< css::security::XCertificate > xCert = GetSelectedCertificate(); if( xCert.is() ) { - ScopedVclPtr<CertificateViewer> aViewer(new CertificateViewer( this, mxSecurityEnvironment, xCert, true )); + ScopedVclPtrInstance< CertificateViewer > aViewer( this, mxSecurityEnvironment, xCert, true ); aViewer->Execute(); } } diff --git a/xmlsecurity/source/dialogs/certificateviewer.cxx b/xmlsecurity/source/dialogs/certificateviewer.cxx index 6a859e878cfa..58bf309f5b3c 100644 --- a/xmlsecurity/source/dialogs/certificateviewer.cxx +++ b/xmlsecurity/source/dialogs/certificateviewer.cxx @@ -425,7 +425,10 @@ IMPL_LINK_NOARG(CertificateViewerCertPathTP, ViewCertHdl) SvTreeListEntry* pEntry = mpCertPathLB->FirstSelected(); if( pEntry ) { - ScopedVclPtrInstance<CertificateViewer> aViewer( this, mpDlg->mxSecurityEnvironment, static_cast<CertPath_UserData*>(pEntry->GetUserData())->mxCert, false ); + ScopedVclPtrInstance< CertificateViewer > aViewer( + this, mpDlg->mxSecurityEnvironment, + static_cast<CertPath_UserData*>(pEntry->GetUserData())->mxCert, + false ); aViewer->Execute(); } diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx index b2e40bed19b8..ecd95070f7a5 100644 --- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx +++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx @@ -313,7 +313,7 @@ bool DigitalSignaturesDialog::canAddRemove() if ( (!bSave1_1 && bDoc1_1) || (bSave1_1 && bDoc1_1) ) { //#4 - ScopedVclPtr<MessageDialog> err(new MessageDialog(NULL, XMLSEC_RES(STR_XMLSECDLG_OLD_ODF_FORMAT))); + ScopedVclPtrInstance< MessageDialog > err(nullptr, XMLSEC_RES(STR_XMLSECDLG_OLD_ODF_FORMAT)); err->Execute(); ret = false; } @@ -432,7 +432,7 @@ IMPL_LINK_NOARG(DigitalSignaturesDialog, AddButtonHdl) uno::Reference<com::sun::star::security::XSerialNumberAdapter> xSerialNumberAdapter = ::com::sun::star::security::SerialNumberAdapter::create(mxCtx); - ScopedVclPtr<CertificateChooser> aChooser(new CertificateChooser( this, mxCtx, xSecEnv, maCurrentSignatureInformations )); + ScopedVclPtrInstance< CertificateChooser > aChooser( this, mxCtx, xSecEnv, maCurrentSignatureInformations ); if ( aChooser->Execute() == RET_OK ) { uno::Reference< ::com::sun::star::security::XCertificate > xCert = aChooser->GetSelectedCertificate(); @@ -767,7 +767,7 @@ void DigitalSignaturesDialog::ImplShowSignaturesDetails() DBG_ASSERT( xCert.is(), "Error getting cCertificate!" ); if ( xCert.is() ) { - ScopedVclPtr<CertificateViewer> aViewer(new CertificateViewer( this, maSignatureHelper.GetSecurityEnvironment(), xCert, false )); + ScopedVclPtrInstance< CertificateViewer > aViewer( this, maSignatureHelper.GetSecurityEnvironment(), xCert, false ); aViewer->Execute(); } } diff --git a/xmlsecurity/source/dialogs/macrosecurity.cxx b/xmlsecurity/source/dialogs/macrosecurity.cxx index 2b2b64e7ae1b..ab3ac51ba3f6 100644 --- a/xmlsecurity/source/dialogs/macrosecurity.cxx +++ b/xmlsecurity/source/dialogs/macrosecurity.cxx @@ -238,7 +238,7 @@ IMPL_LINK_NOARG(MacroSecurityTrustedSourcesTP, ViewCertPBHdl) if ( xCert.is() ) { - ScopedVclPtr<CertificateViewer> aViewer(new CertificateViewer( this, mpDlg->mxSecurityEnvironment, xCert, false )); + ScopedVclPtrInstance< CertificateViewer > aViewer( this, mpDlg->mxSecurityEnvironment, xCert, false ); aViewer->Execute(); } } |