--- a/textrendering/texthandling/stext/TXTIXSTR.CPP Tue Aug 31 17:01:26 2010 +0300
+++ b/textrendering/texthandling/stext/TXTIXSTR.CPP Wed Sep 01 12:39:40 2010 +0100
@@ -27,11 +27,6 @@
#include "TXTINDEX.H"
#include "TXTSTD.H"
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "TXTIXSTRTraces.h"
-#endif
-
#ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
#include "TXTFMLYR_INTERNAL.H"
#endif
@@ -147,10 +142,6 @@
{
RPhraseAttribsEntry& phrase=*current.iPhrase;
TPictureHeader* hdr=phrase.PictureHeaderPtr();
- if (!hdr)
- {
- OstTrace0( TRACE_DUMP, CRICHTEXTINDEX_STOREPICTURESL, "ERichTextStorePictureIntegrityError" );
- }
__ASSERT_DEBUG(hdr,Panic(ERichTextStorePictureIntegrityError));
TBool pictureInMemory=(hdr->iPicture.IsPtr() && hdr->iPicture.AsPtr());
if (pictureInMemory)
@@ -203,20 +194,12 @@
if (phrase.IsPicturePhrase())
{
TPictureHeader* hdr=phrase.PictureHeaderPtr();
- if (!hdr)
- {
- OstTrace0( TRACE_DUMP, CRICHTEXTINDEX_DETACHFROMSTOREL, "ERichTextStorePictureIntegrityError" );
- }
__ASSERT_DEBUG(hdr,Panic(ERichTextStorePictureIntegrityError));
//
if (hdr->iPicture.IsId())
{
TRAPD(r,
phrase.PictureHandleL(iText.PictureFactory(),iText.StoreResolver(),iPos.iDocPos,MLayDoc::EForceLoadTrue)); // swizzles
- if (r!=KErrNone && !hdr->iPicture.IsId())
- {
- OstTrace0( TRACE_DUMP, DUP1_CRICHTEXTINDEX_DETACHFROMSTOREL, "ERichTextStorePictureIntegrityError" );
- }
__ASSERT_DEBUG(r==KErrNone || hdr->iPicture.IsId(),Panic(ERichTextStorePictureIntegrityError));
if (r==KErrNotSupported) // we don't recognise the picture type
{
@@ -224,16 +207,10 @@
currentPos+=CurrentPhraseLength()-offsetIntoUnit;
continue;
}
-
- OstTrace1( TRACE_FATAL, DUP3_CRICHTEXTINDEX_DETACHFROMSTOREL, "Leave code=%d", r );
User::LeaveIfError(r);
}
//
// recurse the call to detach the picture from the store
- if (!hdr->iPicture.IsPtr())
- {
- OstTrace0( TRACE_DUMP, DUP2_CRICHTEXTINDEX_DETACHFROMSTOREL, "ERichTextStorePictureIntegrityError" );
- }
__ASSERT_DEBUG(hdr->iPicture.IsPtr(),Panic(ERichTextStorePictureIntegrityError));
hdr->iPicture->DetachFromStoreL(aDegree);
}
@@ -280,10 +257,6 @@
// on the specified global format layers.
//
{
- if (iParaIx->Count()!=1 || (*iParaIx)[0].iLength!=1)
- {
- OstTrace0( TRACE_FATAL, CRICHTEXTINDEX_INTERNALIZEL, "ERtIndexInternalizeCalledOnNonEmptySource" );
- }
__ASSERT_ALWAYS(iParaIx->Count()==1 && (*iParaIx)[0].iLength==1,Panic(ERtIndexInternalizeCalledOnNonEmptySource));
TRtPasteContext context(NULL,aGlobalParaLayer,aGlobalCharLayer,aStyleList);
InternalizeRtiHeaderL(aStream,context);
@@ -322,10 +295,6 @@
}
else
{
- if (phraseCount<=1)
- {
- OstTrace0( TRACE_DUMP, CRICHTEXTINDEX_GENERATEALLPHRASELINKSL, "EDebug" );
- }
__ASSERT_DEBUG(phraseCount>1,Panic(EDebug));
// If the phrase count is too great the CParaAttribs object is corrupt.
@@ -426,15 +395,7 @@
//
{
CStyleList* list = iText.StyleList();
- if (!list)
- {
- OstTrace0( TRACE_DUMP, CRICHTEXTINDEX_EXTERNALIZEREFERENCEDSTYLESL, "EStyleClipboardIntegrityError" );
- }
__ASSERT_DEBUG(list,Panic(EStyleClipboardIntegrityError));
- if (aStart.iParaElement > aEnd.iParaElement)
- {
- OstTrace0( TRACE_DUMP, DUP1_CRICHTEXTINDEX_EXTERNALIZEREFERENCEDSTYLESL, "EStyleClipboardIntegrityError" );
- }
__ASSERT_DEBUG(aStart.iParaElement <= aEnd.iParaElement,Panic(EStyleClipboardIntegrityError));
TUint8 numStyles = 0;
@@ -555,10 +516,6 @@
TInt index=iText.StyleList()->IndexByPtr(STATIC_CAST(const CParaFormatLayer*,para->iParaFormat->SenseBase()));
if (index!=KErrNotFound)
{
- if (index>=aBuf.Length())
- {
- OstTrace0( TRACE_DUMP, CRICHTEXTINDEX_MARKSTYLEREGISTER, "EStyleClipboardIntegrityError" );
- }
__ASSERT_DEBUG(index<aBuf.Length(),Panic(EStyleClipboardIntegrityError));
if (aBuf[index]!=KRegisterItemPresent)
{
@@ -577,10 +534,6 @@
// register, aBuf.
//
{
- if (aSharedCount>(TInt)KMaxTUint8)
- {
- OstTrace0( TRACE_DUMP, CRICHTEXTINDEX_EXTERNALIZEITEMSPRESENTINREGISTERL, "ESharedParaCountStreamOverflow" );
- }
__ASSERT_DEBUG(aSharedCount<=(TInt)KMaxTUint8,Panic(ESharedParaCountStreamOverflow));
aStream.WriteUint8L(aSharedCount);
CParaAttribs* currentSharedPara=NULL;
@@ -604,10 +557,6 @@
// Externalize each object from the paragraph style list that has a corresponding mark in the register aBuf.
//
{
- if (aRefStyleCount > (TInt)KMaxTUint8)
- {
- OstTrace0( TRACE_DUMP, CRICHTEXTINDEX_EXTERNALIZEITEMSPRESENTINSTYLEREGISTERL, "EStyleClipboardIntegrityError" );
- }
__ASSERT_DEBUG(aRefStyleCount <= (TInt)KMaxTUint8,Panic(EStyleClipboardIntegrityError));
aStream.WriteUint8L(aRefStyleCount);
TInt count=aBuf.Length();
@@ -679,10 +628,6 @@
phraseCount=(aEnd.iPhraseElement-aStart.iPhraseElement)+1; // copied text contained within 1 para
else
phraseCount=(aEnd.iPhraseElement-aEnd.iParaBasePhraseElement)+1;
- if (phraseCount>lastParaAttribs->iPhraseCount)
- {
- OstTrace0( TRACE_DUMP, CRICHTEXTINDEX_EXTERNALIZEPARAIXL, "ERtExternalizeParaIx" );
- }
__ASSERT_DEBUG(phraseCount<=lastParaAttribs->iPhraseCount,Panic(ERtExternalizeParaIx));
aStream.WriteInt32L(phraseCount);
if (refNo>0)
@@ -978,10 +923,6 @@
TInt match=1;
while ((currentSharedPara=iterator++)!=NULL && aOrdinal!=match)
match++;
- if (currentSharedPara==NULL)
- {
- OstTrace0( TRACE_FATAL, CRICHTEXTINDEX_SHAREDPARAATTRIBS, "EEndOfSharedParaListEncountered" );
- }
__ASSERT_ALWAYS(currentSharedPara!=NULL,Panic(EEndOfSharedParaListEncountered));
return currentSharedPara;
}
@@ -1369,11 +1310,7 @@
characterCount+=para.iLength;
}
CleanupStack::Pop(); // firstParaVirtualPhrase
-// ASSERT: At this point we have pasted all paras that were in the stream.
- if (aContext.iParasPasted!=aCompleteParaCount)
- {
- OstTrace0( TRACE_DUMP, CRICHTEXTINDEX_PASTEPARAIXL, "EPasteParaIxError" );
- }
+// ASSERT: At this point we have pasted all paras that were in the stream.
__ASSERT_DEBUG(aContext.iParasPasted==aCompleteParaCount,Panic(EPasteParaIxError));
return characterCount;
}
@@ -1397,10 +1334,6 @@
CleanupStack::Pop(2); // layer & specificParaAttribs
//
para.iParaAttribs=specificParaAttribs;
- if (para.iParaAttribs==NULL)
- {
- OstTrace0( TRACE_FATAL, CRICHTEXTINDEX_DOPASTEFIRSTINTOPARAL, "ESharedFormatsMapIntegrityError" );
- }
__ASSERT_ALWAYS(para.iParaAttribs!=NULL,Panic(ESharedFormatsMapIntegrityError));
}
else
@@ -1426,10 +1359,6 @@
if (refNo>0)
{// Link to para attribs in shared list & up its reference count
para.iParaAttribs=aMap.Item(refNo);
- if (para.iParaAttribs==NULL)
- {
- OstTrace0( TRACE_FATAL, CRICHTEXTINDEX_DOPASTEINTOPARAL, "ESharedFormatsMapIntegrityError" );
- }
__ASSERT_ALWAYS(para.iParaAttribs!=NULL,Panic(ESharedFormatsMapIntegrityError));
para.iParaAttribs->iRefCount++;
}
@@ -1462,10 +1391,6 @@
//
{
// ASSERT: Having pasted the paraIx, the para containig pastePos has had the containing phrase split at that point.
- if (aContext.iPastePos.iPhraseElementOffset!=0)
- {
- OstTrace0( TRACE_FATAL, CRICHTEXTINDEX_PASTEPHRASEIXL, "EPastePhraseIxErr" );
- }
__ASSERT_ALWAYS(aContext.iPastePos.iPhraseElementOffset==0,Panic(EPastePhraseIxErr));
TInt offset=0;
@@ -1497,10 +1422,6 @@
TBool isPicture=(TBool)aStream.ReadUint8L();
TInt phraseLength=aStream.ReadInt32L();
- if (!(isPicture && phraseLength==1 || !isPicture))
- {
- OstTrace0( TRACE_FATAL, CRICHTEXTINDEX_DOPASTEPHRASEL, "KErrCorrupt" );
- }
__ASSERT_ALWAYS(isPicture && phraseLength==1 || !isPicture,User::Leave(KErrCorrupt));
CCharFormatLayer* charLayer=CCharFormatLayer::NewL(aStream);
@@ -1543,10 +1464,7 @@
picPhrase->iCharFormat=NULL;
CleanupStack::PopAndDestroy(picPhrase);
if (r!=KErrNotSupported)
- {
- OstTrace1( TRACE_FATAL, DUP2_CRICHTEXTINDEX_DOPASTEPHRASEL, "Leave code=%d", r );
- User::Leave(r);
- }
+ User::Leave(r);
}
}
}
@@ -1571,7 +1489,6 @@
//
{
NormalizeSharedList();
- OstTrace1( TRACE_FATAL, CRICHTEXTINDEX_RBPASTESHAREDFORMATSL, "Leave code=%d", aRet );
User::Leave(aRet);
}
@@ -1626,7 +1543,6 @@
(*iParaIx)[aPos.iParaElement].iParaAttribs=iRollbackParaAttribsHandle;
iRollbackParaAttribsHandle=NULL;
}
- OstTrace1( TRACE_FATAL, CRICHTEXTINDEX_RBPASTEPARAIXL, "Leave code=%d", aRet );
User::Leave(aRet);
}
@@ -1654,6 +1570,5 @@
//
{
RbRemoveInsertedPhraseAttribsEntries(aPos.iPhraseElement,aPhraseCount);
- OstTrace1( TRACE_FATAL, CRICHTEXTINDEX_RBPASTEPHRASEIXL, "Leave code=%d", aRet );
User::Leave(aRet);
}