#include "Buffer.h"
#include "BufferParams.h"
-#include "debug.h"
-#include "gettext.h"
+#include "support/debug.h"
+#include "support/gettext.h"
+#include "Layout.h"
#include "output.h"
#include "OutputParams.h"
#include "Paragraph.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)
//--
// 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) {
char_type c = par.getUChar(buf.params(), i);
- if (c == Paragraph::META_INSET || c == ' ') {
+ if (par.isInset(i) || c == ' ') {
if (runparams.linelen > 0 &&
currlinelen + word.length() > runparams.linelen) {
os << '\n';
word.erase();
}
- switch (c) {
- case Paragraph::META_INSET: {
+ if (par.isInset(i)) {
OutputParams rp = runparams;
rp.depth = par.params().depth();
int len = par.getInset(i)->plaintext(buf, os, rp);
currlinelen = len - Inset::PLAINTEXT_NEWLINE;
else
currlinelen += len;
- break;
+ continue;
}
+ switch (c) {
case ' ':
os << ' ';
currlinelen++;
break;
case '\0':
- LYXERR(Debug::INFO) <<
- "writePlaintextFile: NULL char in structure." << endl;
+ LYXERR(Debug::INFO, "writePlaintextFile: NULL char in structure.");
break;
default: