diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-06-13 10:27:38 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-06-29 08:18:35 +0200 |
commit | 71112060e0930fc58087c3762e836b1e12b60f75 (patch) | |
tree | 3bd54aa5b5864d9cd31d0aa3ec4080b46cf66a2d /xmlsecurity/source/helper/xmlsignaturehelper.cxx | |
parent | d6da9e495d7ca32de6cda1a94cb4c8cd26b240cc (diff) |
loplugin:oncevar various
Change-Id: I8b82d46d4688b1a59d6fe1b05da7d5c8dfc13ca6
Reviewed-on: https://gerrit.libreoffice.org/38766
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmlsecurity/source/helper/xmlsignaturehelper.cxx')
-rw-r--r-- | xmlsecurity/source/helper/xmlsignaturehelper.cxx | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/xmlsecurity/source/helper/xmlsignaturehelper.cxx b/xmlsecurity/source/helper/xmlsignaturehelper.cxx index 6242518ce4e1..b6078d373916 100644 --- a/xmlsecurity/source/helper/xmlsignaturehelper.cxx +++ b/xmlsecurity/source/helper/xmlsignaturehelper.cxx @@ -201,8 +201,7 @@ void XMLSignatureHelper::ExportSignature( void XMLSignatureHelper::ExportOOXMLSignature(const uno::Reference<embed::XStorage>& xRootStorage, const uno::Reference<embed::XStorage>& xSignatureStorage, const SignatureInformation& rInformation, int nSignatureIndex) { - sal_Int32 nOpenMode = embed::ElementModes::READWRITE; - uno::Reference<io::XOutputStream> xOutputStream(xSignatureStorage->openStreamElement("sig" + OUString::number(nSignatureIndex) + ".xml", nOpenMode), uno::UNO_QUERY); + uno::Reference<io::XOutputStream> xOutputStream(xSignatureStorage->openStreamElement("sig" + OUString::number(nSignatureIndex) + ".xml", embed::ElementModes::READWRITE), uno::UNO_QUERY); if (rInformation.aSignatureBytes.hasElements()) // This is a signature roundtrip, just write back the signature as-is. @@ -504,8 +503,7 @@ void XMLSignatureHelper::ExportSignatureRelations(const css::uno::Reference<css: void XMLSignatureHelper::ExportSignatureContentTypes(const css::uno::Reference<css::embed::XStorage>& xStorage, int nSignatureCount) { - sal_Int32 nOpenMode = embed::ElementModes::READWRITE; - uno::Reference<io::XStream> xStream(xStorage->openStreamElement("[Content_Types].xml", nOpenMode), uno::UNO_QUERY); + uno::Reference<io::XStream> xStream(xStorage->openStreamElement("[Content_Types].xml", embed::ElementModes::READWRITE), uno::UNO_QUERY); uno::Reference<io::XInputStream> xInputStream = xStream->getInputStream(); uno::Sequence< uno::Sequence<beans::StringPair> > aContentTypeInfo = comphelper::OFOPXMLHelper::ReadContentTypeSequence(xInputStream, mxCtx); if (aContentTypeInfo.getLength() < 2) @@ -554,8 +552,7 @@ void XMLSignatureHelper::ExportSignatureContentTypes(const css::uno::Reference<c } bool XMLSignatureHelper::CreateAndWriteOOXMLSignature(const uno::Reference<embed::XStorage>& xRootStorage, const uno::Reference<embed::XStorage>& xSignatureStorage, int nSignatureIndex) { - sal_Int32 nOpenMode = embed::ElementModes::READWRITE; - uno::Reference<io::XOutputStream> xOutputStream(xSignatureStorage->openStreamElement("sig" + OUString::number(nSignatureIndex) + ".xml", nOpenMode), uno::UNO_QUERY); + uno::Reference<io::XOutputStream> xOutputStream(xSignatureStorage->openStreamElement("sig" + OUString::number(nSignatureIndex) + ".xml", embed::ElementModes::READWRITE), uno::UNO_QUERY); uno::Reference<xml::sax::XWriter> xSaxWriter = xml::sax::Writer::create(mxCtx); xSaxWriter->setOutputStream(xOutputStream); xSaxWriter->startDocument(); |