summaryrefslogtreecommitdiff
path: root/xmlsecurity
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-09-16 16:24:33 +0200
committerNoel Grandin <noel@peralex.com>2015-09-17 08:19:34 +0200
commit39da0a99672d9066dbe417288566d43ed71e24dd (patch)
treed12b14ce3d9dff02700f7dc301404522c48645ff /xmlsecurity
parent1e2119fd0211b671cad7ba7005a99a1da1a0caf5 (diff)
convert Link<> to typed
Change-Id: I2a149a0a2a189ca84ce8e71f32d0f3696a0bb50d
Diffstat (limited to 'xmlsecurity')
-rw-r--r--xmlsecurity/inc/xmlsecurity/digitalsignaturesdialog.hxx2
-rw-r--r--xmlsecurity/inc/xmlsecurity/xmlsignaturehelper.hxx10
-rw-r--r--xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx4
-rw-r--r--xmlsecurity/source/helper/xmlsignaturehelper.cxx22
-rw-r--r--xmlsecurity/source/helper/xmlsignaturehelper2.cxx14
-rw-r--r--xmlsecurity/source/helper/xmlsignaturehelper2.hxx10
6 files changed, 31 insertions, 31 deletions
diff --git a/xmlsecurity/inc/xmlsecurity/digitalsignaturesdialog.hxx b/xmlsecurity/inc/xmlsecurity/digitalsignaturesdialog.hxx
index e70a714992c7..aeb6fdb628f6 100644
--- a/xmlsecurity/inc/xmlsecurity/digitalsignaturesdialog.hxx
+++ b/xmlsecurity/inc/xmlsecurity/digitalsignaturesdialog.hxx
@@ -93,7 +93,7 @@ private:
DECL_LINK_TYPED(RemoveButtonHdl, Button*, void);
DECL_LINK_TYPED(SignatureHighlightHdl, SvTreeListBox*, void );
DECL_LINK_TYPED(SignatureSelectHdl, SvTreeListBox*, bool );
- DECL_LINK( StartVerifySignatureHdl, void* );
+ DECL_LINK_TYPED(StartVerifySignatureHdl, LinkParamNone*, bool );
DECL_LINK_TYPED(OKButtonHdl, Button*, void );
void ImplGetSignatureInformations(bool bUseTempStream);
diff --git a/xmlsecurity/inc/xmlsecurity/xmlsignaturehelper.hxx b/xmlsecurity/inc/xmlsecurity/xmlsignaturehelper.hxx
index 80f2bffa2695..150eaef4ddaa 100644
--- a/xmlsecurity/inc/xmlsecurity/xmlsignaturehelper.hxx
+++ b/xmlsecurity/inc/xmlsecurity/xmlsignaturehelper.hxx
@@ -105,12 +105,12 @@ private:
XSecController* mpXSecController;
bool mbError;
bool mbODFPre1_2;
- Link<> maStartVerifySignatureHdl;
+ Link<LinkParamNone*,bool> maStartVerifySignatureHdl;
private:
- DECL_LINK( SignatureCreationResultListener, XMLSignatureCreationResult*);
- DECL_LINK( SignatureVerifyResultListener, XMLSignatureVerifyResult* );
- DECL_LINK( StartVerifySignatureElement, const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >* );
+ DECL_LINK_TYPED( SignatureCreationResultListener, XMLSignatureCreationResult&, void );
+ DECL_LINK_TYPED( SignatureVerifyResultListener, XMLSignatureVerifyResult&, void );
+ DECL_LINK_TYPED( StartVerifySignatureElement, LinkParamNone*, void );
XMLSignatureHelper(const XMLSignatureHelper&) SAL_DELETED_FUNCTION;
@@ -130,7 +130,7 @@ public:
// Argument for the Link is a uno::Reference< xml::sax::XAttributeList >*
// Return 1 to verify, 0 to skip.
// Default handler will verify all.
- void SetStartVerifySignatureHdl( const Link<>& rLink );
+ void SetStartVerifySignatureHdl( const Link<LinkParamNone*,bool>& rLink );
// Get the security environment
::com::sun::star::uno::Reference< ::com::sun::star::xml::crypto::XSecurityEnvironment > GetSecurityEnvironment();
diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
index 0c3fb39ebcda..31d8cb501886 100644
--- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
+++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
@@ -565,9 +565,9 @@ IMPL_LINK_NOARG_TYPED(DigitalSignaturesDialog, RemoveButtonHdl, Button*, void)
}
}
-IMPL_LINK_NOARG(DigitalSignaturesDialog, StartVerifySignatureHdl)
+IMPL_LINK_NOARG_TYPED(DigitalSignaturesDialog, StartVerifySignatureHdl, LinkParamNone*, bool)
{
- return mbVerifySignatures ? 1 : 0;
+ return mbVerifySignatures;
}
void DigitalSignaturesDialog::ImplFillSignaturesBox()
diff --git a/xmlsecurity/source/helper/xmlsignaturehelper.cxx b/xmlsecurity/source/helper/xmlsignaturehelper.cxx
index 96b190940cde..7827155bfb8b 100644
--- a/xmlsecurity/source/helper/xmlsignaturehelper.cxx
+++ b/xmlsecurity/source/helper/xmlsignaturehelper.cxx
@@ -85,7 +85,7 @@ void XMLSignatureHelper::SetStorage(
}
-void XMLSignatureHelper::SetStartVerifySignatureHdl( const Link<>& rLink )
+void XMLSignatureHelper::SetStartVerifySignatureHdl( const Link<LinkParamNone*,bool>& rLink )
{
maStartVerifySignatureHdl = rLink;
}
@@ -311,31 +311,27 @@ uno::Reference< ::com::sun::star::xml::crypto::XSecurityEnvironment > XMLSignatu
return (mxSecurityContext.is()?(mxSecurityContext->getSecurityEnvironment()): uno::Reference< ::com::sun::star::xml::crypto::XSecurityEnvironment >());
}
-IMPL_LINK( XMLSignatureHelper, SignatureCreationResultListener, XMLSignatureCreationResult*, pResult )
+IMPL_LINK_TYPED( XMLSignatureHelper, SignatureCreationResultListener, XMLSignatureCreationResult&, rResult, void )
{
- maCreationResults.insert( maCreationResults.begin() + maCreationResults.size(), *pResult );
- if ( pResult->nSignatureCreationResult != com::sun::star::xml::crypto::SecurityOperationStatus_OPERATION_SUCCEEDED )
+ maCreationResults.insert( maCreationResults.begin() + maCreationResults.size(), rResult );
+ if ( rResult.nSignatureCreationResult != com::sun::star::xml::crypto::SecurityOperationStatus_OPERATION_SUCCEEDED )
mbError = true;
- return 0;
}
-IMPL_LINK( XMLSignatureHelper, SignatureVerifyResultListener, XMLSignatureVerifyResult*, pResult )
+IMPL_LINK_TYPED( XMLSignatureHelper, SignatureVerifyResultListener, XMLSignatureVerifyResult&, rResult, void )
{
- maVerifyResults.insert( maVerifyResults.begin() + maVerifyResults.size(), *pResult );
- if ( pResult->nSignatureVerifyResult != com::sun::star::xml::crypto::SecurityOperationStatus_OPERATION_SUCCEEDED )
+ maVerifyResults.insert( maVerifyResults.begin() + maVerifyResults.size(), rResult );
+ if ( rResult.nSignatureVerifyResult != com::sun::star::xml::crypto::SecurityOperationStatus_OPERATION_SUCCEEDED )
mbError = true;
- return 0;
}
-IMPL_LINK( XMLSignatureHelper, StartVerifySignatureElement, const uno::Reference< com::sun::star::xml::sax::XAttributeList >*, pAttrs )
+IMPL_LINK_NOARG_TYPED( XMLSignatureHelper, StartVerifySignatureElement, LinkParamNone*, void )
{
- if ( !maStartVerifySignatureHdl.IsSet() || maStartVerifySignatureHdl.Call( const_cast<css::uno::Reference<css::xml::sax::XAttributeList> *>(pAttrs) ) )
+ if ( !maStartVerifySignatureHdl.IsSet() || maStartVerifySignatureHdl.Call(nullptr) )
{
sal_Int32 nSignatureId = mpXSecController->getNewSecurityId();
mpXSecController->addSignature( nSignatureId );
}
-
- return 0;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/helper/xmlsignaturehelper2.cxx b/xmlsecurity/source/helper/xmlsignaturehelper2.cxx
index 6033fe931be0..eb0a49a119ee 100644
--- a/xmlsecurity/source/helper/xmlsignaturehelper2.cxx
+++ b/xmlsecurity/source/helper/xmlsignaturehelper2.cxx
@@ -32,13 +32,15 @@
using namespace com::sun::star;
-ImplXMLSignatureListener::ImplXMLSignatureListener(const Link<>& rCreationResultListenerListener, const Link<>& rVerifyResultListenerListener, const Link<>& rStartSignatureElement)
+ImplXMLSignatureListener::ImplXMLSignatureListener(const Link<XMLSignatureCreationResult&,void>& rCreationResultListenerListener,
+ const Link<XMLSignatureVerifyResult&,void>& rVerifyResultListenerListener,
+ const Link<LinkParamNone*,void>& rStartSignatureElement)
{
maCreationResultListenerListener = rCreationResultListenerListener;
maVerifyResultListenerListener = rVerifyResultListenerListener;
maStartVerifySignatureElementListener = rStartSignatureElement;
-
}
+
ImplXMLSignatureListener::~ImplXMLSignatureListener()
{
}
@@ -53,14 +55,14 @@ void SAL_CALL ImplXMLSignatureListener::signatureCreated( sal_Int32 securityId,
throw (com::sun::star::uno::RuntimeException, std::exception)
{
XMLSignatureCreationResult aResult( securityId, nResult );
- maCreationResultListenerListener.Call( &aResult );
+ maCreationResultListenerListener.Call( aResult );
}
void SAL_CALL ImplXMLSignatureListener::signatureVerified( sal_Int32 securityId, com::sun::star::xml::crypto::SecurityOperationStatus nResult )
throw (com::sun::star::uno::RuntimeException, std::exception)
{
XMLSignatureVerifyResult aResult( securityId, nResult );
- maVerifyResultListenerListener.Call( &aResult );
+ maVerifyResultListenerListener.Call( aResult );
}
// XDocumentHandler
@@ -82,12 +84,12 @@ void SAL_CALL ImplXMLSignatureListener::endDocument( )
}
}
-void SAL_CALL ImplXMLSignatureListener::startElement( const OUString& aName, const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttribs )
+void SAL_CALL ImplXMLSignatureListener::startElement( const OUString& aName, const css::uno::Reference< css::xml::sax::XAttributeList >& xAttribs )
throw (com::sun::star::xml::sax::SAXException, com::sun::star::uno::RuntimeException, std::exception)
{
if ( aName == "Signature" )
{
- maStartVerifySignatureElementListener.Call( const_cast<css::uno::Reference<css::xml::sax::XAttributeList> *>(&xAttribs) );
+ maStartVerifySignatureElementListener.Call( nullptr );
}
if (m_xNextHandler.is())
diff --git a/xmlsecurity/source/helper/xmlsignaturehelper2.hxx b/xmlsecurity/source/helper/xmlsignaturehelper2.hxx
index 844f34ee4dc5..2c9887765138 100644
--- a/xmlsecurity/source/helper/xmlsignaturehelper2.hxx
+++ b/xmlsecurity/source/helper/xmlsignaturehelper2.hxx
@@ -48,15 +48,17 @@ class ImplXMLSignatureListener : public cppu::WeakImplHelper
>
{
private:
- Link<> maCreationResultListenerListener;
- Link<> maVerifyResultListenerListener;
- Link<> maStartVerifySignatureElementListener;
+ Link<XMLSignatureCreationResult&,void> maCreationResultListenerListener;
+ Link<XMLSignatureVerifyResult&,void> maVerifyResultListenerListener;
+ Link<LinkParamNone*,void> maStartVerifySignatureElementListener;
com::sun::star::uno::Reference<
com::sun::star::xml::sax::XDocumentHandler > m_xNextHandler;
public:
- ImplXMLSignatureListener(const Link<>& rCreationResultListenerListener, const Link<>& rVerifyResultListenerListener, const Link<>& rStartVerifySignatureElement);
+ ImplXMLSignatureListener(const Link<XMLSignatureCreationResult&,void>& rCreationResultListenerListener,
+ const Link<XMLSignatureVerifyResult&,void>& rVerifyResultListenerListener,
+ const Link<LinkParamNone*, void>& rStartVerifySignatureElement);
virtual ~ImplXMLSignatureListener();
void setNextHandler(com::sun::star::uno::Reference<