loplugin:returnconstval in writerperfect

Change-Id: I86e9977438c69c19adafc3743e618321a05e3923
Reviewed-on: https://gerrit.libreoffice.org/78064
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin
2019-08-24 20:35:36 +02:00
parent 502d73cda8
commit b26a3db534
9 changed files with 10 additions and 11 deletions

View File

@@ -44,7 +44,7 @@ public:
static std::unique_ptr<DirectoryStream>
createForParent(const css::uno::Reference<css::ucb::XContent>& xContent);
const css::uno::Reference<css::ucb::XContent> getContent() const;
css::uno::Reference<css::ucb::XContent> getContent() const;
virtual bool isStructured() override;
virtual unsigned subStreamCount() override;

View File

@@ -16,7 +16,7 @@ namespace writerperfect
*/
template <class Generator> struct DocumentHandlerFor
{
// static const OUString name();
// static OUString name();
};
}

View File

@@ -16,7 +16,7 @@ namespace writerperfect
{
template <> struct DocumentHandlerFor<OdgGenerator>
{
static const OUString name() { return "com.sun.star.comp.Draw.XMLOasisImporter"; }
static OUString name() { return "com.sun.star.comp.Draw.XMLOasisImporter"; }
};
}

View File

@@ -16,7 +16,7 @@ namespace writerperfect
{
template <> struct DocumentHandlerFor<OdpGenerator>
{
static const OUString name() { return "com.sun.star.comp.Impress.XMLOasisImporter"; }
static OUString name() { return "com.sun.star.comp.Impress.XMLOasisImporter"; }
};
}

View File

@@ -16,7 +16,7 @@ namespace writerperfect
{
template <> struct DocumentHandlerFor<OdsGenerator>
{
static const OUString name() { return "com.sun.star.comp.Calc.XMLOasisImporter"; }
static OUString name() { return "com.sun.star.comp.Calc.XMLOasisImporter"; }
};
}

View File

@@ -16,7 +16,7 @@ namespace writerperfect
{
template <> struct DocumentHandlerFor<OdtGenerator>
{
static const OUString name() { return "com.sun.star.comp.Writer.XMLOasisImporter"; }
static OUString name() { return "com.sun.star.comp.Writer.XMLOasisImporter"; }
};
}

View File

@@ -83,7 +83,7 @@ shared_ptr<RVNGInputStream> lcl_createStream()
return pInputStream;
}
const shared_ptr<RVNGInputStream> lcl_createStreamForURL(const OUString& rURL)
shared_ptr<RVNGInputStream> lcl_createStreamForURL(const OUString& rURL)
{
using uno::Reference;
using uno::UNO_QUERY_THROW;
@@ -97,8 +97,7 @@ const shared_ptr<RVNGInputStream> lcl_createStreamForURL(const OUString& rURL)
const Reference<io::XInputStream> xInputStream(xFileAccess->openFileRead(rURL),
css::uno::UNO_SET_THROW);
const shared_ptr<RVNGInputStream> pInput(new WPXSvInputStream(xInputStream));
return pInput;
return shared_ptr<RVNGInputStream>(new WPXSvInputStream(xInputStream));
}
void lcl_testSubStreams(const shared_ptr<RVNGInputStream>& pInput)

View File

@@ -157,7 +157,7 @@ DirectoryStream::createForParent(const css::uno::Reference<css::ucb::XContent>&
}
}
const css::uno::Reference<css::ucb::XContent> DirectoryStream::getContent() const
css::uno::Reference<css::ucb::XContent> DirectoryStream::getContent() const
{
if (!m_pImpl)
return css::uno::Reference<css::ucb::XContent>();

View File

@@ -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;