summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2021-01-11 20:26:46 +0100
committerStephan Bergmann <sbergman@redhat.com>2021-01-12 13:24:46 +0100
commitb269e95f7ee36fbe6cbe5e3ddc5e10aa4ef651cd (patch)
tree59da0bfe883c55a42fb3738b322f250aecc16433
parented6c5803cfe942932a1c7a6042808d68c2017559 (diff)
WW8LVL members do not require a specific layout
While the struct is apparently modelled after a specific data format, all the individual members are accessed by dedicated code, never via something like memcpy. Change-Id: I7eff8a251d9fa9f6d771cc425584b9765308d723 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109110 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
-rw-r--r--sw/source/filter/ww8/ww8par3.cxx17
1 files changed, 7 insertions, 10 deletions
diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx
index 5c44be1ad5f5..b7df7589a5e7 100644
--- a/sw/source/filter/ww8/ww8par3.cxx
+++ b/sw/source/filter/ww8/ww8par3.cxx
@@ -371,13 +371,10 @@ struct WW8LVL // only THE entries, WE need!
sal_uInt8 aOfsNumsXCH[WW8ListManager::nMaxLevel];
sal_uInt8 nLenGrpprlChpx; // length, in bytes, of the LVL's grpprlChpx
sal_uInt8 nLenGrpprlPapx; // length, in bytes, of the LVL's grpprlPapx
- sal_uInt8 nAlign: 2; // alignment (left, right, centered) of the number
- sal_uInt8: 1; // doesn't matter ("bLegal")
- sal_uInt8: 1; // doesn't matter ("bNoRest")
- sal_uInt8 bV6Prev:1; // Ver6-Compatible: number will include previous levels
- sal_uInt8 bV6PrSp:1; // Ver6-Compatible: doesn't matter
- sal_uInt8 bV6: 1; // if true, pay attention to the V6-Compatible Entries!
- sal_uInt8: 1; // (fills the byte)
+ sal_uInt8 nAlign; // alignment (left, right, centered) of the number
+ bool bV6Prev; // Ver6-Compatible: number will include previous levels
+ bool bV6PrSp; // Ver6-Compatible: doesn't matter
+ bool bV6; // if true, pay attention to the V6-Compatible Entries!
};
@@ -636,9 +633,9 @@ bool WW8ListManager::ReadLVL(SwNumFormat& rNumFormat, std::unique_ptr<SfxItemSet
rSt.ReadUChar( aBits1 );
if( ERRCODE_NONE != rSt.GetError() ) return false;
aLVL.nAlign = (aBits1 & 0x03);
- if( aBits1 & 0x10 ) aLVL.bV6Prev = sal_uInt8(true);
- if( aBits1 & 0x20 ) aLVL.bV6PrSp = sal_uInt8(true);
- if( aBits1 & 0x40 ) aLVL.bV6 = sal_uInt8(true);
+ if( aBits1 & 0x10 ) aLVL.bV6Prev = true;
+ if( aBits1 & 0x20 ) aLVL.bV6PrSp = true;
+ if( aBits1 & 0x40 ) aLVL.bV6 = true;
bool bLVLOkB = true;
for(sal_uInt8 nLevelB = 0; nLevelB < nMaxLevel; ++nLevelB)
{