diff options
author | Noel Power <noel.power@novell.com> | 2011-10-03 18:55:08 +0100 |
---|---|---|
committer | Noel Power <noel.power@novell.com> | 2011-10-03 18:58:04 +0100 |
commit | 7c20a8edbc35cb61bd955fd4c3984bced7533129 (patch) | |
tree | d16b6894268f457d136a1c3dac6b653aa5c218fc /oox | |
parent | deb2d9b1775605c415d7d31b5ed56d065d13981b (diff) |
fix morph control export also fix toggle button state export
Diffstat (limited to 'oox')
-rw-r--r-- | oox/inc/oox/ole/axbinarywriter.hxx | 2 | ||||
-rw-r--r-- | oox/source/ole/axbinarywriter.cxx | 2 | ||||
-rw-r--r-- | oox/source/ole/axcontrol.cxx | 22 |
3 files changed, 8 insertions, 18 deletions
diff --git a/oox/inc/oox/ole/axbinarywriter.hxx b/oox/inc/oox/ole/axbinarywriter.hxx index 408abaa1f5c7..227ac419f746 100644 --- a/oox/inc/oox/ole/axbinarywriter.hxx +++ b/oox/inc/oox/ole/axbinarywriter.hxx @@ -109,7 +109,7 @@ public: { if( startNextProperty() ) maOutStrm.writeAligned< StreamType >( ornValue ); } /** Write a boolean property value to the stream, the respective flag in the property mask is set. */ - void writeBoolProperty( bool& orbValue, bool bReverse = false ); + void writeBoolProperty( bool orbValue, bool bReverse = false ); /** Write a pair property the stream, the respective flag in the property mask is set. */ void writePairProperty( AxPairData& orPairData ); diff --git a/oox/source/ole/axbinarywriter.cxx b/oox/source/ole/axbinarywriter.cxx index 390b592d50d3..e5ed29ac3cf0 100644 --- a/oox/source/ole/axbinarywriter.cxx +++ b/oox/source/ole/axbinarywriter.cxx @@ -164,7 +164,7 @@ AxBinaryPropertyWriter::AxBinaryPropertyWriter( BinaryOutputStream& rOutStrm, bo mnNextProp = 1; } -void AxBinaryPropertyWriter::writeBoolProperty( bool& orbValue, bool bReverse ) +void AxBinaryPropertyWriter::writeBoolProperty( bool orbValue, bool bReverse ) { // orbValue ^ bReverse true then we want to set the bit, e.g. don't skip startNextProperty( !( ( orbValue ^ bReverse ) >= 1 ) ); diff --git a/oox/source/ole/axcontrol.cxx b/oox/source/ole/axcontrol.cxx index c78ffdd75e4e..c9bde1fd3e86 100644 --- a/oox/source/ole/axcontrol.cxx +++ b/oox/source/ole/axcontrol.cxx @@ -540,26 +540,16 @@ void ControlConverter::convertAxState( PropertyMap& rPropMap, } void ControlConverter::convertToAxState( PropertySet& rPropSet, - OUString& rValue, sal_Int32& nMultiSelect, ApiDefaultStateMode eDefStateMode, bool bAwtModel ) const + OUString& rValue, sal_Int32& nMultiSelect, ApiDefaultStateMode eDefStateMode, bool /*bAwtModel*/ ) const { - bool bBooleanState = eDefStateMode == API_DEFAULTSTATE_BOOLEAN; bool bSupportsTriState = eDefStateMode == API_DEFAULTSTATE_TRISTATE; - sal_Int32 nPropId = bAwtModel ? PROP_State : PROP_DefaultState; sal_Int16 nState = API_STATE_DONTKNOW; sal_Bool bTmp = sal_False; - - if( bBooleanState ) - { - rPropSet.getProperty( bTmp, nPropId ); - if ( bTmp ) - nState = API_STATE_CHECKED; - else - nState = API_STATE_UNCHECKED; - } - else - rPropSet.getProperty( nState, nPropId ); + // need to use State for current state ( I think this is regardless of whether + // control is awt or not ) + rPropSet.getProperty( nState, PROP_State ); rValue = rtl::OUString(); // empty e.g. 'don't know' if ( nState == API_STATE_UNCHECKED ) @@ -1475,7 +1465,7 @@ void AxMorphDataModelBase::exportBinaryModel( BinaryOutputStream& rOutStrm ) aWriter.skipProperty(); aWriter.skipProperty(); // drop down style aWriter.writeIntProperty< sal_uInt8 >( mnMultiSelect ); - aWriter.skipProperty(); // maValue; + aWriter.writeStringProperty( maValue ); aWriter.writeStringProperty( maCaption ); aWriter.skipProperty(); // mnPicturePos ); aWriter.writeIntProperty< sal_uInt32 >( mnBorderColor ); @@ -1484,7 +1474,7 @@ void AxMorphDataModelBase::exportBinaryModel( BinaryOutputStream& rOutStrm ) aWriter.skipProperty(); // maPictureData aWriter.skipProperty(); // accelerator aWriter.skipProperty(); // undefined - aWriter.skipProperty(); // some bool + aWriter.writeBoolProperty(true); // must be 1 for morph aWriter.writeStringProperty( maGroupName ); aWriter.finalizeExport(); AxFontDataModel::exportBinaryModel( rOutStrm ); |