[Libreoffice-commits] .: oox/inc oox/source
Noel Power
noelp at kemper.freedesktop.org
Mon Oct 3 10:58:47 PDT 2011
oox/inc/oox/ole/axbinarywriter.hxx | 2 +-
oox/source/ole/axbinarywriter.cxx | 2 +-
oox/source/ole/axcontrol.cxx | 22 ++++++----------------
3 files changed, 8 insertions(+), 18 deletions(-)
New commits:
commit 7c20a8edbc35cb61bd955fd4c3984bced7533129
Author: Noel Power <noel.power at novell.com>
Date: Mon Oct 3 18:55:08 2011 +0100
fix morph control export also fix toggle button state export
diff --git a/oox/inc/oox/ole/axbinarywriter.hxx b/oox/inc/oox/ole/axbinarywriter.hxx
index 408abaa..227ac41 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 390b592..e5ed29a 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 c78ffdd..c9bde1f 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 );
More information about the Libreoffice-commits
mailing list