From 1491b0003a03064a3cec30fc71c35d46eb6970b2 Mon Sep 17 00:00:00 2001 From: Noel Date: Wed, 17 Feb 2021 18:23:05 +0200 Subject: loplugin:referencecasting in writerperfect Change-Id: I2b8dfca7344caa4b9dd503fc3fca383a6cee8f04 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111077 Tested-by: Jenkins Reviewed-by: Noel Grandin --- writerperfect/source/writer/EPUBPackage.cxx | 3 +-- writerperfect/source/writer/exp/XMLTextFrameContext.cxx | 2 +- writerperfect/source/writer/exp/xmlfmt.cxx | 2 +- writerperfect/source/writer/exp/xmlimp.cxx | 3 +-- 4 files changed, 4 insertions(+), 6 deletions(-) (limited to 'writerperfect/source') diff --git a/writerperfect/source/writer/EPUBPackage.cxx b/writerperfect/source/writer/EPUBPackage.cxx index 914983e97580..fe5cbf069ce4 100644 --- a/writerperfect/source/writer/EPUBPackage.cxx +++ b/writerperfect/source/writer/EPUBPackage.cxx @@ -87,8 +87,7 @@ void EPUBPackage::openElement(const char* pName, const librevenge::RVNGPropertyL pAttributeList->AddAttribute(OUString::fromUtf8(it.key()), OUString::fromUtf8(it()->getStr().cstr())); - mxOutputWriter->startElement(OUString::fromUtf8(pName), - uno::Reference(pAttributeList.get())); + mxOutputWriter->startElement(OUString::fromUtf8(pName), pAttributeList); } void EPUBPackage::closeElement(const char* pName) diff --git a/writerperfect/source/writer/exp/XMLTextFrameContext.cxx b/writerperfect/source/writer/exp/XMLTextFrameContext.cxx index 60cc3d87f94a..4c6ca118efd2 100644 --- a/writerperfect/source/writer/exp/XMLTextFrameContext.cxx +++ b/writerperfect/source/writer/exp/XMLTextFrameContext.cxx @@ -96,7 +96,7 @@ rtl::Reference XMLTextImageContext::CreateChildContext( if (rName == "office:binary-data") { m_xBinaryData = new XMLBase64ImportContext(GetImport()); - return m_xBinaryData.get(); + return m_xBinaryData; } return nullptr; } diff --git a/writerperfect/source/writer/exp/xmlfmt.cxx b/writerperfect/source/writer/exp/xmlfmt.cxx index f34540dddc1e..4ac70b85a3b1 100644 --- a/writerperfect/source/writer/exp/xmlfmt.cxx +++ b/writerperfect/source/writer/exp/xmlfmt.cxx @@ -227,7 +227,7 @@ rtl::Reference XMLFontFaceUriContext::CreateChildContext( if (rName == "office:binary-data") { mxBinaryData = new XMLBase64ImportContext(GetImport()); - return mxBinaryData.get(); + return mxBinaryData; } if (rName == "svg:font-face-format") return new XMLFontFaceFormatContext(GetImport(), *this); diff --git a/writerperfect/source/writer/exp/xmlimp.cxx b/writerperfect/source/writer/exp/xmlimp.cxx index 62d004197f67..3efd6eab7ddd 100644 --- a/writerperfect/source/writer/exp/xmlimp.cxx +++ b/writerperfect/source/writer/exp/xmlimp.cxx @@ -188,8 +188,7 @@ void FindXMPMetadata(const uno::Reference& xContext, aInputSource.aInputStream = xStream; uno::Reference xParser = xml::sax::Parser::create(xContext); rtl::Reference xXMP(new XMPParser(rMetaData)); - uno::Reference xDocumentHandler(xXMP.get()); - xParser->setDocumentHandler(xDocumentHandler); + xParser->setDocumentHandler(xXMP); try { xParser->parseStream(aInputSource); -- cgit v1.2.3