summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-01-24 13:21:42 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-01-25 07:06:20 +0100
commita258a043c90eaaa4f6a411318e239e805d087d0c (patch)
tree250eed3d964d3872e02d0d9622ede8b3343ce7ef /svl
parentcee62b1068775b7d0bcd2875e9789c8c36c22057 (diff)
loplugin:makeshared in svl..svx
Change-Id: I067ea2f3cb651fdc5c3d1a09b0c55583618b9d1f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87355 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svl')
-rw-r--r--svl/source/items/slstitm.cxx8
-rw-r--r--svl/source/items/style.cxx2
2 files changed, 5 insertions, 5 deletions
diff --git a/svl/source/items/slstitm.cxx b/svl/source/items/slstitm.cxx
index 95de93e7b635..05e5401db18e 100644
--- a/svl/source/items/slstitm.cxx
+++ b/svl/source/items/slstitm.cxx
@@ -41,7 +41,7 @@ SfxStringListItem::SfxStringListItem( sal_uInt16 which, const std::vector<OUStri
// Therefore the query after the count is commented out
if( pList /*!!! && pList->Count() */ )
{
- mpList.reset(new std::vector<OUString>);
+ mpList = std::make_shared<std::vector<OUString>>();
*mpList = *pList;
}
}
@@ -55,7 +55,7 @@ SfxStringListItem::~SfxStringListItem()
std::vector<OUString>& SfxStringListItem::GetList()
{
if( !mpList )
- mpList.reset( new std::vector<OUString> );
+ mpList = std::make_shared<std::vector<OUString>>();
return *mpList;
}
@@ -95,7 +95,7 @@ SfxStringListItem* SfxStringListItem::Clone( SfxItemPool *) const
void SfxStringListItem::SetString( const OUString& rStr )
{
- mpList.reset( new std::vector<OUString> );
+ mpList = std::make_shared<std::vector<OUString>>();
sal_Int32 nStart = 0;
OUString aStr(convertLineEnd(rStr, LINEEND_CR));
@@ -143,7 +143,7 @@ OUString SfxStringListItem::GetString()
void SfxStringListItem::SetStringList( const css::uno::Sequence< OUString >& rList )
{
- mpList.reset(new std::vector<OUString>);
+ mpList = std::make_shared<std::vector<OUString>>();
// String belongs to the list
comphelper::sequenceToContainer(*mpList, rList);
diff --git a/svl/source/items/style.cxx b/svl/source/items/style.cxx
index f1463d501c3e..6d2095ad93b3 100644
--- a/svl/source/items/style.cxx
+++ b/svl/source/items/style.cxx
@@ -98,7 +98,7 @@ public:
std::shared_ptr<svl::IndexedStyleSheets> mxIndexedStyleSheets;
SfxStyleSheetBasePool_Impl() :
- mxIndexedStyleSheets(new svl::IndexedStyleSheets) {}
+ mxIndexedStyleSheets(std::make_shared<svl::IndexedStyleSheets>()) {}
};