summaryrefslogtreecommitdiff
path: root/xmlsecurity/source/component/documentdigitalsignatures.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-02-11 14:42:23 +0200
committerMichael Meeks <michael.meeks@collabora.com>2015-04-09 22:17:00 +0100
commit00f2787a4a68633206635743298926bf2e65a8fa (patch)
treeefc3a4f02b3d8acd69d25071499be5a475cb0338 /xmlsecurity/source/component/documentdigitalsignatures.cxx
parentb3dcb2996b70caabda1939c9e85545c97d78404a (diff)
vclwidgets: wrap all vcl::Window subclasses allocated on stack in VclPtr
Change-Id: Ia8b0d84bbf69f9d8f85505d019acdded14e25133 Conflicts: sw/qa/tiledrendering/tiledrendering.cxx
Diffstat (limited to 'xmlsecurity/source/component/documentdigitalsignatures.cxx')
-rw-r--r--xmlsecurity/source/component/documentdigitalsignatures.cxx32
1 files changed, 16 insertions, 16 deletions
diff --git a/xmlsecurity/source/component/documentdigitalsignatures.cxx b/xmlsecurity/source/component/documentdigitalsignatures.cxx
index acaac53e3e43..16301d12d9c6 100644
--- a/xmlsecurity/source/component/documentdigitalsignatures.cxx
+++ b/xmlsecurity/source/component/documentdigitalsignatures.cxx
@@ -222,17 +222,17 @@ 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();
+ VclPtr<DigitalSignaturesDialog> aSignaturesDialog(new DigitalSignaturesDialog(
+ NULL, 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 +246,8 @@ bool DocumentDigitalSignatures::ImplViewSignatures(
}
else
{
- MessageDialog aBox(NULL, XMLSEC_RES(RID_XMLSECWB_NO_MOZILLA_PROFILE), VCL_MESSAGE_WARNING);
- aBox.Execute();
+ VclPtr<MessageDialog> aBox(new MessageDialog(NULL, XMLSEC_RES(RID_XMLSECWB_NO_MOZILLA_PROFILE), VCL_MESSAGE_WARNING));
+ aBox->Execute();
}
return bChanges;
@@ -386,8 +386,8 @@ void DocumentDigitalSignatures::manageTrustedSources( ) throw (RuntimeException
if ( aSignatureHelper.Init() )
xSecEnv = aSignatureHelper.GetSecurityEnvironment();
- MacroSecurity aDlg( NULL, mxCtx, xSecEnv );
- aDlg.Execute();
+ VclPtr<MacroSecurity> aDlg(new MacroSecurity( NULL, mxCtx, xSecEnv ) );
+ aDlg->Execute();
}
void DocumentDigitalSignatures::showCertificate(
@@ -401,8 +401,8 @@ void DocumentDigitalSignatures::showCertificate(
if ( bInit )
{
- CertificateViewer aViewer( NULL, aSignatureHelper.GetSecurityEnvironment(), _Certificate, false );
- aViewer.Execute();
+ VclPtr<CertificateViewer> aViewer(new CertificateViewer( NULL, aSignatureHelper.GetSecurityEnvironment(), _Certificate, false ) );
+ aViewer->Execute();
}
}
@@ -441,12 +441,12 @@ Reference< css::security::XCertificate > DocumentDigitalSignatures::chooseCertif
if ( aSignatureHelper.Init() )
xSecEnv = aSignatureHelper.GetSecurityEnvironment();
- CertificateChooser aChooser( NULL, mxCtx, xSecEnv, aSignatureHelper.GetSignatureInformations());
+ VclPtr<CertificateChooser> aChooser(new CertificateChooser( NULL, 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);