[Libreoffice-commits] core.git: writerfilter/source

Miklos Vajna vmiklos at collabora.co.uk
Tue Jul 28 01:18:56 PDT 2015


 writerfilter/source/dmapper/DomainMapperTableManager.cxx |    2 --
 writerfilter/source/dmapper/DomainMapperTableManager.hxx |    3 ++-
 2 files changed, 2 insertions(+), 3 deletions(-)

New commits:
commit cc58fe655918e5fba7d75af1a2652e1210e37dc1
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Tue Jul 28 10:14:20 2015 +0200

    writerfilter: use std::unique_ptr<> in DomainMapperTableManager
    
    Change-Id: Ib5910d3198824d625a96b53a30ad67c69c622642

diff --git a/writerfilter/source/dmapper/DomainMapperTableManager.cxx b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
index 9ecf275..6419939 100644
--- a/writerfilter/source/dmapper/DomainMapperTableManager.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
@@ -66,8 +66,6 @@ DomainMapperTableManager::DomainMapperTableManager() :
 
 DomainMapperTableManager::~DomainMapperTableManager()
 {
-    if ( m_pTablePropsHandler )
-        delete m_pTablePropsHandler, m_pTablePropsHandler = nullptr;
 }
 
 bool DomainMapperTableManager::attribute(Id nName, Value& rValue)
diff --git a/writerfilter/source/dmapper/DomainMapperTableManager.hxx b/writerfilter/source/dmapper/DomainMapperTableManager.hxx
index 0bd2f42..14e20b8 100644
--- a/writerfilter/source/dmapper/DomainMapperTableManager.hxx
+++ b/writerfilter/source/dmapper/DomainMapperTableManager.hxx
@@ -27,6 +27,7 @@
 #include "StyleSheetTable.hxx"
 #include <com/sun/star/text/XTextRange.hpp>
 #include <vector>
+#include <memory>
 #include <comphelper/sequenceashashmap.hxx>
 
 namespace writerfilter {
@@ -72,7 +73,7 @@ class DomainMapperTableManager : public TableManager
     sal_uInt32 m_nLayoutType;
     sal_Int32 m_nMaxFixedWidth;
 
-    TablePropertiesHandler   *m_pTablePropsHandler;
+    std::unique_ptr<TablePropertiesHandler> m_pTablePropsHandler;
     PropertyMapPtr            m_pStyleProps;
 
     virtual void clearData() SAL_OVERRIDE;


More information about the Libreoffice-commits mailing list