diff options
Diffstat (limited to 'filter/source/msfilter/msocximex.cxx')
-rw-r--r-- | filter/source/msfilter/msocximex.cxx | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/filter/source/msfilter/msocximex.cxx b/filter/source/msfilter/msocximex.cxx index e434da1fbfb3..82663cdf2523 100644 --- a/filter/source/msfilter/msocximex.cxx +++ b/filter/source/msfilter/msocximex.cxx @@ -2323,8 +2323,8 @@ sal_Bool OCX_ToggleButton::Import(com::sun::star::uno::Reference< if (pValue) { INT16 nTmp=pValue[0]-0x30; - aTmp <<= nTmp; - rPropSet->setPropertyValue( WW8_ASCII2STR("State"), aTmp); + aTmp <<= nTmp == 1; + rPropSet->setPropertyValue( WW8_ASCII2STR("DefaultState"), aTmp); } if (pCaption) @@ -2444,9 +2444,9 @@ sal_Bool OCX_ToggleButton::WriteContents(SvStorageStreamRef &rContents, WriteAlign(rContents,4); nValueLen = 1|SVX_MSOCX_COMPRESSED; - aTmp = rPropSet->getPropertyValue(WW8_ASCII2STR("State")); - sal_Int16 nDefault = sal_Int16(); - aTmp >>= nDefault; + bool bDefault = false; + rPropSet->getPropertyValue(WW8_ASCII2STR("DefaultState")) >>= bDefault; + sal_uInt8 nDefault = static_cast< sal_uInt8 >( bDefault ? '1' : '0' ); *rContents << nValueLen; pBlockFlags[2] |= 0x40; @@ -2459,8 +2459,7 @@ sal_Bool OCX_ToggleButton::WriteContents(SvStorageStreamRef &rContents, *rContents << rSize.Width; *rContents << rSize.Height; - nDefault += 0x30; - *rContents << sal_uInt8(nDefault); + *rContents << nDefault; *rContents << sal_uInt8(0x00); aCaption.WriteCharArray( *rContents ); |