[Libreoffice-commits] core.git: 2 commits - include/xmloff lotuswordpro/source xmloff/source
Noel Grandin
noel.grandin at collabora.co.uk
Tue Apr 11 06:10:13 UTC 2017
include/xmloff/xmlexp.hxx | 7 ++--
lotuswordpro/source/filter/lwpcharacterstyle.cxx | 34 +++--------------------
lotuswordpro/source/filter/lwpcharacterstyle.hxx | 12 ++++----
xmloff/source/core/xmlexp.cxx | 13 +++-----
4 files changed, 21 insertions(+), 45 deletions(-)
New commits:
commit 6491d6f9f23573a5ffe2ebd89c0875256851ec7a
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Mon Apr 10 10:28:42 2017 +0200
loplugin:inlinefields in LwpTextStyle
Change-Id: I5f5eef91ddfb108a77bfe57e0078f3fc7eb7c446
Reviewed-on: https://gerrit.libreoffice.org/36375
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/lotuswordpro/source/filter/lwpcharacterstyle.cxx b/lotuswordpro/source/filter/lwpcharacterstyle.cxx
index 72ec1a982b63..a100423377bd 100644
--- a/lotuswordpro/source/filter/lwpcharacterstyle.cxx
+++ b/lotuswordpro/source/filter/lwpcharacterstyle.cxx
@@ -74,10 +74,6 @@
LwpTextStyle::LwpTextStyle(LwpObjectHeader& objHdr, LwpSvStream* pStrm)
: LwpDLNFPVList(objHdr, pStrm),
m_nFontID(0), m_nFinalFontID(0), m_nCSFlags(0), m_nUseCount(0),
- m_pDescription(new LwpAtomHolder), m_pLangOverride(new LwpTextLanguageOverride),
- m_pTxtAttrOverride(new LwpTextAttributeOverride),
- m_pCharacterBorderOverride(new LwpCharacterBorderOverride),
- m_pAmikakeOverride(new LwpAmikakeOverride),
m_nStyleDefinition(0), m_nKey(0)
{
}
@@ -90,26 +86,6 @@ void LwpTextStyle::Read()
LwpTextStyle::~LwpTextStyle()
{
- if (m_pDescription)
- {
- delete m_pDescription;
- }
- if (m_pLangOverride)
- {
- delete m_pLangOverride;
- }
- if (m_pTxtAttrOverride)
- {
- delete m_pTxtAttrOverride;
- }
- if (m_pCharacterBorderOverride)
- {
- delete m_pCharacterBorderOverride;
- }
- if (m_pAmikakeOverride)
- {
- delete m_pAmikakeOverride;
- }
}
void LwpTextStyle::ReadCommon()
@@ -119,14 +95,14 @@ void LwpTextStyle::ReadCommon()
m_nCSFlags = m_pObjStrm->QuickReaduInt16();
m_nUseCount = m_pObjStrm->QuickReaduInt32();
- m_pDescription->Read(m_pObjStrm.get());
+ m_aDescription.Read(m_pObjStrm.get());
- m_pLangOverride->Read(m_pObjStrm.get());
- m_pTxtAttrOverride->Read(m_pObjStrm.get());
+ m_aLangOverride.Read(m_pObjStrm.get());
+ m_aTxtAttrOverride.Read(m_pObjStrm.get());
if (LwpFileHeader::m_nFileRevision < 0x000B)
{
- m_pCharacterBorderOverride->Read(m_pObjStrm.get());
- m_pAmikakeOverride->Read(m_pObjStrm.get());
+ m_aCharacterBorderOverride.Read(m_pObjStrm.get());
+ m_aAmikakeOverride.Read(m_pObjStrm.get());
}
else
{
diff --git a/lotuswordpro/source/filter/lwpcharacterstyle.hxx b/lotuswordpro/source/filter/lwpcharacterstyle.hxx
index 9c9a61048fc6..449408803f9e 100644
--- a/lotuswordpro/source/filter/lwpcharacterstyle.hxx
+++ b/lotuswordpro/source/filter/lwpcharacterstyle.hxx
@@ -63,6 +63,8 @@
#include "lwpobj.hxx"
#include "lwpdlvlist.hxx"
+#include "lwpoverride.hxx"
+#include "lwpcharborderoverride.hxx"
class LwpAtomHolder;
class LwpTextLanguageOverride;
@@ -92,12 +94,12 @@ protected:
sal_uInt16 m_nCSFlags;
sal_uInt32 m_nUseCount;
- LwpAtomHolder* m_pDescription;
- LwpTextLanguageOverride* m_pLangOverride;
- LwpTextAttributeOverride* m_pTxtAttrOverride;
+ LwpAtomHolder m_aDescription;
+ LwpTextLanguageOverride m_aLangOverride;
+ LwpTextAttributeOverride m_aTxtAttrOverride;
- LwpCharacterBorderOverride* m_pCharacterBorderOverride;
- LwpAmikakeOverride* m_pAmikakeOverride;
+ LwpCharacterBorderOverride m_aCharacterBorderOverride;
+ LwpAmikakeOverride m_aAmikakeOverride;
LwpObjectID m_CharacterBorder;
LwpObjectID m_Amikake;
commit ade95165ef32443ebf419faaf0cef149497bb098
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Mon Apr 10 10:22:16 2017 +0200
loplugin:inlinefields in SvXMLExport
Change-Id: I9e9dddcbdd450f40b34318c90b8c2d8d3980dbd6
Reviewed-on: https://gerrit.libreoffice.org/36374
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
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())
More information about the Libreoffice-commits
mailing list