equal
deleted
inserted
replaced
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 |
22 |
27 |
23 static const TText KLineBreak = 0x0A;//Used by TSLBTransaltor class - 0x0A, 0x0D, {0x0D, 0x0A} |
28 static const TText KLineBreak = 0x0A;//Used by TSLBTransaltor class - 0x0A, 0x0D, {0x0D, 0x0A} |
24 //character aequences found in the input stream will be translated |
29 //character aequences found in the input stream will be translated |
25 //to KLineBreak character. |
30 //to KLineBreak character. |
26 |
31 |
97 @param aChar Input character to be processed. It can't be 0x0D, but it could be 0x0A - identified |
102 @param aChar Input character to be processed. It can't be 0x0D, but it could be 0x0A - identified |
98 line break. |
103 line break. |
99 */ |
104 */ |
100 void TParagraphTextWriter::WriteL(TText aChar) |
105 void TParagraphTextWriter::WriteL(TText aChar) |
101 { |
106 { |
|
107 if (aChar == 0x0D) |
|
108 { |
|
109 OstTrace0( TRACE_DUMP, TPARAGRAPHTEXTWRITER_WRITEL, "Invariant" ); |
|
110 } |
102 __ASSERT_DEBUG(aChar != 0x0D, User::Invariant()); |
111 __ASSERT_DEBUG(aChar != 0x0D, User::Invariant()); |
103 if(aChar == KLineBreak) |
112 if(aChar == KLineBreak) |
104 { |
113 { |
105 iOutputChar.OutputCharL(CEditableText::EParagraphDelimiter); |
114 iOutputChar.OutputCharL(CEditableText::EParagraphDelimiter); |
106 } |
115 } |
124 @param aChar Input character to be processed. It can't be 0x0D, but it could be 0x0A - identified |
133 @param aChar Input character to be processed. It can't be 0x0D, but it could be 0x0A - identified |
125 line break. |
134 line break. |
126 */ |
135 */ |
127 void TLineTextWriter::WriteL(TText aChar) |
136 void TLineTextWriter::WriteL(TText aChar) |
128 { |
137 { |
|
138 if (aChar == 0x0D) |
|
139 { |
|
140 OstTrace0( TRACE_DUMP, TLINETEXTWRITER_WRITEL, "Invariant" ); |
|
141 } |
129 __ASSERT_DEBUG(aChar != 0x0D, User::Invariant()); |
142 __ASSERT_DEBUG(aChar != 0x0D, User::Invariant()); |
130 TText prevChar = iPrevChar; |
143 TText prevChar = iPrevChar; |
131 iPrevChar = aChar; |
144 iPrevChar = aChar; |
132 if(aChar != KLineBreak) |
145 if(aChar != KLineBreak) |
133 { |
146 { |