textrendering/texthandling/stext/TXTSCAN.CPP
branchRCL_3
changeset 55 336bee5c2d35
parent 54 748ec5531811
--- a/textrendering/texthandling/stext/TXTSCAN.CPP	Tue Aug 31 17:01:26 2010 +0300
+++ b/textrendering/texthandling/stext/TXTSCAN.CPP	Wed Sep 01 12:39:40 2010 +0100
@@ -18,11 +18,6 @@
 
 #include "TXTETEXT.H"
 #include "TXTSTD.H"
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "TXTSCANTraces.h"
-#endif
-
 
 
 EXPORT_C TInt CPlainText::CharPosOfParagraph(TInt& aLength,TInt aParaOffset)const
@@ -66,10 +61,6 @@
 	{
 	__TEST_INVARIANT;
 
-	if (aPos<0 || aPos>DocumentLength())
-	    {
-	    OstTrace0( TRACE_FATAL, CPLAINTEXT_PARAGRAPHNUMBERFORPOS, "ECharPosBeyondDocument" );
-	    }
 	__ASSERT_ALWAYS(aPos>=0 && aPos<=DocumentLength(),Panic(ECharPosBeyondDocument));
 	TUint scanMask=(EScanBackwards|EScanStayIfBoundary|EScanToUnitStart);
 	ScanParas(aPos,scanMask);
@@ -102,10 +93,6 @@
 	{
 	__TEST_INVARIANT;
 
-	if (aCurrentPos<0 || aCurrentPos>DocumentLength())
-	    {
-	    OstTrace0( TRACE_FATAL, CPLAINTEXT_GETWORDINFO, "ECharPosBeyondDocument" );
-	    }
 	__ASSERT_ALWAYS(aCurrentPos>=0 && aCurrentPos<=DocumentLength(),Panic(ECharPosBeyondDocument));
 	aStartPos=aLength=aCurrentPos;
 	// First find the start of the word.
@@ -125,10 +112,6 @@
 		scanMask|=EScanPunctuationIsDelimiter;
 	ScanWords(aLength,scanMask);
 	aLength-=aStartPos;
-	if (aLength+aStartPos>(DocumentLength()+1))
-	    {
-	    OstTrace0( TRACE_DUMP, DUP2_CPLAINTEXT_GETWORDINFO, "ECharPosBeyondDocument" );
-	    }
 	__ASSERT_DEBUG(aLength+aStartPos<=(DocumentLength()+1),Panic(ECharPosBeyondDocument));
 
 	__TEST_INVARIANT;
@@ -145,10 +128,6 @@
 paragraph. */
 	{
 	__TEST_INVARIANT;
-	if (aPos<0 || aPos>DocumentLength())
-	    {
-	    OstTrace0( TRACE_FATAL, CPLAINTEXT_TOPARAGRAPHSTART, "ECharPosBeyondDocument" );
-	    }
 	__ASSERT_ALWAYS(aPos>=0 && aPos<=DocumentLength(),Panic(ECharPosBeyondDocument));
 
 	int skipped = 0;
@@ -234,10 +213,6 @@
 CPlainText::EScanBackwards. 
 @return The number of characters skipped to reach the new document position. */
 	{
-	if (aPos<0 || aPos>DocumentLength())
-	    {
-	    OstTrace0( TRACE_FATAL, CPLAINTEXT_SCANWORDS, "ECharPosBeyondDocument" );
-	    }
 	__ASSERT_ALWAYS(aPos>=0 && aPos<=DocumentLength(),Panic(ECharPosBeyondDocument));
 	SScanData scanData;
 	InitScanControl(aPos,aScanMask,EUnitIsWord,scanData);
@@ -261,10 +236,6 @@
 CPlainText::EScanBackwards. 
 @return The number of characters skipped to reach the new document position. */
 	{
-	if (aPos<0 || aPos>DocumentLength())
-	    {
-	    OstTrace0( TRACE_FATAL, CPLAINTEXT_SCANPARAS, "ECharPosBeyondDocument" );
-	    }
 	__ASSERT_ALWAYS(aPos>=0 && aPos<=DocumentLength(),Panic(ECharPosBeyondDocument));
 	SScanData scanData;
 	InitScanControl(aPos,aScanMask,EUnitIsParagraph,scanData);