summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/xmloff/xmlexp.hxx7
-rw-r--r--xmloff/source/core/xmlexp.cxx13
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())