summaryrefslogtreecommitdiff
path: root/xmlsecurity/source/component
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-08-02 20:07:17 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-08-02 22:44:36 +0200
commitf0da01e59ffe1f7f1b5446f111994be6cf6f7d4a (patch)
treeeea592416cf701d1f45b2fe5b2d410f20b7643de /xmlsecurity/source/component
parent5ef5c1b294063d1d2d6554d5fcf1d4cfb4d3f06d (diff)
loplugin:flatten in xmlsecurity
Change-Id: Ic9e410c77a04edbd58485d4177da22e17efa8720 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99964 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmlsecurity/source/component')
-rw-r--r--xmlsecurity/source/component/documentdigitalsignatures.cxx38
1 files changed, 19 insertions, 19 deletions
diff --git a/xmlsecurity/source/component/documentdigitalsignatures.cxx b/xmlsecurity/source/component/documentdigitalsignatures.cxx
index 3baab59e03ac..68e1aa704441 100644
--- a/xmlsecurity/source/component/documentdigitalsignatures.cxx
+++ b/xmlsecurity/source/component/documentdigitalsignatures.cxx
@@ -236,25 +236,25 @@ void DocumentDigitalSignatures::initialize( const Sequence< Any >& aArguments)
m_nArgumentsCount = aArguments.getLength();
- if (aArguments.hasElements())
- {
- if (!(aArguments[0] >>= m_sODFVersion))
- throw css::lang::IllegalArgumentException(
- "DocumentDigitalSignatures::initialize: the first arguments must be a string",
- static_cast<XInitialization*>(this), 0);
-
- if (aArguments.getLength() == 2
- && !(aArguments[1] >>= m_bHasDocumentSignature))
- throw css::lang::IllegalArgumentException(
- "DocumentDigitalSignatures::initialize: the second arguments must be a bool",
- static_cast<XInitialization*>(this), 1);
-
- //the Version is supported as of ODF1.2, so for and 1.1 document or older we will receive the
- //an empty string. In this case we set it to ODFVER_010_TEXT. Then we can later check easily
- //if initialize was called. Only then m_sODFVersion.getLength() is greater than 0
- if (m_sODFVersion.isEmpty())
- m_sODFVersion = ODFVER_010_TEXT;
- }
+ if (!aArguments.hasElements())
+ return;
+
+ if (!(aArguments[0] >>= m_sODFVersion))
+ throw css::lang::IllegalArgumentException(
+ "DocumentDigitalSignatures::initialize: the first arguments must be a string",
+ static_cast<XInitialization*>(this), 0);
+
+ if (aArguments.getLength() == 2
+ && !(aArguments[1] >>= m_bHasDocumentSignature))
+ throw css::lang::IllegalArgumentException(
+ "DocumentDigitalSignatures::initialize: the second arguments must be a bool",
+ static_cast<XInitialization*>(this), 1);
+
+ //the Version is supported as of ODF1.2, so for and 1.1 document or older we will receive the
+ //an empty string. In this case we set it to ODFVER_010_TEXT. Then we can later check easily
+ //if initialize was called. Only then m_sODFVersion.getLength() is greater than 0
+ if (m_sODFVersion.isEmpty())
+ m_sODFVersion = ODFVER_010_TEXT;
}
OUString DocumentDigitalSignatures::getImplementationName()