]> git.lyx.org Git - lyx.git/blobdiff - src/bufferview_funcs.cpp
BufferParams.h: add comment
[lyx.git] / src / bufferview_funcs.cpp
index b8358ab8ad47c28b039fcc47a31e33eb5643073e..cf47bcf855d1b5b4b311813d784c45b2e28b0aa4 100644 (file)
@@ -56,7 +56,7 @@ namespace bv_funcs {
 
 // 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())
@@ -81,7 +81,7 @@ bool font2string(LyXFont const & font, bool const toggle, string & data)
 
 // 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);
@@ -98,26 +98,26 @@ bool string2font(string const & data, LyXFont & font, bool & toggle)
 
                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);
@@ -239,13 +239,13 @@ CurStatus status(BufferView const * bv, DocIterator const & dit)
 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() ||
@@ -262,7 +262,7 @@ bool findNextInset(DocIterator & dit,
 } // 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;
@@ -272,7 +272,7 @@ bool findInset(DocIterator & dit, vector<InsetBase_code> const & codes,
                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();
@@ -294,13 +294,13 @@ bool findInset(DocIterator & dit, vector<InsetBase_code> const & codes,
 }
 
 
-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();
@@ -314,9 +314,9 @@ void gotoInset(BufferView * bv, vector<InsetBase_code> const & codes,
 }
 
 
-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);
 }