summaryrefslogtreecommitdiff
path: root/sw/source/filter/xml/xmltbli.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-07-23 11:05:23 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-07-24 13:15:24 +0200
commit125a139e3dcfcf2bec4c61c30fb5dbf63f454cba (patch)
tree5968d189bf6e64b0a95e2750e9649615e36206d1 /sw/source/filter/xml/xmltbli.cxx
parentc33613a07df9ea92201ad741032cb9201aebf21d (diff)
loplugin:useuniqueptr in SwXMLTableContext
Change-Id: I14dddb4ffb9ceb36ccdb902d6cbf253ccf480931 Reviewed-on: https://gerrit.libreoffice.org/57866 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/filter/xml/xmltbli.cxx')
-rw-r--r--sw/source/filter/xml/xmltbli.cxx10
1 files changed, 5 insertions, 5 deletions
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;