basic/source/sbx/sbxarray.cxx | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-)
New commits: commit a7e23e7f7b5489da2441adf5b8afbee507709821 Author: Arnaud Versini <arnaud.vers...@gmail.com> Date: Mon Apr 18 20:18:51 2016 +0200 BASIC : Partially revert SbxArray simplification. Revert partially commit 0fa6c88007f61176ac707cb5d77fd35cf1521123 (BASIC : Simplify SbxArray) to make sure SbxArray::Put add too much objects behind 65k limit. Change-Id: I2d86f213711665f8cb522879ff78ff5bc9f42b31 Reviewed-on: https://gerrit.libreoffice.org/24223 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Stephan Bergmann <sberg...@redhat.com> diff --git a/basic/source/sbx/sbxarray.cxx b/basic/source/sbx/sbxarray.cxx index b6b80c2..d3b09ec 100644 --- a/basic/source/sbx/sbxarray.cxx +++ b/basic/source/sbx/sbxarray.cxx @@ -198,7 +198,22 @@ void SbxArray::Put32( SbxVariable* pVar, sal_uInt32 nIdx ) void SbxArray::Put( SbxVariable* pVar, sal_uInt16 nIdx ) { - Put32(pVar, nIdx); + if( !CanWrite() ) + SetError( ERRCODE_SBX_PROP_READONLY ); + else + { + if( pVar ) + if( eType != SbxVARIANT ) + // Convert no objects + if( eType != SbxOBJECT || pVar->GetClass() != SbxCLASS_OBJECT ) + pVar->Convert( eType ); + SbxVariableRef& rRef = GetRef( nIdx ); + if( static_cast<SbxVariable*>(rRef) != pVar ) + { + rRef = pVar; + SetFlag( SbxFlagBits::Modified ); + } + } } OUString SbxArray::GetAlias( sal_uInt16 nIdx ) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits