]> git.lyx.org Git - lyx.git/blobdiff - src/output_docbook.C
Fix bug 886 and others not reported related with the document paper size.
[lyx.git] / src / output_docbook.C
index 152ab9d380adf6513343b78824582a1ba0a5986b..ddb95b08424e8a5ce41b4920bdf8823e8ea384de 100644 (file)
 #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"
 
@@ -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;
@@ -231,7 +233,7 @@ ParagraphList::const_iterator makeCommand(Buffer const & buf,
        // Label around sectioning number:
        if (!bstyle->labeltag().empty()) {
                sgml::openTag(os, bstyle->labeltag());
-               os << expandLabel(buf.params().getLyXTextClass(), bstyle, false);
+               os << expandLabel(buf, bstyle, false);
                sgml::closeTag(os, bstyle->labeltag());
        }