Kaydet (Commit) 2d326986 authored tarafından Eike Rathke's avatar Eike Rathke

real assert() to bail out on invalid index

... instead of displaying a message and then silently poking memory that
we don't own. Now that globstr.hrc is renumbered it makes sense to
prevent future inconsistencies.

Change-Id: I7458fbca4928b33fc7471820aeea7882a0f71e50
üst 9c6d513f
...@@ -346,7 +346,7 @@ void ScGlobal::SetUserList( const ScUserList* pNewList ) ...@@ -346,7 +346,7 @@ void ScGlobal::SetUserList( const ScUserList* pNewList )
const OUString& ScGlobal::GetRscString( sal_uInt16 nIndex ) const OUString& ScGlobal::GetRscString( sal_uInt16 nIndex )
{ {
OSL_ENSURE( nIndex < SC_GLOBSTR_STR_COUNT, "ScGlobal::GetRscString - invalid string index"); assert( nIndex < SC_GLOBSTR_STR_COUNT);
if( !ppRscString[ nIndex ] ) if( !ppRscString[ nIndex ] )
{ {
OpCode eOp = ocNone; OpCode eOp = ocNone;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment