]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/BUGS
further code uglification to make Jean-Marc's compiler happy
[lyx.git] / src / mathed / BUGS
index c19a7f63d6338d93faf96cda65137a5fe9a76aae..4005050395c0b25d19c9e31c368f802192c193f1 100644 (file)
@@ -32,33 +32,16 @@ General hints for bug reports:
 
 ----------------------------------------------------------------------
 
-"R. Lahaye" <lahaye@users.sourceforge.net>
--  Mathematical \frac with subscripts, for example:
-   \begin_inset Formula $\frac{\alpha _{1} }{\beta _{2} }$
-   is wrongly displayed 
-
-
 Dekel:
 
-Array/eqnarray
-
-// - Ctrl+enter doesn't work
-
-// - When creating a matrix/align/eqnarray all columns are centered.
-
-
 Macros:
 
-?? - When changing the macro definition, all instances are not updated.
-
-:: I cannot reproduce this.
-
-?? - If I have macros \newcommand{\foo}[1]{[#1]} and
-??   \newcommand{\foox}{\foo{x}} then when an instance of \foox is drawn on
-??   screen, there are two black frames.  While this is "correct", it is
-??   annoying.
+ - When changing the macro definition, all instances are not updated.
 
-:: This is partially fixed?
+// - If I have macros \newcommand{\foo}[1]{[#1]} and
+//   \newcommand{\foox}{\foo{x}} then when an instance of \foox is drawn on
+//   screen, there are two black frames.  While this is "correct", it is
+//   annoying.
 
 - LyX crashes when you define a recursive macro
 
@@ -67,17 +50,12 @@ Misc:
 - If I have x_{1}^{2}, I put the cursor before the 2, and press backspace,
   the result is 'x2'. The correct result should be 'x_{1}2'
 
-- If I mark some text and then press ^, then the marked text is deleted.
-  The correct behavior is to put the marked text in the superscript.
+// - If I mark some text and then press ^, then the marked text is deleted.
+//   The correct behavior is to put the marked text in the superscript.
 
-- Pressing <down> when cursor is in subscript will move the cursor up
-  (to the base of the subscript) instead of exiting the inset.
-  The same problem happen in fractions
-
-!! If you type something there you will see that the corsor has left the
-!! inset. That's mor or less a "feature". If you don't like it, propose a
-!! method how a subscript inset can figure out what is "optically" lower
-!! on screen.
+// - Pressing <down> when cursor is in subscript will move the cursor up
+//   (to the base of the subscript) instead of exiting the inset.
+//   The same problem happen in fractions
 
 // - When you press the mouse just to the left of the middle point of
 //   some char, the cursor will be positioned to the right of the char.
@@ -86,26 +64,25 @@ Misc:
 
 // - Text in superscript is not smaller than normal text.
 
-?? - After insertion of \sum, the cursor is in invalid location
-??    There is still a problem when doing c-m \sum S-C-M
+// - After insertion of \sum, the cursor is in invalid location
 
-?? - The height of the frame is often wrong (e.g. x^2)
-??    For example $\sum x$ in an inline formula
+// - The height of the frame is often wrong (e.g. x^2)
+//    For example $\sum x$ in an inline formula
 
 - InsetFormula::validate is broken
 
 // - Changing math space length by pressing the space-bar key doesn't work
 !!  it's M-m space now. 
 
-- The drawing of decorations on screen is very different than latex.
-   (a low priority bug).
+// - The drawing of decorations on screen is very different than latex.
+//    (a low priority bug).
 
-- If I change '\alpha' to bold, the result is \mathbf{a}
+// - If I change '\alpha' to bold, the result is \mathbf{a}
 
-- Just moving the cursor in a math inset causes changing the buffer status
-  to (changed).
+// - Just moving the cursor in a math inset causes changing the buffer status
+//   to (changed).
 
-- disable the insert->label menu item when in inline formula.
+// - disable the insert->label menu item when in inline formula.
 
 
 Eran Tromer:
@@ -115,17 +92,17 @@ Eran Tromer:
 
 // - Scripts are too large. $\log_2$ exceeds inset frame (non-displayed).
 
-- You need two <right> to get past \vec{v}, and all sort of other
-  insetish behavior.
+// - You need two <right> to get past \vec{v}, and all sort of other
+//  insetish behavior.
 
-- \vec{several-characters} doesn't work. \overrightarrow does.
+:: Not a bug.
 
-- When the cursor is in a subscript (and either isn't at the end of 
-  the subscript or there's no subsubscript), pressing <down> should
-  try to *really* go down (to the next line, or denumerator, or 
-  whatever). Currently it goes *up*. Ditto for superscripts.
+// - \vec{several-characters} doesn't work. \overrightarrow does.
 
-:: Please see comment to Dekel's report on the same problem.
+// - When the cursor is in a subscript (and either isn't at the end of 
+//   the subscript or there's no subsubscript), pressing <down> should
+//   try to *really* go down (to the next line, or denumerator, or 
+//   whatever). Currently it goes *up*. Ditto for superscripts.
 
 // - When choosing to insert "\left\Vert \right\Vert" parenthesis using
 //   the maths [sic] panel, a "\left( \right." is inserted instead.
@@ -143,14 +120,11 @@ Eran Tromer:
 - When selecting, maybe give a visual indication of the "original" 
   anchor, when it differs from the "actual" one.
 
-// - C-v always pastes into the end of the current math inset, instead of
-//   the cursor location.
-
-- Placement of cursor using mouse is seriously broken.
-  Example 1: large fractions.
-  Example 2: type into a new document: 
-  "M-d xxxxxxxxx <right> M-x footnote-insert"
-  Can't reach most places in the formula using mouse.
+// - Placement of cursor using mouse is seriously broken.
+//   Example 1: large fractions.
+//   Example 2: type into a new document: 
+//   "M-d xxxxxxxxx <right> M-x footnote-insert"
+//   Can't reach most places in the formula using mouse.
 
 
 
@@ -168,8 +142,8 @@ Rainer Dorsch:
 
 Marcus (Suran@gmx.net) 
 
-// - In math-mode I can switch back to text-mode in a formula but then I am
-//   not able to type Umlauts.
+- In math-mode I can switch back to text-mode in a formula but then I am
+  not able to type Umlauts.
 
 ?? - Having selected some part of a formula and creating a fraction with that
 ??   part in the top my selection-buffer is replaced with the part.
@@ -185,12 +159,13 @@ From: 
  
 - the most annoying bug by far: bold is "inherited" to super and subscripts.
  
-- when you get into equation array mode, the previous equation(s) remain(s) 
- unaligned. I would be soo much faster to have LyX pick the last equal sign 
- from the previous line as a reference for the alignment (and a good heuristic 
- for the 80% of cases, with the advantage that we don't lose anything 
- enforcing it). This is another case that slows down a lot when typing 
- because, as the previous one, requires going back and correcting.
+// - when you get into equation array mode, the previous equation(s)
+// remain(s) unaligned. I would be soo much faster to have LyX pick the
+// last equal sign from the previous line as a reference for the alignment
+// (and a good heuristic for the 80% of cases, with the advantage that we
+// don't lose anything enforcing it). This is another case that slows down
+// a lot when typing because, as the previous one, requires going back
+// and correcting.
  
 - the movement is sometimes clumsy inside this arrayed equations: ie. C-a (or 
  "home" are understood as "beginning of the formula" instead of "beginning of 
@@ -236,12 +211,13 @@ From: 
  won't repeat that. Only that the flattening option would be then easier to 
  implement on top of that.
  
-- There's something I keep wondering about.. how do new math symbols get into 
- LyX. Do they get ever?. I don't know if it can be done, but if you tell me 
- where to "draw" those symbols or how, I would very glad start doing it. LyX 
- deserves to have support (visual support) for all the AMSTeX constructs. But 
- there must be something structural going on there, because otherwise more 
- math symbols would be ready by now.. just a thought.
+// - There's something I keep wondering about.. how do new math symbols get
+// into LyX. Do they get ever?. I don't know if it can be done, but if you
+// tell me where to "draw" those symbols or how, I would very glad start
+// doing it. LyX deserves to have support (visual support) for all the
+// AMSTeX constructs. But there must be something structural going on
+// there, because otherwise more math symbols would be ready by now..
+// just a thought.
  
 - Some math symbols aren't very well supported (to my knowledge). I'm 
   thinking of underbraces with extra data in them,or [] options.
@@ -355,14 +331,13 @@ Yves Bastide:
 
 Jean-Marc:
 
-> \def\neq{\not=} \let\ne=\neq
->    \let\le=\leq
->    \let\ge=\geq
->     \let\owns=\ni
->    \let\gets=\leftarrow
->    \let\to=\rightarrow
-> % \let\@@sqrt\sqrtsign
-> \let\|=\Vert
+// \def\neq{\not=} \let\ne=\neq
+// \let\le=\leq
+// \let\ge=\geq
+// \let\owns=\ni
+// \let\gets=\leftarrow
+// \let\to=\rightarrow
+// \let\|=\Vert
 
 Angus:
 
@@ -370,9 +345,301 @@ Angus:
 
 Tuukka:
 
-- An inline equation does not get a number, so putting a label there is not
-  overly sensible...
-       Ok. In that case show a message in the bottom similarly as the message
-       "you cannot type two spaces this way". Eg. "You can insert math labels
-       only in display mode"
+// - An inline equation does not get a number, so putting a label there is not
+//   overly sensible...
+//     Ok. In that case show a message in the bottom similarly as the message
+//     "you cannot type two spaces this way". Eg. "You can insert math labels
+//     only in display mode"
+
+:: Not a bug. It's allowed by LaTeX and there might be other reasons for
+:: putting labels there. I won't add extra code to disable this.
+
+
+Jean-Marc:
+
 
+// cxx: Info: ../../../lyx-devel/src/mathed/array.C, line 98: conversion to
+//           integral type of smaller size could lose data (D:intconlosbit)
+//     return bf_.size();
+// ---------------^
+
+// cxx: Info: ../../../lyx-devel/src/mathed/formula.h, line 56: 
+//           "void InsetFormula::write(std::ostream &) const" does not match
+//           "Inset::write" -- virtual function override intended? (D:nonfundec)
+//     void write(std::ostream &) const;
+// -------------^
+:: not a bug
+
+// cxx: Info: ../../../lyx-devel/src/mathed/formula.h, line 58: 
+//           "void InsetFormula::read(LyXLex &)" does not match "Inset::read" --
+//           virtual function override intended? (D:nonfundec)
+//     void read(LyXLex & lex);
+// -------------^
+:: not a bug
+:: etc.
+
+cxx: Info: ../../../lyx-devel/src/mathed/math_gridinset.h, line 94: 
+          conversion to integral type of smaller size could lose data
+          (D:intconlosbit)
+       int ncols() const { return colinfo_.size(); }
+-----------------------------------^
+cxx: Info: ../../../lyx-devel/src/mathed/math_gridinset.h, line 96: 
+          conversion to integral type of smaller size could lose data
+          (D:intconlosbit)
+       int nrows() const { return rowinfo_.size(); }
+-----------------------------------^
+
+// cxx: Info: ../../../lyx-devel/src/mathed/formulabase.C, line 63: function
+//           "<unnamed>::mathed_init_fonts" was declared but never referenced
+//           (D:declbutnotref)
+// void mathed_init_fonts();
+// -----^
+
+//cxx: Info: ../../../lyx-devel/src/mathed/formulabase.C, line 65: function
+//          "<unnamed>::nicelabel" was declared but never referenced
+//          (D:declbutnotref)
+//string nicelabel(string const & label)
+//-------^
+
+-----------------------------------^
+cxx: Info: ../../../lyx-devel/src/mathed/math_gridinset.h, line 94: 
+          conversion to integral type of smaller size could lose data
+          (D:intconlosbit)
+       int ncols() const { return colinfo_.size(); }
+-----------------------------------^
+cxx: Info: ../../../lyx-devel/src/mathed/math_gridinset.h, line 96: 
+          conversion to integral type of smaller size could lose data
+          (D:intconlosbit)
+       int nrows() const { return rowinfo_.size(); }
+-----------------------------------^
+cxx: Info: ../../../lyx-devel/src/mathed/math_cursor.C, line 176: 
+          label "__Unreachable1" was declared but never referenced
+          (D:declbutnotref)
+       lyxerr << "MC: " << what << "\n";
+--------^
+cxx: Warning: ../../../lyx-devel/src/mathed/math_cursor.C, line 193: statement
+          is unreachable (D:codeunreachable)
+       lyxerr << "\n\n\n=================vvvvvvvvvvvvv=======================   "
+--------^
+cxx: Info: ../../../lyx-devel/src/mathed/math_cursor.C, line 193: 
+          label "__Unreachable2" was declared but never referenced
+          (D:declbutnotref)
+       lyxerr << "\n\n\n=================vvvvvvvvvvvvv=======================   "
+--------^
+cxx: Info: ../../../lyx-devel/src/mathed/math_cursor.C, line 351: 
+          controlling expression is constant (D:boolexprconst)
+       while (1) {
+---------------^
+cxx: Info: ../../../lyx-devel/src/mathed/math_cursor.C, line 597: conversion
+          to integral type of smaller size could lose data (D:intconlosbit)
+               pos() = pos() - s.size();
+----------------------^
+cxx: Info: ../../../lyx-devel/src/mathed/math_cursor.C, line 828: conversion
+          to integral type of smaller size could lose data (D:intconlosbit)
+       for (int i = Cursor_.size() - 1; i >= 0; --i) {
+---------------------^
+cxx: Info: ../../../lyx-devel/src/mathed/math_cursor.C, line 1049: 
+          conversion to integral type of smaller size could lose data
+          (D:intconlosbit)
+       return p ? p->valign() : 0;
+---------------^
+cxx: Info: ../../../lyx-devel/src/mathed/math_cursor.C, line 1057: 
+          conversion to integral type of smaller size could lose data
+          (D:intconlosbit)
+       return p ? p->halign(idx % p->ncols()) : 0;
+---------------^
+cxx: Info: ../../../lyx-devel/src/mathed/math_cursor.C, line 109: function
+          "<unnamed>::operator<<" was declared but never referenced
+          (D:declbutnotref)
+std::ostream & operator<<(std::ostream & os, MathCursorPos const & p)
+---------------^
+cxx: Info: ../../../lyx-devel/src/mathed/math_fracinset.h, line 30: type
+          qualifier on return type is meaningless (D:nousetypqualret)
+       char const name() const;
+-------------------^
+cxx: Info: ../../../lyx-devel/src/mathed/math_macro.h, line 54: 
+          "void MathMacro::dump(std::ostream &) const" does not match
+          "MathInset::dump" -- virtual function override intended?
+          (D:nonfundec)
+       void dump(std::ostream & os) const;
+-------------^
+cxx: Info: ../../../lyx-devel/src/mathed/math_macro.h, line 54: 
+          "void MathMacro::dump(std::ostream &) const" does not match
+          "MathNestInset::dump" -- virtual function override intended?
+          (D:nonfundec)
+       void dump(std::ostream & os) const;
+-------------^
+cxx: Info: ../../../lyx-devel/src/mathed/math_factory.C, line 29: conversion
+          to integral type of smaller size could lose data (D:intconlosbit)
+               return new MathSpecialCharInset(l->id);
+------------------------------------------------^
+cxx: Info: ../../../lyx-devel/src/mathed/math_fracinset.h, line 30: type
+          qualifier on return type is meaningless (D:nousetypqualret)
+       char const name() const;
+-------------------^
+cxx: Info: ../../../lyx-devel/src/mathed/math_gridinset.h, line 94: 
+          conversion to integral type of smaller size could lose data
+          (D:intconlosbit)
+       int ncols() const { return colinfo_.size(); }
+-----------------------------------^
+cxx: Info: ../../../lyx-devel/src/mathed/math_gridinset.h, line 96: 
+          conversion to integral type of smaller size could lose data
+          (D:intconlosbit)
+       int nrows() const { return rowinfo_.size(); }
+-----------------------------------^
+cxx: Info: ../../../lyx-devel/src/mathed/math_gridinset.C, line 71: 
+          conversion to integral type of smaller size could lose data
+          (D:intconlosbit)
+       int n = hh.size();
+----------------^
+cxx: Info: ../../../lyx-devel/src/mathed/../lyxlex.h, line 32: access
+          control not specified ("private" by default) (D:misaccspe)
+class LyXLex : boost::noncopyable { 
+---------------^
+cxx: Info: ../../../lyx-devel/src/mathed/math_hash.C, line 177: conversion
+          to integral type of smaller size could lose data (D:intconlosbit)
+                       tmp.token = tokenEnum(lex.getString());
+----------------------------------^
+cxx: Info: ../../../lyx-devel/src/mathed/math_hash.C, line 179: conversion
+          to integral type of smaller size could lose data (D:intconlosbit)
+                       tmp.latex_font_id = lex.getInteger();
+------------------------------------------^
+cxx: Info: ../../../lyx-devel/src/mathed/math_macro.h, line 54: 
+          "void MathMacro::dump(std::ostream &) const" does not match
+          "MathInset::dump" -- virtual function override intended?
+          (D:nonfundec)
+       void dump(std::ostream & os) const;
+-------------^
+cxx: Info: ../../../lyx-devel/src/mathed/math_macro.h, line 54: 
+          "void MathMacro::dump(std::ostream &) const" does not match
+          "MathNestInset::dump" -- virtual function override intended?
+          (D:nonfundec)
+       void dump(std::ostream & os) const;
+-------------^
+cxx: Info: ../../../lyx-devel/src/mathed/../layout.h, line 554: access
+          control not specified ("private" by default) (D:misaccspe)
+class LyXTextClassList : boost::noncopyable {
+-------------------------^
+cxx: Info: ../../../lyx-devel/src/mathed/math_macro.C, line 122: conversion
+          to integral type of smaller size could lose data (D:intconlosbit)
+                       str[1] += i;
+------------------------^
+cxx: Info: ../../../lyx-devel/src/mathed/math_macro.C, line 101: 
+          variable "col" was set but never used (D:setbutnotused)
+       LColor::color col;
+----------------------^
+cxx: Info: ../../../lyx-devel/src/mathed/math_macro.h, line 54: 
+          "void MathMacro::dump(std::ostream &) const" does not match
+          "MathInset::dump" -- virtual function override intended?
+          (D:nonfundec)
+       void dump(std::ostream & os) const;
+-------------^
+cxx: Info: ../../../lyx-devel/src/mathed/math_macro.h, line 54: 
+          "void MathMacro::dump(std::ostream &) const" does not match
+          "MathNestInset::dump" -- virtual function override intended?
+          (D:nonfundec)
+       void dump(std::ostream & os) const;
+-------------^
+cxx: Info: ../../../lyx-devel/src/mathed/math_macroarg.C, line 21: 
+          conversion to integral type of smaller size could lose data
+          (D:intconlosbit)
+       str_[1] = '0' + n;
+----------------^
+cxx: Info: ../../../lyx-devel/src/mathed/math_macro.h, line 54: 
+          "void MathMacro::dump(std::ostream &) const" does not match
+          "MathInset::dump" -- virtual function override intended?
+          (D:nonfundec)
+       void dump(std::ostream & os) const;
+-------------^
+cxx: Info: ../../../lyx-devel/src/mathed/math_macro.h, line 54: 
+          "void MathMacro::dump(std::ostream &) const" does not match
+          "MathNestInset::dump" -- virtual function override intended?
+          (D:nonfundec)
+       void dump(std::ostream & os) const;
+-------------^
+cxx: Info: ../../../lyx-devel/src/mathed/math_gridinset.h, line 94: 
+          conversion to integral type of smaller size could lose data
+          (D:intconlosbit)
+       int ncols() const { return colinfo_.size(); }
+-----------------------------------^
+cxx: Info: ../../../lyx-devel/src/mathed/math_gridinset.h, line 96: 
+          conversion to integral type of smaller size could lose data
+          (D:intconlosbit)
+       int nrows() const { return rowinfo_.size(); }
+-----------------------------------^
+cxx: Info: ../../../lyx-devel/src/mathed/../layout.h, line 554: access
+          control not specified ("private" by default) (D:misaccspe)
+class LyXTextClassList : boost::noncopyable {
+-------------------------^
+cxx: Info: ../../../lyx-devel/src/mathed/math_matrixinset.C, line 40: 
+          conversion to integral type of smaller size could lose data
+          (D:intconlosbit)
+                       return it - array.begin();
+-------------------------------^
+cxx: Info: ../../../lyx-devel/src/mathed/math_nestinset.C, line 16: 
+          conversion to integral type of smaller size could lose data
+          (D:intconlosbit)
+       return cells_.size();
+---------------^
+cxx: Info: ../../../lyx-devel/src/mathed/math_gridinset.h, line 94: 
+          conversion to integral type of smaller size could lose data
+          (D:intconlosbit)
+       int ncols() const { return colinfo_.size(); }
+-----------------------------------^
+cxx: Info: ../../../lyx-devel/src/mathed/math_gridinset.h, line 96: 
+          conversion to integral type of smaller size could lose data
+          (D:intconlosbit)
+       int nrows() const { return rowinfo_.size(); }
+-----------------------------------^
+cxx: Info: ../../../lyx-devel/src/mathed/math_macro.h, line 54: 
+          "void MathMacro::dump(std::ostream &) const" does not match
+          "MathInset::dump" -- virtual function override intended?
+          (D:nonfundec)
+       void dump(std::ostream & os) const;
+-------------^
+cxx: Info: ../../../lyx-devel/src/mathed/math_macro.h, line 54: 
+          "void MathMacro::dump(std::ostream &) const" does not match
+          "MathNestInset::dump" -- virtual function override intended?
+          (D:nonfundec)
+       void dump(std::ostream & os) const;
+-------------^
+cxx: Info: ../../../lyx-devel/src/mathed/../lyxlex.h, line 32: access
+          control not specified ("private" by default) (D:misaccspe)
+class LyXLex : boost::noncopyable { 
+---------------^
+cxx: Info: ../../../lyx-devel/src/mathed/math_parser.C, line 60: conversion
+          to integral type of smaller size could lose data (D:intconlosbit)
+       unsigned n = s.size();
+---------------------^
+cxx: Info: ../../../lyx-devel/src/mathed/math_parser.C, line 437: 
+          controlling expression is constant (D:boolexprconst)
+       for (int row = 0; true; ++row) {
+--------------------------^
+cxx: Info: ../../../lyx-devel/src/mathed/math_parser.C, line 786: conversion
+          to integral type of smaller size could lose data (D:intconlosbit)
+                               MathArrayInset * m = new MathArrayInset(halign.size(), 1);
+------------------------------------------------------------------------^
+cxx: Info: ../../../lyx-devel/src/mathed/math_parser.C, line 804: 
+          controlling expression is constant (D:boolexprconst)
+                       while (1) {
+-------------------------------^
+cxx: Info: ../../../lyx-devel/src/mathed/math_gridinset.h, line 94: 
+          conversion to integral type of smaller size could lose data
+          (D:intconlosbit)
+       int ncols() const { return colinfo_.size(); }
+-----------------------------------^
+cxx: Info: ../../../lyx-devel/src/mathed/math_gridinset.h, line 96: 
+          conversion to integral type of smaller size could lose data
+          (D:intconlosbit)
+       int nrows() const { return rowinfo_.size(); }
+-----------------------------------^
+cxx: Info: ../../../lyx-devel/src/mathed/math_symbolinset.C, line 75: 
+          conversion to integral type of smaller size could lose data
+          (D:intconlosbit)
+               mathed_char_dim(code2(), size_, sym_->id,
+------------------------------------------------^
+cxx: Info: ../../../lyx-devel/src/mathed/math_symbolinset.C, line 92: 
+          conversion to integral type of smaller size could lose data
+          (D:intconlosbit)
+               drawChar(pain, code2(), size_, x, y, sym_->id);
+-----------------------------------------------------^