summaryrefslogtreecommitdiff
path: root/xmlhelp
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-08-22 09:45:14 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-08-22 13:24:24 +0200
commit5cb74685babe8ce8ea61bec515c0b701e0df34a5 (patch)
tree1575196835a2ac1c4cd4383663c02fe1fe33571d /xmlhelp
parent5f7d8f68886065a316cb0b88b8364a789bc5c0bf (diff)
loplugin:useuniqueptr in chelp::DynamicResultSet
Change-Id: If9ffa025ba0ce9a1c97c89ec50e71e7f90c5435b Reviewed-on: https://gerrit.libreoffice.org/59436 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmlhelp')
-rw-r--r--xmlhelp/source/cxxhelp/provider/content.cxx5
-rw-r--r--xmlhelp/source/cxxhelp/provider/resultset.cxx4
-rw-r--r--xmlhelp/source/cxxhelp/provider/resultset.hxx2
3 files changed, 6 insertions, 5 deletions
diff --git a/xmlhelp/source/cxxhelp/provider/content.cxx b/xmlhelp/source/cxxhelp/provider/content.cxx
index e785daa4b1fa..1b7104950641 100644
--- a/xmlhelp/source/cxxhelp/provider/content.cxx
+++ b/xmlhelp/source/cxxhelp/provider/content.cxx
@@ -38,6 +38,7 @@
#include <ucbhelper/contentidentifier.hxx>
#include <ucbhelper/propertyvalueset.hxx>
#include <ucbhelper/cancelcommandexecution.hxx>
+#include <o3tl/make_unique.hxx>
#include "content.hxx"
#include "provider.hxx"
#include "resultset.hxx"
@@ -289,7 +290,7 @@ uno::Any SAL_CALL Content::execute(
= new DynamicResultSet(
m_xContext,
aOpenCommand,
- new ResultSetForRootFactory(
+ o3tl::make_unique<ResultSetForRootFactory>(
m_xContext,
m_xProvider.get(),
aOpenCommand.Properties,
@@ -303,7 +304,7 @@ uno::Any SAL_CALL Content::execute(
= new DynamicResultSet(
m_xContext,
aOpenCommand,
- new ResultSetForQueryFactory(
+ o3tl::make_unique<ResultSetForQueryFactory>(
m_xContext,
m_xProvider.get(),
aOpenCommand.Properties,
diff --git a/xmlhelp/source/cxxhelp/provider/resultset.cxx b/xmlhelp/source/cxxhelp/provider/resultset.cxx
index c6983ebcf954..23d7dcbf79e4 100644
--- a/xmlhelp/source/cxxhelp/provider/resultset.cxx
+++ b/xmlhelp/source/cxxhelp/provider/resultset.cxx
@@ -34,9 +34,9 @@ using namespace chelp;
DynamicResultSet::DynamicResultSet(
const Reference< XComponentContext >& rxContext,
const OpenCommandArgument2& rCommand,
- ResultSetFactory* pFactory )
+ std::unique_ptr<ResultSetFactory> pFactory )
: ResultSetImplHelper( rxContext, rCommand ),
- m_pFactory( pFactory )
+ m_pFactory( std::move(pFactory) )
{
}
diff --git a/xmlhelp/source/cxxhelp/provider/resultset.hxx b/xmlhelp/source/cxxhelp/provider/resultset.hxx
index 82849ab3abe3..24891246d766 100644
--- a/xmlhelp/source/cxxhelp/provider/resultset.hxx
+++ b/xmlhelp/source/cxxhelp/provider/resultset.hxx
@@ -42,7 +42,7 @@ namespace chelp {
DynamicResultSet(
const css::uno::Reference< css::uno::XComponentContext >& rxContext,
const css::ucb::OpenCommandArgument2& rCommand,
- ResultSetFactory* pFactory );
+ std::unique_ptr<ResultSetFactory> pFactory );
virtual ~DynamicResultSet() override;
};