]> git.lyx.org Git - lyx.git/blobdiff - src/output_plaintext.cpp
Further to r26743, add CustomPars and ForcePlain layout tags to InsetLayout,
[lyx.git] / src / output_plaintext.cpp
index ca67db49284b9d697a5f71e4fb3c206fd3b0e991..0619b0668c86d8fd7d92fc4df5f234add8192f93 100644 (file)
@@ -45,7 +45,7 @@ void writePlaintextFile(Buffer const & buf, odocstream & os,
        OutputParams const & runparams)
 {
        bool ref_printed = false;
-       ParagraphList const par = buf.paragraphs();
+       ParagraphList const par = buf.paragraphs();
        ParagraphList::const_iterator beg = par.begin();
        ParagraphList::const_iterator end = par.end();
        ParagraphList::const_iterator it = beg;
@@ -58,9 +58,7 @@ void writePlaintextFile(Buffer const & buf, odocstream & os,
 }
 
 
-namespace {
-
-pair<int, docstring> const addDepth(int depth, int ldepth)
+static pair<int, docstring> addDepth(int depth, int ldepth)
 {
        int d = depth * 2;
        if (ldepth > depth)
@@ -68,9 +66,6 @@ pair<int, docstring> const addDepth(int depth, int ldepth)
        return make_pair(d, docstring(d, ' '));
 }
 
-}
-
-
 void writePlaintextParagraph(Buffer const & buf,
                    Paragraph const & par,
                    odocstream & os,
@@ -82,7 +77,7 @@ void writePlaintextParagraph(Buffer const & buf,
        depth_type depth = par.params().depth();
 
        // First write the layout
-       string const tmp = to_utf8(par.layout()->name());
+       string const tmp = to_utf8(par.layout().name());
        if (compare_ascii_no_case(tmp, "itemize") == 0) {
                ltype = 1;
                ltype_depth = depth + 1;
@@ -200,7 +195,7 @@ void writePlaintextParagraph(Buffer const & buf,
                if (par.isInset(i)) {
                        OutputParams rp = runparams;
                        rp.depth = par.params().depth();
-                       int len = par.getInset(i)->plaintext(buf, os, rp);
+                       int len = par.getInset(i)->plaintext(os, rp);
                        if (len >= Inset::PLAINTEXT_NEWLINE)
                                currlinelen = len - Inset::PLAINTEXT_NEWLINE;
                        else
@@ -215,7 +210,7 @@ void writePlaintextParagraph(Buffer const & buf,
                        break;
 
                case '\0':
-                       LYXERR(Debug::INFO, "writePlaintextFile: NULL char in structure.");
+                       LYXERR(Debug::INFO, "writePlaintextFile: NUL char in structure.");
                        break;
 
                default: