diff options
author | Eike Rathke <erack@redhat.com> | 2017-11-09 20:12:34 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2017-11-09 23:21:56 +0100 |
commit | cf36b5d5f598d9b5528b273858584e2b419b23e9 (patch) | |
tree | 4a39690d3c95445b8be147572d7bda4cc313011b /sc | |
parent | 82331a914d3544f06e471c48ac2aaf5cf201daca (diff) |
Make this breakable in a debugger
Change-Id: I5db40b513de43a27a2e58937ea2ad9501d432917
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/filter/inc/tokstack.hxx | 29 |
1 files changed, 19 insertions, 10 deletions
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()) |