summaryrefslogtreecommitdiff
path: root/xmlsecurity/source/component/documentdigitalsignatures.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'xmlsecurity/source/component/documentdigitalsignatures.cxx')
-rw-r--r--xmlsecurity/source/component/documentdigitalsignatures.cxx33
1 files changed, 17 insertions, 16 deletions
diff --git a/xmlsecurity/source/component/documentdigitalsignatures.cxx b/xmlsecurity/source/component/documentdigitalsignatures.cxx
index acaac53e3e43..287b5cf50125 100644
--- a/xmlsecurity/source/component/documentdigitalsignatures.cxx
+++ b/xmlsecurity/source/component/documentdigitalsignatures.cxx
@@ -222,17 +222,18 @@ bool DocumentDigitalSignatures::ImplViewSignatures(
DocumentSignatureMode eMode, bool bReadOnly ) throw (RuntimeException, std::exception)
{
bool bChanges = false;
- DigitalSignaturesDialog aSignaturesDialog(
- NULL, mxCtx, eMode, bReadOnly, m_sODFVersion, m_bHasDocumentSignature);
- bool bInit = aSignaturesDialog.Init();
+ ScopedVclPtrInstance<DigitalSignaturesDialog> aSignaturesDialog(
+ nullptr, mxCtx, eMode, bReadOnly, m_sODFVersion,
+ m_bHasDocumentSignature);
+ bool bInit = aSignaturesDialog->Init();
DBG_ASSERT( bInit, "Error initializing security context!" );
if ( bInit )
{
- aSignaturesDialog.SetStorage( rxStorage );
- aSignaturesDialog.SetSignatureStream( xSignStream );
- if ( aSignaturesDialog.Execute() )
+ aSignaturesDialog->SetStorage( rxStorage );
+ aSignaturesDialog->SetSignatureStream( xSignStream );
+ if ( aSignaturesDialog->Execute() )
{
- if ( aSignaturesDialog.SignaturesChanged() )
+ if ( aSignaturesDialog->SignaturesChanged() )
{
bChanges = true;
// If we have a storage and no stream, we are responsible for commit
@@ -246,8 +247,8 @@ bool DocumentDigitalSignatures::ImplViewSignatures(
}
else
{
- MessageDialog aBox(NULL, XMLSEC_RES(RID_XMLSECWB_NO_MOZILLA_PROFILE), VCL_MESSAGE_WARNING);
- aBox.Execute();
+ ScopedVclPtrInstance< MessageDialog > aBox(nullptr, XMLSEC_RES(RID_XMLSECWB_NO_MOZILLA_PROFILE), VCL_MESSAGE_WARNING);
+ aBox->Execute();
}
return bChanges;
@@ -386,8 +387,8 @@ void DocumentDigitalSignatures::manageTrustedSources( ) throw (RuntimeException
if ( aSignatureHelper.Init() )
xSecEnv = aSignatureHelper.GetSecurityEnvironment();
- MacroSecurity aDlg( NULL, mxCtx, xSecEnv );
- aDlg.Execute();
+ ScopedVclPtrInstance< MacroSecurity > aDlg( nullptr, mxCtx, xSecEnv );
+ aDlg->Execute();
}
void DocumentDigitalSignatures::showCertificate(
@@ -401,8 +402,8 @@ void DocumentDigitalSignatures::showCertificate(
if ( bInit )
{
- CertificateViewer aViewer( NULL, aSignatureHelper.GetSecurityEnvironment(), _Certificate, false );
- aViewer.Execute();
+ ScopedVclPtrInstance< CertificateViewer > aViewer( nullptr, aSignatureHelper.GetSecurityEnvironment(), _Certificate, false );
+ aViewer->Execute();
}
}
@@ -441,12 +442,12 @@ Reference< css::security::XCertificate > DocumentDigitalSignatures::chooseCertif
if ( aSignatureHelper.Init() )
xSecEnv = aSignatureHelper.GetSecurityEnvironment();
- CertificateChooser aChooser( NULL, mxCtx, xSecEnv, aSignatureHelper.GetSignatureInformations());
+ ScopedVclPtrInstance< CertificateChooser > aChooser( nullptr, mxCtx, xSecEnv, aSignatureHelper.GetSignatureInformations());
- if (aChooser.Execute() != RET_OK)
+ if (aChooser->Execute() != RET_OK)
return Reference< css::security::XCertificate >(0);
- Reference< css::security::XCertificate > xCert = aChooser.GetSelectedCertificate();
+ Reference< css::security::XCertificate > xCert = aChooser->GetSelectedCertificate();
if ( !xCert.is() )
return Reference< css::security::XCertificate >(0);