textrendering/textformatting/tbox/FRMPRINT.CPP
branchRCL_3
changeset 17 336bee5c2d35
parent 16 748ec5531811
equal deleted inserted replaced
16:748ec5531811 17:336bee5c2d35
    17 
    17 
    18 
    18 
    19 #include "FRMPRINT.H"
    19 #include "FRMPRINT.H"
    20 #include "FRMCONST.H"
    20 #include "FRMCONST.H"
    21 
    21 
    22 #include "OstTraceDefinitions.h"
       
    23 #ifdef OST_TRACE_COMPILER_IN_USE
       
    24 #include "FRMPRINTTraces.h"
       
    25 #endif
       
    26 
       
    27 #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
    22 #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
    28 #include "FRMCONST_INTERNAL.H"
    23 #include "FRMCONST_INTERNAL.H"
    29 #include "FRMCONST_PARTNER.H"
    24 #include "FRMCONST_PARTNER.H"
    30 #endif
    25 #endif
    31 
    26 
   155 EXPORT_C void CTextPageRegionPrinter::PrintBandL(CGraphicsDevice* aImageDevice,TInt aPageNo,const TBandAttributes& aBandInPixels)
   150 EXPORT_C void CTextPageRegionPrinter::PrintBandL(CGraphicsDevice* aImageDevice,TInt aPageNo,const TBandAttributes& aBandInPixels)
   156 //
   151 //
   157 // Traps leaves
   152 // Traps leaves
   158 //
   153 //
   159 	{
   154 	{
   160 	if (!iPageList)
       
   161 	    {
       
   162 	    OstTrace0( TRACE_FATAL, DUP1_CTEXTPAGEREGIONPRINTER_PRINTBANDL, "EFInvalidPageList" );
       
   163 	    }
       
   164 	__ASSERT_ALWAYS(iPageList!=NULL,FormPanic(EFInvalidPageList));
   155 	__ASSERT_ALWAYS(iPageList!=NULL,FormPanic(EFInvalidPageList));
   165 	if (aPageNo-iFirstPage>=iPageList->Count())
       
   166 	    {
       
   167 	    OstTrace0( TRACE_DUMP, CTEXTPAGEREGIONPRINTER_PRINTBANDL, "EFInvalidPageNumber" );
       
   168 	    }
       
   169 	if (aPageNo<iFirstPage)
       
   170 	    {
       
   171 	    OstTrace0( TRACE_DUMP, DUP2_CTEXTPAGEREGIONPRINTER_PRINTBANDL, "EFInvalidPageNumber" );
       
   172 	    }
       
   173 	__ASSERT_DEBUG(aPageNo-iFirstPage<iPageList->Count(),FormPanic(EFInvalidPageNumber));
   156 	__ASSERT_DEBUG(aPageNo-iFirstPage<iPageList->Count(),FormPanic(EFInvalidPageNumber));
   174 	__ASSERT_DEBUG(aPageNo>=iFirstPage,FormPanic(EFInvalidPageNumber));
   157 	__ASSERT_DEBUG(aPageNo>=iFirstPage,FormPanic(EFInvalidPageNumber));
   175 
   158 
   176 	TRAPD(err,PrintBand2L(aImageDevice,aPageNo,aBandInPixels));
   159 	TRAPD(err,PrintBand2L(aImageDevice,aPageNo,aBandInPixels));
   177 	if (err)
   160 	if (err)
   399 	delete iGc;
   382 	delete iGc;
   400 	iGc=NULL;
   383 	iGc=NULL;
   401 
   384 
   402 	delete iPictureGc;
   385 	delete iPictureGc;
   403 	iPictureGc=NULL;
   386 	iPictureGc=NULL;
   404 	
   387 
   405 	OstTrace1( TRACE_FATAL, CTEXTPAGEREGIONPRINTER_LEAVEL, "CTextPageRegionPrinter::LeaveL;aErr=%d", aErr );
       
   406 	User::Leave(aErr);
   388 	User::Leave(aErr);
   407 	}
   389 	}
   408 
   390