textrendering/textformatting/tbox/CARET.CPP
branchRCL_3
changeset 17 336bee5c2d35
parent 16 748ec5531811
--- a/textrendering/textformatting/tbox/CARET.CPP	Tue Aug 31 17:01:26 2010 +0300
+++ b/textrendering/textformatting/tbox/CARET.CPP	Wed Sep 01 12:39:40 2010 +0100
@@ -20,11 +20,6 @@
 #include "FRMLAYDT.H"
 #include "FRMCONST.H"
 
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "CARETTraces.h"
-#endif
-
 #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
 #include "FRMCONST_INTERNAL.H"
 #include "FRMCONST_PARTNER.H"
@@ -42,11 +37,6 @@
 
 void TCursorPosition::CheckSelection(TBool aSelect)
 	{
-	if (IsSelection() && iDocPos.iPos == iAnchor)
-	    {
-	    OstTrace0( TRACE_DUMP, TCURSORPOSITION_CHECKSELECTION, "EFSelectedRangeZeroLen" );
-	    }
-	    
 	__ASSERT_DEBUG(!IsSelection() || iDocPos.iPos != iAnchor,FormPanic(EFSelectedRangeZeroLen));
 	CheckNullSelection();
 	TUint drawSelectionFlags = 0;
@@ -117,10 +107,6 @@
 	TInt extraScroll;
 	TBool cursorVisible = EFalse;
 
-	if (aSelection.iCursorPos<0 || aSelection.iCursorPos>iLayout->DocumentLength())
-	    {
-	    OstTrace0( TRACE_DUMP, TCURSORPOSITION_SETSELECTIONL, "EFInvalidDocPos" );
-	    }
 	__ASSERT_DEBUG(aSelection.iCursorPos>=0 && aSelection.iCursorPos<=iLayout->DocumentLength()
 																		,FormPanic(EFInvalidDocPos));
 	iLayout->PosRangeInBand(firstVisChar);
@@ -301,10 +287,6 @@
 	CheckSelection(aDragSelectOn);
 	DoSetXyPos(aPos);
 	TRAPD(ret,pixels=CheckCursorOnScreenL(aPos.iY));
-	if (ret)
-	    {
-	    OstTrace0( TRACE_FATAL, TCURSORPOSITION_SETXYPOSL, "EFShouldNotLeave" );
-	    }
 	__ASSERT_ALWAYS(!ret,FormPanic(EFShouldNotLeave));
 	UpdateLatentX(aPos.iX);
 	UpdateLatentY(aPos.iY);
@@ -566,10 +548,6 @@
 TBool TCursorPosition::LeftRightL(TTmPosInfo2& aPos, TTmLineInfo& aLine, TMovementType& aMove)
 	{
 	TTmPosInfo2 posInfo;
-	if (!(aMove == EFLeft || aMove == EFRight))
-	    {
-	    OstTrace0( TRACE_DUMP, TCURSORPOSITION_LEFTRIGHTL, "EFIncorrectCursorMovement" );
-	    }
 	__ASSERT_DEBUG(aMove == EFLeft || aMove == EFRight,
 		FormPanic(EFIncorrectCursorMovement));
 	TBool found = EFalse;
@@ -635,10 +613,6 @@
 @param aLine Returns details of the line containing aPos.*/
 void TCursorPosition::StartEnd(TTmPosInfo2& aPos, TTmLineInfo& aLine, TMovementType& aMove)
 	{
-	if (aMove != EFLineBeg && aMove != EFLineEnd)
-	    {
-	    OstTrace0( TRACE_DUMP, TCURSORPOSITION_STARTEND, "EFIncorrectCursorMovement" );
-	    }
 	__ASSERT_DEBUG(aMove == EFLineBeg || aMove == EFLineEnd,
 		FormPanic(EFIncorrectCursorMovement));
 	iLayout->FindDocPos(iDocPos, aPos, &aLine);
@@ -658,10 +632,6 @@
 @param aLine returns details of the line containing aPos. */
 void TCursorPosition::UpDownL(TTmPosInfo2& aPos, TTmLineInfo& aLine, TMovementType& aMove)
 	{
-	if (aMove != EFLineUp && aMove != EFLineDown)
-	    {
-	    OstTrace0( TRACE_DUMP, TCURSORPOSITION_UPDOWNL, "EFIncorrectCursorMovement" );
-	    }
 	__ASSERT_DEBUG(aMove == EFLineUp || aMove == EFLineDown,
 		FormPanic(EFIncorrectCursorMovement));
 	iLayout->FindDocPos(iDocPos, aPos, &aLine);
@@ -707,10 +677,6 @@
 // Move the display one page and put the cursor back in the same place (as far as possible).
 TInt TCursorPosition::PageScrollL(TMovementType& aMove)
 	{
-	if (aMove!=EFPageUp && aMove!=EFPageDown)
-	    {
-	    OstTrace0( TRACE_DUMP, TCURSORPOSITION_PAGESCROLLL, "EFIncorrectCursorMovement" );
-	    }
 	__ASSERT_DEBUG(aMove==EFPageUp || aMove==EFPageDown,FormPanic(EFIncorrectCursorMovement));
 	TPoint scrPos;
 	TInt pixelsScrolled;
@@ -759,10 +725,6 @@
 	TInt pixels=0;
 
 	iLayout->GetLineRect(aY,cursorLine);
-	if (cursorLine.iTl.iY>aY || cursorLine.iBr.iY<aY)
-	    {
-	    OstTrace0( TRACE_DUMP, TCURSORPOSITION_CHECKCURSORONSCREENL, "EFPixelNotInFormattedLine" );
-	    }
 	__ASSERT_DEBUG(cursorLine.iTl.iY<=aY && cursorLine.iBr.iY>=aY,FormPanic(EFPixelNotInFormattedLine));
 	if (cursorLine.iTl.iY<0 && cursorLine.iBr.iY<botRow)
 		linesToScroll=1;
@@ -774,16 +736,7 @@
 
 		aY+=pixels;
 		}
-	if (aY<0 && aY>=botRow)
-	    {
-	    OstTrace0( TRACE_DUMP, DUP1_TCURSORPOSITION_CHECKCURSORONSCREENL, "EFCursorOffDisplay" );
-	    }
 	__ASSERT_DEBUG(aY>=0 || aY<botRow,FormPanic(EFCursorOffDisplay));
-	if (!(cursorLine.Height()>=botRow || cursorLine.iBr.iY>=botRow 
-	        || (cursorLine.iTl.iY+pixels>=0 && cursorLine.iBr.iY+pixels<=botRow)) )
-	    {
-	    OstTrace0( TRACE_DUMP, DUP2_TCURSORPOSITION_CHECKCURSORONSCREENL, "EFCursorOffDisplay" );
-	    }
 	__ASSERT_DEBUG(cursorLine.Height()>=botRow || cursorLine.iBr.iY>=botRow 
 		|| (cursorLine.iTl.iY+pixels>=0 && cursorLine.iBr.iY+pixels<=botRow),FormPanic(EFCursorOffDisplay));
 	return pixels;