summaryrefslogtreecommitdiff
path: root/sfx2/source/doc/docinsert.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-08-06 17:17:20 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-08-08 09:31:02 +0200
commit6a6774cc4b22aceaca4441318420bb9dfb1cacab (patch)
treeab2dd62d7a69f1127fed8192268e16fbdaacd9fa /sfx2/source/doc/docinsert.cxx
parent1444bd72006fec7ebcd3c5df2399da26ad3b1466 (diff)
loplugin:useuniqueptr in SfxApplication::LoadTemplate and SfxMedium
pass SfxItemSet around by std::unique_ptr Change-Id: I54da96d8df224f7c4f2fb9ebf06ed32d479298e7 Reviewed-on: https://gerrit.libreoffice.org/58649 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2/source/doc/docinsert.cxx')
-rw-r--r--sfx2/source/doc/docinsert.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sfx2/source/doc/docinsert.cxx b/sfx2/source/doc/docinsert.cxx
index ad262468313e..ca63af89aa8a 100644
--- a/sfx2/source/doc/docinsert.cxx
+++ b/sfx2/source/doc/docinsert.cxx
@@ -108,7 +108,7 @@ SfxMedium* DocumentInserter::CreateMedium(char const*const pFallbackHack)
DBG_ASSERT( m_pURLList.size() == 1, "DocumentInserter::CreateMedium(): invalid URL list count" );
pMedium.reset(new SfxMedium(
m_pURLList[0], SFX_STREAM_READONLY,
- SfxGetpApp()->GetFilterMatcher().GetFilter4FilterName( m_sFilter ), m_pItemSet ));
+ SfxGetpApp()->GetFilterMatcher().GetFilter4FilterName( m_sFilter ), std::unique_ptr<SfxItemSet>(m_pItemSet) ));
pMedium->UseInteractionHandler( true );
std::unique_ptr<SfxFilterMatcher> pMatcher;
if ( !m_sDocFactory.isEmpty() )
@@ -145,7 +145,7 @@ SfxMediumList* DocumentInserter::CreateMediumList()
{
SfxMedium* pMedium = new SfxMedium(
url, SFX_STREAM_READONLY,
- SfxGetpApp()->GetFilterMatcher().GetFilter4FilterName( m_sFilter ), m_pItemSet );
+ SfxGetpApp()->GetFilterMatcher().GetFilter4FilterName( m_sFilter ), std::unique_ptr<SfxItemSet>(m_pItemSet) );
pMedium->UseInteractionHandler( true );