sc/source/filter/xcl97/xcl97esc.cxx | 1 + sw/source/filter/xml/xmltbli.cxx | 10 +++++----- sw/source/filter/xml/xmltbli.hxx | 6 +++--- 3 files changed, 9 insertions(+), 8 deletions(-)
New commits: commit 03477108118028c8dfc1e161502177fabd037a6d Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Tue Jul 24 11:04:59 2018 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Tue Jul 24 13:15:34 2018 +0200 crashtesting: tdf107162-1.xls regression from commit 8a304fe8b1282efa2d40bdf337728e64b7532a35 loplugin:useuniqueptr in XclEscherEx Change-Id: I84c2619a1ac62cf70144b530c540a4c18b474bd1 Reviewed-on: https://gerrit.libreoffice.org/57903 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sc/source/filter/xcl97/xcl97esc.cxx b/sc/source/filter/xcl97/xcl97esc.cxx index 329ad5170150..ccbc75ae3dd3 100644 --- a/sc/source/filter/xcl97/xcl97esc.cxx +++ b/sc/source/filter/xcl97/xcl97esc.cxx @@ -383,6 +383,7 @@ void XclEscherEx::EndShape( sal_uInt16 nShapeType, sal_uInt32 nShapeID ) { pCurrXclObj = aStack.top().first; pCurrAppData = std::move(aStack.top().second); + aStack.pop(); } if( nAdditionalText == 3 ) nAdditionalText = 0; commit 125a139e3dcfcf2bec4c61c30fb5dbf63f454cba Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Mon Jul 23 11:05:23 2018 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Tue Jul 24 13:15:24 2018 +0200 loplugin:useuniqueptr in SwXMLTableContext Change-Id: I14dddb4ffb9ceb36ccdb902d6cbf253ccf480931 Reviewed-on: https://gerrit.libreoffice.org/57866 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx index beff1d977a38..f5357e284625 100644 --- a/sw/source/filter/xml/xmltbli.cxx +++ b/sw/source/filter/xml/xmltbli.cxx @@ -1412,9 +1412,9 @@ SwXMLTableContext::~SwXMLTableContext() { if (m_bOwnsBox1) delete m_pBox1; - delete m_pColumnDefaultCellStyleNames; - delete m_pSharedBoxFormats; - delete m_pRows; + m_pColumnDefaultCellStyleNames.reset(); + m_pSharedBoxFormats.reset(); + m_pRows.reset(); // close redlines on table end nodes GetImport().GetTextImport()->RedlineAdjustStartNodeCursor(false); @@ -1492,7 +1492,7 @@ void SwXMLTableContext::InsertColumn( sal_Int32 nWidth2, bool bRelWidth2, { if( !m_pColumnDefaultCellStyleNames ) { - m_pColumnDefaultCellStyleNames = new std::vector<OUString>; + m_pColumnDefaultCellStyleNames.reset(new std::vector<OUString>); sal_uLong nCount = m_aColumnWidths.size() - 1; while( nCount-- ) m_pColumnDefaultCellStyleNames->push_back(OUString()); @@ -1830,7 +1830,7 @@ SwTableBoxFormat* SwXMLTableContext::GetSharedBoxFormat( bool* pModifyLocked ) { if ( m_pSharedBoxFormats == nullptr ) - m_pSharedBoxFormats = new map_BoxFormat; + m_pSharedBoxFormats.reset(new map_BoxFormat); SwTableBoxFormat* pBoxFormat2; diff --git a/sw/source/filter/xml/xmltbli.hxx b/sw/source/filter/xml/xmltbli.hxx index 0fac390c2794..157be580f67f 100644 --- a/sw/source/filter/xml/xmltbli.hxx +++ b/sw/source/filter/xml/xmltbli.hxx @@ -58,12 +58,12 @@ class SwXMLTableContext : public XMLTextTableContext ColumnWidthInfo(sal_uInt16 wdth, bool isRel) : width(wdth), isRelative(isRel) {}; }; std::vector<ColumnWidthInfo> m_aColumnWidths; - std::vector<OUString> *m_pColumnDefaultCellStyleNames; + std::unique_ptr<std::vector<OUString>> m_pColumnDefaultCellStyleNames; css::uno::Reference< css::text::XTextCursor > m_xOldCursor; css::uno::Reference< css::text::XTextContent > m_xTextContent; - SwXMLTableRows_Impl * m_pRows; + std::unique_ptr<SwXMLTableRows_Impl> m_pRows; SwTableNode *m_pTableNode; SwTableBox *m_pBox1; @@ -77,7 +77,7 @@ class SwXMLTableContext : public XMLTextTableContext // the column width, and protection flag typedef std::unordered_map<TableBoxIndex,SwTableBoxFormat*, TableBoxIndexHasher> map_BoxFormat; - map_BoxFormat* m_pSharedBoxFormats; + std::unique_ptr<map_BoxFormat> m_pSharedBoxFormats; SvXMLImportContextRef m_xParentTable; // if table is a sub table _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits