basic/source/sbx/sbxvalue.cxx | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-)
New commits: commit 354dc28282ec72326b6decf0b34df57ed43858fb Author: Bogdan Buzea <buzea.bog...@libreoffice.org> AuthorDate: Fri Oct 18 17:17:03 2024 +0200 Commit: David Gilbert <freedesk...@treblig.org> CommitDate: Tue Nov 12 01:35:14 2024 +0100 tdf#163486: PVS: Identical branches Change-Id: Ic54a8e009f68ab992831ba849ae1349a6235bedd V1037: Two or more case-branches perform the same actions. Check lines: 1276 and 1408, 1434 and 1510 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175149 Tested-by: Jenkins Reviewed-by: David Gilbert <freedesk...@treblig.org> diff --git a/basic/source/sbx/sbxvalue.cxx b/basic/source/sbx/sbxvalue.cxx index 6587d08f5da4..f3122fe71904 100644 --- a/basic/source/sbx/sbxvalue.cxx +++ b/basic/source/sbx/sbxvalue.cxx @@ -1273,7 +1273,9 @@ bool SbxValue::LoadData( SvStream& r, sal_uInt16 ) case SbxINTEGER: r.ReadInt16( aData.nInteger ); break; case SbxLONG: - r.ReadInt32( aData.nLong ); break; + case SbxDATAOBJECT: + r.ReadInt32( aData.nLong ); + break; case SbxSINGLE: { // Floats as ASCII @@ -1404,9 +1406,6 @@ bool SbxValue::LoadData( SvStream& r, sal_uInt16 ) case SbxNULL: case SbxVOID: break; - case SbxDATAOBJECT: - r.ReadInt32( aData.nLong ); - break; // #78919 For backwards compatibility case SbxWSTRING: case SbxWCHAR: @@ -1431,7 +1430,9 @@ bool SbxValue::LoadData( SvStream& r, sal_uInt16 ) case SbxINTEGER: r.WriteInt16( aData.nInteger ); break; case SbxLONG: - r.WriteInt32( aData.nLong ); break; + case SbxDATAOBJECT: + r.WriteInt32( aData.nLong ); + break; case SbxDATE: // #49935: Save as double, otherwise an error during the read in const_cast<SbxValue*>(this)->aData.eType = static_cast<SbxDataType>( ( nType & 0xF000 ) | SbxDOUBLE ); @@ -1506,9 +1507,6 @@ bool SbxValue::LoadData( SvStream& r, sal_uInt16 ) case SbxNULL: case SbxVOID: break; - case SbxDATAOBJECT: - r.WriteInt32( aData.nLong ); - break; // #78919 For backwards compatibility case SbxWSTRING: case SbxWCHAR: