diff options
author | Noel <noel.grandin@collabora.co.uk> | 2021-02-17 18:23:05 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-02-18 08:17:57 +0100 |
commit | 1491b0003a03064a3cec30fc71c35d46eb6970b2 (patch) | |
tree | 3f0b39a55046de669f5f0d67b0795702115ca80c /writerperfect/source | |
parent | e981d8f787764bafc64105159960f7a41440cd3d (diff) |
loplugin:referencecasting in writerperfect
Change-Id: I2b8dfca7344caa4b9dd503fc3fca383a6cee8f04
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111077
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'writerperfect/source')
-rw-r--r-- | writerperfect/source/writer/EPUBPackage.cxx | 3 | ||||
-rw-r--r-- | writerperfect/source/writer/exp/XMLTextFrameContext.cxx | 2 | ||||
-rw-r--r-- | writerperfect/source/writer/exp/xmlfmt.cxx | 2 | ||||
-rw-r--r-- | writerperfect/source/writer/exp/xmlimp.cxx | 3 |
4 files changed, 4 insertions, 6 deletions
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<xml::sax::XAttributeList>(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<XMLImportContext> 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<XMLImportContext> 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<uno::XComponentContext>& xContext, aInputSource.aInputStream = xStream; uno::Reference<xml::sax::XParser> xParser = xml::sax::Parser::create(xContext); rtl::Reference<XMPParser> xXMP(new XMPParser(rMetaData)); - uno::Reference<xml::sax::XDocumentHandler> xDocumentHandler(xXMP.get()); - xParser->setDocumentHandler(xDocumentHandler); + xParser->setDocumentHandler(xXMP); try { xParser->parseStream(aInputSource); |