sc/source/filter/inc/tokstack.hxx | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-)
New commits: commit cf36b5d5f598d9b5528b273858584e2b419b23e9 Author: Eike Rathke <er...@redhat.com> Date: Thu Nov 9 20:12:34 2017 +0100 Make this breakable in a debugger Change-Id: I5db40b513de43a27a2e58937ea2ad9501d432917 diff --git a/sc/source/filter/inc/tokstack.hxx b/sc/source/filter/inc/tokstack.hxx index d07aaef1ae56..d0b2a59f2173 100644 --- a/sc/source/filter/inc/tokstack.hxx +++ b/sc/source/filter/inc/tokstack.hxx @@ -276,13 +276,13 @@ class TokenStack inline const TokenId TokenStack::Get() { - OSL_ENSURE( nPos > 0, - "*TokenStack::Get(): is empty, is empty, ..." ); - TokenId nRet; if( nPos == 0 ) + { + SAL_WARN("sc.filter", "*TokenStack::Get(): is empty, is empty, ..."); nRet = 0; + } else { nPos--; @@ -294,25 +294,30 @@ inline const TokenId TokenStack::Get() inline TokenStack &TokenStack::operator <<( const TokenId& rNewId ) {// Element on Stack - OSL_ENSURE( nPos < nSize, "*TokenStack::<<(): Stack overflow" ); if( nPos < nSize ) { pStack[ nPos ] = rNewId; nPos++; } + else + { + SAL_WARN("sc.filter", "*TokenStack::<<(): Stack overflow"); + } return *this; } inline void TokenStack::operator >>( TokenId& rId ) {// Element of Stack - OSL_ENSURE( nPos > 0, - "*TokenStack::>>(): is empty, is empty, ..." ); if( nPos > 0 ) { nPos--; rId = pStack[ nPos ]; } + else + { + SAL_WARN("sc.filter", "*TokenStack::>>(): is empty, is empty, ..."); + } } inline void TokenStack::Reset() @@ -325,8 +330,10 @@ inline TokenPool& TokenPool::operator <<( const TokenId& rId ) // POST: rId's are stored consecutively in Pool under a new Id; // finalize with >> or Store() // rId -> ( sal_uInt16 ) rId - 1; - OSL_ENSURE( ( sal_uInt16 ) rId < nScTokenOff, - "-TokenPool::operator <<: TokenId in DefToken-Range!" ); + if ((sal_uInt16)rId >= nScTokenOff) + { + SAL_WARN("sc.filter", "-TokenPool::operator <<: TokenId in DefToken-Range!"); + } if( nP_IdAkt >= nP_Id ) if (!GrowId()) @@ -340,8 +347,10 @@ inline TokenPool& TokenPool::operator <<( const TokenId& rId ) inline TokenPool& TokenPool::operator <<( const DefTokenId eId ) { - OSL_ENSURE( ( sal_uInt32 ) eId + nScTokenOff < 0xFFFF, - "-TokenPool::operator<<: enum too large!" ); + if ((sal_uInt32)eId + nScTokenOff >= 0xFFFF) + { + SAL_WARN("sc.filter", "-TokenPool::operator<<: enum too large!" ); + } if( nP_IdAkt >= nP_Id ) if (!GrowId()) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits