diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-02-08 18:46:21 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-07-07 12:27:05 +0200 |
commit | bbe5612e5edc05fe851bdb5c2944eb6d3521c9e7 (patch) | |
tree | 4315c50c73b8d39a223d767152e00b6723e355ea /xmlsecurity | |
parent | 82784efc0ae20e8cfb925c8563e78290304242c1 (diff) |
loplugin:refcounting
Change-Id: Ib522a6ce9663b5f56888debb911296360da484d6
(cherry picked from commit 3d0a2c8c43179ae0e19be154f44def8bb6cf8de6)
Diffstat (limited to 'xmlsecurity')
-rw-r--r-- | xmlsecurity/source/helper/xsecctl.cxx | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/xmlsecurity/source/helper/xsecctl.cxx b/xmlsecurity/source/helper/xsecctl.cxx index 2bd8ec4d8f6a..6aec0f6d51d4 100644 --- a/xmlsecurity/source/helper/xsecctl.cxx +++ b/xmlsecurity/source/helper/xsecctl.cxx @@ -1026,16 +1026,16 @@ void XSecController::exportOOXMLSignature(const uno::Reference<embed::XStorage>& xDocumentHandler->startElement(TAG_SIGNEDINFO, uno::Reference<xml::sax::XAttributeList>(new SvXMLAttributeList())); { - std::unique_ptr<SvXMLAttributeList> pAttributeList(new SvXMLAttributeList()); + rtl::Reference<SvXMLAttributeList> pAttributeList(new SvXMLAttributeList()); pAttributeList->AddAttribute(ATTR_ALGORITHM, ALGO_C14N); - xDocumentHandler->startElement(TAG_CANONICALIZATIONMETHOD, uno::Reference<xml::sax::XAttributeList>(pAttributeList.release())); + xDocumentHandler->startElement(TAG_CANONICALIZATIONMETHOD, uno::Reference<xml::sax::XAttributeList>(pAttributeList.get())); xDocumentHandler->endElement(TAG_CANONICALIZATIONMETHOD); } { - std::unique_ptr<SvXMLAttributeList> pAttributeList(new SvXMLAttributeList()); + rtl::Reference<SvXMLAttributeList> pAttributeList(new SvXMLAttributeList()); pAttributeList->AddAttribute(ATTR_ALGORITHM, ALGO_RSASHA256); - xDocumentHandler->startElement(TAG_SIGNATUREMETHOD, uno::Reference<xml::sax::XAttributeList>(pAttributeList.release())); + xDocumentHandler->startElement(TAG_SIGNATUREMETHOD, uno::Reference<xml::sax::XAttributeList>(pAttributeList.get())); xDocumentHandler->endElement(TAG_SIGNATUREMETHOD); } @@ -1045,28 +1045,28 @@ void XSecController::exportOOXMLSignature(const uno::Reference<embed::XStorage>& if (rReference.nType == SignatureReferenceType::SAMEDOCUMENT) { { - std::unique_ptr<SvXMLAttributeList> pAttributeList(new SvXMLAttributeList()); + rtl::Reference<SvXMLAttributeList> pAttributeList(new SvXMLAttributeList()); if (rReference.ouURI != "#idSignedProperties") pAttributeList->AddAttribute("Type", "http://www.w3.org/2000/09/xmldsig#Object"); else pAttributeList->AddAttribute("Type", "http://uri.etsi.org/01903#SignedProperties"); pAttributeList->AddAttribute(ATTR_URI, rReference.ouURI); - xDocumentHandler->startElement(TAG_REFERENCE, uno::Reference<xml::sax::XAttributeList>(pAttributeList.release())); + xDocumentHandler->startElement(TAG_REFERENCE, uno::Reference<xml::sax::XAttributeList>(pAttributeList.get())); } if (rReference.ouURI == "#idSignedProperties") { xDocumentHandler->startElement(TAG_TRANSFORMS, uno::Reference<xml::sax::XAttributeList>(new SvXMLAttributeList())); - std::unique_ptr<SvXMLAttributeList> pAttributeList(new SvXMLAttributeList()); + rtl::Reference<SvXMLAttributeList> pAttributeList(new SvXMLAttributeList()); pAttributeList->AddAttribute(ATTR_ALGORITHM, ALGO_C14N); - xDocumentHandler->startElement(TAG_TRANSFORM, uno::Reference<xml::sax::XAttributeList>(pAttributeList.release())); + xDocumentHandler->startElement(TAG_TRANSFORM, uno::Reference<xml::sax::XAttributeList>(pAttributeList.get())); xDocumentHandler->endElement(TAG_TRANSFORM); xDocumentHandler->endElement(TAG_TRANSFORMS); } { - std::unique_ptr<SvXMLAttributeList> pAttributeList(new SvXMLAttributeList()); + rtl::Reference<SvXMLAttributeList> pAttributeList(new SvXMLAttributeList()); pAttributeList->AddAttribute(ATTR_ALGORITHM, ALGO_XMLDSIGSHA256); - xDocumentHandler->startElement(TAG_DIGESTMETHOD, uno::Reference<xml::sax::XAttributeList>(pAttributeList.release())); + xDocumentHandler->startElement(TAG_DIGESTMETHOD, uno::Reference<xml::sax::XAttributeList>(pAttributeList.get())); xDocumentHandler->endElement(TAG_DIGESTMETHOD); } xDocumentHandler->startElement(TAG_DIGESTVALUE, uno::Reference<xml::sax::XAttributeList>(new SvXMLAttributeList())); |