From 60006a36fa508dfbaf5058cfd5e8958a4d7a4188 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Matox?= Date: Fri, 6 Jun 2003 19:17:59 +0000 Subject: [PATCH] output newline and hfill correctly, (bug 1148) git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_3_X@7131 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/ChangeLog | 5 +++++ src/buffer.C | 22 +++++++++++++++++----- status.13x | 2 ++ 3 files changed, 24 insertions(+), 5 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index dd1c40f96d..3481df34d0 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2003-06-06 José Matos + + * buffer.C (simpleDocBookOnePar): output meta::newline and + meta::hfill correctly, fixes bug #1148 + 2003-06-06 José Matos * buffer.C (makeDocBookFile): fix bug #821 diff --git a/src/buffer.C b/src/buffer.C index 97fcd9cfc4..e0fcc8ee2e 100644 --- a/src/buffer.C +++ b/src/buffer.C @@ -3030,9 +3030,11 @@ void Buffer::simpleDocBookOnePar(ostream & os, } } - - if (par->isInset(i)) { - Inset * inset = par->getInset(i); + char c = par->getChar(i); + switch (c) { + case Paragraph::META_INSET: + { + Inset const * inset = par->getInset(i); // don't print the inset in position 0 if desc_on == 3 (label) if (i || desc_on != 3) { if (style->latexparam() == "CDATA") @@ -3041,8 +3043,18 @@ void Buffer::simpleDocBookOnePar(ostream & os, if (style->latexparam() == "CDATA") os << "getChar(i); + + break; + } + case Paragraph::META_NEWLINE: + os << "\n"; + break; + + case Paragraph::META_HFILL: + os << " "; + break; + + default: bool ws; string str; boost::tie(ws, str) = sgml::escapeChar(c); diff --git a/status.13x b/status.13x index df5255ed1d..49781d9933 100644 --- a/status.13x +++ b/status.13x @@ -50,3 +50,5 @@ What's new - convert old files (0.11 series) correctly, suppressing space between number and units [bug #763] + +- output newline and hfill correctly, fixes bug #1148 \ No newline at end of file