summaryrefslogtreecommitdiff
path: root/sw/source/core/unocore/unoportenum.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-05-17 13:09:11 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-05-18 06:58:44 +0000
commitd96c114171dada05caffd9a50f870809ebd0c450 (patch)
tree2ef1572fce732c39557b3f2f944aef86f17aa703 /sw/source/core/unocore/unoportenum.cxx
parent70aa5799336de6cbd1d964e2e9a176b44d438db2 (diff)
clang-tidy modernize-make-shared
Change-Id: I3fa866bfb3093fc876474a9d9db29fe05dc2af3a Reviewed-on: https://gerrit.libreoffice.org/25056 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sw/source/core/unocore/unoportenum.cxx')
-rw-r--r--sw/source/core/unocore/unoportenum.cxx23
1 files changed, 10 insertions, 13 deletions
diff --git a/sw/source/core/unocore/unoportenum.cxx b/sw/source/core/unocore/unoportenum.cxx
index 918d1f7b7722..1f0db3dfda0c 100644
--- a/sw/source/core/unocore/unoportenum.cxx
+++ b/sw/source/core/unocore/unoportenum.cxx
@@ -142,10 +142,9 @@ namespace
::sw::mark::CrossRefBookmark *const pCrossRefMark(dynamic_cast< ::sw::mark::CrossRefBookmark*>(pBkmk));
sal_uInt8 const nType = (hasOther || pCrossRefMark)
? BKM_TYPE_START : BKM_TYPE_START_END;
- rBkmArr.insert(SwXBookmarkPortion_ImplSharedPtr(
- new SwXBookmarkPortion_Impl(
+ rBkmArr.insert(std::make_shared<SwXBookmarkPortion_Impl>(
SwXBookmark::CreateXBookmark(rDoc, pBkmk),
- nType, rStartPos)));
+ nType, rStartPos));
}
const SwPosition& rEndPos = pBkmk->GetMarkEnd();
@@ -167,10 +166,9 @@ namespace
}
if(pEndPos)
{
- rBkmArr.insert(SwXBookmarkPortion_ImplSharedPtr(
- new SwXBookmarkPortion_Impl(
+ rBkmArr.insert(std::make_shared<SwXBookmarkPortion_Impl>(
SwXBookmark::CreateXBookmark(rDoc, pBkmk),
- BKM_TYPE_END, *pEndPos)));
+ BKM_TYPE_END, *pEndPos));
}
}
}
@@ -302,11 +300,10 @@ namespace
if ( pAnnotationFormatField != nullptr )
{
rAnnotationStartArr.insert(
- SwAnnotationStartPortion_ImplSharedPtr(
- new SwAnnotationStartPortion_Impl(
+ std::make_shared<SwAnnotationStartPortion_Impl>(
SwXTextField::CreateXTextField(&rDoc,
pAnnotationFormatField),
- rStartPos)));
+ rStartPos));
}
}
}
@@ -1073,11 +1070,11 @@ static void lcl_FillRedlineArray(
const SwPosition* pRedStart = pRedline->Start();
const SwNodeIndex nRedNode = pRedStart->nNode;
if ( nOwnNode == nRedNode )
- rRedArr.insert( SwXRedlinePortion_ImplSharedPtr (
- new SwXRedlinePortion_Impl ( pRedline, true ) ) );
+ rRedArr.insert( std::make_shared<SwXRedlinePortion_Impl>(
+ pRedline, true ) );
if( pRedline->HasMark() && pRedline->End()->nNode == nOwnNode )
- rRedArr.insert( SwXRedlinePortion_ImplSharedPtr (
- new SwXRedlinePortion_Impl ( pRedline, false) ) );
+ rRedArr.insert( std::make_shared<SwXRedlinePortion_Impl>(
+ pRedline, false ) );
}
}
}