/**
- * \file src/text.cpp
+ * \file src/Text.cpp
* This file is part of LyX, the document processor.
* Licence details can be found in the file COPYING.
*
#include "Cursor.h"
#include "ParIterator.h"
#include "CutAndPaste.h"
-#include "debug.h"
#include "DispatchResult.h"
#include "Encoding.h"
#include "ErrorList.h"
#include "FuncRequest.h"
#include "factory.h"
#include "FontIterator.h"
-#include "gettext.h"
#include "Language.h"
#include "Length.h"
#include "Lexer.h"
#include "insets/InsetSpecialChar.h"
#include "insets/InsetTabular.h"
+#include "support/convert.h"
+#include "support/debug.h"
#include "support/docstream.h"
+#include "support/gettext.h"
#include "support/lstrings.h"
#include "support/textutils.h"
-#include "support/convert.h"
-#include <boost/current_function.hpp>
#include <boost/next_prior.hpp>
#include <sstream>
using std::auto_ptr;
-using std::advance;
-using std::distance;
-using std::max;
-using std::min;
-using std::endl;
using std::string;
namespace lyx {
par.params().read(lex);
} else if (token == "\\end_layout") {
- lyxerr << BOOST_CURRENT_FUNCTION
- << ": Solitary \\end_layout in line "
- << lex.getLineNo() << "\n"
- << "Missing \\begin_layout?.\n";
+ LYXERR0("Solitary \\end_layout in line " << lex.getLineNo() << "\n"
+ << "Missing \\begin_layout ?");
} else if (token == "\\end_inset") {
- lyxerr << BOOST_CURRENT_FUNCTION
- << ": Solitary \\end_inset in line "
- << lex.getLineNo() << "\n"
- << "Missing \\begin_inset?.\n";
+ LYXERR0("Solitary \\end_inset in line " << lex.getLineNo() << "\n"
+ << "Missing \\begin_inset ?");
} else if (token == "\\begin_inset") {
Inset * inset = readInset(lex, buf);
if (inset)
}
} else if (token == "\\backslash") {
par.appendChar('\\', font, change);
+ } else if (token == "\\linebreak") {
+ auto_ptr<Inset> inset(new InsetLinebreak);
+ inset->read(buf, lex);
+ par.insertInset(par.size(), inset.release(), font, change);
} else if (token == "\\newline") {
auto_ptr<Inset> inset(new InsetNewline);
inset->read(buf, lex);
lex.eatLine();
std::istringstream is(lex.getString());
unsigned int aid;
- time_type ct;
+ time_t ct;
is >> aid >> ct;
if (aid >= bp.author_map.size()) {
errorList.push_back(ErrorItem(_("Change tracking error"),
lex.eatLine();
std::istringstream is(lex.getString());
unsigned int aid;
- time_type ct;
+ time_t ct;
is >> aid >> ct;
if (aid >= bp.author_map.size()) {
errorList.push_back(ErrorItem(_("Change tracking error"),
--from.pos();
break;
case NEXT_WORD:
- lyxerr << "Text::getWord: NEXT_WORD not implemented yet"
- << endl;
+ LYXERR0("Text::getWord: NEXT_WORD not implemented yet");
break;
case PARTIAL_WORD:
// no need to move the 'from' cursor
} else if (token == "\\begin_deeper") {
++depth;
} else if (token == "\\end_deeper") {
- if (!depth) {
+ if (!depth)
lex.printError("\\end_deeper: " "depth is already null");
- } else {
+ else
--depth;
- }
} else {
- lyxerr << "Handling unknown body token: `"
- << token << '\'' << endl;
+ LYXERR0("Handling unknown body token: `" << token << '\'');
}
}
return true;