]> git.lyx.org Git - lyx.git/commitdiff
small stuff + protected space
authorLars Gullik Bjønnes <larsbj@gullik.org>
Fri, 5 May 2000 08:44:11 +0000 (08:44 +0000)
committerLars Gullik Bjønnes <larsbj@gullik.org>
Fri, 5 May 2000 08:44:11 +0000 (08:44 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@715 a592a061-630c-0410-9148-cb99ea01b6c8

ChangeLog
src/insets/figinset.C
src/insets/insetspecialchar.C
src/lyx_main.C
src/lyxparagraph.h
src/mathed/formula.C

index 4c1b0c93696e7269cf512b73dda1b54e052b30a3..ad523ff3daade922479f9f52cc6a054bc6e414cc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+2000-05-05  Lars Gullik Bjønnes  <larsbj@lyx.org>
+
+       * src/insets/insetspecialchar.C (Read): allow command == '~' for
+       PROTECTED_SEPARATOR 
+       (Write): write '~' for PROTECTED_SEPARATOR
+
+2000-05-04  Lars Gullik Bjønnes  <larsbj@lyx.org>
+
+       * src/lyxparagraph.h: add a friend struct matchIT after the struct
+       InsetTable.
+
+       * src/mathed/formula.C (drawStr): rename size to siz.
+
+       * src/insets/figinset.C (RestoreForm): rename pflags to piflags,
+       possibly fix a bug by not changing the pflags = flags to piflags =
+       flags.
+
 2000-05-05  Juergen Vigna  <jug@sad.it>
 
        * src/insets/insetbib.C: moved using directive
index e39691c7d8349d694a374407e8916a30360e3428..7fe8f386fd1e368736b0d943fa95f9a01323356d 100644 (file)
@@ -1919,11 +1919,11 @@ void InsetFig::RestoreForm()
                fl_activate_object(form->Height);
        }
 
-       int pflags = flags & 3;
-       fl_set_button(form->Wysiwyg0, (pflags == 0));
-       fl_set_button(form->Wysiwyg1, (pflags == 1));
-       fl_set_button(form->Wysiwyg2, (pflags == 2));
-       fl_set_button(form->Wysiwyg3, (pflags == 3));
+       int piflags = flags & 3;
+       fl_set_button(form->Wysiwyg0, (piflags == 0));
+       fl_set_button(form->Wysiwyg1, (piflags == 1));
+       fl_set_button(form->Wysiwyg2, (piflags == 2));
+       fl_set_button(form->Wysiwyg3, (piflags == 3));
        fl_set_button(form->Frame, ((flags & 4) != 0));
        fl_set_button(form->Translations, ((flags & 8) != 0));
        fl_set_button(form->Subfigure, (subfigure != 0));
index 8caa469bfebcb8ef3c215c006d2fd9843b1d9c83..ae93b68d869a87a21ef747101d4dd99f74a7ea44 100644 (file)
@@ -150,7 +150,9 @@ void InsetSpecialChar::Write(ostream & os) const
        case LDOTS:             command = "\\ldots{}";  break;
        case MENU_SEPARATOR:    command = "\\menuseparator"; break;
        case PROTECTED_SEPARATOR:
-                               command = "\\protected_separator";          break;
+               //command = "\\protected_separator";
+               command = "~";
+               break;
        }
        os << "\\SpecialChar " << command << "\n";
 }
@@ -170,7 +172,8 @@ void InsetSpecialChar::Read(LyXLex & lex)
                kind = LDOTS;
        else if (command == "\\menuseparator")
                kind = MENU_SEPARATOR;
-       else if (command == "\\protected_separator")
+       else if (command == "\\protected_separator"
+                || command == "~")
                kind = PROTECTED_SEPARATOR;
        else
                lex.printError("InsetSpecialChar: Unknown kind: `$$Token'");
index 4f69d52ebe1a05af8aaf101f34baf3eb52031cf8..661d0149e56aae2f7d65dd2a94affee9e9c4113b 100644 (file)
@@ -69,6 +69,7 @@ LyX::LyX(int * argc, char * argv[])
 
        // Global bindings (this must be done as early as possible.) (Lgb)
        toplevel_keymap = new kb_keymap;
+       
        // Fill the toplevel_keymap with some defaults
        for (LyXRC::Bindings::const_iterator cit = lyxrc.bindings.begin();
             cit != lyxrc.bindings.end(); ++cit) {
index d329740e423e0e2d143d6b4768ebdc365183df7a..fbbc80f6cc7ec61204c0f4e6971ebdfee8f29101 100644 (file)
@@ -522,6 +522,8 @@ private:
                InsetTable(size_type p, Inset * i) { pos = p; inset = i;}
        };
        ///
+       friend struct matchIT;
+       ///
        struct matchIT {
                /// used by lower_bound
                inline
index ebe09988608ef03120d6113cc54e8ab5cecf9373..46be0e44af05e86f30908fb842208d3c68b72f68 100644 (file)
@@ -250,7 +250,7 @@ int mathed_char_height(short type, int size, byte c, int & asc, int & des)
 
 
 // In a near future maybe we use a better fonts renderer
-void MathedInset::drawStr(Painter & pain, short type, int size,
+void MathedInset::drawStr(Painter & pain, short type, int siz,
                          int x, int y, byte const * s, int ls)
 {
        string st;
@@ -261,7 +261,7 @@ void MathedInset::drawStr(Painter & pain, short type, int size,
        } else {
                st = string(reinterpret_cast<char const *>(s), ls);
        }
-       LyXFont mf = mathed_get_font(type, size);
+       LyXFont mf = mathed_get_font(type, siz);
        pain.text(x, y, st, mf);
 }