diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-04-10 10:22:16 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-04-11 08:09:51 +0200 |
commit | ade95165ef32443ebf419faaf0cef149497bb098 (patch) | |
tree | d18867ffb582a15087778a48ce131c82752ee19f | |
parent | 489a0039f86ef48d5aa85f4ff56a9cb63c29b56f (diff) |
loplugin:inlinefields in SvXMLExport
Change-Id: I9e9dddcbdd450f40b34318c90b8c2d8d3980dbd6
Reviewed-on: https://gerrit.libreoffice.org/36374
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | include/xmloff/xmlexp.hxx | 7 | ||||
-rw-r--r-- | xmloff/source/core/xmlexp.cxx | 13 |
2 files changed, 9 insertions, 11 deletions
diff --git a/include/xmloff/xmlexp.hxx b/include/xmloff/xmlexp.hxx index b8f274cc90b2..cb134c747193 100644 --- a/include/xmloff/xmlexp.hxx +++ b/include/xmloff/xmlexp.hxx @@ -42,6 +42,7 @@ #include <xmloff/xmltoken.hxx> #include <xmloff/SchXMLExportHelper.hxx> #include <xmloff/XMLFontAutoStylePool.hxx> +#include <xmloff/xmluconv.hxx> #include <com/sun/star/document/XFilter.hpp> #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/document/XExporter.hpp> @@ -137,7 +138,7 @@ class XMLOFF_DLLPUBLIC SvXMLExport : public cppu::WeakImplHelper< OUString msEmbeddedObjectProtocol; OUString msFilterName; SvXMLNamespaceMap *mpNamespaceMap; // the namepspace map - SvXMLUnitConverter *mpUnitConv; // the unit converter + SvXMLUnitConverter maUnitConv; // the unit converter SvXMLNumFmtExport *mpNumExport; ProgressBarHelper *mpProgressBarHelper; @@ -389,9 +390,9 @@ public: const SvXMLNamespaceMap& GetNamespaceMap() const { return *mpNamespaceMap; } // Get unit converter - const SvXMLUnitConverter& GetMM100UnitConverter() const { return *mpUnitConv; } + const SvXMLUnitConverter& GetMM100UnitConverter() const { return maUnitConv; } - SvXMLUnitConverter& GetMM100UnitConverter() { return *mpUnitConv; } + SvXMLUnitConverter& GetMM100UnitConverter() { return maUnitConv; } void addChaffWhenEncryptedStorage(); diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx index 077cb4f55dd4..6ca60f723a5d 100644 --- a/xmloff/source/core/xmlexp.cxx +++ b/xmloff/source/core/xmlexp.cxx @@ -433,8 +433,7 @@ SvXMLExport::SvXMLExport( m_xContext(xContext), m_implementationName(implementationName), mxAttrList( new SvXMLAttributeList ), mpNamespaceMap( new SvXMLNamespaceMap ), - mpUnitConv( new SvXMLUnitConverter( xContext, - util::MeasureUnit::MM_100TH, eDefaultMeasureUnit) ), + maUnitConv( xContext, util::MeasureUnit::MM_100TH, eDefaultMeasureUnit ), mpNumExport(nullptr), mpProgressBarHelper( nullptr ), mpEventExport( nullptr ), @@ -463,8 +462,7 @@ SvXMLExport::SvXMLExport( mxAttrList( new SvXMLAttributeList ), msOrigFileName( rFileName ), mpNamespaceMap( new SvXMLNamespaceMap ), - mpUnitConv( new SvXMLUnitConverter( xContext, - util::MeasureUnit::MM_100TH, eDefaultMeasureUnit) ), + maUnitConv( xContext, util::MeasureUnit::MM_100TH, eDefaultMeasureUnit ), mpNumExport(nullptr), mpProgressBarHelper( nullptr ), mpEventExport( nullptr ), @@ -500,9 +498,9 @@ SvXMLExport::SvXMLExport( mxAttrList( new SvXMLAttributeList ), msOrigFileName( rFileName ), mpNamespaceMap( new SvXMLNamespaceMap ), - mpUnitConv( new SvXMLUnitConverter( xContext, - util::MeasureUnit::MM_100TH, - SvXMLUnitConverter::GetMeasureUnit(eDefaultFieldUnit)) ), + maUnitConv( xContext, + util::MeasureUnit::MM_100TH, + SvXMLUnitConverter::GetMeasureUnit(eDefaultFieldUnit) ), mpNumExport(nullptr), mpProgressBarHelper( nullptr ), mpEventExport( nullptr ), @@ -528,7 +526,6 @@ SvXMLExport::~SvXMLExport() delete mpImageMapExport; delete mpEventExport; delete mpNamespaceMap; - delete mpUnitConv; if (mpProgressBarHelper || mpNumExport) { if (mxExportInfo.is()) |