textrendering/texthandling/stext/TxtWriter.cpp
branchRCL_3
changeset 55 336bee5c2d35
parent 54 748ec5531811
equal deleted inserted replaced
54:748ec5531811 55:336bee5c2d35
    17 
    17 
    18 
    18 
    19 #include "TxtWriter.h"
    19 #include "TxtWriter.h"
    20 #include <txtetext.h>
    20 #include <txtetext.h>
    21 #include "TXTPLAIN.H"
    21 #include "TXTPLAIN.H"
    22 #include "OstTraceDefinitions.h"
       
    23 #ifdef OST_TRACE_COMPILER_IN_USE
       
    24 #include "TxtWriterTraces.h"
       
    25 #endif
       
    26 
       
    27 
    22 
    28 static const TText KLineBreak = 0x0A;//Used by TSLBTransaltor class - 0x0A, 0x0D, {0x0D, 0x0A}
    23 static const TText KLineBreak = 0x0A;//Used by TSLBTransaltor class - 0x0A, 0x0D, {0x0D, 0x0A}
    29                               //character aequences found in the input stream will be translated 
    24                               //character aequences found in the input stream will be translated 
    30                               //to KLineBreak character.
    25                               //to KLineBreak character.
    31 
    26 
   102 @param aChar Input character to be processed. It can't be 0x0D, but it could be 0x0A - identified
    97 @param aChar Input character to be processed. It can't be 0x0D, but it could be 0x0A - identified
   103              line break.
    98              line break.
   104 */
    99 */
   105 void TParagraphTextWriter::WriteL(TText aChar)
   100 void TParagraphTextWriter::WriteL(TText aChar)
   106 	{
   101 	{
   107 	if (aChar == 0x0D)
       
   108 	    {
       
   109 	    OstTrace0( TRACE_DUMP, TPARAGRAPHTEXTWRITER_WRITEL, "Invariant" );
       
   110 	    }
       
   111 	__ASSERT_DEBUG(aChar != 0x0D, User::Invariant());
   102 	__ASSERT_DEBUG(aChar != 0x0D, User::Invariant());
   112 	if(aChar == KLineBreak)
   103 	if(aChar == KLineBreak)
   113 		{
   104 		{
   114 		iOutputChar.OutputCharL(CEditableText::EParagraphDelimiter);
   105 		iOutputChar.OutputCharL(CEditableText::EParagraphDelimiter);
   115 		}
   106 		}
   133 @param aChar Input character to be processed. It can't be 0x0D, but it could be 0x0A - identified
   124 @param aChar Input character to be processed. It can't be 0x0D, but it could be 0x0A - identified
   134              line break.
   125              line break.
   135 */
   126 */
   136 void TLineTextWriter::WriteL(TText aChar)
   127 void TLineTextWriter::WriteL(TText aChar)
   137 	{
   128 	{
   138 	if (aChar == 0x0D)
       
   139 	    {
       
   140 	    OstTrace0( TRACE_DUMP, TLINETEXTWRITER_WRITEL, "Invariant" );
       
   141 	    }
       
   142 	__ASSERT_DEBUG(aChar != 0x0D, User::Invariant());
   129 	__ASSERT_DEBUG(aChar != 0x0D, User::Invariant());
   143 	TText prevChar = iPrevChar;
   130 	TText prevChar = iPrevChar;
   144 	iPrevChar = aChar;
   131 	iPrevChar = aChar;
   145 	if(aChar != KLineBreak)
   132 	if(aChar != KLineBreak)
   146 		{
   133 		{