SIZE_NORMAL,
LColor::none,
OFF,
-#ifndef NO_LATEX
- OFF,
-#endif
OFF,
OFF,
OFF };
INHERIT_SIZE,
LColor::inherit,
INHERIT,
-#ifndef NO_LATEX
- INHERIT,
-#endif
INHERIT,
INHERIT,
OFF };
IGNORE_SIZE,
LColor::ignore,
IGNORE,
-#ifndef NO_LATEX
- IGNORE,
-#endif
IGNORE,
IGNORE,
IGNORE };
fb1.emph == emph &&
fb1.underbar == underbar &&
fb1.noun == noun &&
-#ifndef NO_LATEX
- fb1.latex == latex &&
-#endif
fb1.number == number;
}
}
-#ifndef NO_LATEX
-LyXFont::FONT_MISC_STATE LyXFont::latex() const
-{
- return bits.latex;
-}
-#endif
-
-
LColor::color LyXFont::color() const
{
return bits.color;
bool LyXFont::isVisibleRightToLeft() const
{
return (lang->RightToLeft() &&
-#ifndef NO_LATEX
- latex() != ON &&
-#endif
number() != ON);
}
}
-#ifndef NO_LATEX
-LyXFont & LyXFont::setLatex(LyXFont::FONT_MISC_STATE l)
-{
- bits.latex = l;
- return *this;
-}
-#endif
-
-
LyXFont & LyXFont::setColor(LColor::color c)
{
bits.color = c;
setEmph(setMisc(newfont.emph(), emph()));
setUnderbar(setMisc(newfont.underbar(), underbar()));
setNoun(setMisc(newfont.noun(), noun()));
-#ifndef NO_LATEX
- setLatex(setMisc(newfont.latex(), latex()));
-#endif
setNumber(setMisc(newfont.number(), number()));
if (newfont.language() == language() && toggleall)
setUnderbar(INHERIT);
if (noun() == tmplt.noun())
setNoun(INHERIT);
-#ifndef NO_LATEX
- if (latex() == tmplt.latex())
- setLatex(INHERIT);
-#endif
if (color() == tmplt.color())
setColor(LColor::inherit);
if (language() == tmplt.language())
if (bits.noun == INHERIT) {
bits.noun = tmplt.bits.noun;
}
-#ifndef NO_LATEX
- if (bits.latex == INHERIT) {
- bits.latex = tmplt.bits.latex;
- }
-#endif
if (bits.color == LColor::inherit) {
bits.color = tmplt.bits.color;
}
shape() != INHERIT_SHAPE && size() != INHERIT_SIZE &&
emph() != INHERIT && underbar() != INHERIT &&
noun() != INHERIT &&
-#ifndef NO_LATEX
- latex() != INHERIT &&
-#endif
color() != LColor::inherit &&
language() != inherit_language);
}
<< _(GUIMiscNames[underbar()]) << ", ";
if (noun() != INHERIT)
ost << _("Noun ") << _(GUIMiscNames[noun()]) << ", ";
-#ifndef NO_LATEX
- if (latex() != INHERIT)
- ost << _("Latex ") << _(GUIMiscNames[latex()]) << ", ";
-#endif
if (bits == inherit)
ost << _("Default") << ", ";
if (!params || (language() != params->language))
{
bool error = false;
bool finished = false;
- while (!finished && lex.IsOK() && !error) {
+ while (!finished && lex.isOK() && !error) {
lex.next();
- string const tok = lowercase(lex.GetString());
+ string const tok = lowercase(lex.getString());
if (tok.empty()) {
continue;
finished = true;
} else if (tok == "family") {
lex.next();
- string const ttok = lex.GetString();
+ string const ttok = lex.getString();
setLyXFamily(ttok);
} else if (tok == "series") {
lex.next();
- string const ttok = lex.GetString();
+ string const ttok = lex.getString();
setLyXSeries(ttok);
} else if (tok == "shape") {
lex.next();
- string const ttok = lex.GetString();
+ string const ttok = lex.getString();
setLyXShape(ttok);
} else if (tok == "size") {
lex.next();
- string const ttok = lex.GetString();
+ string const ttok = lex.getString();
setLyXSize(ttok);
-#ifndef NO_LATEX
- } else if (tok == "latex") {
- lex.next();
- string const ttok = lowercase(lex.GetString());
-
- if (ttok == "no_latex") {
- setLatex(OFF);
- } else if (ttok == "latex") {
- setLatex(ON);
- } else {
- lex.printError("Illegal LaTeX type`$$Token'");
- }
-#endif
} else if (tok == "misc") {
lex.next();
- string const ttok = lowercase(lex.GetString());
+ string const ttok = lowercase(lex.getString());
if (ttok == "no_bar") {
setUnderbar(OFF);
}
} else if (tok == "color") {
lex.next();
- string const ttok = lex.GetString();
+ string const ttok = lex.getString();
setLyXColor(ttok);
} else {
lex.printError("Unknown tag `$$Token'");
if (orgfont.noun() != noun()) {
os << "\\noun " << LyXMiscNames[noun()] << " \n";
}
-#ifndef NO_LATEX
- if (orgfont.latex() != latex()) {
- // This is only for backwards compatibility
- switch (latex()) {
- case OFF: os << "\\latex no_latex \n"; break;
- case ON: os << "\\latex latex \n"; break;
- case TOGGLE: lyxerr << "LyXFont::lyxWriteFontChanges: "
- "TOGGLE should not appear here!"
- << endl;
- break;
- case INHERIT: os << "\\latex default \n"; break;
- case IGNORE: lyxerr << "LyXFont::lyxWriteFontChanges: "
- "IGNORE should not appear here!"
- << endl;
- break;
- }
- }
-#endif
if (orgfont.color() != color()) {
// To make us file compatible with older
// lyx versions we emit "default" instead
LColor::color LyXFont::realColor() const
{
-#ifndef NO_LATEX
- if (latex() == ON)
- return LColor::latex;
-#endif
if (color() == LColor::none)
return LColor::foreground;
return color();
}
-bool LyXFont::equalExceptLatex(LyXFont const & f) const
-{
- LyXFont f1 = *this;
-#ifndef NO_LATEX
- f1.setLatex(f.latex());
-#endif
- return f1 == f;
-}
-
-
ostream & operator<<(ostream & o, LyXFont::FONT_MISC_STATE fms)
{
return o << int(fms);