summaryrefslogtreecommitdiff
path: root/xmlsecurity
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
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')
-rw-r--r--xmlsecurity/source/component/documentdigitalsignatures.cxx32
-rw-r--r--xmlsecurity/source/dialogs/certificatechooser.cxx4
-rw-r--r--xmlsecurity/source/dialogs/certificateviewer.cxx4
-rw-r--r--xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx14
-rw-r--r--xmlsecurity/source/dialogs/macrosecurity.cxx4
5 files changed, 29 insertions, 29 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);
diff --git a/xmlsecurity/source/dialogs/certificatechooser.cxx b/xmlsecurity/source/dialogs/certificatechooser.cxx
index dfd3a549afd6..576013a9e06b 100644
--- a/xmlsecurity/source/dialogs/certificatechooser.cxx
+++ b/xmlsecurity/source/dialogs/certificatechooser.cxx
@@ -223,8 +223,8 @@ void CertificateChooser::ImplShowCertificateDetails()
uno::Reference< css::security::XCertificate > xCert = GetSelectedCertificate();
if( xCert.is() )
{
- CertificateViewer aViewer( this, mxSecurityEnvironment, xCert, true );
- aViewer.Execute();
+ VclPtr<CertificateViewer> aViewer(new CertificateViewer( this, mxSecurityEnvironment, xCert, true ));
+ aViewer->Execute();
}
}
diff --git a/xmlsecurity/source/dialogs/certificateviewer.cxx b/xmlsecurity/source/dialogs/certificateviewer.cxx
index 4c67c84e6f9c..6de4d968b58b 100644
--- a/xmlsecurity/source/dialogs/certificateviewer.cxx
+++ b/xmlsecurity/source/dialogs/certificateviewer.cxx
@@ -382,8 +382,8 @@ IMPL_LINK_NOARG(CertificateViewerCertPathTP, ViewCertHdl)
SvTreeListEntry* pEntry = mpCertPathLB->FirstSelected();
if( pEntry )
{
- CertificateViewer aViewer( this, mpDlg->mxSecurityEnvironment, static_cast<CertPath_UserData*>(pEntry->GetUserData())->mxCert, false );
- aViewer.Execute();
+ ScopedVclPtr<CertificateViewer> aViewer( this, mpDlg->mxSecurityEnvironment, static_cast<CertPath_UserData*>(pEntry->GetUserData())->mxCert, false );
+ aViewer->Execute();
}
return 0;
diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
index 948655c0da23..ab127deedc94 100644
--- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
+++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
@@ -298,8 +298,8 @@ bool DigitalSignaturesDialog::canAddRemove()
if ( (!bSave1_1 && bDoc1_1) || (bSave1_1 && bDoc1_1) )
{
//#4
- MessageDialog err(NULL, XMLSEC_RES(STR_XMLSECDLG_OLD_ODF_FORMAT));
- err.Execute();
+ VclPtr<MessageDialog> err(new MessageDialog(NULL, XMLSEC_RES(STR_XMLSECDLG_OLD_ODF_FORMAT)));
+ err->Execute();
ret = false;
}
@@ -417,10 +417,10 @@ IMPL_LINK_NOARG(DigitalSignaturesDialog, AddButtonHdl)
uno::Reference<com::sun::star::security::XSerialNumberAdapter> xSerialNumberAdapter =
::com::sun::star::security::SerialNumberAdapter::create(mxCtx);
- CertificateChooser aChooser( this, mxCtx, xSecEnv, maCurrentSignatureInformations );
- if ( aChooser.Execute() == RET_OK )
+ VclPtr<CertificateChooser> aChooser(new CertificateChooser( this, mxCtx, xSecEnv, maCurrentSignatureInformations ));
+ if ( aChooser->Execute() == RET_OK )
{
- uno::Reference< ::com::sun::star::security::XCertificate > xCert = aChooser.GetSelectedCertificate();
+ uno::Reference< ::com::sun::star::security::XCertificate > xCert = aChooser->GetSelectedCertificate();
if ( !xCert.is() )
{
SAL_WARN( "xmlsecurity.dialogs", "no certificate selected" );
@@ -752,8 +752,8 @@ void DigitalSignaturesDialog::ImplShowSignaturesDetails()
DBG_ASSERT( xCert.is(), "Error getting cCertificate!" );
if ( xCert.is() )
{
- CertificateViewer aViewer( this, maSignatureHelper.GetSecurityEnvironment(), xCert, false );
- aViewer.Execute();
+ VclPtr<CertificateViewer> aViewer(new CertificateViewer( this, maSignatureHelper.GetSecurityEnvironment(), xCert, false ));
+ aViewer->Execute();
}
}
}
diff --git a/xmlsecurity/source/dialogs/macrosecurity.cxx b/xmlsecurity/source/dialogs/macrosecurity.cxx
index 3fc606537eac..e5bcabcddd40 100644
--- a/xmlsecurity/source/dialogs/macrosecurity.cxx
+++ b/xmlsecurity/source/dialogs/macrosecurity.cxx
@@ -208,8 +208,8 @@ IMPL_LINK_NOARG(MacroSecurityTrustedSourcesTP, ViewCertPBHdl)
if ( xCert.is() )
{
- CertificateViewer aViewer( this, mpDlg->mxSecurityEnvironment, xCert, false );
- aViewer.Execute();
+ VclPtr<CertificateViewer> aViewer(new CertificateViewer( this, mpDlg->mxSecurityEnvironment, xCert, false ));
+ aViewer->Execute();
}
}
return 0;