// Set data using font and toggle
// If successful, returns true
-bool font2string(LyXFont const & font, bool const toggle, string & data)
+bool font2string(Font const & font, bool const toggle, string & data)
{
string lang = "ignore";
if (font.language())
// Set font and toggle using data
// If successful, returns true
-bool string2font(string const & data, LyXFont & font, bool & toggle)
+bool string2font(string const & data, Font & font, bool & toggle)
{
istringstream is(data);
Lexer lex(0,0);
if (token == "family") {
int const next = lex.getInteger();
- font.setFamily(LyXFont::FONT_FAMILY(next));
+ font.setFamily(Font::FONT_FAMILY(next));
} else if (token == "series") {
int const next = lex.getInteger();
- font.setSeries(LyXFont::FONT_SERIES(next));
+ font.setSeries(Font::FONT_SERIES(next));
} else if (token == "shape") {
int const next = lex.getInteger();
- font.setShape(LyXFont::FONT_SHAPE(next));
+ font.setShape(Font::FONT_SHAPE(next));
} else if (token == "size") {
int const next = lex.getInteger();
- font.setSize(LyXFont::FONT_SIZE(next));
+ font.setSize(Font::FONT_SIZE(next));
} else if (token == "emph" || token == "underbar" ||
token == "noun" || token == "number") {
int const next = lex.getInteger();
- LyXFont::FONT_MISC_STATE const misc =
- LyXFont::FONT_MISC_STATE(next);
+ Font::FONT_MISC_STATE const misc =
+ Font::FONT_MISC_STATE(next);
if (token == "emph")
font.setEmph(misc);
namespace {
bool findNextInset(DocIterator & dit,
- vector<InsetBase_code> const & codes,
+ vector<Inset_code> const & codes,
string const & contents)
{
DocIterator tmpdit = dit;
while (tmpdit) {
- InsetBase const * inset = tmpdit.nextInset();
+ Inset const * inset = tmpdit.nextInset();
if (inset
&& find(codes.begin(), codes.end(), inset->lyxCode()) != codes.end()
&& (contents.empty() ||
} // namespace anon
-bool findInset(DocIterator & dit, vector<InsetBase_code> const & codes,
+bool findInset(DocIterator & dit, vector<Inset_code> const & codes,
bool same_content)
{
string contents;
return false;
if (same_content) {
- InsetBase const * inset = tmpdit.nextInset();
+ Inset const * inset = tmpdit.nextInset();
if (inset
&& find(codes.begin(), codes.end(), inset->lyxCode()) != codes.end()) {
contents = static_cast<InsetCommand const *>(inset)->getContents();
}
-void findInset(DocIterator & dit, InsetBase_code code, bool same_content)
+void findInset(DocIterator & dit, Inset_code code, bool same_content)
{
- findInset(dit, vector<InsetBase_code>(1, code), same_content);
+ findInset(dit, vector<Inset_code>(1, code), same_content);
}
-void gotoInset(BufferView * bv, vector<InsetBase_code> const & codes,
+void gotoInset(BufferView * bv, vector<Inset_code> const & codes,
bool same_content)
{
Cursor tmpcur = bv->cursor();
}
-void gotoInset(BufferView * bv, InsetBase_code code, bool same_content)
+void gotoInset(BufferView * bv, Inset_code code, bool same_content)
{
- gotoInset(bv, vector<InsetBase_code>(1, code), same_content);
+ gotoInset(bv, vector<Inset_code>(1, code), same_content);
}