diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-01-24 13:21:55 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-01-24 20:40:37 +0100 |
commit | 9b8013b20d20a3946146d5287e8d8f8b9ddf694d (patch) | |
tree | 7bcfb26045aad3dc0f54dfaba4cd08d619a12a47 /sw/source/core/txtnode | |
parent | 3bbc0cf67cd5aa0ec5a1997794d21a87830bc618 (diff) |
loplugin:makeshared in sw
Change-Id: I6b297b84edda441c4ec6ea9f89ed553a50783bf5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87356
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/core/txtnode')
-rw-r--r-- | sw/source/core/txtnode/atrfld.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/txtnode/fmtatr2.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/txtnode/ndtxt.cxx | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/sw/source/core/txtnode/atrfld.cxx b/sw/source/core/txtnode/atrfld.cxx index c7587c328a85..3bc232ece517 100644 --- a/sw/source/core/txtnode/atrfld.cxx +++ b/sw/source/core/txtnode/atrfld.cxx @@ -512,10 +512,10 @@ void SwTextField::GetPamForTextField( const SwTextNode& rTextNode = rTextField.GetTextNode(); - rPamForTextField.reset( new SwPaM( rTextNode, + rPamForTextField = std::make_shared<SwPaM>( rTextNode, (rTextField.End() != nullptr) ? *(rTextField.End()) : ( rTextField.GetStart() + 1 ), rTextNode, - rTextField.GetStart() ) ); + rTextField.GetStart() ); } diff --git a/sw/source/core/txtnode/fmtatr2.cxx b/sw/source/core/txtnode/fmtatr2.cxx index 77ee06fcd7d7..e825a99a856c 100644 --- a/sw/source/core/txtnode/fmtatr2.cxx +++ b/sw/source/core/txtnode/fmtatr2.cxx @@ -613,7 +613,7 @@ void SwFormatMeta::DoCopy(::sw::MetaFieldManager & i_rTargetDocManager, const std::shared_ptr< ::sw::Meta> pOriginal( m_pMeta ); if (RES_TXTATR_META == Which()) { - m_pMeta.reset( new ::sw::Meta(this) ); + m_pMeta = std::make_shared<::sw::Meta>(this); } else { diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx index 9b2095a27e55..be604ee78542 100644 --- a/sw/source/core/txtnode/ndtxt.cxx +++ b/sw/source/core/txtnode/ndtxt.cxx @@ -5335,7 +5335,7 @@ drawinglayer::attribute::SdrAllFillAttributesHelperPtr SwTextNode::getSdrAllFill // create SdrAllFillAttributesHelper on demand if(!maFillAttributes.get()) { - const_cast< SwTextNode* >(this)->maFillAttributes.reset(new drawinglayer::attribute::SdrAllFillAttributesHelper(GetSwAttrSet())); + const_cast< SwTextNode* >(this)->maFillAttributes = std::make_shared<drawinglayer::attribute::SdrAllFillAttributesHelper>(GetSwAttrSet()); } return maFillAttributes; |