diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-05-12 16:17:25 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2021-10-19 13:57:45 +0200 |
commit | 83e028ae46d73afa24e0c963619d3798d208a6ce (patch) | |
tree | 633f61e851e56038688cdc68bb20a606640754f0 /xmlsecurity/source/helper/xsecparser.cxx | |
parent | default to CertificateValidity::INVALID (diff) | |
download | core-83e028ae46d73afa24e0c963619d3798d208a6ce.tar.gz core-83e028ae46d73afa24e0c963619d3798d208a6ce.zip |
expand out some namespace aliases [xmlsecurity/source/helper]
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94093
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
(cherry picked from commit 943fbfad668da76f7d0ebd4f4d8cdd67224d2f01)
plus one line in xsecverify.cxx from:
commit f59d9e7ea09482c2e9e5f52a8d0445e4cebc3df5
Author: Noel Grandin <noel.grandin@collabora.co.uk>
AuthorDate: Fri Apr 3 15:53:49 2020 +0200
new loplugin:unusedvariableplus
a particularly aggressive checker, which is why it is off by default
Change-Id: I5fdb554a1b116824843f35645bc1cea3ca91e0f2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113052
Tested-by: Michael Stahl <michael.stahl@allotropia.de>
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'xmlsecurity/source/helper/xsecparser.cxx')
-rw-r--r-- | xmlsecurity/source/helper/xsecparser.cxx | 39 |
1 files changed, 18 insertions, 21 deletions
diff --git a/xmlsecurity/source/helper/xsecparser.cxx b/xmlsecurity/source/helper/xsecparser.cxx index 532ba07a0298..70c3c165612c 100644 --- a/xmlsecurity/source/helper/xsecparser.cxx +++ b/xmlsecurity/source/helper/xsecparser.cxx @@ -26,9 +26,6 @@ #include <string.h> -namespace cssu = com::sun::star::uno; -namespace cssxc = com::sun::star::xml::crypto; -namespace cssxs = com::sun::star::xml::sax; XSecParser::XSecParser(XMLSignatureHelper& rXMLSignatureHelper, XSecController* pXSecController) @@ -50,12 +47,12 @@ XSecParser::XSecParser(XMLSignatureHelper& rXMLSignatureHelper, , m_bInSignatureLineInvalidImage(false) , m_pXSecController(pXSecController) , m_bReferenceUnresolved(false) - , m_nReferenceDigestID(cssxc::DigestID::SHA1) + , m_nReferenceDigestID(css::xml::crypto::DigestID::SHA1) , m_rXMLSignatureHelper(rXMLSignatureHelper) { } -OUString XSecParser::getIdAttr(const cssu::Reference< cssxs::XAttributeList >& xAttribs ) +OUString XSecParser::getIdAttr(const css::uno::Reference< css::xml::sax::XAttributeList >& xAttribs ) { OUString ouIdAttr = xAttribs->getValueByName("id"); @@ -99,7 +96,7 @@ void SAL_CALL XSecParser::endDocument( ) void SAL_CALL XSecParser::startElement( const OUString& aName, - const cssu::Reference< cssxs::XAttributeList >& xAttribs ) + const css::uno::Reference< css::xml::sax::XAttributeList >& xAttribs ) { try { @@ -159,11 +156,11 @@ void SAL_CALL XSecParser::startElement( && ouAlgorithm != ALGO_XMLDSIGSHA512, "xmlsecurity.helper", "Algorithm neither SHA1, SHA256 nor SHA512"); if (ouAlgorithm == ALGO_XMLDSIGSHA1) - m_nReferenceDigestID = cssxc::DigestID::SHA1; + m_nReferenceDigestID = css::xml::crypto::DigestID::SHA1; else if (ouAlgorithm == ALGO_XMLDSIGSHA256) - m_nReferenceDigestID = cssxc::DigestID::SHA256; + m_nReferenceDigestID = css::xml::crypto::DigestID::SHA256; else if (ouAlgorithm == ALGO_XMLDSIGSHA512) - m_nReferenceDigestID = cssxc::DigestID::SHA512; + m_nReferenceDigestID = css::xml::crypto::DigestID::SHA512; else m_nReferenceDigestID = 0; } @@ -286,18 +283,18 @@ void SAL_CALL XSecParser::startElement( m_xNextHandler->startElement(aName, xAttribs); } } - catch (cssu::Exception& ) + catch (css::uno::Exception& ) {//getCaughtException MUST be the first line in the catch block - cssu::Any exc = cppu::getCaughtException(); - throw cssxs::SAXException( + css::uno::Any exc = cppu::getCaughtException(); + throw css::xml::sax::SAXException( "xmlsecurity: Exception in XSecParser::startElement", nullptr, exc); } catch (...) { - throw cssxs::SAXException( + throw css::xml::sax::SAXException( "xmlsecurity: unexpected exception in XSecParser::startElement", nullptr, - cssu::Any()); + css::uno::Any()); } } @@ -410,18 +407,18 @@ void SAL_CALL XSecParser::endElement( const OUString& aName ) m_xNextHandler->endElement(aName); } } - catch (cssu::Exception& ) + catch (css::uno::Exception& ) {//getCaughtException MUST be the first line in the catch block - cssu::Any exc = cppu::getCaughtException(); - throw cssxs::SAXException( + css::uno::Any exc = cppu::getCaughtException(); + throw css::xml::sax::SAXException( "xmlsecurity: Exception in XSecParser::endElement", nullptr, exc); } catch (...) { - throw cssxs::SAXException( + throw css::xml::sax::SAXException( "xmlsecurity: unexpected exception in XSecParser::endElement", nullptr, - cssu::Any()); + css::uno::Any()); } } @@ -514,7 +511,7 @@ void SAL_CALL XSecParser::processingInstruction( const OUString& aTarget, const } } -void SAL_CALL XSecParser::setDocumentLocator( const cssu::Reference< cssxs::XLocator >& xLocator ) +void SAL_CALL XSecParser::setDocumentLocator( const css::uno::Reference< css::xml::sax::XLocator >& xLocator ) { if (m_xNextHandler.is()) { @@ -526,7 +523,7 @@ void SAL_CALL XSecParser::setDocumentLocator( const cssu::Reference< cssxs::XLoc * XInitialization */ void SAL_CALL XSecParser::initialize( - const cssu::Sequence< cssu::Any >& aArguments ) + const css::uno::Sequence< css::uno::Any >& aArguments ) { aArguments[0] >>= m_xNextHandler; } |