X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Foutput_docbook.C;h=f398c8b76fa0bfc02e2ee70bf41b7b83a4b970a0;hb=530749439472bddf13d9f4ee74ee6184ef76e3f9;hp=ead3b3cc31d11edb5c9c5bc35d2202cc61a8717f;hpb=1ecc7b79cdf95de50f2683fb7a8f983b5dcdf0d2;p=lyx.git diff --git a/src/output_docbook.C b/src/output_docbook.C index ead3b3cc31..f398c8b76f 100644 --- a/src/output_docbook.C +++ b/src/output_docbook.C @@ -14,12 +14,13 @@ #include "output_docbook.h" #include "buffer.h" +#include "buffer_funcs.h" #include "bufferparams.h" #include "counters.h" #include "debug.h" -#include "lyxtext.h" #include "paragraph.h" #include "paragraph_funcs.h" +#include "ParagraphList_fwd.h" #include "ParagraphParameters.h" #include "sgml.h" @@ -27,7 +28,7 @@ #include "support/lstrings.h" #include "support/lyxlib.h" -#include "support/tostr.h" +#include "support/convert.h" #include "support/types.h" #ifdef HAVE_LOCALE @@ -88,7 +89,7 @@ ParagraphList::const_iterator searchEnvironment(ParagraphList::const_iterator co if(p->params().depth() < par->params().depth()) return p; - if( style->latexname() != bstyle->latexname() and p->params().depth() == par->params().depth() ) + if( style->latexname() != bstyle->latexname() && p->params().depth() == par->params().depth() ) return p; } return pend; @@ -104,13 +105,14 @@ ParagraphList::const_iterator makeParagraph(Buffer const & buf, { LyXLayout_ptr const & defaultstyle = buf.params().getLyXTextClass().defaultLayout(); for(ParagraphList::const_iterator par = pbegin; par != pend; ++par) { + if (par != pbegin) + os << '\n'; if (par->layout() == defaultstyle && par->emptyTag()) { par->simpleDocBookOnePar(buf, os, runparams, outerFont(par - paragraphs.begin(), paragraphs)); } else { sgml::openTag(buf, os, runparams, *par); par->simpleDocBookOnePar(buf, os, runparams, outerFont(par - paragraphs.begin(), paragraphs)); sgml::closeTag(os, *par); - os << '\n'; } } return pend; @@ -132,7 +134,7 @@ ParagraphList::const_iterator makeEnvironment(Buffer const & buf, // Opening outter tag sgml::openTag(buf, os, runparams, *pbegin); os << '\n'; - if (bstyle->latextype == LATEX_ENVIRONMENT and bstyle->pass_thru) + if (bstyle->latextype == LATEX_ENVIRONMENT && bstyle->pass_thru) os << "latextype == LATEX_ENVIRONMENT and bstyle->pass_thru) + if (bstyle->latextype == LATEX_ENVIRONMENT && bstyle->pass_thru) os << "]]>"; // Closing outter tag @@ -235,7 +237,7 @@ ParagraphList::const_iterator makeCommand(Buffer const & buf, sgml::closeTag(os, bstyle->labeltag()); } - // Opend inner tag and close inner tags + // Opend inner tag and close inner tags sgml::openTag(os, bstyle->innertag()); par->simpleDocBookOnePar(buf, os, runparams, outerFont(par - paragraphs.begin(), paragraphs)); sgml::closeTag(os, bstyle->innertag());