From 41268a49a44a7e969b19f138ba67e8f82d191529 Mon Sep 17 00:00:00 2001 From: Martin Vermeer Date: Fri, 24 Oct 2003 15:32:32 +0000 Subject: [PATCH] Fixed borkage of delimiters panel git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7978 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/xforms/ChangeLog | 4 ++++ src/frontends/xforms/FormMathsDelim.C | 15 ++++++++++----- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/frontends/xforms/ChangeLog b/src/frontends/xforms/ChangeLog index 4588aab2b2..e108510647 100644 --- a/src/frontends/xforms/ChangeLog +++ b/src/frontends/xforms/ChangeLog @@ -1,3 +1,7 @@ +2003-10-24 Martin Vermeer + + * FormMathsDelimiters.C: fixed borkage of this panel + 2003-10-22 Angus Leeming * FormExternal.C: diff --git a/src/frontends/xforms/FormMathsDelim.C b/src/frontends/xforms/FormMathsDelim.C index 3d22d965df..a13a9cae87 100644 --- a/src/frontends/xforms/FormMathsDelim.C +++ b/src/frontends/xforms/FormMathsDelim.C @@ -31,13 +31,16 @@ using std::ostringstream; #include "delim1.xpm" -static int const delim_rversion[] = { -1,1,3,3,4,5,7,7,9,9,10,11, +namespace { +int const delim_rversion[] = { + 1,1,3,3,4,5,7,7,9,9,10,11, + 3,13,15,15,16,17,19,19,20,21,22 }; +int const delim_size = + sizeof(delim_rversion) / sizeof(delim_rversion[0]); - -static char const * delim_values[] = { +char const * delim_values[] = { "(", ")", "lceil", "rceil", "uparrow", "Uparrow", "[", "]", "lfloor", "rfloor", "updownarrow", "Updownarrow", "{", "}", "/", "backslash", "downarrow", "Downarrow", @@ -45,6 +48,8 @@ static char const * delim_values[] = { }; +} // namespace anon + typedef FormController > base_class; @@ -116,7 +121,7 @@ ButtonPolicy::SMInput FormMathsDelim::input(FL_OBJECT *, long) if (both) { right = delim_rversion[i]; // Add left delimiter in "both" case if right one was pressed: - for (int j = 0; j <= 23; ++j) { + for (int j = 0; j < delim_size; ++j) { if (delim_rversion[j] == left) { right = left; left = j;