]> git.lyx.org Git - lyx.git/blobdiff - src/output_plaintext.cpp
Add doxy.
[lyx.git] / src / output_plaintext.cpp
index d12c82b85cc3f70c8e52b3d3b0edc1c1750559fc..09d7a3847cbeedf87230b3c00b8b6d6a6491bb65 100644 (file)
@@ -14,8 +14,6 @@
 
 #include "Buffer.h"
 #include "BufferParams.h"
-#include "debug.h"
-#include "gettext.h"
 #include "Layout.h"
 #include "output.h"
 #include "OutputParams.h"
 #include "ParagraphList.h"
 #include "ParagraphParameters.h"
 
+#include "support/debug.h"
+#include "support/gettext.h"
 #include "support/lstrings.h"
 
+using namespace std;
+using namespace lyx::support;
 
 namespace lyx {
 
-using support::ascii_lowercase;
-using support::compare_ascii_no_case;
-using support::contains;
-using support::FileName;
-
-using std::endl;
-using std::ostream;
-using std::pair;
-using std::string;
-
 
 void writePlaintextFile(Buffer const & buf, FileName const & fname,
        OutputParams const & runparams)
@@ -66,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)
@@ -76,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,
@@ -90,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;
@@ -132,7 +119,7 @@ void writePlaintextParagraph(Buffer const & buf,
 
        //--
        // we should probably change to the paragraph language in the
-       // gettext here (if possible) so that strings are output in
+       // support/gettext.here (if possible) so that strings are output in
        // the correct language! (20012712 Jug)
        //--
        switch (ltype) {
@@ -208,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