From b26a3db534cd30bee596670e99897ee5ce907adf Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Sat, 24 Aug 2019 20:35:36 +0200 Subject: [PATCH] loplugin:returnconstval in writerperfect Change-Id: I86e9977438c69c19adafc3743e618321a05e3923 Reviewed-on: https://gerrit.libreoffice.org/78064 Tested-by: Jenkins Reviewed-by: Noel Grandin --- writerperfect/inc/DirectoryStream.hxx | 2 +- writerperfect/inc/DocumentHandlerFor.hxx | 2 +- writerperfect/inc/DocumentHandlerForOdg.hxx | 2 +- writerperfect/inc/DocumentHandlerForOdp.hxx | 2 +- writerperfect/inc/DocumentHandlerForOds.hxx | 2 +- writerperfect/inc/DocumentHandlerForOdt.hxx | 2 +- writerperfect/qa/unit/WPXSvStreamTest.cxx | 5 ++--- writerperfect/source/common/DirectoryStream.cxx | 2 +- writerperfect/source/common/WPXSvInputStream.cxx | 2 +- 9 files changed, 10 insertions(+), 11 deletions(-) diff --git a/writerperfect/inc/DirectoryStream.hxx b/writerperfect/inc/DirectoryStream.hxx index 5fb9d2b8d3db..6747c8707109 100644 --- a/writerperfect/inc/DirectoryStream.hxx +++ b/writerperfect/inc/DirectoryStream.hxx @@ -44,7 +44,7 @@ public: static std::unique_ptr createForParent(const css::uno::Reference& xContent); - const css::uno::Reference getContent() const; + css::uno::Reference getContent() const; virtual bool isStructured() override; virtual unsigned subStreamCount() override; diff --git a/writerperfect/inc/DocumentHandlerFor.hxx b/writerperfect/inc/DocumentHandlerFor.hxx index 0f31b85fd176..d90039e2c5c2 100644 --- a/writerperfect/inc/DocumentHandlerFor.hxx +++ b/writerperfect/inc/DocumentHandlerFor.hxx @@ -16,7 +16,7 @@ namespace writerperfect */ template struct DocumentHandlerFor { - // static const OUString name(); + // static OUString name(); }; } diff --git a/writerperfect/inc/DocumentHandlerForOdg.hxx b/writerperfect/inc/DocumentHandlerForOdg.hxx index 72968edc14f1..9d46bcbe5492 100644 --- a/writerperfect/inc/DocumentHandlerForOdg.hxx +++ b/writerperfect/inc/DocumentHandlerForOdg.hxx @@ -16,7 +16,7 @@ namespace writerperfect { template <> struct DocumentHandlerFor { - static const OUString name() { return "com.sun.star.comp.Draw.XMLOasisImporter"; } + static OUString name() { return "com.sun.star.comp.Draw.XMLOasisImporter"; } }; } diff --git a/writerperfect/inc/DocumentHandlerForOdp.hxx b/writerperfect/inc/DocumentHandlerForOdp.hxx index c919514b80cb..9ef36814df77 100644 --- a/writerperfect/inc/DocumentHandlerForOdp.hxx +++ b/writerperfect/inc/DocumentHandlerForOdp.hxx @@ -16,7 +16,7 @@ namespace writerperfect { template <> struct DocumentHandlerFor { - static const OUString name() { return "com.sun.star.comp.Impress.XMLOasisImporter"; } + static OUString name() { return "com.sun.star.comp.Impress.XMLOasisImporter"; } }; } diff --git a/writerperfect/inc/DocumentHandlerForOds.hxx b/writerperfect/inc/DocumentHandlerForOds.hxx index 4ee268176d32..a73944391f28 100644 --- a/writerperfect/inc/DocumentHandlerForOds.hxx +++ b/writerperfect/inc/DocumentHandlerForOds.hxx @@ -16,7 +16,7 @@ namespace writerperfect { template <> struct DocumentHandlerFor { - static const OUString name() { return "com.sun.star.comp.Calc.XMLOasisImporter"; } + static OUString name() { return "com.sun.star.comp.Calc.XMLOasisImporter"; } }; } diff --git a/writerperfect/inc/DocumentHandlerForOdt.hxx b/writerperfect/inc/DocumentHandlerForOdt.hxx index ea3742a27dfd..b454e57d7b71 100644 --- a/writerperfect/inc/DocumentHandlerForOdt.hxx +++ b/writerperfect/inc/DocumentHandlerForOdt.hxx @@ -16,7 +16,7 @@ namespace writerperfect { template <> struct DocumentHandlerFor { - static const OUString name() { return "com.sun.star.comp.Writer.XMLOasisImporter"; } + static OUString name() { return "com.sun.star.comp.Writer.XMLOasisImporter"; } }; } diff --git a/writerperfect/qa/unit/WPXSvStreamTest.cxx b/writerperfect/qa/unit/WPXSvStreamTest.cxx index ef246afb7725..b13fc91e0e7c 100644 --- a/writerperfect/qa/unit/WPXSvStreamTest.cxx +++ b/writerperfect/qa/unit/WPXSvStreamTest.cxx @@ -83,7 +83,7 @@ shared_ptr lcl_createStream() return pInputStream; } -const shared_ptr lcl_createStreamForURL(const OUString& rURL) +shared_ptr lcl_createStreamForURL(const OUString& rURL) { using uno::Reference; using uno::UNO_QUERY_THROW; @@ -97,8 +97,7 @@ const shared_ptr lcl_createStreamForURL(const OUString& rURL) const Reference xInputStream(xFileAccess->openFileRead(rURL), css::uno::UNO_SET_THROW); - const shared_ptr pInput(new WPXSvInputStream(xInputStream)); - return pInput; + return shared_ptr(new WPXSvInputStream(xInputStream)); } void lcl_testSubStreams(const shared_ptr& pInput) diff --git a/writerperfect/source/common/DirectoryStream.cxx b/writerperfect/source/common/DirectoryStream.cxx index d6d39143ecdd..19ec454b293e 100644 --- a/writerperfect/source/common/DirectoryStream.cxx +++ b/writerperfect/source/common/DirectoryStream.cxx @@ -157,7 +157,7 @@ DirectoryStream::createForParent(const css::uno::Reference& } } -const css::uno::Reference DirectoryStream::getContent() const +css::uno::Reference DirectoryStream::getContent() const { if (!m_pImpl) return css::uno::Reference(); diff --git a/writerperfect/source/common/WPXSvInputStream.cxx b/writerperfect/source/common/WPXSvInputStream.cxx index 4b57b25cbdad..f1799f56bd19 100644 --- a/writerperfect/source/common/WPXSvInputStream.cxx +++ b/writerperfect/source/common/WPXSvInputStream.cxx @@ -86,7 +86,7 @@ OUString lcl_normalizeSubStreamPath(const OUString& rPath) namespace { -const OUString concatPath(const OUString& lhs, const OUString& rhs) +OUString concatPath(const OUString& lhs, const OUString& rhs) { if (lhs.isEmpty()) return rhs; -- 2.11.4.GIT