summaryrefslogtreecommitdiff
path: root/sw/source/filter/ww8/wrtww8.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/filter/ww8/wrtww8.cxx')
-rw-r--r--sw/source/filter/ww8/wrtww8.cxx13
1 files changed, 6 insertions, 7 deletions
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index 46c74872e709..037f10b9d86e 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -3523,7 +3523,6 @@ void WW8Export::WriteFormData( const ::sw::mark::IFieldmark& rFieldmark )
const sal_uInt8 aFldData[] =
{
- 0,0,0,0, // len of struct
0x44,0, // the start of "next" data
0,0,0,0,0,0,0,0,0,0, // PIC-Structure! /10
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // | /16
@@ -3531,7 +3530,8 @@ void WW8Export::WriteFormData( const ::sw::mark::IFieldmark& rFieldmark )
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // | /16
0,0,0,0, // / /4
};
- int slen = sizeof( aFldData )
+ sal_uInt32 slen=sizeof(sal_uInt32)
+ + sizeof(aFldData)
+ sizeof( aFldHeader )
+ 2*ffname.getLength() + 4
+ 2*ffdeftext.getLength() + 4
@@ -3540,12 +3540,11 @@ void WW8Export::WriteFormData( const ::sw::mark::IFieldmark& rFieldmark )
+ 2*ffstattext.getLength() + 4
+ 2*ffentrymcr.getLength() + 4
+ 2*ffexitmcr.getLength() + 4;
-#ifdef OSL_BIGENDIAN
- slen = SWAPLONG( slen );
-#endif // OSL_BIGENDIAN
- *( (sal_uInt32 *)aFldData ) = slen;
+
+ *pDataStrm << slen;
+
int len = sizeof( aFldData );
- OSL_ENSURE( len == 0x44, "SwWW8Writer::WriteFormData(..) - wrong aFldData length" );
+ OSL_ENSURE( len == 0x44-sizeof(sal_uInt32), "SwWW8Writer::WriteFormData(..) - wrong aFldData length" );
pDataStrm->Write( aFldData, len );
len = sizeof( aFldHeader );