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/filter/html | |
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/filter/html')
-rw-r--r-- | sw/source/filter/html/htmlctxt.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/html/htmltab.cxx | 12 | ||||
-rw-r--r-- | sw/source/filter/html/swhtml.cxx | 2 |
3 files changed, 8 insertions, 8 deletions
diff --git a/sw/source/filter/html/htmlctxt.cxx b/sw/source/filter/html/htmlctxt.cxx index 48a270b80862..5ed9cf0427ff 100644 --- a/sw/source/filter/html/htmlctxt.cxx +++ b/sw/source/filter/html/htmlctxt.cxx @@ -101,7 +101,7 @@ std::shared_ptr<HTMLAttrTable> const & HTMLAttrContext_SaveDoc::GetAttrTab( bool { if (!xAttrTab && bCreate) { - xAttrTab.reset(new HTMLAttrTable); + xAttrTab = std::make_shared<HTMLAttrTable>(); memset(xAttrTab.get(), 0, sizeof(HTMLAttrTable)); } return xAttrTab; diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx index dc9c5a7e9180..e0926eb9dbb9 100644 --- a/sw/source/filter/html/htmltab.cxx +++ b/sw/source/filter/html/htmltab.cxx @@ -143,7 +143,7 @@ public: bRestartPRE( false ), bRestartXMP( false ), bRestartListing( false ), - xAttrTab(new HTMLAttrTable) + xAttrTab(std::make_shared<HTMLAttrTable>()) { memset(xAttrTab.get(), 0, sizeof(HTMLAttrTable)); } @@ -691,7 +691,7 @@ const std::shared_ptr<SwHTMLTableLayoutCnts>& HTMLTableCnts::CreateLayoutInfo() std::shared_ptr<SwHTMLTableLayout> xTableInfo; if (m_xTable) xTableInfo = m_xTable->CreateLayoutInfo(); - m_xLayoutInfo.reset(new SwHTMLTableLayoutCnts(m_pStartNode, xTableInfo, m_bNoBreak, xNextInfo)); + m_xLayoutInfo = std::make_shared<SwHTMLTableLayoutCnts>(m_pStartNode, xTableInfo, m_bNoBreak, xNextInfo); } return m_xLayoutInfo; @@ -750,7 +750,7 @@ void HTMLTableCell::SetProtected() // Copy background color if (m_xBGBrush) - m_xBGBrush.reset(new SvxBrushItem(*m_xBGBrush)); + m_xBGBrush = std::make_shared<SvxBrushItem>(*m_xBGBrush); m_nRowSpan = 1; m_nColSpan = 1; @@ -1096,13 +1096,13 @@ const std::shared_ptr<SwHTMLTableLayout>& HTMLTable::CreateLayoutInfo() sal_uInt16 nRightBorderWidth = m_bRightBorder ? GetBorderWidth( m_aRightBorderLine, true ) : 0; - m_xLayoutInfo.reset(new SwHTMLTableLayout( + m_xLayoutInfo = std::make_shared<SwHTMLTableLayout>( m_pSwTable, m_nRows, m_nCols, m_bFixedCols, m_bColSpec, nW, m_bPercentWidth, m_nBorder, m_nCellPadding, m_nCellSpacing, m_eTableAdjust, m_nLeftMargin, m_nRightMargin, - nBorderWidth, nLeftBorderWidth, nRightBorderWidth)); + nBorderWidth, nLeftBorderWidth, nRightBorderWidth); bool bExportable = true; sal_uInt16 i; @@ -4488,7 +4488,7 @@ public: CaptionSaveStruct( SwHTMLParser& rParser, const SwPosition& rPos ) : SectionSaveStruct( rParser ), aSavePos( rPos ), - xAttrTab(new HTMLAttrTable) + xAttrTab(std::make_shared<HTMLAttrTable>()) { rParser.SaveAttrTab(xAttrTab); diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx index 845ca782f394..c67078f24619 100644 --- a/sw/source/filter/html/swhtml.cxx +++ b/sw/source/filter/html/swhtml.cxx @@ -261,7 +261,7 @@ SwHTMLParser::SwHTMLParser( SwDoc* pD, SwPaM& rCursor, SvStream& rIn, : SfxHTMLParser( rIn, bReadNewDoc, pMed ), m_aPathToFile( rPath ), m_sBaseURL( rBaseURL ), - m_xAttrTab(new HTMLAttrTable), + m_xAttrTab(std::make_shared<HTMLAttrTable>()), m_pNumRuleInfo( new SwHTMLNumRuleInfo ), m_xDoc( pD ), m_pActionViewShell( nullptr ), |