diff -r 6be019398652 -r 601ab138ba0b textrendering/texthandling/stext/TXTFMLYR.CPP --- a/textrendering/texthandling/stext/TXTFMLYR.CPP Fri Jun 11 15:33:54 2010 +0300 +++ b/textrendering/texthandling/stext/TXTFMLYR.CPP Tue Jul 06 16:23:19 2010 +0300 @@ -23,6 +23,11 @@ #include #include "TXTSTD.H" +#include "OstTraceDefinitions.h" +#ifdef OST_TRACE_COMPILER_IN_USE +#include "TXTFMLYRTraces.h" +#endif + #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS #include "TXTFMLYR_INTERNAL.H" #endif @@ -148,8 +153,16 @@ @param aExcludeCount The number of layers to be excluded. By default, zero. */ { // ASSERT: aExcludeCount is positive. + if (aExcludeCount<0) + { + OstTrace0( TRACE_FATAL, CFORMATLAYER_EXTERNALIZECHAINL, "ECannotStoreFormatLayerChain" ); + } __ASSERT_ALWAYS(aExcludeCount>=0,Panic(ECannotStoreFormatLayerChain)); // ASSERT: The number of layers to be excluded is less than the total no. of layers. + if (aExcludeCount>=ChainCount()) + { + OstTrace0( TRACE_FATAL, DUP1_CFORMATLAYER_EXTERNALIZECHAINL, "ECannotStoreFormatLayerChain" ); + } __ASSERT_ALWAYS(aExcludeCountExternalizeLayersRecurseL(aStream,--aDescendantCount); } @@ -360,6 +377,10 @@ EAllAttributes, all attributes are written; if EFixedAttributes, tabs, bullets and borders are not written. */ { + if (aParaFormat==NULL) + { + OstTrace0( TRACE_FATAL, CPARAFORMATLAYER_SENSEEFFECTIVEL, "ENullFormatPointer" ); + } __ASSERT_ALWAYS(aParaFormat!=NULL,Panic(ENullFormatPointer)); aParaFormat->Reset(); TParaFormatMask mask; @@ -390,6 +411,10 @@ EAllAttributes, all attributes are written; if EFixedAttributes, tabs, bullets and borders are not written. */ { + if (aParaFormat==NULL) + { + OstTrace0( TRACE_FATAL, CPARAFORMATLAYER_SENSEL, "ENullFormatPointer" ); + } __ASSERT_ALWAYS(aParaFormat!=NULL,Panic(ENullFormatPointer)); iStore.SenseParaFormatL(*aParaFormat,aMask,aMode);