mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-07 12:32:26 +00:00
Get rid of Token::asString(), which is equivalent to cs().
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32439 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
52061b8313
commit
ccfcd71b36
@ -110,12 +110,6 @@ ostream & operator<<(ostream & os, Token const & t)
|
||||
}
|
||||
|
||||
|
||||
string Token::asString() const
|
||||
{
|
||||
return cs_;
|
||||
}
|
||||
|
||||
|
||||
string Token::asInput() const
|
||||
{
|
||||
if (cat_ == catComment)
|
||||
@ -492,7 +486,7 @@ string Parser::verbatimOption()
|
||||
putback();
|
||||
res += '{' + verbatim_item() + '}';
|
||||
} else
|
||||
res += t.asString();
|
||||
res += t.cs();
|
||||
}
|
||||
}
|
||||
return res;
|
||||
|
@ -77,14 +77,12 @@ public:
|
||||
///
|
||||
Token(docstring const & cs, CatCode cat) : cs_(to_utf8(cs)), cat_(cat) {}
|
||||
|
||||
///
|
||||
/// Returns the token as string
|
||||
std::string const & cs() const { return cs_; }
|
||||
/// Returns the catcode of the token
|
||||
CatCode cat() const { return cat_; }
|
||||
///
|
||||
char character() const { return cs_.empty() ? 0 : cs_[0]; }
|
||||
/// Returns the token as string
|
||||
std::string asString() const;
|
||||
/// Returns the token verbatim
|
||||
std::string asInput() const;
|
||||
|
||||
|
@ -347,7 +347,7 @@ void handle_package(Parser &p, string const & name, string const & opts,
|
||||
if (opts.find(",") == string::npos && one_language == true) {
|
||||
if (opts == "ascii")
|
||||
//change ascii to auto to be in the unicode range, see
|
||||
//http://bugzilla.lyx.org/show_bug.cgi?id=4719
|
||||
//http://www.lyx.org/trac/ticket/4719
|
||||
h_inputencoding = "auto";
|
||||
else if (!opts.empty())
|
||||
h_inputencoding = opts;
|
||||
@ -741,7 +741,7 @@ void parse_preamble(Parser & p, ostream & os,
|
||||
else if (t.cs() == "def") {
|
||||
string name = p.get_token().cs();
|
||||
while (p.next_token().cat() != catBegin)
|
||||
name += p.get_token().asString();
|
||||
name += p.get_token().cs();
|
||||
if (!in_lyx_preamble)
|
||||
h_preamble << "\\def\\" << name << '{'
|
||||
<< p.verbatim_item() << "}";
|
||||
|
@ -1484,9 +1484,9 @@ void parse_text(Parser & p, ostream & os, unsigned flags, bool outer,
|
||||
else
|
||||
simple = false;
|
||||
} else
|
||||
paramtext += p.get_token().asString();
|
||||
paramtext += p.get_token().cs();
|
||||
} else {
|
||||
paramtext += p.get_token().asString();
|
||||
paramtext += p.get_token().cs();
|
||||
simple = false;
|
||||
}
|
||||
}
|
||||
@ -1816,7 +1816,7 @@ void parse_text(Parser & p, ostream & os, unsigned flags, bool outer,
|
||||
|
||||
else if (t.cs() == "listof") {
|
||||
p.skip_spaces(true);
|
||||
string const name = p.get_token().asString();
|
||||
string const name = p.get_token().cs();
|
||||
if (context.textclass.floats().typeExist(name)) {
|
||||
context.check_layout(os);
|
||||
begin_inset(os, "FloatList ");
|
||||
|
Loading…
Reference in New Issue
Block a user