summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorJochen Nitschke <j.nitschke+logerrit@ok.de>2018-07-15 18:11:13 +0200
committerJochen Nitschke <j.nitschke+logerrit@ok.de>2018-07-15 19:21:57 +0200
commit936ae2b21631f2fb302e0e46fafef704b371841e (patch)
tree7e4acb4f256d4f10d27271e0308ca88e96e8bf70 /writerfilter
parentccec2722aa816090f0ea51036c7df8e9871a5231 (diff)
cppcheck: useInitializationList in writerfilter
Change-Id: I4bbd2b4d3a4bba23936bd25a02cff011448e66f9 Reviewed-on: https://gerrit.libreoffice.org/57453 Tested-by: Jenkins Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.cxx11
-rw-r--r--writerfilter/source/dmapper/GraphicHelpers.cxx2
-rw-r--r--writerfilter/source/ooxml/OOXMLPropertySet.cxx2
-rw-r--r--writerfilter/source/rtftok/rtfvalue.cxx2
4 files changed, 10 insertions, 7 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index b1c26144ba90..7a055b629c20 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -5292,12 +5292,15 @@ void DomainMapper_Impl::SetPageMarginTwip( PageMarElement eElement, sal_Int32 nV
PageMar::PageMar()
-{
- header = footer = ConversionHelper::convertTwipToMM100(sal_Int32(720));
- top = bottom = ConversionHelper::convertTwipToMM100( sal_Int32(1440));
+ : top(ConversionHelper::convertTwipToMM100( sal_Int32(1440)))
// This is strange, the RTF spec says it's 1800, but it's clearly 1440 in Word
// OOXML seems not to specify a default value
- right = left = ConversionHelper::convertTwipToMM100( sal_Int32(1440));
+ , right(ConversionHelper::convertTwipToMM100( sal_Int32(1440)))
+ , bottom(top)
+ , left(right)
+ , header(ConversionHelper::convertTwipToMM100(sal_Int32(720)))
+ , footer(header)
+{
}
diff --git a/writerfilter/source/dmapper/GraphicHelpers.cxx b/writerfilter/source/dmapper/GraphicHelpers.cxx
index 2b08671156de..61522228523d 100644
--- a/writerfilter/source/dmapper/GraphicHelpers.cxx
+++ b/writerfilter/source/dmapper/GraphicHelpers.cxx
@@ -46,11 +46,11 @@ using namespace com::sun::star;
PositionHandler::PositionHandler( std::pair<OUString, OUString>& rPositionOffsets, std::pair<OUString, OUString>& rAligns ) :
LoggedProperties("PositionHandler"),
m_nOrient(text::VertOrientation::NONE),
+m_nRelation(text::RelOrientation::FRAME),
m_nPosition(0),
m_rPositionOffsets(rPositionOffsets),
m_rAligns(rAligns)
{
- m_nRelation = text::RelOrientation::FRAME;
}
PositionHandler::~PositionHandler( )
diff --git a/writerfilter/source/ooxml/OOXMLPropertySet.cxx b/writerfilter/source/ooxml/OOXMLPropertySet.cxx
index be1f72ac8ecf..f35379e529a6 100644
--- a/writerfilter/source/ooxml/OOXMLPropertySet.cxx
+++ b/writerfilter/source/ooxml/OOXMLPropertySet.cxx
@@ -555,8 +555,8 @@ OOXMLHexValue::OOXMLHexValue(sal_uInt32 nValue)
}
OOXMLHexValue::OOXMLHexValue(const char * pValue)
+: mnValue(rtl_str_toUInt32(pValue, 16))
{
- mnValue = rtl_str_toUInt32(pValue, 16);
}
OOXMLHexValue::~OOXMLHexValue()
diff --git a/writerfilter/source/rtftok/rtfvalue.cxx b/writerfilter/source/rtftok/rtfvalue.cxx
index 9272ba13647b..f637cc2712a5 100644
--- a/writerfilter/source/rtftok/rtfvalue.cxx
+++ b/writerfilter/source/rtftok/rtfvalue.cxx
@@ -46,9 +46,9 @@ RTFValue::RTFValue(int nValue)
: m_nValue(nValue)
, m_pAttributes(new RTFSprms())
, m_pSprms(new RTFSprms())
+ , m_pShape(new RTFShape())
, m_pPicture(new RTFPicture())
{
- m_pShape = new RTFShape();
}
RTFValue::RTFValue(OUString sValue, bool bForce)