basic/source/classes/sbxmod.cxx | 42 +++++++++++++++++++--------------------- 1 file changed, 20 insertions(+), 22 deletions(-)
New commits: commit 7347248254595c082682180f7a1cfe768f5509a6 Author: Caolán McNamara <caol...@redhat.com> Date: Mon Feb 15 11:26:45 2016 +0000 cppcheck: unreadVariable Change-Id: I15f0320b646d20f0093c77286c1ff2715aacb8ce diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx index 1c3a23f..410c321 100644 --- a/basic/source/classes/sbxmod.cxx +++ b/basic/source/classes/sbxmod.cxx @@ -1790,31 +1790,29 @@ bool SbModule::HasExeCode() // Store only image, no source void SbModule::StoreBinaryData( SvStream& rStrm, sal_uInt16 nVer ) { - bool bRet = Compile(); - if( bRet ) - { - bool bFixup = ( !nVer && !pImage->ExceedsLegacyLimits() );// save in old image format, fix up method starts + if (!Compile()) + return; + bool bFixup = ( !nVer && !pImage->ExceedsLegacyLimits() );// save in old image format, fix up method starts - if ( bFixup ) // save in old image format, fix up method starts - fixUpMethodStart( true ); - bRet = SbxObject::StoreData( rStrm ); - if( bRet ) - { - (pImage->aOUSource).clear(); - pImage->aComment = aComment; - pImage->aName = GetName(); + if ( bFixup ) // save in old image format, fix up method starts + fixUpMethodStart( true ); - rStrm.WriteUChar( 1 ); - if ( nVer ) - bRet = pImage->Save( rStrm ); - else - bRet = pImage->Save( rStrm, B_LEGACYVERSION ); - if ( bFixup ) - fixUpMethodStart( false ); // restore method starts + if (!SbxObject::StoreData(rStrm)) + return; - pImage->aOUSource = aOUSource; - } - } + pImage->aOUSource.clear(); + pImage->aComment = aComment; + pImage->aName = GetName(); + + rStrm.WriteUChar(1); + if (nVer) + pImage->Save(rStrm); + else + pImage->Save(rStrm, B_LEGACYVERSION); + if (bFixup) + fixUpMethodStart(false); // restore method starts + + pImage->aOUSource = aOUSource; } // Called for >= OO 1.0 passwd protected libraries only commit f3f67b770b90c81de82bc38a26e794ad72956c1a Author: Caolán McNamara <caol...@redhat.com> Date: Mon Feb 15 11:25:17 2016 +0000 fix indent Change-Id: I48552afc35c1f7cfff3562c36eca3f1cf6174077 diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx index 5dc0cd9..1c3a23f 100644 --- a/basic/source/classes/sbxmod.cxx +++ b/basic/source/classes/sbxmod.cxx @@ -1797,7 +1797,7 @@ void SbModule::StoreBinaryData( SvStream& rStrm, sal_uInt16 nVer ) if ( bFixup ) // save in old image format, fix up method starts fixUpMethodStart( true ); - bRet = SbxObject::StoreData( rStrm ); + bRet = SbxObject::StoreData( rStrm ); if( bRet ) { (pImage->aOUSource).clear(); @@ -1805,12 +1805,12 @@ void SbModule::StoreBinaryData( SvStream& rStrm, sal_uInt16 nVer ) pImage->aName = GetName(); rStrm.WriteUChar( 1 ); - if ( nVer ) - bRet = pImage->Save( rStrm ); - else - bRet = pImage->Save( rStrm, B_LEGACYVERSION ); - if ( bFixup ) - fixUpMethodStart( false ); // restore method starts + if ( nVer ) + bRet = pImage->Save( rStrm ); + else + bRet = pImage->Save( rStrm, B_LEGACYVERSION ); + if ( bFixup ) + fixUpMethodStart( false ); // restore method starts pImage->aOUSource = aOUSource; }
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits