summaryrefslogtreecommitdiff
path: root/sw/source/filter/ww8/ww8graf2.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-01-28 17:09:39 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-01-28 17:14:22 +0100
commit424717f44c3c63569d1d321611ff5a3d3b7a7ff5 (patch)
treea69df3288b120410b02cc70e415aa047bbe7ebca /sw/source/filter/ww8/ww8graf2.cxx
parent8138c07b984ba1654483b4dc3488820ca4deaaca (diff)
MSVC apparently does not pack bitfields of different type
...so c963d7e642c24f40c19fb9dc227db5da96728c12 "bool improvements" changed the size of some structs in sw/source/filter/ww8/ww8struc.hxx that are used for raw IO and thus have fixed layout requirements. Reverted that part of the commit and instead use explicit conversion between bool and sal_uInt16 where necessary. Also added static asserts for those structs that were easily identifiable as being used for raw IO. (Also reverted the bools in some other structs that were not (easily) identified as being used for raw IO even if that might thus not be necessary, but better safe than sorry.) Change-Id: I60e17a2821d67961f50691625999f2aa72c5ebce
Diffstat (limited to 'sw/source/filter/ww8/ww8graf2.cxx')
-rw-r--r--sw/source/filter/ww8/ww8graf2.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/sw/source/filter/ww8/ww8graf2.cxx b/sw/source/filter/ww8/ww8graf2.cxx
index d9f9b9758af8..15118e3db9f2 100644
--- a/sw/source/filter/ww8/ww8graf2.cxx
+++ b/sw/source/filter/ww8/ww8graf2.cxx
@@ -756,14 +756,14 @@ void WW8FSPAShadowToReal( WW8_FSPA_SHADOW * pFSPAS, WW8_FSPA * pFSPA )
sal_uInt16 nBits = SVBT16ToShort( pFSPAS->aBits1 );
- pFSPA->bHdr = 0 != ( nBits & 0x0001 );
+ pFSPA->bHdr = sal_uInt16(0 != ( nBits & 0x0001 ));
pFSPA->nbx = ( nBits & 0x0006 ) >> 1;
pFSPA->nby = ( nBits & 0x0018 ) >> 3;
pFSPA->nwr = ( nBits & 0x01E0 ) >> 5;
pFSPA->nwrk = ( nBits & 0x1E00 ) >> 9;
- pFSPA->bRcaSimple = 0 != ( nBits & 0x2000 );
- pFSPA->bBelowText = 0 != ( nBits & 0x4000 );
- pFSPA->bAnchorLock = 0 != ( nBits & 0x8000 );
+ pFSPA->bRcaSimple = sal_uInt16(0 != ( nBits & 0x2000 ));
+ pFSPA->bBelowText = sal_uInt16(0 != ( nBits & 0x4000 ));
+ pFSPA->bAnchorLock = sal_uInt16(0 != ( nBits & 0x8000 ));
pFSPA->nTxbx = SVBT32ToUInt32( pFSPAS->nTxbx );
}