Lines Matching refs:context
91 write_text(conversion_context &context, const char *text, size_t length,
95 if (context.new_line) {
96 prefix = context.first_line_indent;
97 context.new_line = false;
104 write_text(context, " ", 1, target);
118 write_text(conversion_context &context, const char *text,
121 return write_text(context, text, strlen(text), target);
126 next_line(conversion_context &context, const char *prefix,
130 context.new_line = true;
145 write_unicode_char(conversion_context &context, uint32 c,
170 return write_text(context, bytes, length, target);
175 process_command(conversion_context &context, RTF::Command *command,
182 return next_line(context, "\n", target);
186 context.section++;
187 return next_line(context, "\n", target);
191 context.page++;
192 return next_line(context, "\n\n", target);
195 return write_text(context, "\t", target);
198 return write_unicode_char(context, command->Option(), target);
203 context.first_line_indent = 0;
210 context.first_line_indent = (command->Option() + 50) / 100;
211 if (context.first_line_indent < 0)
212 context.first_line_indent = 0;
213 if (context.first_line_indent > 8)
214 context.first_line_indent = 8;
223 snprintf(buffer, sizeof(buffer), "%" B_PRId32, context.section);
224 return write_text(context, buffer, target);
227 context.start_page = command->HasOption() ? command->Option() : 1;
231 context.page = context.start_page;
236 snprintf(buffer, sizeof(buffer), "%" B_PRId32, context.page);
237 return write_text(context, buffer, target);