summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-07-16 09:44:09 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-07-16 11:27:19 +0100
commitbfd22d4ba76df2ab3939339ddb5030f3c7082cb8 (patch)
tree4e05dedd6a94d14af472382e2bc9dcb7ed704ec2
parent033f59dad003333d449fec8b8eccf8674ee59d8e (diff)
coverity#708510 Uninitialized scalar field
and coverity708511 Uninitialized scalar field Change-Id: I05b5d836f3a207e70f8fff84524866a54a15daa2
-rw-r--r--sw/source/filter/ww8/ww8scan.cxx8
-rw-r--r--sw/source/filter/ww8/ww8scan.hxx9
2 files changed, 5 insertions, 12 deletions
diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index bbf74a0c7cc6..1800a8277540 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -6519,9 +6519,9 @@ void WW8PLCF_HdFt::UpdateIndex( sal_uInt8 grpfIhdt )
nIdxOffset++;
}
-WW8Dop::WW8Dop(SvStream& rSt, sal_Int16 nFib, sal_Int32 nPos, sal_uInt32 nSize) : bUseThaiLineBreakingRules(false)
+WW8Dop::WW8Dop(SvStream& rSt, sal_Int16 nFib, sal_Int32 nPos, sal_uInt32 nSize)
{
- memset( &nDataStart, 0, (&nDataEnd - &nDataStart) );
+ memset(this, 0, sizeof(WW8Dop));
fDontUseHTMLAutoSpacing = true; //default
fAcetateShowAtn = true; //default
const sal_uInt32 nMaxDopSize = 0x268;
@@ -6743,10 +6743,10 @@ WW8Dop::WW8Dop(SvStream& rSt, sal_Int16 nFib, sal_Int32 nPos, sal_uInt32 nSize)
delete[] pDataPtr;
}
-WW8Dop::WW8Dop() : bUseThaiLineBreakingRules(false)
+WW8Dop::WW8Dop()
{
// first set everything to a default of 0
- memset( &nDataStart, 0, (&nDataEnd - &nDataStart) );
+ memset(this, 0, sizeof(WW8Dop));
fWidowControl = true;
fpc = 1;
diff --git a/sw/source/filter/ww8/ww8scan.hxx b/sw/source/filter/ww8/ww8scan.hxx
index b3ca7ca29c69..893df81c07a0 100644
--- a/sw/source/filter/ww8/ww8scan.hxx
+++ b/sw/source/filter/ww8/ww8scan.hxx
@@ -1497,7 +1497,7 @@ namespace nsHdFtFlags
}
/// Document Properties
-class WW8Dop
+struct WW8Dop
{
public:
/* Error Status */
@@ -1506,9 +1506,6 @@ public:
Corresponds only roughly to the actual structure of the Winword DOP,
the winword FIB version matters to what exists.
*/
- // Initialisier-Dummy:
- sal_uInt8 nDataStart;
-
bool fFacingPages : 1; // 1 when facing pages should be printed
bool fWidowControl : 1; //a: orig 97 docs say
@@ -1729,9 +1726,6 @@ public:
bool fAcetateShowInsDel : 1;
bool fAcetateShowProps : 1;
- // 2. Initialisier-Dummy:
- sal_uInt8 nDataEnd;
-
bool bUseThaiLineBreakingRules;
/* Constructor for importing, needs to know the version of word used */
@@ -1741,7 +1735,6 @@ public:
WW8Dop();
bool Write(SvStream& rStrm, WW8Fib& rFib) const;
-public:
sal_uInt32 GetCompatabilityOptions() const;
void SetCompatabilityOptions(sal_uInt32 a32Bit);
// i#78591#