diff -r f902e87c146f -r 748ec5531811 textrendering/texthandling/stext/TXTSTYLE.CPP --- a/textrendering/texthandling/stext/TXTSTYLE.CPP Wed Jun 09 11:40:52 2010 +0300 +++ b/textrendering/texthandling/stext/TXTSTYLE.CPP Tue Aug 31 17:01:26 2010 +0300 @@ -24,6 +24,11 @@ #include "TXTFRMAT.H" #include "TXTSTD.H" +#include "OstTraceDefinitions.h" +#ifdef OST_TRACE_COMPILER_IN_USE +#include "TXTSTYLETraces.h" +#endif + #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS #include "TXTFMLYR_INTERNAL.H" #include "TXTSTYLE_INTERNAL.H" @@ -164,6 +169,11 @@ { TInt index=IndexByPtr(info.iStyleForNextPara); // ASSERT: The style-to-follow is present in the list. + if (!((info.iStyleForNextPara==NULL) || + ((info.iStyleForNextPara) && (index!=KErrNotFound && index>=0 && index=0 && index=iList->Count()) + { + OstTrace0( TRACE_DUMP, DUP3_CSTYLELIST_AT, "EStyleIndexOutOfRange" ); + } __ASSERT_DEBUG(aIndex>=0 && aIndexCount(),Panic(EStyleIndexOutOfRange)); return (*iList)[aIndex]; @@ -257,7 +275,15 @@ EXPORT_C RParagraphStyleInfo& CStyleList::At(TInt aIndex) { + if (!iList) + { + OstTrace0( TRACE_FATAL, DUP2_CSTYLELIST_AT, "EStyleIntegrityError" ); + } __ASSERT_ALWAYS(iList,Panic(EStyleIntegrityError)); + if (aIndex<0 || aIndex>=iList->Count()) + { + OstTrace0( TRACE_DUMP, DUP1_CSTYLELIST_AT, "EStyleIndexOutOfRange" ); + } __ASSERT_DEBUG(aIndex>=0 && aIndexCount(),Panic(EStyleIndexOutOfRange)); return (*iList)[aIndex]; @@ -333,6 +359,10 @@ TInt offset=(set.iStyleForNextPara!=NULL) ? IndexByPtr(style) : -1; + if (!(offset==-1 || (offset>=0 && offset=0 && offset