diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-03-11 13:43:39 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-03-12 07:31:08 +0100 |
commit | 31bf558349d9ab2634e9a866edf79bc115d649ce (patch) | |
tree | 5bf9c60d40144bb4454ba7f1179a973383f1ba3c /oox/source/ole | |
parent | 469aea3b3b76926112d7b6fce212be2906842dc9 (diff) |
Revert "loplugin:constfields in oox"
This reverts commit a84e3df74eecc8778e3d5be5dd80ad4ddb511edf.
Now that we know that making fields has negative side effects
like disabling assignment operator generation.
Change-Id: I7b45b7ead281cf3a9202ca6aabc55ee5033e5331
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90332
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'oox/source/ole')
-rw-r--r-- | oox/source/ole/axcontrol.cxx | 15 | ||||
-rw-r--r-- | oox/source/ole/olehelper.cxx | 2 | ||||
-rw-r--r-- | oox/source/ole/olestorage.cxx | 2 |
3 files changed, 12 insertions, 7 deletions
diff --git a/oox/source/ole/axcontrol.cxx b/oox/source/ole/axcontrol.cxx index 8ce93ea1ffa5..ebdf845310e5 100644 --- a/oox/source/ole/axcontrol.cxx +++ b/oox/source/ole/axcontrol.cxx @@ -661,7 +661,9 @@ ComCtlModelBase::ComCtlModelBase( sal_uInt32 nDataPartId5, sal_uInt32 nDataPartI mnFlags( 0 ), mnVersion( nVersion ), mnDataPartId5( nDataPartId5 ), - mnDataPartId6( nDataPartId6 ) + mnDataPartId6( nDataPartId6 ), + mbCommonPart( true ), + mbComplexPart( true ) { } @@ -671,13 +673,15 @@ bool ComCtlModelBase::importBinaryModel( BinaryInputStream& rInStrm ) if( importSizePart( rInStrm ) && readPartHeader( rInStrm, getDataPartId(), mnVersion ) ) { // if flags part exists, the first int32 of the data part contains its size - sal_uInt32 nCommonPartSize = rInStrm.readuInt32(); + sal_uInt32 nCommonPartSize = 0; + if (mbCommonPart) + nCommonPartSize = rInStrm.readuInt32(); // implementations must read the exact amount of data, stream must point to its end afterwards importControlData( rInStrm ); // read following parts if( !rInStrm.isEof() && - importCommonPart( rInStrm, nCommonPartSize ) && - importComplexPart( rInStrm ) ) + (!mbCommonPart || importCommonPart( rInStrm, nCommonPartSize )) && + (!mbComplexPart || importComplexPart( rInStrm )) ) { return !rInStrm.isEof(); } @@ -687,7 +691,8 @@ bool ComCtlModelBase::importBinaryModel( BinaryInputStream& rInStrm ) void ComCtlModelBase::convertProperties( PropertyMap& rPropMap, const ControlConverter& rConv ) const { - rPropMap.setProperty( PROP_Enabled, getFlag( mnFlags, COMCTL_COMMON_ENABLED ) ); + if( mbCommonPart ) + rPropMap.setProperty( PROP_Enabled, getFlag( mnFlags, COMCTL_COMMON_ENABLED ) ); ControlModelBase::convertProperties( rPropMap, rConv ); } diff --git a/oox/source/ole/olehelper.cxx b/oox/source/ole/olehelper.cxx index 93de727d5097..ec7dad6c181f 100644 --- a/oox/source/ole/olehelper.cxx +++ b/oox/source/ole/olehelper.cxx @@ -96,7 +96,7 @@ struct GUIDCNamePair struct IdCntrlData { sal_Int16 nId; - GUIDCNamePair const aData; + GUIDCNamePair aData; }; const sal_Int16 TOGGLEBUTTON = -1; diff --git a/oox/source/ole/olestorage.cxx b/oox/source/ole/olestorage.cxx index f9fd84a8c44e..0eec7ad679bf 100644 --- a/oox/source/ole/olestorage.cxx +++ b/oox/source/ole/olestorage.cxx @@ -79,7 +79,7 @@ private: Reference< XStream > mxTempFile; Reference< XOutputStream > mxOutStrm; Reference< XSeekable > mxSeekable; - OUString const maElementName; + OUString maElementName; }; OleOutputStream::OleOutputStream( const Reference< XComponentContext >& rxContext, |