diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2014-03-02 17:22:01 -0600 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2014-03-02 18:40:41 -0600 |
commit | d3428aaf3180d3741766365e33ab0a3b4af3c47d (patch) | |
tree | 346b10be0f28871499b25bcaa2cd0eec8dad2926 /lotuswordpro | |
parent | 17b56dc326e98a97f45f86d0010f06bd37e32091 (diff) |
coverity#738771: Unitialized scalar field
Change-Id: I6a3956623d013bb2e827ce82650a8834398a1387
Diffstat (limited to 'lotuswordpro')
-rw-r--r-- | lotuswordpro/source/filter/xfilter/xfparastyle.cxx | 77 |
1 files changed, 38 insertions, 39 deletions
diff --git a/lotuswordpro/source/filter/xfilter/xfparastyle.cxx b/lotuswordpro/source/filter/xfilter/xfparastyle.cxx index a2ea03492002..4a2627c3cf97 100644 --- a/lotuswordpro/source/filter/xfilter/xfparastyle.cxx +++ b/lotuswordpro/source/filter/xfilter/xfparastyle.cxx @@ -66,63 +66,62 @@ #include "xfbgimage.hxx" XFParaStyle::XFParaStyle() + : m_eAlignType(enumXFAlignNone) + , m_eLastLineAlign(enumXFAlignNone) + , m_bJustSingleWord(sal_False) + , m_bKeepWithNext(sal_False) + , m_fTextIndent(0) + , m_pFont(NULL) + , m_pBorders(NULL) + , m_pBGImage(NULL) + , m_nPageNumber(0) + , m_bNumberLines(sal_True) + , m_nLineNumberRestart(0) + , m_nFlag(0) + , m_bNumberRight(sal_False) { - //init member variables: - m_nFlag = 0; - m_eAlignType = enumXFAlignNone; - m_eLastLineAlign = enumXFAlignNone; - m_bJustSingleWord = sal_False; - m_bKeepWithNext = sal_False; - m_nPageNumber = 0; - m_fTextIndent = 0; - - m_pFont = NULL; - m_pBorders = NULL; - m_pBGImage = NULL; - - m_nLineNumberRestart = 0; - m_bNumberLines = sal_True; - m_bNumberRight = sal_False; } -XFParaStyle::XFParaStyle(const XFParaStyle& other) : XFStyle(other) + +XFParaStyle::XFParaStyle(const XFParaStyle& other) + : XFStyle(other) + , m_eAlignType(other.m_eAlignType) + , m_eLastLineAlign(other.m_eLastLineAlign) + , m_bJustSingleWord(other.m_bJustSingleWord) + , m_bKeepWithNext(other.m_bKeepWithNext) + , m_fTextIndent(other.m_fTextIndent) + , m_aBackColor(other.m_aBackColor) + , m_aMargin(other.m_aMargin) + , m_aPadding(other.m_aPadding) + , m_pFont(other.m_pFont) + , m_aShadow(other.m_aShadow) + , m_aDropcap(other.m_aDropcap) + , m_aLineHeight(other.m_aLineHeight) + , m_aBreaks(other.m_aBreaks) + , m_nPageNumber(other.m_nPageNumber) + , m_bNumberLines(other.m_bNumberLines) + , m_nLineNumberRestart(other.m_nLineNumberRestart) + , m_nFlag(other.m_nFlag) + , m_bNumberRight(other.m_bNumberRight) { m_strParentStyleName = other.m_strParentStyleName; - m_nFlag = other.m_nFlag; - m_eAlignType = other.m_eAlignType; - m_fTextIndent = other.m_fTextIndent; - m_bNumberLines = other.m_bNumberLines; - m_nLineNumberRestart = other.m_nLineNumberRestart; - m_bNumberRight = other.m_bNumberRight; - - if( other.m_pFont ) - m_pFont = other.m_pFont; - else - m_pFont = NULL; if( other.m_pBorders ) m_pBorders = new XFBorders(*other.m_pBorders); else m_pBorders = NULL; - m_aBackColor = other.m_aBackColor; + if( other.m_pBGImage ) m_pBGImage = new XFBGImage(*other.m_pBGImage); else m_pBGImage = NULL; - m_aShadow = other.m_aShadow; - m_aMargin = other.m_aMargin; - m_aDropcap = other.m_aDropcap; - m_aLineHeight = other.m_aLineHeight; - m_aPadding = other.m_aPadding; - m_aBreaks = other.m_aBreaks; - - for (size_t i=0; i<other.m_aTabs.GetCount(); ++i) + for (size_t i = 0; i < other.m_aTabs.GetCount(); ++i) { - const IXFStyle *pStyle = other.m_aTabs.Item(i); + const IXFStyle* pStyle = other.m_aTabs.Item(i); if( pStyle ) { - const XFTabStyle *pTabStyle = dynamic_cast<const XFTabStyle*>(pStyle); + const XFTabStyle* pTabStyle = dynamic_cast<const XFTabStyle*>(pStyle); if( pTabStyle ) { XFTabStyle *pCopyStyle = new XFTabStyle(*pTabStyle); |