diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-01-09 09:22:34 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-01-10 06:28:22 +0000 |
commit | b0229855057ed4d73e73ecd8c501a4564f2237ce (patch) | |
tree | 05a3e4eea3ea9584699063ed9b726d466f3a8839 /xmlsecurity | |
parent | bce35b8e13b0d82ba54bf3d380f448dad0ee13bb (diff) |
loplugin:unusedfields
Change-Id: I9611511cb3480734dea3c3cbaf0d659071366ad1
Reviewed-on: https://gerrit.libreoffice.org/32873
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmlsecurity')
-rw-r--r-- | xmlsecurity/inc/framework/signaturecreatorimpl.hxx | 2 | ||||
-rw-r--r-- | xmlsecurity/inc/framework/signatureengine.hxx | 5 | ||||
-rw-r--r-- | xmlsecurity/inc/framework/signatureverifierimpl.hxx | 3 | ||||
-rw-r--r-- | xmlsecurity/inc/pdfsignaturehelper.hxx | 3 | ||||
-rw-r--r-- | xmlsecurity/inc/xsecctl.hxx | 6 | ||||
-rw-r--r-- | xmlsecurity/source/framework/signaturecreatorimpl.cxx | 8 | ||||
-rw-r--r-- | xmlsecurity/source/framework/signatureengine.cxx | 4 | ||||
-rw-r--r-- | xmlsecurity/source/framework/signatureverifierimpl.cxx | 8 | ||||
-rw-r--r-- | xmlsecurity/source/helper/documentsignaturemanager.cxx | 2 | ||||
-rw-r--r-- | xmlsecurity/source/helper/pdfsignaturehelper.cxx | 3 | ||||
-rw-r--r-- | xmlsecurity/source/helper/xsecctl.cxx | 1 | ||||
-rw-r--r-- | xmlsecurity/source/helper/xsecsign.cxx | 2 | ||||
-rw-r--r-- | xmlsecurity/source/helper/xsecverify.cxx | 2 |
13 files changed, 18 insertions, 31 deletions
diff --git a/xmlsecurity/inc/framework/signaturecreatorimpl.hxx b/xmlsecurity/inc/framework/signaturecreatorimpl.hxx index ce5e01f08eb7..cdf0da4e1067 100644 --- a/xmlsecurity/inc/framework/signaturecreatorimpl.hxx +++ b/xmlsecurity/inc/framework/signaturecreatorimpl.hxx @@ -67,7 +67,7 @@ private: throw (css::uno::Exception, css::uno::RuntimeException) override; public: - explicit SignatureCreatorImpl( const css::uno::Reference< css::uno::XComponentContext > & xContext ); + explicit SignatureCreatorImpl(); virtual ~SignatureCreatorImpl() override; /* XBlockerMonitor */ diff --git a/xmlsecurity/inc/framework/signatureengine.hxx b/xmlsecurity/inc/framework/signatureengine.hxx index ee6c79abea98..3793016cec61 100644 --- a/xmlsecurity/inc/framework/signatureengine.hxx +++ b/xmlsecurity/inc/framework/signatureengine.hxx @@ -54,9 +54,6 @@ class XSECFW_DLLPUBLIC SignatureEngine : public cppu::ImplInheritanceHelper * Maintains common members and methods related with signature operation. ******************************************************************************/ { -private: - css::uno::Reference< css::uno::XComponentContext > m_xContext; - protected: /* @@ -86,7 +83,7 @@ protected: std::vector< css::uno::Reference< css::io::XInputStream > > m_vXInputStreams; protected: - explicit SignatureEngine( const css::uno::Reference< css::uno::XComponentContext > & xContext); + explicit SignatureEngine(); virtual ~SignatureEngine() override {}; virtual void tryToPerform( ) diff --git a/xmlsecurity/inc/framework/signatureverifierimpl.hxx b/xmlsecurity/inc/framework/signatureverifierimpl.hxx index f31f7acda35e..70bbb419de07 100644 --- a/xmlsecurity/inc/framework/signatureverifierimpl.hxx +++ b/xmlsecurity/inc/framework/signatureverifierimpl.hxx @@ -61,8 +61,7 @@ private: throw (css::uno::Exception, css::uno::RuntimeException) override; public: - explicit SignatureVerifierImpl( const css::uno::Reference< - css::uno::XComponentContext >& rxContext); + explicit SignatureVerifierImpl(); virtual ~SignatureVerifierImpl() override; /* XSignatureVerifyResultBroadcaster */ diff --git a/xmlsecurity/inc/pdfsignaturehelper.hxx b/xmlsecurity/inc/pdfsignaturehelper.hxx index 7efdbfba421f..463961a99fdd 100644 --- a/xmlsecurity/inc/pdfsignaturehelper.hxx +++ b/xmlsecurity/inc/pdfsignaturehelper.hxx @@ -24,14 +24,13 @@ /// Handles signatures of a PDF file. class XMLSECURITY_DLLPUBLIC PDFSignatureHelper { - css::uno::Reference<css::uno::XComponentContext> m_xComponentContext; SignatureInformations m_aSignatureInfos; css::uno::Reference<css::security::XCertificate> m_xCertificate; OUString m_aDescription; public: - PDFSignatureHelper(const css::uno::Reference<css::uno::XComponentContext>& xComponentContext); + PDFSignatureHelper(); bool ReadAndVerifySignature(const css::uno::Reference<css::io::XInputStream>& xInputStream); css::uno::Sequence<css::security::DocumentSignatureInformation> GetDocumentSignatureInformations(const css::uno::Reference<css::xml::crypto::XSecurityEnvironment>& xSecEnv) const; SignatureInformations GetSignatureInformations() const; diff --git a/xmlsecurity/inc/xsecctl.hxx b/xmlsecurity/inc/xsecctl.hxx index 8e1fc1b0e066..686d23dca4c4 100644 --- a/xmlsecurity/inc/xsecctl.hxx +++ b/xmlsecurity/inc/xsecctl.hxx @@ -255,12 +255,6 @@ private: */ bool m_bVerifyCurrentSignature; - /* - * the type of signature to generate (from the css::xml::crypto::DigestID alternatives) when there is a choice, - * in practice currently SHA1 or SHA256 for ODF. - */ - sal_Int32 m_nDigestID; - public: /* * An xUriBinding is provided to map Uris to XInputStream interfaces. diff --git a/xmlsecurity/source/framework/signaturecreatorimpl.cxx b/xmlsecurity/source/framework/signaturecreatorimpl.cxx index e9269c267c20..3e289b90f134 100644 --- a/xmlsecurity/source/framework/signaturecreatorimpl.cxx +++ b/xmlsecurity/source/framework/signaturecreatorimpl.cxx @@ -34,8 +34,8 @@ namespace cssxw = com::sun::star::xml::wrapper; #define IMPLEMENTATION_NAME "com.sun.star.xml.security.framework.SignatureCreatorImpl" -SignatureCreatorImpl::SignatureCreatorImpl( const Reference<XComponentContext> & xContext ) - : SignatureCreatorImpl_Base(xContext), m_nIdOfBlocker(-1) +SignatureCreatorImpl::SignatureCreatorImpl() + : SignatureCreatorImpl_Base(), m_nIdOfBlocker(-1) { } @@ -200,10 +200,10 @@ cssu::Sequence< OUString > SAL_CALL SignatureCreatorImpl_getSupportedServiceName } cssu::Reference< cssu::XInterface > SAL_CALL SignatureCreatorImpl_createInstance( - const cssu::Reference< cssl::XMultiServiceFactory >& xMSF ) + const cssu::Reference< cssl::XMultiServiceFactory >& /*xMSF*/ ) throw( cssu::Exception ) { - return static_cast<cppu::OWeakObject*>(new SignatureCreatorImpl( comphelper::getComponentContext( xMSF ) )); + return static_cast<cppu::OWeakObject*>(new SignatureCreatorImpl); } /* XServiceInfo */ diff --git a/xmlsecurity/source/framework/signatureengine.cxx b/xmlsecurity/source/framework/signatureengine.cxx index 27dd705c4ca1..b22d97cbccf4 100644 --- a/xmlsecurity/source/framework/signatureengine.cxx +++ b/xmlsecurity/source/framework/signatureengine.cxx @@ -29,8 +29,8 @@ namespace cssu = com::sun::star::uno; namespace cssxc = com::sun::star::xml::crypto; namespace cssxw = com::sun::star::xml::wrapper; -SignatureEngine::SignatureEngine( const Reference<XComponentContext> & xContext) - : m_xContext(xContext), m_nTotalReferenceNumber(-1) +SignatureEngine::SignatureEngine() + : m_nTotalReferenceNumber(-1) { } diff --git a/xmlsecurity/source/framework/signatureverifierimpl.cxx b/xmlsecurity/source/framework/signatureverifierimpl.cxx index bbbef86896d2..b399af103718 100644 --- a/xmlsecurity/source/framework/signatureverifierimpl.cxx +++ b/xmlsecurity/source/framework/signatureverifierimpl.cxx @@ -32,8 +32,8 @@ namespace cssxc = com::sun::star::xml::crypto; #define IMPLEMENTATION_NAME "com.sun.star.xml.security.framework.SignatureVerifierImpl" -SignatureVerifierImpl::SignatureVerifierImpl( const cssu::Reference< css::uno::XComponentContext >& xContext) - : SignatureVerifierImpl_Base(xContext) +SignatureVerifierImpl::SignatureVerifierImpl() + : SignatureVerifierImpl_Base() { } @@ -153,10 +153,10 @@ cssu::Sequence< OUString > SAL_CALL SignatureVerifierImpl_getSupportedServiceNam } cssu::Reference< cssu::XInterface > SAL_CALL SignatureVerifierImpl_createInstance( - const cssu::Reference< cssl::XMultiServiceFactory >& rSMgr) + const cssu::Reference< cssl::XMultiServiceFactory >& /*rSMgr*/) throw( cssu::Exception ) { - return static_cast<cppu::OWeakObject*>(new SignatureVerifierImpl( comphelper::getComponentContext(rSMgr) )); + return static_cast<cppu::OWeakObject*>(new SignatureVerifierImpl); } /* XServiceInfo */ diff --git a/xmlsecurity/source/helper/documentsignaturemanager.cxx b/xmlsecurity/source/helper/documentsignaturemanager.cxx index 76e0b0aefaa9..7a263449b2ea 100644 --- a/xmlsecurity/source/helper/documentsignaturemanager.cxx +++ b/xmlsecurity/source/helper/documentsignaturemanager.cxx @@ -70,7 +70,7 @@ PDFSignatureHelper& DocumentSignatureManager::getPDFSignatureHelper() SAL_WARN_IF(!bInit, "xmlsecurity.comp", "Error initializing security context!"); if (!mpPDFSignatureHelper) - mpPDFSignatureHelper.reset(new PDFSignatureHelper(mxContext)); + mpPDFSignatureHelper.reset(new PDFSignatureHelper); return *mpPDFSignatureHelper; } diff --git a/xmlsecurity/source/helper/pdfsignaturehelper.cxx b/xmlsecurity/source/helper/pdfsignaturehelper.cxx index 4218a8305ee4..120bd3dd53d0 100644 --- a/xmlsecurity/source/helper/pdfsignaturehelper.cxx +++ b/xmlsecurity/source/helper/pdfsignaturehelper.cxx @@ -23,8 +23,7 @@ using namespace ::com::sun::star; -PDFSignatureHelper::PDFSignatureHelper(const uno::Reference<uno::XComponentContext>& xComponentContext) - : m_xComponentContext(xComponentContext) +PDFSignatureHelper::PDFSignatureHelper() { } diff --git a/xmlsecurity/source/helper/xsecctl.cxx b/xmlsecurity/source/helper/xsecctl.cxx index ffd2f1531066..e27101b4cdf8 100644 --- a/xmlsecurity/source/helper/xsecctl.cxx +++ b/xmlsecurity/source/helper/xsecctl.cxx @@ -58,7 +58,6 @@ XSecController::XSecController( const cssu::Reference<cssu::XComponentContext>& , m_bIsSAXEventKeeperSticky(false) , m_nReservedSignatureId(0) , m_bVerifyCurrentSignature(false) - , m_nDigestID(cssxc::DigestID::SHA1) { } diff --git a/xmlsecurity/source/helper/xsecsign.cxx b/xmlsecurity/source/helper/xsecsign.cxx index eabae475bb02..f2db1bdd10ed 100644 --- a/xmlsecurity/source/helper/xsecsign.cxx +++ b/xmlsecurity/source/helper/xsecsign.cxx @@ -69,7 +69,7 @@ cssu::Reference< cssxc::sax::XReferenceResolvedListener > XSecController::prepar m_xSAXEventKeeper->setSecurityId(nIdOfSignatureElementCollector, nSecurityId); - uno::Reference<xml::crypto::sax::XReferenceResolvedListener> xReferenceResolvedListener(new SignatureCreatorImpl(mxCtx)); + uno::Reference<xml::crypto::sax::XReferenceResolvedListener> xReferenceResolvedListener(new SignatureCreatorImpl); cssu::Reference<cssl::XInitialization> xInitialization(xReferenceResolvedListener, cssu::UNO_QUERY); diff --git a/xmlsecurity/source/helper/xsecverify.cxx b/xmlsecurity/source/helper/xsecverify.cxx index 8eb227386a2d..d6ce85be5f21 100644 --- a/xmlsecurity/source/helper/xsecverify.cxx +++ b/xmlsecurity/source/helper/xsecverify.cxx @@ -60,7 +60,7 @@ cssu::Reference< cssxc::sax::XReferenceResolvedListener > XSecController::prepar * create a SignatureVerifier */ cssu::Reference< cssl::XMultiComponentFactory > xMCF( mxCtx->getServiceManager() ); - xReferenceResolvedListener = new SignatureVerifierImpl(mxCtx); + xReferenceResolvedListener = new SignatureVerifierImpl; cssu::Reference<cssl::XInitialization> xInitialization(xReferenceResolvedListener, cssu::UNO_QUERY); |