[EMAIL PROTECTED] writes: | Author: schmitt | Date: Tue Feb 20 18:56:55 2007 | New Revision: 17276 | | URL: http://www.lyx.org/trac/changeset/17276 | Log: | * src/output_plaintext.C: use InsetBase::PLAINTEXT_NEWLINE; refactor | some common code; remove obsolete comments | | Modified: | lyx-devel/trunk/src/output_plaintext.C | | Modified: lyx-devel/trunk/src/output_plaintext.C | URL: http://www.lyx.org/trac/file/lyx-devel/trunk/src/output_plaintext.C?rev=17276 | ============================================================================== | --- lyx-devel/trunk/src/output_plaintext.C (original) | +++ lyx-devel/trunk/src/output_plaintext.C Tue Feb 20 18:56:55 2007 | @@ -192,12 +186,13 @@ | docstring word; | | for (pos_type i = 0; i < par.size(); ++i) { | - if (par.isDeleted(i)) // deleted characters don't make much sense in plain text output | + // deleted characters don't make much sense in plain text output | + if (par.isDeleted(i)) | continue; | | char_type c = par.getUChar(buf.params(), i); | - switch (c) { | - case Paragraph::META_INSET: { | + | + if (c == Paragraph::META_INSET || c == ' ') { | if (runparams.linelen > 0 && | currlinelen + word.length() > runparams.linelen) { | os << '\n';
I wonder... it is wise to compare ucs4 chars directly to chars? Or should be wrap it up? (same for direct comparion to META_INSET really...) is_inset(c) || is_space(c) -- Lgb