]> git.lyx.org Git - features.git/commitdiff
ws cleanup
authorLars Gullik Bjønnes <larsbj@gullik.org>
Thu, 21 Mar 2002 17:42:56 +0000 (17:42 +0000)
committerLars Gullik Bjønnes <larsbj@gullik.org>
Thu, 21 Mar 2002 17:42:56 +0000 (17:42 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3804 a592a061-630c-0410-9148-cb99ea01b6c8

94 files changed:
src/mathed/ChangeLog
src/mathed/formula.C
src/mathed/formula.h
src/mathed/formulabase.C
src/mathed/formulabase.h
src/mathed/formulamacro.C
src/mathed/formulamacro.h
src/mathed/math_amsarrayinset.C
src/mathed/math_amsarrayinset.h
src/mathed/math_arrayinset.C
src/mathed/math_arrayinset.h
src/mathed/math_atom.C
src/mathed/math_atom.h
src/mathed/math_biginset.C
src/mathed/math_biginset.h
src/mathed/math_binaryopinset.C
src/mathed/math_binominset.C
src/mathed/math_binominset.h
src/mathed/math_braceinset.C
src/mathed/math_braceinset.h
src/mathed/math_casesinset.C
src/mathed/math_casesinset.h
src/mathed/math_charinset.C
src/mathed/math_cursor.C
src/mathed/math_cursor.h
src/mathed/math_data.C
src/mathed/math_data.h
src/mathed/math_decorationinset.C
src/mathed/math_defs.h
src/mathed/math_deliminset.C
src/mathed/math_diffinset.C
src/mathed/math_diminset.C
src/mathed/math_diminset.h
src/mathed/math_dotsinset.C
src/mathed/math_dotsinset.h
src/mathed/math_exfuncinset.C
src/mathed/math_exintinset.C
src/mathed/math_extern.C
src/mathed/math_factory.C
src/mathed/math_fracbase.h
src/mathed/math_fracinset.C
src/mathed/math_funcinset.C
src/mathed/math_funcliminset.C
src/mathed/math_gridinset.C
src/mathed/math_gridinset.h
src/mathed/math_hash.C
src/mathed/math_hullinset.C
src/mathed/math_hullinset.h
src/mathed/math_inset.C
src/mathed/math_inset.h
src/mathed/math_iterator.C
src/mathed/math_iterator.h
src/mathed/math_kerninset.C
src/mathed/math_limitopinset.C
src/mathed/math_macro.C
src/mathed/math_macro.h
src/mathed/math_macroarg.C
src/mathed/math_macrotable.C
src/mathed/math_macrotemplate.h
src/mathed/math_matrixinset.C
src/mathed/math_matrixinset.h
src/mathed/math_nestinset.C
src/mathed/math_nestinset.h
src/mathed/math_notinset.C
src/mathed/math_parser.C
src/mathed/math_parser.h
src/mathed/math_pos.C
src/mathed/math_pos.h
src/mathed/math_rootinset.C
src/mathed/math_rootinset.h
src/mathed/math_scriptinset.C
src/mathed/math_scriptinset.h
src/mathed/math_sizeinset.h
src/mathed/math_spaceinset.C
src/mathed/math_specialcharinset.C
src/mathed/math_specialcharinset.h
src/mathed/math_splitinset.h
src/mathed/math_sqrtinset.C
src/mathed/math_stackrelinset.C
src/mathed/math_stackrelinset.h
src/mathed/math_stringinset.C
src/mathed/math_stringinset.h
src/mathed/math_substackinset.h
src/mathed/math_support.C
src/mathed/math_symbolinset.C
src/mathed/math_undersetinset.C
src/mathed/math_undersetinset.h
src/mathed/math_unknowninset.C
src/mathed/math_xarrowinset.C
src/mathed/math_xdata.C
src/mathed/math_xdata.h
src/mathed/math_xyarrowinset.C
src/mathed/math_xyarrowinset.h
src/mathed/math_xymatrixinset.h

index 8daf9017a1bfdb246d83533cbe03ab8db0bf7ad5..852a90d6d3a144d6548cb9e4145f6e70210255a8 100644 (file)
@@ -1,5 +1,7 @@
 2002-03-21  Lars Gullik Bjønnes  <larsbj@birdstep.com>
 
+       * most files: ws cleanup
+
        * Makefile.am: remove ld -r stuff
 
 2002-03-20  Lars Gullik Bjønnes  <larsbj@birdstep.com>
@@ -17,7 +19,7 @@
 
        * math_inset.C (metrics): parameter "mi" is never referenced. Removed.
        * math_hullinset.C (metrics): ditto.
-       
+
 
 2002-03-12  André Pönitz <poenitz@gmx.net>
 
 
 2002-02-08  Otto Tronarp <otttr440@student.liu.se>
 
-       * math_decorationinset.C: 
+       * math_decorationinset.C:
 
-       * math_support.C: 
+       * math_support.C:
 
        * math_hash.C: Added \underrightarrow and \underleftarrow
 
 2002-02-08  Martin Vermeer <martin.vermeer@hut.fi>
 
        * formulabase.C (localDispatch): fix umlaut handling
-       
+
        * formulabase.C: pop up math panel on right mouse click
 
 2002-02-01  André Pönitz <poenitz@gmx.net>
 2002-01-10  Jean-Marc Lasgouttes  <lasgouttes@freesurf.fr>
 
        * math_support.C: change latex_mathfontcmds to an array of
-       kb_action. 
+       kb_action.
 
 2002-01-11  Angus Leeming  <a.leeming@ic.ac.uk>
 
 2002-01-09  Jean-Marc Lasgouttes  <lasgouttes@freesurf.fr>
 
        * math_hullinset.C (validate): rename feature "amsstyle" to
-       "amsmath". 
+       "amsmath".
 
 2002-01-09  Martin Vermeer <martin.vermeer@hut.fi>
 
-       * math_support.C: modified to support  a mathed pop-up for math 
+       * math_support.C: modified to support  a mathed pop-up for math
        size "styles" and font types.
 
 2002-01-07  Angus Leeming  <a.leeming@ic.ac.uk>
 
        * math_parser.C: user std::fill to fill the catcodes. (please
        check this one...), and some consts.
-       
+
 2001-12-11  André Pönitz <poenitz@gmx.net>
 
        * math_cursor.C: allow cut&paste of rectangular regions of cells
        * math_symbolinset.C:
        * math_unknowninset.C: include math_streamstr.h and remove
        unneeded c_str()
-       
+
        * math_symbolinset.[Ch]: add constructor taking string
-       
+
        * math_mathmlstream.C: move includes around
 
        * math_streamstr.[Ch]: add operator<<(Stream, string) for
        NormalStream, MapleStream, MathMLStream and OctaveStream
-       
+
        * math_gridinset.C: user LyXLength::zero
-       
+
 2001-11-19  Angus Leeming  <a.leeming@ic.ac.uk>
 
        * formula.C:
        * math_arrayinset.C: add using std::getline directive.
 
 2001-11-20 André Pönitz  <poenitz@gmx.net>
-       
+
        * formulabase.C: fix mouse positioning using the cursor
 
 2001-11-19  Dekel Tsur  <dekelts@tau.ac.il>
 
 2001-11-15  Jean-Marc Lasgouttes  <Jean-Marc.Lasgouttes@inria.fr>
 
-       * math_extern.C (extractNumber): 
+       * math_extern.C (extractNumber):
        (extractDiffExponent): add ugly .c_str()
 
 2001-11-08  Jean-Marc Lasgouttes  <Jean-Marc.Lasgouttes@inria.fr>
 
-       * math_arrayinset.C (MathArrayInset): 
-       * formula.C (pipeThroughMaple): 
+       * math_arrayinset.C (MathArrayInset):
+       * formula.C (pipeThroughMaple):
        (pipeThroughOctave): add ugly .c_str() to help compile
        with lyxstring
 
        * math_*inset.[Ch]: remove MathStyles cache from insets that
          don't need it
 
-       * support.C: 
+       * support.C:
          formulabase.C: fix math font sizes in headings etc
 
        * math_inset.[Ch]:
 2001-09-27  Jean-Marc Lasgouttes  <Jean-Marc.Lasgouttes@inria.fr>
 
        * math_cursor.C: fix type mismatches with what was declared in
-       math_cursor.h. 
+       math_cursor.h.
 
 2001-09-28  Dekel Tsur  <dekelts@tau.ac.il>
 
            'xxalignt', 'gather' and 'multiline' environments
 
        * math_cursor.C: fix handling of | and \|
-       
+
 2001-09-04  José Matos  <jamatos@fep.up.pt>
 
        * formulabase.C
 2001-08-17  André Pönitz  <poenitz@gmx.net>
 
        * math_hash.C: Use std::map instead of faking it
-       
+
        * symbol_def.h: remove unneeded symbol definitions
 
        *       support.C: use the decorations' name for drawing
 2001-08-31  Dekel Tsur  <dekelts@tau.ac.il>
 
        * math_hash.C: Read symbols information from external file
-       many files: Add support for latex symbol fonts
+       many files: Add support for latex symbol fonts
 
 2001-08-18  Dekel Tsur  <dekelts@tau.ac.il>
 
        * math_bigopinset.[Ch]: revival for things like \int, \sum
 
        * math_funcliminset.[Ch]: dedicated new inset for \lim, \max, \min...
-       
+
        * math_diminset.h: make cache variables mutable, remove const_cast
 
        * formulabase.[Ch]: remove unneeded convertFont()
        the width_/ascent_/descent_ cache
 
 2001-07-25  André Pönitz  <poenitz@gmx.net>
-       
+
        * formulabase.C: re-enable 'space enlargement' feature
 
        * math_scriptinset.C:
        * formulabase.C: fix memory leak
 
        * math_cursor.C: ^ now copies selection into new srriptinset
-       
+
        * xarray.C: less crude MathXArray::x2pos for preciser cursor positioning
          using the mouse
 
 
        * math_updowninset.[hC]: new base class for script and bigop insets
                *.[hC]: subsequent changes to all Metric() functions
-       
+
        * math_parser.C: small changes (\sqrt0 is read properly now)
-       
+
 2001-07-10 André Pönitz  <poenitz@gmx.net>
-       
+
        * math_accentinset.[hC]: rewrite
 
        * math_parser.C:
 2001-07-09  Jean-Marc Lasgouttes  <Jean-Marc.Lasgouttes@inria.fr>
 
        * formulabase.C (mathDispatchInsertMath): remove bogus return
-       statement. 
+       statement.
 
 2001-07-09 André Pönitz  <poenitz@gmx.net>
 
-       * math_*inset.C: Change order of arguments in MathInset constructor 
+       * math_*inset.C: Change order of arguments in MathInset constructor
 
        * math_cursor.C: Remove broken "increase space" feature for a while
 
 
        * *.C: remove all "using namespace std" directives (not
        good!!) and replaced it with relevant "using" directives.
-       
+
        * math_macrotemplate.C (Clone): change return type to MathInset*
 
 2001-06-27  Lars Gullik Bjønnes  <larsbj@birdstep.com>
        * math_macrotemplate.C (Write): std:: qualify ostream
 
        * math_bigopinset.C (Metrics): std:: qualify max, and include
-       functional 
+       functional
 
        * math_matrixinset.h: include vector and std:: qualify it.
 
        * math_cursor.C (Right): Fixes for cursor movement.
 
        * formula.C (draw): New background color for math.
-       
+
        * math_cursor.C: Fixes for toggling labels on/off in math.
        Fixes for infinity and other symbols that didn't appear in
        LaTeX.
 
        * math_cursor.C: Cursor improvements after a few dead-ends
        in the evolution of cursor movement were tested and scrapped.
-       
+
 2001-06-24  The LyX Project  <Asger>
 
        * math_cursor.C: Renamed stack to path.
        declared in std:: namespace.
 
        * math_macrotemplate.h: do not use explicitely std::string, but
-       string. 
+       string.
 
        * math_macroarg.C: avoid bringing the whole std:: namespace in
        global-land. When you do that, there is an ambiguity between
        * math_macro.[Ch]:
        * math_macrotable.[Ch]:
        * math_macroarg.[Ch]: restructuring of macro handling
-       * several files: 
+       * several files:
 
 2001-04-25  Angus Leeming  <a.leeming@ic.ac.uk>
 
 
 2001-04-16  Allan Rae  <rae@lyx.org>
 
-       * formula.C (Latex, getLabelList, LocalDispatch): 
-       * math_parser.C (mathed_parse): 
+       * formula.C (Latex, getLabelList, LocalDispatch):
+       * math_parser.C (mathed_parse):
        * math_parinset.C (Write): #warning triggers an error on Sun CC 6.0 as
        an unrecognised preprocessor directive.  So ensure they're wrapped.
 
        * math_matrixinset.h:
        * math_parinset.[Ch]:
        * math_rowst.[Ch]: move MathedRowContainer::row_ to the base
-      
+
 2001-03-13  John Levon  <moz@compsoc.man.ac.uk>
 
        * Makefile.am:
 
 2001-03-08  André Pönitz  <poenitz@gmx.net>
 
-       * math_rowst.h: give MathedRowContainer an 'insert' method. 
+       * math_rowst.h: give MathedRowContainer an 'insert' method.
 
        * math_xiter.C: new 'container()' method to encapsulated access to
          the MathParInset's MathedRowContainer
 
        * math_matrixinset.[hC]: remove copy constructr and destructor. Those
          automatically created by the compiler are ok now.
-       
+
 2001-03-06  André Pönitz  <poenitz@gmx.net>
 
        * array.[Ch]: factor out deep_copy,
-         remove third argument from raw_pointer_insert 
+         remove third argument from raw_pointer_insert
 
-       * math_iter.[Ch]: remove unused function Clear()        
+       * math_iter.[Ch]: remove unused function Clear()
 
        * math_cursor.C: change signature of MathStackXIter:push()
          whitespace changes
        shared_ptr, let constructor take a shared_ptr
 
        * math_macro.C (MathMacro): take shared_ptr as arg, remove double
-       initialization. 
+       initialization.
        (draw): remove unneded update, remove removed update of x,y
        (GetXY): call tmplates GetMacroXY directly
        (SetFocus): call Metrics() instead of update()
 
        * math_cursor.C: changes because of the above
        * math_parser.C: changes because of the abobe
-       
+
        * formulamacro.h: change tmacro_ to be a shared_ptr, remove
        default arg on constructor.
        * formulamacro.C: changes because of the above
        (~MathFuncInset): remove
 
        * math_fracinset.h: make MathParInset den_ a real object and not a
-       pointer. 
+       pointer.
 
        * math_fracinset.C (MathFracInset): clean up, move initalization
        to initialization list
        (Clone): remove leak
 
        * math_draw.C: delete file
-       
+
        * math_dotsinset.[Ch]: add pragma
 
        * math_bigopinset.h: make protected variables private add '_' to vars.
        * math_macroarg.C (MathMacroArgument): delete
        * math_macro.C (~MathMacro): delete
        * math_macrotemplate.C (~MathMacroTemplate): delete
-       
+
        * math_decorationinset.[Ch]: add pragma
        * math_deliminset.[Ch]: likewise
        * math_fracinset.[Ch]: likewise
        * math_macroarg.[Ch]: likewise
        * math_macrotemplate.[Ch]: likewise
        * math_matrixinset.[Ch]: likewise
-       
+
        * formulamacro.C (Read): set contents of tmacro_ to ar.
 
        * formulamacro.h: add '_' to private variables.
        * move MathIter::Copy(int, int) to MathArray::shrink(pos, pos)
 
        * several files: subsequent changes
-       
+
        * math_cursor.C: make selarray a proper MathArray
 
        * several files: Change "MathedArray *" to "MathedArray &"
 2001-02-14  André Pönitz  <poenitz@gmx.net>
 
        * array.[Ch]: "deep" copy constructor and assignment operator for
-       MathArray 
+       MathArray
 
        * math_iter.[Ch]: seperate Copy() from Copy(int, int)
 
 2001-02-14  André Pönitz  <poenitz@gmx.net>
 
        * array.[Ch]: remove constructor and  enums ARRAY_MIN_SIZE and
-       ARRAY_STEP 
+       ARRAY_STEP
 
        * math_iter.C: default-construct and resize array
 
        of private variables.
 
        * changes to several files because of the above.
-       
+
 2001-02-14  André Pönitz  <poenitz@gmx.net>
 
        * math_iter.[Ch]: hide fcode_
 
        * move funcs to more localized files, more general cleanup.
        Constify several local vars. Doxygen changes. Formatting.
-       
+
 2001-02-15  Lars Gullik Bjønnes  <larsbj@lyx.org>
 
        * support.C: add some consts
 
 2001-02-14  André Pönitz  <poenitz@gmx.net>
 
-       * formula.C: reformatting 
+       * formula.C: reformatting
 
        * math_cursor.[Ch]:
          math_iter.[Ch]:
 
 2001-02-14  Lars Gullik Bjønnes  <larsbj@lyx.org>
 
-       * math_parser.C: 
-       * math_panel.C: 
+       * math_parser.C:
+       * math_panel.C:
        * formula.C: remove cruft
 
        * array.C (begin): new method
        (end): ditto
 
 2001-02-14  André Pönitz  <poenitz@gmx.net>
-       
+
        * math_iter.[Ch]: remove 'insert', 'maxsize' and 'ARRAY_SIZE'
 
-       * math_cursor.C: reformatting 
+       * math_cursor.C: reformatting
 
 2001-02-14  Jean-Marc Lasgouttes  <Jean-Marc.Lasgouttes@inria.fr>
 
-       * math_spaceinset.C: 
-       * math_root.C: 
-       * math_matrixinset.C: 
-       * math_macrotemplate.C: 
-       * math_funcinset.C: 
-       * math_fracinset.C: 
-       * math_dotsinset.C: 
-       * math_deliminset.C: 
-       * math_decorationinset.C: 
-       * math_bigopinset.C: 
-       * math_accentinset.C: 
+       * math_spaceinset.C:
+       * math_root.C:
+       * math_matrixinset.C:
+       * math_macrotemplate.C:
+       * math_funcinset.C:
+       * math_fracinset.C:
+       * math_dotsinset.C:
+       * math_deliminset.C:
+       * math_decorationinset.C:
+       * math_bigopinset.C:
+       * math_accentinset.C:
        * math_sqrtinset.C: include LOstream.h and add using directive.
 
 2001-02-14  André Pönitz  <poenitz@gmx.net>
 
-       * math_iter.C: reformatting 
+       * math_iter.C: reformatting
 
 2001-02-13  Lars Gullik Bjønnes  <larsbj@lyx.org>
 
        * math_spaceinset.C (GetSpace): move here
 
        * math_parinset.C: add debug.h, move several prev. inlined methods
-       here. 
+       here.
 
        * math_macrotable.C math_xiter.C support.C: add debug.h
 
 2001-02-13  Jean-Marc Lasgouttes  <Jean-Marc.Lasgouttes@inria.fr>
 
        * Makefile.am (libmathed_la_SOURCES): remove duplicate
-       math_sqrtinset. 
+       math_sqrtinset.
 
-       * support.C: 
-       * math_xiter.C: 
+       * support.C:
+       * math_xiter.C:
        * math_parinset.C: add a bunch of "using" directives.
 
-       * math_funcinset.h: 
-       * math_decorationinset.h: 
-       * math_bigopinset.h: 
+       * math_funcinset.h:
+       * math_decorationinset.h:
+       * math_bigopinset.h:
        * math_spaceinset.h: remove more couples of inline.
 
 2001-02-13  Lars Gullik Bjønnes  <larsbj@lyx.org>
 
        * math_xiter.h: remove a couple of "inline"
 
-       * array.C (strange_copy): fix bug (hopefully) 
+       * array.C (strange_copy): fix bug (hopefully)
        * many files: add a lot of new files and move methods to the class
        files they belong to. Only first attempt at cleanup more will
        follow.
-       
+
 2001-02-12  André Pönitz  <poenitz@gmx.net>
-       
+
        * math_macro.[hC]: replace MathMacroArgument[] with
          std::vector<MathMacroArgument>
        * math_defs.h:
        * math_panel.h:
        * math_symbols.C: replace FL_OBJECTP[] with
        std::vector<FL_OBJECT*>
-       
+
 2001-02-12  Lars Gullik Bjønnes  <larsbj@lyx.org>
 
        * math_defs.h (struct MathedRowSt): make all private variables end
        environment.
 
 2001-02-12  André Pönitz  <poenitz@gmx.net>
-       
+
        * array.[hC]: replace private variable maxsize_ with call to
        bf_.size()
        * math_defs.h: replace int[] by std::vector<int> for
        changed name from LyxArrayBase to MathedArray.
        changed name of some methods to start with lowerchar.
        moved inline methods to array.C
-       
+
        * math_iter.C + several file: changes because of the above.
 
        * array.C: new file with the prev inline methods.
-       
+
 2001-02-10  Dekel Tsur  <dekelts@tau.ac.il>
 
        * Many files: add support for the align environment from amsmath.
 2001-02-09  André Pönitz  <poenitz@gmx.net>
 
        * array.h: replace array buffer  'byte bf[]'  by 'std::vector<byte> bf'
-       * several files: subsequent changes         
+       * several files: subsequent changes
        * math_iter.h: remove unused prototype
        * array.h: ditto.
 
 
 2001-02-02  Dekel Tsur  <dekelts@tau.ac.il>
 
-       * Many files: Add support for multline and alignat environments from 
+       * Many files: Add support for multline and alignat environments from
        amsmath.
 
 2001-02-02  Dekel Tsur  <dekelts@tau.ac.il>
 2001-01-15  Dekel Tsur  <dekelts@tau.ac.il>
 
        * math_draw.C (Metrics): Use the correct GetString.
-
index 09930934b412415127528ce99951aad001fd9972..3b7d102fe8a43f897420e41a8db94712b17cdf24 100644 (file)
@@ -92,7 +92,7 @@ namespace {
                                        "eval(`latex/latex/*`)):\n";
 
                // remove spurious \\noalign{\\medskip} in matrix output
-               header += 
+               header +=
                        "`latex/latex/matrix`:= "
                                "subs(`\\\\\\\\\\\\noalign{\\\\medskip}` = `\\\\\\\\`,"
                                        "eval(`latex/latex/matrix`)):\n";
@@ -111,7 +111,7 @@ namespace {
                        //
                        // ... > echo "1A;" | mint -i 1 -S -s -q
                        // on line     1: 1A;
-                       //                 ^ syntax error - 
+                       //                 ^ syntax error -
                        //                   Probably missing an operator such as * p
                        //
                        lyxerr << "checking expr: '" << expr << "'\n";
@@ -143,8 +143,8 @@ namespace {
                mathed_parse_cell(res, out);
                return res;
        }
-               
-       
+
+
        MathArray pipeThroughOctave(string const &, MathArray const & ar)
        {
                ostringstream os;
@@ -155,13 +155,13 @@ namespace {
 
                for (int i = 0; i < 100; ++i) { // at most 100 attempts
                        //
-                       // try to fix missing '*' the hard way 
+                       // try to fix missing '*' the hard way
                        // parse error:
                        // >>> ([[1 2 3 ];[2 3 1 ];[3 1 2 ]])([[1 2 3 ];[2 3 1 ];[3 1 2 ]])
                        //                                   ^
                        //
                        lyxerr << "checking expr: '" << expr << "'\n";
-                       out = captureOutput("octave -q 2>&1", expr);
+                       out = captureOutput("octave -q 2>&1", expr);
                        lyxerr << "checking out: '" << out << "'\n";
 
                        // leave loop if expression syntax is probably ok
@@ -234,7 +234,7 @@ namespace {
                        lyxerr << "converter to '" << lang << "' not found\n";
                        return MathArray();
                }
-               
+
                // run external sript
                string out = captureOutput(file, data);
                MathArray res;
@@ -255,7 +255,7 @@ InsetFormula::InsetFormula(MathInsetTypes t)
 {}
 
 
-InsetFormula::InsetFormula(string const & s) 
+InsetFormula::InsetFormula(string const & s)
 {
        if (s.size()) {
                bool res = mathed_parse_normal(par_, s);
@@ -388,7 +388,7 @@ InsetFormula::localDispatch(BufferView * bv, kb_action action,
 
        switch (action) {
 
-               case LFUN_BREAKLINE: 
+               case LFUN_BREAKLINE:
                        bv->lockedInsetStoreUndo(Undo::INSERT);
                        mathcursor->breakLine();
                        mathcursor->normalize();
@@ -496,11 +496,11 @@ InsetFormula::localDispatch(BufferView * bv, kb_action action,
                        updateLocal(bv, true);
                        break;
                }
-               
+
                case LFUN_PASTESELECTION:
                {
                        string const clip = bv->getClipboard();
-               if (!clip.empty())
+               if (!clip.empty())
                                mathed_parse_normal(par_, clip);
                        break;
                }
@@ -523,14 +523,14 @@ void InsetFormula::handleExtern(const string & arg)
 {
        // where are we?
        if (!mathcursor)
-               return; 
+               return;
 
        string lang;
        string extra;
        istringstream iss(arg.c_str());
        iss >> lang >> extra;
        if (extra.empty())
-               extra = "noextra";      
+               extra = "noextra";
 
        bool selected = mathcursor->selection();
 
@@ -588,9 +588,9 @@ void InsetFormula::validate(LaTeXFeatures & features) const
 
 bool InsetFormula::insetAllowed(Inset::Code code) const
 {
-       return 
+       return
                (code == Inset::LABEL_CODE && display())
-               || code == Inset::ERT_CODE; 
+               || code == Inset::ERT_CODE;
 }
 
 
index dd2ec650ca9681c51f167c00d8175b281d59fb5d..cefe8a8ed8467c3e1c0131e94b9faaeeaed87232 100644 (file)
@@ -2,9 +2,9 @@
 /*
  *  File:        formula.h
  *  Purpose:     Declaration of formula inset
- *  Author:      Alejandro Aguilar Sierra <asierra@servidor.unam.mx> 
+ *  Author:      Alejandro Aguilar Sierra <asierra@servidor.unam.mx>
  *  Created:     January 1996
- *  Description: Allows the edition of math paragraphs inside Lyx. 
+ *  Description: Allows the edition of math paragraphs inside Lyx.
  *
  *  Copyright: 1996, Alejandro Aguilar Sierra
  *
@@ -14,7 +14,7 @@
  *   the GNU General Public Licence version 2 or later.
  */
 
-#ifndef INSET_FORMULA_H 
+#ifndef INSET_FORMULA_H
 #define INSET_FORMULA_H
 
 #ifdef __GNUG__
index 51fde9e14ebcab0070b4c029b387577abfe2a0d6..8b02a4715455346526abf60fe912ff6b38e2dddc 100644 (file)
@@ -70,7 +70,7 @@ int hack_y;
 int hack_button;
 
 
-void handleFont(BufferView * bv, string const & arg, MathTextCodes t) 
+void handleFont(BufferView * bv, string const & arg, MathTextCodes t)
 {
        if (mathcursor->selection())
                bv->lockedInsetStoreUndo(Undo::EDIT);
@@ -133,14 +133,14 @@ void InsetFormulaBase::validate(LaTeXFeatures &) const
 {}
 
 
-void InsetFormulaBase::metrics(BufferView * bv, LyXFont const & f) const 
+void InsetFormulaBase::metrics(BufferView * bv, LyXFont const & f) const
 {
        font_ = f;
        metrics(bv);
 }
 
 
-void InsetFormulaBase::metrics(BufferView * bv) const 
+void InsetFormulaBase::metrics(BufferView * bv) const
 {
        if (bv)
                view_ = bv;
@@ -279,7 +279,7 @@ void InsetFormulaBase::updateLocal(BufferView * bv, bool dirty)
 
 
 bool InsetFormulaBase::insetButtonRelease(BufferView * bv,
-                                          int /*x*/, int /*y*/, int /*button*/)
+                                         int /*x*/, int /*y*/, int /*button*/)
 {
        if (!mathcursor)
                return false;
@@ -328,7 +328,7 @@ void InsetFormulaBase::insetButtonPress(BufferView * bv,
                                        bv->getLyXText()->selectionAsString(bv->buffer(), false);
                                mathed_parse_cell(ar, sel);
                                mathcursor->insert(ar);
-                       }       
+                       }
                        break;
 */
                case 3:
@@ -353,9 +353,9 @@ void InsetFormulaBase::insetMotionNotify(BufferView * bv,
        first_x = x;
        first_y = y;
 
-       if (!mathcursor->selection()) 
+       if (!mathcursor->selection())
                mathcursor->selStart();
-       
+
        //lyxerr << "insetMotionNotify: " << x + xo_ << ' ' << y + yo_
        //      << ' ' << button << "\n";
        hideInsetCursor(bv);
@@ -378,7 +378,7 @@ InsetFormulaBase::localDispatch(BufferView * bv, kb_action action,
        //lyxerr << "InsetFormulaBase::localDispatch: act: " << action
        //      << " arg: '" << arg << "' cursor: " << mathcursor << "\n";
 
-       if (!mathcursor) 
+       if (!mathcursor)
                return UNDISPATCHED;
 
        if (mathcursor->asHyperActiveInset()) {
@@ -568,7 +568,7 @@ InsetFormulaBase::localDispatch(BufferView * bv, kb_action action,
        case LFUN_DEFAULT:      handleFont(bv, arg, LM_TC_VAR); break;
        case LFUN_FREE:         handleFont(bv, arg, LM_TC_TEXTRM); break;
 
-       case LFUN_GREEK: 
+       case LFUN_GREEK:
                handleFont(bv, arg, LM_TC_GREEK1);
                if (arg.size())
                        mathcursor->interpret(arg);
@@ -618,7 +618,7 @@ InsetFormulaBase::localDispatch(BufferView * bv, kb_action action,
                updateLocal(bv, true);
                break;
        }
-       
+
        case LFUN_SUPERSCRIPT:
        case LFUN_SUBSCRIPT:
        {
@@ -627,7 +627,7 @@ InsetFormulaBase::localDispatch(BufferView * bv, kb_action action,
                updateLocal(bv, true);
                break;
        }
-       
+
        case LFUN_MATH_DELIM:
        {
                lyxerr << "formulabase::LFUN_MATH_DELIM, arg: '" << arg << "'\n";
@@ -825,7 +825,7 @@ bool InsetFormulaBase::searchForward(BufferView * bv, string const & str,
                //lyxerr << "reset lastformula to " << this << "\n";
                lastformula = this;
                laststr = str;
-               current = ibegin(par().nucleus());
+               current = ibegin(par().nucleus());
                ar.clear();
                mathed_parse_cell(ar, str);
        } else {
@@ -893,7 +893,7 @@ void mathDispatchCreation(BufferView * bv, string const & arg, bool display)
                } else {
                        // create a macro if we see "\\newcommand" somewhere, and an ordinary
                        // formula otherwise
-                       if (sel.find("\\newcommand") == string::npos) 
+                       if (sel.find("\\newcommand") == string::npos)
                                f = new InsetFormula(sel);
                        else {
                                string name;
@@ -914,7 +914,7 @@ void mathDispatchMathDisplay(BufferView * bv, string const & arg)
        mathDispatchCreation(bv, arg, true);
 }
 
-       
+
 void mathDispatchMathMode(BufferView * bv, string const & arg)
 {
        mathDispatchCreation(bv, arg, false);
@@ -944,20 +944,20 @@ void mathDispatchMathMacro(BufferView * bv, string const & arg)
 
 void mathDispatchMathDelim(BufferView * bv, string const & arg)
 {
-       if (bv->available()) { 
+       if (bv->available()) {
                if (openNewInset(bv, new InsetFormula))
                        bv->theLockingInset()->localDispatch(bv, LFUN_MATH_DELIM, arg);
        }
-}         
+}
 
 
 void mathDispatchInsertMatrix(BufferView * bv, string const & arg)
-{         
-       if (bv->available()) { 
+{
+       if (bv->available()) {
                if (openNewInset(bv, new InsetFormula))
                        bv->theLockingInset()->localDispatch(bv, LFUN_INSERT_MATRIX, arg);
        }
-}         
+}
 
 
 void mathDispatchInsertMath(BufferView * bv, string const & arg)
@@ -974,16 +974,16 @@ void mathDispatchInsertMath(BufferView * bv, string const & arg)
 
 
 void mathDispatchGreek(BufferView * bv, string const & arg)
-{         
-       if (bv->available()) { 
+{
+       if (bv->available()) {
                InsetFormula * f = new InsetFormula;
                if (openNewInset(bv, f)) {
                        bv->theLockingInset()->localDispatch(bv, LFUN_GREEK, arg);
                        bv->unlockInset(f);
                }
        }
-}         
+}
 
 
 void mathDispatch(BufferView *, kb_action, string const &)
-{}        
+{}
index 25048df783059caa7eb7abaa2ba81b7f46c3e86a..67eeaa159a5fcf2c045cba788c2e923d4c60eb98 100644 (file)
@@ -4,7 +4,7 @@
  *  Purpose:     Common parts of the math LyX insets
  *  Author:      André Pönitz
  *  Created:     May 2001
- *  Description: Allows the edition of math paragraphs inside Lyx. 
+ *  Description: Allows the edition of math paragraphs inside Lyx.
  *
  *  Copyright: 2001, The LyX Project
  *
@@ -12,7 +12,7 @@
  *   the GNU General Public Licence version 2 or later.
  */
 
-#ifndef INSET_FORMULABASE_H 
+#ifndef INSET_FORMULABASE_H
 #define INSET_FORMULABASE_H
 
 #ifdef __GNUG__
@@ -87,10 +87,10 @@ public:
        virtual void insetMotionNotify(BufferView *, int x, int y, int state);
        ///
        virtual void insetUnlock(BufferView *);
-   
+
        /// To allow transparent use of math editing functions
        virtual RESULT localDispatch(BufferView *, kb_action, string const &);
-    
+
        ///
        virtual std::vector<string> const getLabelList() const;
        ///
@@ -104,10 +104,10 @@ public:
 
        ///
        virtual bool searchForward(BufferView *, string const &,
-                                  bool = true, bool = false);
+                                  bool = true, bool = false);
        ///
        virtual bool searchBackward(BufferView *, string const &,
-                                   bool = true, bool = false);
+                                   bool = true, bool = false);
        ///
        virtual bool isTextInset() const { return true; }
        ///
@@ -123,7 +123,7 @@ private:
        void handleAccent(BufferView * bv, string const & arg, string const & name);
 
        ///
-       mutable BufferView * view_;     
+       mutable BufferView * view_;
        ///
        mutable LyXFont font_;
 
index 814bfca680470af690643df8249b81c58079b8b6..764321417bf97fec3cbcfa814b569d24fafa23e6 100644 (file)
@@ -3,7 +3,7 @@
  *  Purpose:     Implementation of the formula macro LyX inset
  *  Author:      André Pönitz, based on ideas of Alejandro Aguilar Sierra
  *  Created:     March 2001
- *  Description: Allows the edition of math macros inside Lyx. 
+ *  Description: Allows the edition of math macros inside Lyx.
  *
  *  Copyright: 2001  The LyX Project
  *
@@ -76,7 +76,7 @@ void InsetFormulaMacro::write(Buffer const *, ostream & os) const
 }
 
 
-int InsetFormulaMacro::latex(Buffer const *, ostream & os, bool fragile, 
+int InsetFormulaMacro::latex(Buffer const *, ostream & os, bool fragile,
                             bool /*free_spacing*/) const
 {
        WriteStream wi(os, fragile);
@@ -172,7 +172,7 @@ void InsetFormulaMacro::draw(BufferView * bv, LyXFont const & f,
 
        // label
        font.setColor(LColor::math);
-       
+
        int const a = y - ascent(bv, font) + 1;
        int const w = width(bv, font) - 2;
        int const h = ascent(bv, font) + descent(bv, font) - 2;
@@ -193,4 +193,3 @@ void InsetFormulaMacro::draw(BufferView * bv, LyXFont const & f,
        yo_ = y;
        par()->draw(pain, xo_, yo_);
 }
-
index 407ba74135eeb053877a09668a88069a45df0913..5fb3b4e1c6571476b3e2094865f1f902575e550a 100644 (file)
@@ -2,9 +2,9 @@
 /*
  *  File:        formula.h
  *  Purpose:     Declaration of formula inset
- *  Author:      Alejandro Aguilar Sierra <asierra@servidor.unam.mx> 
+ *  Author:      Alejandro Aguilar Sierra <asierra@servidor.unam.mx>
  *  Created:     January 1996
- *  Description: Allows the edition of math paragraphs inside Lyx. 
+ *  Description: Allows the edition of math paragraphs inside Lyx.
  *
  *  Copyright: 1996, Alejandro Aguilar Sierra
  *
@@ -14,7 +14,7 @@
  *   the GNU General Public Licence version 2 or later.
  */
 
-#ifndef INSET_FORMULA_MACRO_H 
+#ifndef INSET_FORMULA_MACRO_H
 #define INSET_FORMULA_MACRO_H
 
 #include "formulabase.h"
@@ -26,7 +26,7 @@
 class MathMacroTemplate;
 
 // InsetFormulaMacro's only knows its name and asks the global
-// MathMacroTable if it needs to know more. 
+// MathMacroTable if it needs to know more.
 
 ///
 class InsetFormulaMacro: public InsetFormulaBase {
index ad53ae2c1557021edec28efd114723b58e5e1834..efd88cf89f6e31052c9fbfb6eb5b702e38162829 100644 (file)
@@ -67,7 +67,7 @@ void MathAMSArrayInset::metrics(MathMetricsInfo const & st) const
 
 
 void MathAMSArrayInset::draw(Painter & pain, int x, int y) const
-{ 
+{
        MathGridInset::draw(pain, x + 6, y);
        int yy = y - ascent_;
        mathed_draw_deco(pain, x + 1, yy, 5, height(), name_left());
index 861f51d7dad8851fddcd91c32bc36cb1694b4502..27154a99bef6e97d28ca69f63450d1c4d3238434 100644 (file)
@@ -10,7 +10,7 @@
 
 
 class MathAMSArrayInset : public MathGridInset {
-public: 
+public:
        ///
        MathAMSArrayInset(string const & name_, int m, int n);
        ///
index e19bf8b25e9d5c896766cb9a34eb8dd08f4f6fc7..41e2d754a019b1ce85bed0bb106c72ba371128fa 100644 (file)
@@ -81,7 +81,7 @@ void MathArrayInset::write(WriteStream & os) const
                os << "\\protect";
        os << "\\begin{" << name_ << "}";
 
-       if (v_align_ == 't' || v_align_ == 'b') 
+       if (v_align_ == 't' || v_align_ == 'b')
                os << '[' << char(v_align_) << ']';
        os << '{' << halign() << "}\n";
 
index ce74bf261c64ff24b6fd38c36ca58cc360ab1f64..8a715370d20329a85395120381f7c1dd5ad46ae4 100644 (file)
@@ -10,7 +10,7 @@
 
 
 class MathArrayInset : public MathGridInset {
-public: 
+public:
        ///
        MathArrayInset(string const &, int m, int n);
        ///
index 8e423064bac79325f49e4ae6008fee08cd7db078..76fc538851833e1c95f916cb8cad07cb1c37b77b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  File:        math_atom.C
- *  Purpose:     Wrapper for MathInset * 
+ *  Purpose:     Wrapper for MathInset *
  *  Author:      André Pönitz
  *  Created:     July 2001
  *
index 2c79655c8a40d8f389134193dd702071fcaddb4b..69d8b47c8dce2783ec71b7ab1b8f9d5f8c9a5513 100644 (file)
@@ -7,12 +7,12 @@
 #pragma interface
 #endif
 
-/** 
+/**
 The 'atom' is the major blob in math typesetting.  And 'atom' consists
 of a nucleus, an optional superscript, and an optional subscript.
 
 Exactly where the subscript and superscript are drawn depends on the
-size, and type, of the nucleus they are attached to.  
+size, and type, of the nucleus they are attached to.
 
 Jules
 
@@ -33,7 +33,7 @@ Andre'
 class MathInset;
 
 class MathAtom {
-public: 
+public:
        /// default constructor, object is useless, but we need it to put it into
        // std::containers
        MathAtom();
@@ -42,7 +42,7 @@ public:
        /// copy constructor, invokes nucleus_->clone()
        MathAtom(MathAtom const &);
        /// we really need to clean up
-       ~MathAtom(); 
+       ~MathAtom();
        /// assignment invokes nucleus_->clone()
        void operator=(MathAtom const &);
        /// change inset under the hood
index fb9ec3e9f731990374a4e7ce639ff22b95c6031b..cff9a7d2393b4f9f7d6817301abd47ba8744337b 100644 (file)
@@ -17,7 +17,7 @@ MathBigInset::MathBigInset(string const & name, string const & delim)
 
 
 MathInset * MathBigInset::clone() const
-{   
+{
        return new MathBigInset(*this);
 }
 
@@ -53,7 +53,7 @@ void MathBigInset::metrics(MathMetricsInfo const & mi) const
 
 
 void MathBigInset::draw(Painter & pain, int x, int y) const
-{ 
+{
        mathed_draw_deco(pain, x + 1, y - ascent_, 4, height(), delim_);
 }
 
index 850b4b012d6563e32b5d7cedd552f29ca8ee842d..daf0078db07530716eb7a77300789f5f0a14b7ad 100644 (file)
@@ -33,7 +33,7 @@ private:
        size_type size() const;
        ///
        double increase() const;
-       
+
        /// \bigl or what?
        string const name_;
        /// ( or [ or Vert...
index bd1300e07ef194649248817eea69ca21b132a234..b20a12fbca22bd6f9b882d0f4b15da4fc82e2e1d 100644 (file)
@@ -20,7 +20,7 @@ MathBinaryOpInset::MathBinaryOpInset(char op)
 
 
 MathInset * MathBinaryOpInset::clone() const
-{   
+{
        return new MathBinaryOpInset(*this);
 }
 
@@ -43,10 +43,10 @@ void MathBinaryOpInset::metrics(MathMetricsInfo const & mi) const
 
 
 void MathBinaryOpInset::draw(Painter & pain, int x, int y) const
-{ 
-       xcell(0).draw(pain, x, y); 
+{
+       xcell(0).draw(pain, x, y);
        drawChar(pain, LM_TC_CONST, mi_, x + xcell(0).width() , y, op_);
-       xcell(1).draw(pain, x + width() - xcell(1).width(), y); 
+       xcell(1).draw(pain, x + width() - xcell(1).width(), y);
 }
 
 
index f7aa2693dbb7c403bea28784088b8dc93d641d9a..20732e7ccacfb374af4f2b19807d6ce042ff2071 100644 (file)
@@ -18,7 +18,7 @@ MathBinomInset::MathBinomInset()
 
 
 MathInset * MathBinomInset::clone() const
-{   
+{
        return new MathBinomInset(*this);
 }
 
@@ -41,8 +41,8 @@ void MathBinomInset::metrics(MathMetricsInfo const & st) const
        xcell(0).metrics(mi);
        xcell(1).metrics(mi);
        ascent_  = xcell(0).height() + 4 + 5;
-       descent_ = xcell(1).height() + 4 - 5; 
-       width_   = max(xcell(0).width(), xcell(1).width()) + 2 * dw() + 4; 
+       descent_ = xcell(1).height() + 4 - 5;
+       width_   = max(xcell(0).width(), xcell(1).width()) + 2 * dw() + 4;
 }
 
 
index 213d19a0747a1e9b299b3b2ba456845743a93e59..3bac831efe615dc9ed090ef23495e9d116b8953e 100644 (file)
@@ -9,7 +9,7 @@
 #endif
 
 /** Binom like objects
-    \author André Pönitz 
+    \author André Pönitz
  */
 class MathBinomInset : public MathFracbaseInset {
 public:
index 6680d7fd221c16ad0cfc3ddd06153869cc5c1cd9..9e73f782935e7da5a594db9279d8b1a107da7267 100644 (file)
@@ -19,7 +19,7 @@ MathBraceInset::MathBraceInset()
 
 
 MathInset * MathBraceInset::clone() const
-{   
+{
        return new MathBraceInset(*this);
 }
 
@@ -37,7 +37,7 @@ void MathBraceInset::metrics(MathMetricsInfo const & mi) const
 
 
 void MathBraceInset::draw(Painter & pain, int x, int y) const
-{ 
+{
        drawChar(pain, font_, x, y, '{');
        xcell(0).draw(pain, x + wid_, y);
        drawChar(pain, font_, x + width_ - wid_, y, '}');
@@ -54,5 +54,3 @@ void MathBraceInset::normalize(NormalStream & os) const
 {
        os << "[block " << cell(0) << ']';
 }
-
-
index 2957fe031f70829c5df8260ac8ba2cb7a21d4570..adebc05bb0125210305f2fb08995abc7a1ddac81 100644 (file)
@@ -9,7 +9,7 @@
 #pragma interface
 #endif
 
-/** Extra nesting 
+/** Extra nesting
     \author André Pönitz
 */
 
index 083782564bcb54e813001d0932678178bd6e2001..cf3b21ff54fb7216b1ab435cfa43b3e4a57f0b4c 100644 (file)
@@ -30,7 +30,7 @@ void MathCasesInset::metrics(MathMetricsInfo const & mi) const
 
 
 void MathCasesInset::draw(Painter & pain, int x, int y) const
-{ 
+{
        mathed_draw_deco(pain, x + 1, y - ascent(), 6, height(), "{");
        MathGridInset::draw(pain, x + 8, y);
 }
index ca1ce4b43196b0db8381a82d06644cd5ee290c27..07a83a2de64c7ec9890d05fb70ce6ae245f29af0 100644 (file)
@@ -10,7 +10,7 @@
 
 
 class MathCasesInset : public MathGridInset {
-public: 
+public:
        ///
        explicit MathCasesInset(row_type rows = 1u);
        ///
index 1e65c67936021196842dcd35587bb132ee90dfd1..71a3609ccf4538710cfd28dca3a927b831ead7d6 100644 (file)
@@ -57,7 +57,7 @@ MathTextCodes MathCharInset::nativeCode(char c)
 
 
 MathInset * MathCharInset::clone() const
-{   
+{
        return new MathCharInset(*this);
 }
 
@@ -72,7 +72,7 @@ void MathCharInset::metrics(MathMetricsInfo const & mi) const
 
 
 void MathCharInset::draw(Painter & pain, int x, int y) const
-{ 
+{
        //lyxerr << "drawing '" << char_ << "' code: " << code_ << endl;
        if (isBinaryOp(char_, code_))
                x += lyxfont::width(' ', font_);
@@ -89,7 +89,7 @@ void MathCharInset::metricsT(TextMetricsInfo const &) const
 
 
 void MathCharInset::drawT(TextPainter & pain, int x, int y) const
-{ 
+{
        //lyxerr << "drawing text '" << char_ << "' code: " << code_ << endl;
        pain.draw(x, y, char_);
 }
index 1200f2cc3e953372c90fa390add33238bcfb165f..175a0157a2f1755a561158d5f38eb676c7c500f4 100644 (file)
@@ -358,7 +358,7 @@ void MathCursor::last()
 
 
 bool positionable(MathCursor::cursor_type const & cursor,
-                  MathCursor::cursor_type const & anchor)
+                 MathCursor::cursor_type const & anchor)
 {
        // avoid deeper nested insets when selecting
        if (cursor.size() > anchor.size())
@@ -946,12 +946,12 @@ void MathCursor::normalize()
        }
 #endif
 
-       if (idx() >= par()->nargs()) {
+       if (idx() >= par()->nargs()) {
                lyxerr << "this should not really happen - 1: "
                       << idx() << " " << par()->nargs() << "\n";
                dump("error 2");
        }
-       idx() = min(idx(), par()->nargs() - 1);
+       idx() = min(idx(), par()->nargs() - 1);
 
        if (pos() > size()) {
                lyxerr << "this should not really happen - 2: "
@@ -1238,7 +1238,7 @@ bool MathCursor::goUpDown(bool up)
                if (!popLeft()) {
                        // no such inset found, just take something "above"
                        ///lyxerr << "updown: handled by strange case\n";
-                       return 
+                       return
                                bruteFind(xo, yo,
                                        formula()->xlow(),
                                        formula()->xhigh(),
@@ -1363,7 +1363,7 @@ bool MathCursor::interpret(string const & s)
        }
 
        // prevent entering of recursive macros
-       if (formula()->lyxCode() == Inset::MATHMACRO_CODE 
+       if (formula()->lyxCode() == Inset::MATHMACRO_CODE
                && formula()->getInsetName() == s.substr(1))
        {
                lyxerr << "can't enter recursive macro\n";
index 433810c2298eeb8d651825c2c79cf74aaa048848..4f4a19fd65ac42067bc972ea9f18ecdae0c1370a 100644 (file)
@@ -2,7 +2,7 @@
 /*
  *  File:        math_cursor.h
  *  Purpose:     Declaration of interaction classes for mathed
- *  Author:      Alejandro Aguilar Sierra <asierra@servidor.unam.mx> 
+ *  Author:      Alejandro Aguilar Sierra <asierra@servidor.unam.mx>
  *  Created:     January 1996
  *  Description: MathCursor control all user interaction
  *
@@ -128,7 +128,7 @@ public:
        bool inMacroMode() const;
        /// are we currently typing '#1' or '#2' or...?
        bool inMacroArgMode() const;
-       
+
        // Local selection methods
        ///
        bool selection() const;
@@ -158,7 +158,7 @@ public:
        void handleNest(MathInset * p);
        /// splits cells and shifts right part to the next cell
        void splitCell();
-       /// splits line and insert new row of cell 
+       /// splits line and insert new row of cell
        void breakLine();
        /// read contents of line into an array
        void readLine(MathArray & ar) const;
@@ -185,12 +185,12 @@ public:
 
        /// make sure cursor position is valid
        void normalize();
-       /// mark current cursor trace for redraw 
+       /// mark current cursor trace for redraw
        void touch();
        ///
        UpdatableInset * asHyperActiveInset() const;
 
-       /// enter a MathInset 
+       /// enter a MathInset
        void push(MathAtom & par);
        /// enter a MathInset from the front
        void pushLeft(MathAtom & par);
@@ -236,7 +236,7 @@ public:
        void dump(char const * str) const;
        ///
        void stripFromLastEqualSign();
-       /// moves on 
+       /// moves on
        void setSelection(cursor_type const & where, size_type n);
        ///
        void insert(char);
@@ -244,7 +244,7 @@ public:
        /// hack for reveal codes
        void markInsert();
        void markErase();
-       
+
        ///
        friend class Selection;
 
@@ -268,7 +268,7 @@ private:
        MathInset::difference_type macroNamePos() const;
        ///
        void insert(char, MathTextCodes t);
-       /// can we enter the inset? 
+       /// can we enter the inset?
        bool openable(MathAtom const &, bool selection) const;
        /// write access to cursor cell position
        pos_type & pos();
index b9ecc2e79b0be99510e7964829cf3aa5860f9dd8..7ef98e0589ddb92a862920e69aea94428a522d62 100644 (file)
@@ -66,7 +66,7 @@ void MathArray::insert(size_type pos, MathArray const & ar)
 
 
 void MathArray::push_back(MathAtom const & t)
-{      
+{
        bf_.push_back(t);
 }
 
@@ -85,7 +85,7 @@ void MathArray::clear()
 
 void MathArray::swap(MathArray & ar)
 {
-       if (this != &ar) 
+       if (this != &ar)
                bf_.swap(ar.bf_);
 }
 
@@ -176,7 +176,7 @@ void MathArray::validate(LaTeXFeatures & features) const
 
 
 void MathArray::pop_back()
-{      
+{
        if (!size()) {
                lyxerr << "pop_back from empty array!\n";
                return;
@@ -219,7 +219,7 @@ bool MathArray::matchpart(MathArray const & ar, pos_type pos) const
 {
        if (size() < ar.size() + pos)
                return false;
-       const_iterator it = begin() + pos; 
+       const_iterator it = begin() + pos;
        for (const_iterator jt = ar.begin(); jt != ar.end(); ++jt, ++it)
                if (!jt->nucleus()->match(it->nucleus()))
                        return false;
@@ -265,6 +265,6 @@ bool MathArray::contains(MathArray const & ar) const
        for (const_iterator it = begin(); it != end(); ++it)
                if (it->nucleus()->contains(ar))
                        return true;
-       
+
        return false;
 }
index a69342d5315f7ec10a72c30c9863575d887e60ae..2b94c69dd074633e663f07d34f24079435acddc1 100644 (file)
@@ -1,7 +1,7 @@
 // -*- C++ -*-
 /*
- *  Purpose:     A general purpose resizable array.  
- *  Author:      Alejandro Aguilar Sierra <asierra@servidor.unam.mx> 
+ *  Purpose:     A general purpose resizable array.
+ *  Author:      Alejandro Aguilar Sierra <asierra@servidor.unam.mx>
  *  Created:     January 1996
  *
  *  Dependencies: None (almost)
@@ -33,7 +33,7 @@ class ReplaceData;
 
 /** \class MathArray
     \brief Low level container for math insets
-    
+
     \author Alejandro Aguilar Sierra
     \author André Pönitz
     \author Lars Gullik Bjønnes
@@ -73,7 +73,7 @@ public:
        void clear();
        ///
        void swap(MathArray &);
-       
+
        ///
        void insert(size_type pos, MathAtom const &);
        ///
@@ -126,9 +126,9 @@ public:
        ///
        void validate(LaTeXFeatures &) const;
        ///
-       const_iterator begin() const;   
+       const_iterator begin() const;
        ///
-       const_iterator end() const;     
+       const_iterator end() const;
        ///
        iterator begin();
        ///
index a5f9409688275d7f6cb5e52bed026db4b8e5ca57..0a70a07924db1af0cba46e3631a172c60583bb70 100644 (file)
@@ -17,7 +17,7 @@ MathDecorationInset::MathDecorationInset(string const & name)
 
 
 MathInset * MathDecorationInset::clone() const
-{   
+{
        return new MathDecorationInset(*this);
 }
 
@@ -81,7 +81,7 @@ void MathDecorationInset::metrics(MathMetricsInfo const & mi) const
        ascent_  = xcell(0).ascent();
        descent_ = xcell(0).descent();
 
-       dh_ = 6; //mathed_char_height(LM_TC_VAR, mi(), 'I', ascent_, descent_);  
+       dh_ = 6; //mathed_char_height(LM_TC_VAR, mi(), 'I', ascent_, descent_);
        dw_ = 6; //mathed_char_width(LM_TC_VAR, mi, 'x');
 
        if (upper()) {
@@ -95,9 +95,9 @@ void MathDecorationInset::metrics(MathMetricsInfo const & mi) const
 
 
 void MathDecorationInset::draw(Painter & pain, int x, int y) const
-{ 
+{
        xcell(0).draw(pain, x, y);
-       if (wide()) 
+       if (wide())
                mathed_draw_deco(pain, x, y + dy_, width_, dh_, name_);
        else
                mathed_draw_deco(pain, x + (width_ - dw_) / 2, y + dy_, dw_, dh_, name_);
index 5130dfdcc61499b7761922e9a8060af307c7722e..03c03dd4ca7772379e8180ed3c8b981887d5cb35 100644 (file)
@@ -1,8 +1,8 @@
 // -*- C++ -*-
 /*
  *  File:        math_defs.h
- *  Purpose:     Math editor definitions 
- *  Author:      Alejandro Aguilar Sierra <asierra@servidor.unam.mx> 
+ *  Purpose:     Math editor definitions
+ *  Author:      Alejandro Aguilar Sierra <asierra@servidor.unam.mx>
  *  Created:     January 1996
  *  Description: Math paragraph and objects for a WYSIWYG math editor.
  *
@@ -14,7 +14,7 @@
  *
  *   You are free to use and modify this code under the terms of
  *   the GNU General Public Licence version 2 or later.
- * 
+ *
  */
 
 #ifndef MATH_DEFS
@@ -27,7 +27,7 @@
 
 ///
 enum MathTextCodes  {
-       /// 
+       ///
        LM_TC_MIN = 0,
        /// internal code for variables
        LM_TC_VAR,
@@ -53,7 +53,7 @@ enum MathTextCodes  {
        LM_TC_IT,
        ///
        LM_TC_TEXTRM,
-       /// math mode TeX characters ",;:{}"  
+       /// math mode TeX characters ",;:{}"
        LM_TC_TEX,
        /// internal code when typing greek
        LM_TC_GREEK,
@@ -80,13 +80,13 @@ enum MathTextCodes  {
 };
 
 
-/// Types of lyx-math insets 
+/// Types of lyx-math insets
 enum MathInsetTypes  {
        ///
        LM_OT_SIMPLE = 0,
        ///
        LM_OT_EQUATION,
-       /// 
+       ///
        LM_OT_EQNARRAY,
        ///
        LM_OT_ALIGN,
index 564bc95532f52d93bd8cb00259ccfb26195ae4f0..84525f9d6844297ced15ee2829037c065698bc83 100644 (file)
@@ -21,7 +21,7 @@ MathDelimInset::MathDelimInset(string const & l, string const & r)
 
 
 MathInset * MathDelimInset::clone() const
-{   
+{
        return new MathDelimInset(*this);
 }
 
@@ -68,7 +68,7 @@ void MathDelimInset::metrics(MathMetricsInfo const & mi) const
 
 
 void MathDelimInset::draw(Painter & pain, int x, int y) const
-{ 
+{
        int const w = dw();
        int const b = y - ascent_;
        xcell(0).draw(pain, x + w + 4, y);
@@ -101,7 +101,7 @@ void MathDelimInset::maplize(MapleStream & os) const
                bool mat =
                        cell(0).size() == 1 && cell(0).begin()->nucleus()
                                        && cell(0).begin()->nucleus()->asMatrixInset();
-               if (mat)        
+               if (mat)
                        os << "linalg[det](" << cell(0) << ")";
                else
                        os << "abs(" << cell(0) << ")";
index c05620e98ac5e67ac8988c6056e11314b6a4de8a..7708364b2db5772c22e7b753f922c0f041d94861 100644 (file)
@@ -39,7 +39,7 @@ void MathDiffInset::metrics(MathMetricsInfo const &) const
 
 
 void MathDiffInset::draw(Painter &, int, int) const
-{  
+{
        lyxerr << "should not happen\n";
 }
 
@@ -72,4 +72,3 @@ void MathDiffInset::write(WriteStream &) const
 {
        lyxerr << "should not happen\n";
 }
-
index c1640dbb7b589fd74f42727143f881d74f0b9c34..e9de770737d0324aab5e97d22e6419171f35df76 100644 (file)
@@ -1,4 +1,3 @@
-
 #include "math_diminset.h"
 #include "Lsstream.h"
 #include "textpainter.h"
index 601f477b101d7a6171f9efceca21abc73cae568d..64fe5ee58e2c4f2c36217ef854d877cefb776c30 100644 (file)
@@ -10,9 +10,9 @@ class MathDimInset : public MathInset {
 public:
        /// not sure whether the initialization is really necessary
        MathDimInset() : width_(0), ascent_(0), descent_(0) {}
-       /// read ascent value (should be inline according to gprof) 
+       /// read ascent value (should be inline according to gprof)
        int ascent() const { return ascent_; }
-       /// read descent 
+       /// read descent
        int descent() const { return descent_; }
        /// read width
        int width() const { return width_; }
index 6fb6cbacc3c3e1e187a8254969a2c311bb036e17..fd2585452304cfef55f29777960a16efcbc8365e 100644 (file)
@@ -18,7 +18,7 @@ MathDotsInset::MathDotsInset(string const & name)
 MathInset * MathDotsInset::clone() const
 {
        return new MathDotsInset(*this);
-}     
+}
 
 
 void MathDotsInset::metrics(MathMetricsInfo const & mi) const
@@ -32,7 +32,7 @@ void MathDotsInset::metrics(MathMetricsInfo const & mi) const
                case 'v': width_ /= 2;
                case 'd': dh_ = ascent_; break;
        }
-} 
+}
 
 
 void MathDotsInset::draw(Painter & pain, int x, int y) const
index 87869a842167373507adde050e88f22eb6f302c4..9ac4f722b9c553e45ec97abf65f4bbbbb6bc9202 100644 (file)
@@ -29,5 +29,5 @@ protected:
        mutable int dh_;
        ///
        string const name_;
-};   
+};
 #endif
index f9c4f663aa3e91963e613ec6efc48167156cb4bf..84ab2df48978692dd5f93cb1ae36e16723cc3cef 100644 (file)
@@ -25,7 +25,7 @@ void MathExFuncInset::metrics(MathMetricsInfo const & mi) const
 
 
 void MathExFuncInset::draw(Painter & pain, int x, int y) const
-{  
+{
        drawStr(pain, font_, x, y, name_);
 }
 
@@ -58,5 +58,3 @@ void MathExFuncInset::write(WriteStream & os) const
 {
        os << '\\' << name_ << '{' << cell(0) << '}';
 }
-
-
index 81e6b8398049e5a14aa87ee218af9a3c415b6da1..663b527856236919b43fb02dd52a9e98d51ef82a 100644 (file)
@@ -44,7 +44,7 @@ bool MathExIntInset::hasScripts() const
 
 void MathExIntInset::normalize(NormalStream & os) const
 {
-       os << '[' << symbol_ << ' ' << cell(0) << ' ' << cell(1) << ' ' 
+       os << '[' << symbol_ << ' ' << cell(0) << ' ' << cell(1) << ' '
           << cell(2) << ' ' << cell(3) << ']';
 }
 
@@ -56,7 +56,7 @@ void MathExIntInset::metrics(MathMetricsInfo const &) const
 
 
 void MathExIntInset::draw(Painter &, int, int) const
-{  
+{
        lyxerr << "should not happen" << endl;
 }
 
@@ -66,7 +66,7 @@ void MathExIntInset::maplize(MapleStream & os) const
        os << symbol_ << '(';
        if (cell(0).size())
                os << cell(0);
-       else 
+       else
                os << '1';
        os << ',' << cell(1);
        if (hasScripts())
@@ -80,7 +80,7 @@ void MathExIntInset::mathmlize(MathMLStream & os) const
        boost::scoped_ptr<MathSymbolInset> sym(new MathSymbolInset(symbol_));
        //if (hasScripts())
        //      mathmlize(sym, os);
-       //else 
+       //else
                sym->mathmlize(os);
        os << cell(0) << "<mo> &InvisibleTimes; </mo>"
           << MTag("mrow") << "<mo> &DifferentialD; </mo>"
@@ -92,4 +92,3 @@ void MathExIntInset::write(WriteStream &) const
 {
        lyxerr << "should not happen" << endl;
 }
-
index 1681338fc174ceeda7d209a250d9340dd93b187c..3cf02b2bd2838d417bbe536b00dc50f208ccd5d8 100644 (file)
@@ -1,4 +1,3 @@
-
 // This file contains most of the magic that extracts "context
 // information" from the unstructered layout-oriented stuff in an
 // MathArray.
@@ -28,7 +27,7 @@ using std::find_if;
 
 ostream & operator<<(ostream & os, MathArray const & ar)
 {
-       NormalStream ns(os);    
+       NormalStream ns(os);
        ns << ar;
        return os;
 }
@@ -42,7 +41,7 @@ typedef MathInset * ReplaceArgumentFunc(const MathArray & ar);
 
 
 
-// try to extract a super/subscript 
+// try to extract a super/subscript
 // modify iterator position to point behind the thing
 bool extractScript(MathArray & ar,
        MathArray::iterator & pos, MathArray::iterator last)
@@ -260,13 +259,13 @@ void replaceNested(
                ar.erase(it + 1, jt + 1);
                (*it).reset(p);
        }
-} 
+}
 
 
 
 //
 // split scripts into seperate super- and subscript insets. sub goes in
-// front of super... 
+// front of super...
 //
 
 void splitScripts(MathArray & ar)
@@ -286,13 +285,13 @@ void splitScripts(MathArray & ar)
 
                // create extra script inset and move superscript over
                MathScriptInset * q = new MathScriptInset;
-               q->ensure(true); 
+               q->ensure(true);
                q->up().data_.swap(p->up().data_);
                p->removeScript(true);
 
                // insert new inset behind
                ++i;
-               ar.insert(i, MathAtom(q)); 
+               ar.insert(i, MathAtom(q));
        }
        //lyxerr << "\nScripts to: " << ar << "\n";
 }
@@ -385,10 +384,10 @@ void extractFunctions(MathArray & ar)
 
                string name;
                // is it a function?
-               if ((*it)->asFuncInset()) { 
+               if ((*it)->asFuncInset()) {
                        // it certainly is if it is well known...
                        name = (*it)->asFuncInset()->name();
-               } else {
+               } else {
                        // is this a user defined function?
                        // it it probably not, if it doesn't have a name.
                        if (!extractString((*it).nucleus(), name))
@@ -408,7 +407,7 @@ void extractFunctions(MathArray & ar)
                // 'sin' '^2' 'x' -> 'sin(x)' '^2'
                MathArray exp;
                extractScript(exp, jt, ar.end());
-       
+
                // create a proper inset as replacement
                MathExFuncInset * p = new MathExFuncInset(name);
 
@@ -417,7 +416,7 @@ void extractFunctions(MathArray & ar)
 
                // replace the function name by a real function inset
                (*it).reset(p);
-               
+
                // remove the source of the argument from the array
                ar.erase(it + 1, st);
 
@@ -425,7 +424,7 @@ void extractFunctions(MathArray & ar)
                ar.insert(i + 1, exp);
                //lyxerr << "\nFunctions to: " << ar << "\n";
        }
-} 
+}
 
 
 //
@@ -480,7 +479,7 @@ void extractIntegrals(MathArray & ar)
                // collect subscript if any
                MathArray::iterator st = it + 1;
                if (st != ar.end())
-                       if (MathScriptInset * sub = (*st)->asScriptInset()) 
+                       if (MathScriptInset * sub = (*st)->asScriptInset())
                                if (sub->hasDown()) {
                                        p->cell(2) = sub->down().data_;
                                        ++st;
@@ -488,7 +487,7 @@ void extractIntegrals(MathArray & ar)
 
                // collect superscript if any
                if (st != ar.end())
-                       if (MathScriptInset * sup = (*st)->asScriptInset()) 
+                       if (MathScriptInset * sup = (*st)->asScriptInset())
                                if (sup->hasUp()) {
                                        p->cell(3) = sup->up().data_;
                                        ++st;
@@ -499,7 +498,7 @@ void extractIntegrals(MathArray & ar)
 
                // use the "thing" behind the 'd' as differential
                MathArray::iterator tt = extractArgument(p->cell(1), jt + 1, ar.end());
-               
+
                // remove used parts
                ar.erase(it + 1, tt);
                (*it).reset(p);
@@ -632,7 +631,7 @@ void extractDiff(MathArray & ar)
                // is this a "differential fraction"?
                if (!testDiffFrac(it->nucleus()))
                        continue;
-               
+
                MathFracInset * f = (*it)->asFracInset();
                if (!f) {
                        lyxerr << "should not happen\n";
@@ -643,20 +642,20 @@ void extractDiff(MathArray & ar)
                MathDiffInset * diff = new MathDiffInset;
 
                // collect function, let jt point behind last used item
-               MathArray::iterator jt = it + 1; 
-               //int n = 1; 
+               MathArray::iterator jt = it + 1;
+               //int n = 1;
                MathArray & numer = f->cell(0);
                if (numer.size() > 1 && numer.at(1)->asScriptInset()) {
                        // this is something like  d^n f(x) / d... or  d^n / d...
                        // FIXME
-                       //n = 1;        
-                       if (numer.size() > 2) 
+                       //n = 1;
+                       if (numer.size() > 2)
                                diff->cell(0) = MathArray(numer.begin() + 2, numer.end());
                        else
                                jt = extractArgument(diff->cell(0), jt, ar.end());
                } else {
                        // simply d f(x) / d... or  d/d...
-                       if (numer.size() > 1) 
+                       if (numer.size() > 1)
                                diff->cell(0) = MathArray(numer.begin() + 1, numer.end());
                        else
                                jt = extractArgument(diff->cell(0), jt, ar.end());
@@ -725,7 +724,7 @@ void write(MathArray const & dat, WriteStream & wi)
                                q->write2(p, wi);
                                ++it;
                                continue;
-                       } 
+                       }
                }
                p->write(wi);
        }
@@ -748,7 +747,7 @@ void octavize(MathArray const & dat, OctaveStream & os)
                if (it + 1 != ar.end()) {
                        if (MathScriptInset const * q = asScript(it)) {
                                q->octavize2(p, os);
-                               ++it;   
+                               ++it;
                                continue;
                        }
                }
@@ -766,7 +765,7 @@ void maplize(MathArray const & dat, MapleStream & os)
                if (it + 1 != ar.end()) {
                        if (MathScriptInset const * q = asScript(it)) {
                                q->maplize2(p, os);
-                               ++it;   
+                               ++it;
                                continue;
                        }
                }
@@ -790,7 +789,7 @@ void mathmlize(MathArray const & dat, MathMLStream & os)
                        if (it + 1 != ar.end()) {
                                if (MathScriptInset const * q = asScript(it)) {
                                        q->mathmlize2(p, os);
-                                       ++it;   
+                                       ++it;
                                        continue;
                                }
                        }
@@ -799,4 +798,3 @@ void mathmlize(MathArray const & dat, MathMLStream & os)
                os << ETag("mrow");
        }
 }
-
index 320004617661b92e83fce2d22f40099ebfc0fcdf..8aec0d4313e11066a7d53d3b35d75f0ecb582f0d 100644 (file)
@@ -52,7 +52,7 @@ MathAtom createMathInset(latexkeys const * l)
                return MathAtom(new MathStackrelInset);
        case LM_TK_UNDERSET:
                return MathAtom(new MathUndersetInset);
-       case LM_TK_KERN: 
+       case LM_TK_KERN:
                return MathAtom(new MathKernInset);
        case LM_TK_BINOM:
        case LM_TK_CHOOSE:
@@ -117,14 +117,14 @@ MathAtom createMathInset(string const & s)
                return MathAtom(new MathArrayInset(s, 1, 1));
 
        if (s == "pmatrix" || s == "bmatrix" || s == "vmatrix" || s == "Vmatrix" ||
-                 s == "matrix") 
+                 s == "matrix")
                return MathAtom(new MathAMSArrayInset(s));
 
        latexkeys const * l = in_word_set(s);
        if (l)
                return createMathInset(l);
 
-       if (MathMacroTable::has(s)) 
+       if (MathMacroTable::has(s))
                return MathAtom(new MathMacro(s));
 
        //cerr << "creating inset 2 with name: '" << s << "'\n";
index 71d0b9418bc2cc6fd19ee594c6a3fdde5912bbad..32d601f347fa487b47baa163ebb84c6869564c5b 100644 (file)
@@ -12,7 +12,7 @@ class MathFracbaseInset : public MathNestInset {
 public:
        ///
        MathFracbaseInset();
-       /// 
+       ///
        bool idxUpDown(idx_type &, bool up) const;
        ///
        bool idxLeft(idx_type &, pos_type &) const;
index 26af46aa5bb0ef886b1fe703c39fac94d3e99635..6e27e9079cd94769ae864f15f8f72c71859041ca 100644 (file)
@@ -18,7 +18,7 @@ MathFracInset::MathFracInset(bool atop)
 
 
 MathInset * MathFracInset::clone() const
-{   
+{
        return new MathFracInset(*this);
 }
 
@@ -35,9 +35,9 @@ void MathFracInset::metrics(MathMetricsInfo const & mi) const
        smallerStyleFrac(m);
        xcell(0).metrics(m);
        xcell(1).metrics(m);
-       width_   = max(xcell(0).width(), xcell(1).width()) + 2; 
+       width_   = max(xcell(0).width(), xcell(1).width()) + 2;
        ascent_  = xcell(0).height() + 2 + 5;
-       descent_ = xcell(1).height() + 2 - 5; 
+       descent_ = xcell(1).height() + 2 - 5;
 }
 
 
@@ -82,7 +82,7 @@ void MathFracInset::write(WriteStream & os) const
 
 void MathFracInset::normalize(NormalStream & os) const
 {
-       if (atop_) 
+       if (atop_)
                os << "[atop ";
        else
                os << "[frac ";
index d92ec01ededb5f73ca4f2344ec34c6fd5034ada8..6f24b2f475aa71d1f854af46be3ea6951d19ca5e 100644 (file)
@@ -38,7 +38,7 @@ void MathFuncInset::setName(string const & n)
 }
 
 
-void MathFuncInset::metrics(MathMetricsInfo const & mi) const 
+void MathFuncInset::metrics(MathMetricsInfo const & mi) const
 {
        whichFont(font_, LM_TC_TEXTRM, mi);
        mathed_string_dim(font_, name_, ascent_, descent_, width_);
@@ -46,7 +46,7 @@ void MathFuncInset::metrics(MathMetricsInfo const & mi) const
 
 
 void MathFuncInset::draw(Painter & pain, int x, int y) const
-{ 
+{
        drawStr(pain, font_, x, y, name_);
 }
 
index 01c83892e27c27abeffcc13aee83656a6f0ed9d4..dba26a2aa95932ad01b200c2b150fece31b84933 100644 (file)
@@ -44,6 +44,6 @@ void MathFuncLimInset::metrics(MathMetricsInfo const & mi) const
 
 
 void MathFuncLimInset::draw(Painter & pain, int x, int y) const
-{  
+{
        drawStr(pain, font_, x, y, name_);
 }
index 2829a14be846bbf86c18ec4cfa21da6a8574f9ce..31143b20c21cbcff1a5dc3492b00a543628b1542 100644 (file)
@@ -29,7 +29,7 @@ string verboseHLine(int n)
 }
 
 
-////////////////////////////////////////////////////////////// 
+//////////////////////////////////////////////////////////////
 
 
 MathGridInset::RowInfo::RowInfo()
@@ -48,7 +48,7 @@ int MathGridInset::RowInfo::skipPixels() const
 
 
 
-////////////////////////////////////////////////////////////// 
+//////////////////////////////////////////////////////////////
 
 
 MathGridInset::ColInfo::ColInfo()
@@ -56,14 +56,14 @@ MathGridInset::ColInfo::ColInfo()
 {}
 
 
-////////////////////////////////////////////////////////////// 
+//////////////////////////////////////////////////////////////
 
 
 MathGridInset::MathGridInset(char v, string const & h)
        : MathNestInset(guessColumns(h)), rowinfo_(2), colinfo_(guessColumns(h) + 1)
 {
        setDefaults();
-       valign(v);
+       valign(v);
        halign(h);
 }
 
@@ -79,7 +79,7 @@ MathGridInset::MathGridInset(col_type m, row_type n, char v, string const & h)
        : MathNestInset(m * n), rowinfo_(n + 1), colinfo_(m + 1), v_align_(v)
 {
        setDefaults();
-       valign(v);
+       valign(v);
        halign(h);
 }
 
@@ -124,7 +124,7 @@ void MathGridInset::halign(string const & hh)
                        lyxerr << "unkown column separator: '" << c << "'\n";
                }
        }
-                       
+
 /*
        col_type n = hh.size();
        if (n > ncols())
@@ -163,7 +163,7 @@ string MathGridInset::halign() const
        for (col_type col = 0; col < ncols(); ++col) {
                res += string(colinfo_[col].lines_, '|');
                res += colinfo_[col].align_;
-       } 
+       }
        return res + string(colinfo_[ncols()].lines_, '|');
 }
 
@@ -240,7 +240,7 @@ void MathGridInset::metrics(MathMetricsInfo const & mi) const
        // compute vertical offsets
        rowinfo_[0].offset_ = 0;
        for (row_type row = 1; row <= nrows(); ++row) {
-               rowinfo_[row].offset_  =        
+               rowinfo_[row].offset_  =
                        rowinfo_[row - 1].offset_  +
                        rowinfo_[row - 1].descent_ +
                        rowinfo_[row - 1].skipPixels() +
@@ -263,12 +263,12 @@ void MathGridInset::metrics(MathMetricsInfo const & mi) const
        }
        for (row_type row = 0; row <= nrows(); ++row)
                rowinfo_[row].offset_ -= h;
-       
+
 
        // compute absolute sizes of horizontal structure
        for (col_type col = 0; col < ncols(); ++col) {
                int wid = 0;
-               for (row_type row = 0; row < nrows(); ++row) 
+               for (row_type row = 0; row < nrows(); ++row)
                        wid = max(wid, xcell(index(row, col)).width());
                colinfo_[col].width_ = wid;
        }
@@ -279,30 +279,30 @@ void MathGridInset::metrics(MathMetricsInfo const & mi) const
        for (col_type col = 1; col <= ncols(); ++col) {
                colinfo_[col].offset_ =
                        colinfo_[col - 1].offset_ +
-                       colinfo_[col - 1].width_ + 
+                       colinfo_[col - 1].width_ +
                        colinfo_[col - 1].skip_ +
-                       colsep() + 
+                       colsep() +
                        colinfo_[col].lines_ * vlinesep();
        }
 
 
-       width_   =   colinfo_[ncols() - 1].offset_      
-                      + colinfo_[ncols() - 1].width_
-                 + vlinesep() * colinfo_[ncols()].lines_
-                      + border();
+       width_   =   colinfo_[ncols() - 1].offset_
+                      + colinfo_[ncols() - 1].width_
+                + vlinesep() * colinfo_[ncols()].lines_
+                      + border();
 
-       ascent_  = - rowinfo_[0].offset_          
-                      + rowinfo_[0].ascent_
-                 + hlinesep() * rowinfo_[0].lines_
-                      + border();
+       ascent_  = - rowinfo_[0].offset_
+                      + rowinfo_[0].ascent_
+                + hlinesep() * rowinfo_[0].lines_
+                      + border();
 
        descent_ =   rowinfo_[nrows() - 1].offset_
-                      + rowinfo_[nrows() - 1].descent_
-                 + hlinesep() * rowinfo_[nrows()].lines_
-                      + border();
+                      + rowinfo_[nrows() - 1].descent_
+                + hlinesep() * rowinfo_[nrows()].lines_
+                      + border();
 
 
-/*     
+/*
        // Increase ws_[i] for 'R' columns (except the first one)
        for (int i = 1; i < nc_; ++i)
                if (align_[i] == 'R')
@@ -311,10 +311,10 @@ void MathGridInset::metrics(MathMetricsInfo const & mi) const
        if (align_[0] == 'C')
                if (ws_[0] < 7 * workwidth / 8)
                        ws_[0] = 7 * workwidth / 8;
-       
+
        // Adjust local tabs
        width = colsep();
-       for (cxrow = row_.begin(); cxrow; ++cxrow) {   
+       for (cxrow = row_.begin(); cxrow; ++cxrow) {
                int rg = COLSEP;
                int lf = 0;
                for (int i = 0; i < nc_; ++i) {
@@ -328,7 +328,7 @@ void MathGridInset::metrics(MathMetricsInfo const & mi) const
                                lf = 0;
                                break;
                        case 'c':
-                               lf = (ws_[i] - cxrow->getTab(i))/2; 
+                               lf = (ws_[i] - cxrow->getTab(i))/2;
                                break;
                        case 'r':
                        case 'R':
@@ -340,7 +340,7 @@ void MathGridInset::metrics(MathMetricsInfo const & mi) const
                                else if (cxrow.is_last())
                                        lf = ws_[i] - cxrow->getTab(i);
                                else
-                                       lf = (ws_[i] - cxrow->getTab(i))/2; 
+                                       lf = (ws_[i] - cxrow->getTab(i))/2;
                                break;
                        }
                        int const ww = (isvoid) ? lf : lf + cxrow->getTab(i);
@@ -380,7 +380,7 @@ void MathGridInset::metricsT(TextMetricsInfo const & mi) const
 {
        // let the cells adjust themselves
        //MathNestInset::metrics(mi);
-       for (idx_type i = 0; i < nargs(); ++i) 
+       for (idx_type i = 0; i < nargs(); ++i)
                xcell(i).metricsT(mi);
 
        // compute absolute sizes of vertical structure
@@ -402,7 +402,7 @@ void MathGridInset::metricsT(TextMetricsInfo const & mi) const
        // compute vertical offsets
        rowinfo_[0].offset_ = 0;
        for (row_type row = 1; row <= nrows(); ++row) {
-               rowinfo_[row].offset_  =        
+               rowinfo_[row].offset_  =
                        rowinfo_[row - 1].offset_  +
                        rowinfo_[row - 1].descent_ +
                        //rowinfo_[row - 1].skipPixels() +
@@ -425,12 +425,12 @@ void MathGridInset::metricsT(TextMetricsInfo const & mi) const
        }
        for (row_type row = 0; row <= nrows(); ++row)
                rowinfo_[row].offset_ -= h;
-       
+
 
        // compute absolute sizes of horizontal structure
        for (col_type col = 0; col < ncols(); ++col) {
                int wid = 0;
-               for (row_type row = 0; row < nrows(); ++row) 
+               for (row_type row = 0; row < nrows(); ++row)
                        wid = max(wid, xcell(index(row, col)).width());
                colinfo_[col].width_ = wid;
        }
@@ -441,27 +441,27 @@ void MathGridInset::metricsT(TextMetricsInfo const & mi) const
        for (col_type col = 1; col <= ncols(); ++col) {
                colinfo_[col].offset_ =
                        colinfo_[col - 1].offset_ +
-                       colinfo_[col - 1].width_ + 
+                       colinfo_[col - 1].width_ +
                        colinfo_[col - 1].skip_ +
-                       1 ; //colsep() + 
+                       1 ; //colsep() +
                        //colinfo_[col].lines_ * vlinesep();
        }
 
 
-       width_   =   colinfo_[ncols() - 1].offset_      
-                      + colinfo_[ncols() - 1].width_
-                 //+ vlinesep() * colinfo_[ncols()].lines_
-                      + 2;
+       width_   =   colinfo_[ncols() - 1].offset_
+                      + colinfo_[ncols() - 1].width_
+                //+ vlinesep() * colinfo_[ncols()].lines_
+                      + 2;
 
-       ascent_  = - rowinfo_[0].offset_          
-                      + rowinfo_[0].ascent_
-                 //+ hlinesep() * rowinfo_[0].lines_
-                      + 1;
+       ascent_  = - rowinfo_[0].offset_
+                      + rowinfo_[0].ascent_
+                //+ hlinesep() * rowinfo_[0].lines_
+                      + 1;
 
        descent_ =   rowinfo_[nrows() - 1].offset_
-                      + rowinfo_[nrows() - 1].descent_
-                 //+ hlinesep() * rowinfo_[nrows()].lines_
-                      + 1;
+                      + rowinfo_[nrows() - 1].descent_
+                //+ hlinesep() * rowinfo_[nrows()].lines_
+                      + 1;
 
 }
 
@@ -525,7 +525,7 @@ void MathGridInset::delRow(row_type row)
        if (nrows() == 1)
                return;
 
-       cells_type::iterator it = cells_.begin() + row * ncols(); 
+       cells_type::iterator it = cells_.begin() + row * ncols();
        cells_.erase(it, it + ncols());
 
        rowinfo_.erase(rowinfo_.begin() + row);
@@ -537,7 +537,7 @@ void MathGridInset::addCol(col_type newcol)
        const col_type nc = ncols();
        const row_type nr = nrows();
        cells_type new_cells((nc + 1) * nr);
-       
+
        for (row_type row = 0; row < nr; ++row)
                for (col_type col = 0; col < nc; ++col)
                        new_cells[row * (nc + 1) + col + (col > newcol)]
@@ -557,7 +557,7 @@ void MathGridInset::delCol(col_type col)
                return;
 
        cells_type tmpcells;
-       for (col_type i = 0; i < nargs(); ++i) 
+       for (col_type i = 0; i < nargs(); ++i)
                if (i % ncols() != col)
                        tmpcells.push_back(cells_[i]);
        swap(cells_, tmpcells);
@@ -572,9 +572,9 @@ int MathGridInset::cellXOffset(idx_type idx) const
        int x = colinfo_[c].offset_;
        char align = colinfo_[c].align_;
        if (align == 'r' || align == 'R')
-               x += colinfo_[c].width_ - xcell(idx).width(); 
+               x += colinfo_[c].width_ - xcell(idx).width();
        if (align == 'c' || align == 'C')
-               x += (colinfo_[c].width_ - xcell(idx).width()) / 2; 
+               x += (colinfo_[c].width_ - xcell(idx).width()) / 2;
        return x;
 }
 
@@ -600,7 +600,7 @@ bool MathGridInset::idxUpDown(idx_type & idx, bool up) const
        }
 }
 
-       
+
 bool MathGridInset::idxLeft(idx_type & idx, pos_type & pos) const
 {
        // leave matrix if on the left hand edge
@@ -610,8 +610,8 @@ bool MathGridInset::idxLeft(idx_type & idx, pos_type & pos) const
        pos = cell(idx).size();
        return true;
 }
-       
-       
+
+
 bool MathGridInset::idxRight(idx_type & idx, pos_type & pos) const
 {
        // leave matrix if on the right hand edge
@@ -632,7 +632,7 @@ bool MathGridInset::idxFirst(idx_type & idx, pos_type & pos) const
                case 'b':
                        idx = (nrows() - 1) * ncols();
                        break;
-               default: 
+               default:
                        idx = ((nrows() - 1) / 2) * ncols();
        }
        pos = 0;
@@ -714,14 +714,14 @@ void MathGridInset::idxDelete(idx_type & idx, bool & popit, bool & deleteit)
        // move cells if necessary
        for (idx_type i = index(row(idx), 0); i < idx; ++i)
                cell(i).swap(cell(i + ncols()));
-               
+
        delRow(row(idx));
 
        if (idx >= nargs())
                idx = nargs() - 1;
 
        // undo effect of Ctrl-Tab (i.e. pull next cell)
-       //if (idx + 1 != nargs()) 
+       //if (idx + 1 != nargs())
        //      cell(idx).swap(cell(idx + 1));
 }
 
@@ -772,7 +772,7 @@ void MathGridInset::mathmlize(MathMLStream & os) const
        os << MTag("mtable");
        for (row_type row = 0; row < nrows(); ++row) {
                os << MTag("mtr");
-               for (col_type col = 0; col < ncols(); ++col) 
+               for (col_type col = 0; col < ncols(); ++col)
                        os << cell(index(row, col));
                os << ETag("mtr");
        }
@@ -784,7 +784,7 @@ void MathGridInset::write(WriteStream & os) const
 {
        for (row_type row = 0; row < nrows(); ++row) {
                os << verboseHLine(rowinfo_[row].lines_);
-               for (col_type col = 0; col < ncols(); ++col) 
+               for (col_type col = 0; col < ncols(); ++col)
                        os << cell(index(row, col)) << eocString(col);
                os << eolString(row);
        }
index 69680a30c8b9a2c9581e33aded5e6cfd836a2005..58d6af14b69b6a12da457466ef636eaaf87fddad 100644 (file)
@@ -40,7 +40,7 @@ class MathGridInset : public MathNestInset {
 
        // additional per-row information
        struct ColInfo {
-               ///     
+               ///
                ColInfo();
                /// currently possible: 'l', 'c', 'r'
                char align_;
@@ -50,7 +50,7 @@ class MathGridInset : public MathNestInset {
                mutable int width_;
                /// cached offset
                mutable int offset_;
-               /// do we need a line to the left? 
+               /// do we need a line to the left?
                bool leftline_;
                /// do we need a line to the right?
                bool rightline_;
@@ -60,7 +60,7 @@ class MathGridInset : public MathNestInset {
                int skip_;
        };
 
-public: 
+public:
        /// constructor from columns description, creates one row
        MathGridInset(char valign, string const & halign);
        /// Note: columns first!
@@ -131,7 +131,7 @@ public:
        bool idxEnd(idx_type &, pos_type &) const;
        ///
        void idxDelete(idx_type &, bool &, bool &);
-                       
+
        ///
        virtual void addRow(row_type);
        ///
@@ -187,7 +187,7 @@ protected:
        std::vector<RowInfo> rowinfo_;
        /// column info
        std::vector<ColInfo> colinfo_;
-       /// 
+       ///
        char v_align_; // add approp. type
 };
 
index f3d20ce72e3a86ae4c849feef54b877e091f67fc..62047308db636188bd5fd5260dc68b9af56fcc8c 100644 (file)
@@ -27,7 +27,7 @@ struct key_type {
 };
 
 
-key_type wordlist_array[] = 
+key_type wordlist_array[] =
 {
        {"!",  LM_TK_SPACE, 0},
        {"#",  LM_TK_SPECIAL, '#'},
index d1736f34d7d051bffa4ef13d092fd1d6896be7c1..8a8dbee8aace5d05fd623573674973b641cf6004 100644 (file)
@@ -65,7 +65,7 @@ namespace {
                if (s == "multline")  return LM_OT_MULTLINE;
                if (s == "gather")    return LM_OT_GATHER;
                return LM_OT_SIMPLE;
-       }       
+       }
 
 
        string normalName(MathInsetTypes t)
@@ -83,7 +83,7 @@ namespace {
                        default: break;
                }
                return "unknown";
-       }       
+       }
 
 } // end anon namespace
 
@@ -165,7 +165,7 @@ void MathHullInset::metrics(MathMetricsInfo const & mi) const
        if (display()) {
                ascent_  += 12;
                descent_ += 12;
-       }       
+       }
 
        if (numberedType()) {
                whichFont(mi_.font, LM_TC_BF, mi_);
@@ -226,13 +226,13 @@ string MathHullInset::label(row_type row) const
 
 void MathHullInset::label(row_type row, string const & label)
 {
-       label_[row] = label; 
+       label_[row] = label;
 }
 
 
 void MathHullInset::numbered(row_type row, bool num)
 {
-       nonum_[row] = !num; 
+       nonum_[row] = !num;
 }
 
 
@@ -246,7 +246,7 @@ bool MathHullInset::ams() const
 {
        return true;
 /*
-       return 
+       return
                objtype_ == LM_OT_ALIGN ||
                objtype_ == LM_OT_MULTLINE ||
                objtype_ == LM_OT_GATHER ||
@@ -315,9 +315,9 @@ void MathHullInset::header_write(WriteStream & os) const
 
                case LM_OT_EQUATION:
                        if (n)
-                               os << "\\begin{equation" << star(n) << "}\n"; 
+                               os << "\\begin{equation" << star(n) << "}\n";
                        else
-                               os << "\\[\n"; 
+                               os << "\\[\n";
                        break;
 
                case LM_OT_EQNARRAY:
@@ -339,7 +339,7 @@ void MathHullInset::header_write(WriteStream & os) const
                        break;
 
                case LM_OT_XXALIGNAT:
-                       os << "\\begin{xxalignat}" 
+                       os << "\\begin{xxalignat}"
                           << "{" << static_cast<unsigned int>(ncols()/2) << "}\n";
                        break;
 
@@ -368,9 +368,9 @@ void MathHullInset::footer_write(WriteStream & os) const
 
                case LM_OT_EQUATION:
                        if (n)
-                               os << "\\end{equation" << star(n) << "}\n"; 
+                               os << "\\end{equation" << star(n) << "}\n";
                        else
-                               os << "\\]\n"; 
+                               os << "\\]\n";
                        break;
 
                case LM_OT_EQNARRAY:
@@ -407,7 +407,7 @@ void MathHullInset::footer_write(WriteStream & os) const
 }
 
 
-void MathHullInset::addRow(row_type row) 
+void MathHullInset::addRow(row_type row)
 {
        nonum_.insert(nonum_.begin() + row + 1, !numberedType());
        label_.insert(label_.begin() + row + 1, string());
@@ -423,7 +423,7 @@ void MathHullInset::appendRow()
 }
 
 
-void MathHullInset::delRow(row_type row) 
+void MathHullInset::delRow(row_type row)
 {
        MathGridInset::delRow(row);
        nonum_.erase(nonum_.begin() + row);
@@ -541,7 +541,7 @@ void MathHullInset::mutate(MathInsetTypes newtype)
                                        setType(LM_OT_SIMPLE);
                                        break;
 
-                               case LM_OT_ALIGN: 
+                               case LM_OT_ALIGN:
                                case LM_OT_ALIGNAT:
                                case LM_OT_XALIGNAT:
                                case LM_OT_XXALIGNAT: {
@@ -549,7 +549,7 @@ void MathHullInset::mutate(MathInsetTypes newtype)
                                        MathGridInset::addCol(1);
 
                                        // split it "nicely"
-                                       pos_type pos = firstRelOp(cell(0));     
+                                       pos_type pos = firstRelOp(cell(0));
                                        cell(1) = cell(0);
                                        cell(0).erase(pos, cell(0).size());
                                        cell(1).erase(0, pos);
@@ -564,7 +564,7 @@ void MathHullInset::mutate(MathInsetTypes newtype)
                                        MathGridInset::addCol(1);
 
                                        // split it "nicely" on the firest relop
-                                       pos_type pos = firstRelOp(cell(0));     
+                                       pos_type pos = firstRelOp(cell(0));
                                        cell(1) = MathArray(cell(0), pos, cell(0).size());
                                        cell(0).erase(pos, cell(0).size());
 
@@ -633,7 +633,7 @@ void MathHullInset::mutate(MathInsetTypes newtype)
                                        setType(LM_OT_EQNARRAY);
                                        mutate(newtype);
                                        break;
-                               
+
                                case LM_OT_ALIGNAT:
                                case LM_OT_XALIGNAT:
                                case LM_OT_XXALIGNAT:
@@ -684,11 +684,11 @@ void MathHullInset::mutate(MathInsetTypes newtype)
 void MathHullInset::write(WriteStream & os) const
 {
        header_write(os);
-       
+
        bool n = numberedType();
-       
+
        for (row_type row = 0; row < nrows(); ++row) {
-               for (col_type col = 0; col < ncols(); ++col) 
+               for (col_type col = 0; col < ncols(); ++col)
                        os << cell(index(row, col)) << eocString(col);
                if (n) {
                        if (!label_[row].empty())
@@ -698,7 +698,7 @@ void MathHullInset::write(WriteStream & os) const
                }
                os << eolString(row);
        }
-       
+
        footer_write(os);
 }
 
@@ -722,5 +722,3 @@ void MathHullInset::check() const
        lyx::Assert(nonum_.size() == nrows());
        lyx::Assert(label_.size() == nrows());
 }
-
-
index f112a1c785ebba709cc6f603f8836708357d8dd6..6f234e7d0d4fee5e31ad2be3d5d0f5b59d20c29e 100644 (file)
@@ -15,7 +15,7 @@
 class LaTeXFeatures;
 
 class MathHullInset : public MathGridInset {
-public: 
+public:
        ///
        MathHullInset();
        ///
index 526e89c93f8a116076b3978669c90afb82454493..ef12d2c77bd17ef3a7dd50a59e25356c1c395787 100644 (file)
@@ -1,9 +1,9 @@
 /*
  *  File:        math_inset.C
  *  Purpose:     Implementation of insets for mathed
- *  Author:      Alejandro Aguilar Sierra <asierra@servidor.unam.mx> 
+ *  Author:      Alejandro Aguilar Sierra <asierra@servidor.unam.mx>
  *  Created:     January 1996
- *  Description: 
+ *  Description:
  *
  *  Dependencies: Xlib, XForms
  *
index 2f783048c1e2785537d4db80036b1a168219c3e4..6cbcf808f9e66f55f5970b85a58e7105a99c93e4 100644 (file)
@@ -1,8 +1,8 @@
 // -*- C++ -*-
 /*
  *  File:        math_inset.h
- *  Purpose:     Declaration of insets for mathed 
- *  Author:      Alejandro Aguilar Sierra <asierra@servidor.unam.mx> 
+ *  Purpose:     Declaration of insets for mathed
+ *  Author:      Alejandro Aguilar Sierra <asierra@servidor.unam.mx>
  *  Created:     January 1996
  *  Description: Math paragraph and objects for a WYSIWYG math editor.
  *
@@ -35,7 +35,7 @@
 
 Abstract base class for all math objects.  A math insets is for use of the
 math editor only, it isn't a general LyX inset. It's used to represent all
-the math objects. 
+the math objects.
 
 Math insets do not know there parents, a cursor position or things
 like that. The are dumb object that are contained in other math insets
@@ -80,7 +80,7 @@ class MathPosFinder;
 
 
 class MathInset {
-public: 
+public:
        /// short of anything else reasonable
        typedef MathArray::size_type        size_type;
        /// type for cursor positions differences within a cell
@@ -163,7 +163,7 @@ public:
        virtual MathXArray & xcell(idx_type);
        /// return cell plus drawing cache given its number
        virtual MathXArray const & xcell(idx_type) const;
-                       
+
        /// the number of columns of this inset if it is grid-like
        virtual col_type ncols() const { return 1; }
        /// the number of rows of this inset if it is grid-like
index 9d4e9c11baa9f933bb0dbe5a8e9823673a077069..628ead5cab346f3afc8ceaf414ea822801c93676 100644 (file)
@@ -1,4 +1,3 @@
-
 #include <config.h>
 
 #include "math_iterator.h"
@@ -116,7 +115,7 @@ void MathIterator::operator++()
 
        // otherwise leave array, move on one position
        // this might yield pos() == size(), but that's a ok.
-       pop(); 
+       pop();
        // it certainly invalidates top
        ++position().pos_;
 }
@@ -135,7 +134,7 @@ bool operator==(MathIterator const & it, MathIterator const & jt)
        //lyxerr << "==: " << it.cursor().size() << " " << jt.cursor().size() << endl;
        if (it.cursor().size() != jt.cursor().size())
                return false;
-       return it.cursor() == jt.cursor();      
+       return it.cursor() == jt.cursor();
 }
 
 
@@ -144,7 +143,7 @@ bool operator!=(MathIterator const & it, MathIterator const & jt)
        //lyxerr << "!=: " << it.cursor().size() << " " << jt.cursor().size() << endl;
        if (it.cursor().size() != jt.cursor().size())
                return true;
-       return it.cursor() != jt.cursor();      
+       return it.cursor() != jt.cursor();
 }
 
 
index 70fdef85c70e1d158327e2594f2efa3587daf4d4..d30bd4752998ba59c2d499f5935e6c45515d40d5 100644 (file)
@@ -37,7 +37,7 @@ public:
        /// read access to top most item
        MathArray const & cell() const;
 
-private:       
+private:
        /// own level down
        void push(MathInset *);
        /// own level up
index ae853e35b718e3544e0119d2074d2fa65e70be92..42b5514ba2278ba25ed2a949affd4add3b192126 100644 (file)
@@ -59,4 +59,3 @@ void MathKernInset::normalize(NormalStream & os) const
 {
        os << "[kern " << wid_.asLatexString() << "]";
 }
-
index 7f3dfce4e08f23832cdd91fc0287e1c97750d24e..d92e7a69a13d996c208611a80ced6bc63245fda4 100644 (file)
@@ -38,7 +38,7 @@ void MathLimitOpInset::metrics(MathMetricsInfo const &) const
 
 
 void MathLimitOpInset::draw(Painter &, int, int) const
-{  
+{
        lyxerr << "should not happen\n";
 }
 
index 69e14928f1f32bbebca7c3be94b168b3b1211b91..b1360a33a5e8fdfa859b97ab33208366d8b41f6c 100644 (file)
@@ -1,7 +1,7 @@
 /*
  *  File:        math_macro.C
- *  Purpose:     Implementation of macro class for mathed 
- *  Author:      Alejandro Aguilar Sierra <asierra@servidor.unam.mx> 
+ *  Purpose:     Implementation of macro class for mathed
+ *  Author:      Alejandro Aguilar Sierra <asierra@servidor.unam.mx>
  *  Created:     November 1996
  *  Description: WYSIWYG math macros
  *
@@ -98,7 +98,7 @@ void MathMacro::metrics(MathMetricsInfo const & mi) const
                        descent_ += max(c.descent(), ldes) + 5;
                }
                return;
-       } 
+       }
 
        expanded_ = tmplate_->xcell(0);
        expanded_.data_.substitute(*this);
@@ -214,7 +214,7 @@ void MathMacro::octavize(OctaveStream & os) const
 void MathMacro::normalize(NormalStream & os) const
 {
        os << "[macro " << name() << " ";
-       for (idx_type i = 0; i < nargs(); ++i) 
+       for (idx_type i = 0; i < nargs(); ++i)
                os << cell(i) << ' ';
        os << ']';
 }
@@ -225,7 +225,7 @@ void MathMacro::write(WriteStream & os) const
        os << '\\' << name();
        for (idx_type i = 0; i < nargs(); ++i)
                os << '{' << cell(i) << '}';
-       if (nargs() == 0) 
+       if (nargs() == 0)
                os << ' ';
 }
 
index c43ed9cd888fd71037e77298fe2869fc23ff486f..cf1b59320699c86b3bb9ed8b8ac374a66f9582f3 100644 (file)
@@ -1,8 +1,8 @@
 // -*- C++ -*-
 /*
  *  File:        math_macro.h
- *  Purpose:     Declaration of macro class for mathed 
- *  Author:      Alejandro Aguilar Sierra <asierra@servidor.unam.mx> 
+ *  Purpose:     Declaration of macro class for mathed
+ *  Author:      Alejandro Aguilar Sierra <asierra@servidor.unam.mx>
  *  Created:     November 1996
  *  Description: WYSIWYG math macros
  *
index 2f68f11e89dd6710b287dbccb6df10ba414b1d2c..8033d70b84fb7bf58ab289b0078202cf49424c8f 100644 (file)
@@ -77,4 +77,3 @@ void MathMacroArgument::substitute(MathMacro const & m)
                        it->nucleus()->handleFont(code_);
        expanded_ = true;
 }
-
index 58e07660516c958b711c8ba0a156e9af02a38336..f98f6c826595e3db7929abc62871335dbe6cb455 100644 (file)
@@ -35,14 +35,14 @@ void MathMacroTable::dump()
 MathAtom & MathMacroTable::provide(string const & name)
 {
        builtinMacros();
-       
+
        table_type::iterator pos = macro_table.find(name);
 
        if (pos == macro_table.end()) {
                lyxerr << "MathMacroTable::provideTemplate: no template with name '"
                       << name << "' available.\n";
        }
-               
+
        return pos->second;
 }
 
@@ -75,9 +75,9 @@ bool MathMacroTable::has(string const & name)
 void MathMacroTable::builtinMacros()
 {
        static bool built = false;
-       
+
        if (built)
-               return; 
+               return;
 
        built = true;
        //lyxerr[Debug::MATHED] << "Building macros\n";
index bab64d1500d92590de82ab93ad511a3c85ad8b5e..726874ff848241c02201e241c08ad4d5d29e9751 100644 (file)
@@ -14,7 +14,7 @@ class MathMacro;
 /** This class contains the macro definition
     \author Alejandro Aguilar Sierra
  */
-//class MathMacroTemplate : public MathInset, boost::noncopyable 
+//class MathMacroTemplate : public MathInset, boost::noncopyable
 
 class MathMacroTemplate : public MathNestInset {
 public:
index 1f43e5a9b09aa7134c7cd51d08ca570d9de5e278..25cece5aa9736617620749752cc35cdb99d146a6 100644 (file)
@@ -56,7 +56,7 @@ void MathMatrixInset::octavize(OctaveStream & os) const
                if (row)
                        os << ';';
                os << '[';
-               for (col_type col = 0; col < ncols(); ++col) 
+               for (col_type col = 0; col < ncols(); ++col)
                        os << cell(index(row, col)) << ' ';
                os << ']';
        }
index f4f2a0aceb83c1d32c4e5dcd7d881e6bee85338e..dd1636131b7d9e9243af42b83a09e64e3140bfd9 100644 (file)
@@ -11,7 +11,7 @@
 // "shortcut" for DelimInset("(",ArrayInset,")")
 
 class MathMatrixInset : public MathArrayInset {
-public: 
+public:
        ///
        MathMatrixInset(MathArrayInset const &);
        ///
index 0a8df206217bc7308debe1e7e6b47025e518812a..6a11a9dbfee62ee6a0d4805bc02ae358d9bfd767 100644 (file)
@@ -182,4 +182,3 @@ bool MathNestInset::editing() const
 {
        return mathcursor && mathcursor->isInside(this);
 }
-
index db2fc5cffaa2bd2ce7bf0793282daa6950acbd70..78175a75068e14160d285c3cc7d5781cb6c7bb6e 100644 (file)
 class LaTeXFeatures;
 
 class MathNestInset : public MathDimInset {
-public: 
+public:
        /// nestinsets have a fixed size to start with
        explicit MathNestInset(idx_type ncells);
 
        /// the size is usuall some sort of convex hull of the cells
        void metrics(MathMetricsInfo const & st) const;
        /// appends itself with macro arguments substituted
-       void substitute(MathMacro const & macro); 
+       void substitute(MathMacro const & macro);
        /// identifies NestInsets
        MathNestInset * asNestInset() { return this; }
 
@@ -58,7 +58,7 @@ public:
        MathXArray & xcell(idx_type);
        /// direct access to the cell including the drawing cache
        MathXArray const & xcell(idx_type) const;
-                       
+
        /// can we move into this cell (see macroarg.h)
        bool isActive() const { return nargs() > 0; }
        /// request "external features"
index c40640ff3e6152a610250d1b16a112ed97e78985..ce3db3945cb45fbe7351f3330ae0697e608de386 100644 (file)
@@ -41,7 +41,7 @@ void MathNotInset::metrics(MathMetricsInfo const & mi) const
 
 
 void MathNotInset::draw(Painter & pain, int x, int y) const
-{  
+{
        if (math_font_available(LM_TC_CMSY))
                drawChar(pain, font_, x, y, 54);
        else
index 274e29ae386cd7bcbc7381d44f8a6f54ac22605d..f7cead75b04300daa66d275ded8b3011c5e7d659 100644 (file)
@@ -1,7 +1,7 @@
 /*
  *  File:        math_parser.C
  *  Purpose:     Parser for mathed
- *  Author:      Alejandro Aguilar Sierra <asierra@servidor.unam.mx> 
+ *  Author:      Alejandro Aguilar Sierra <asierra@servidor.unam.mx>
  *  Created:     January 1996
  *  Description: Parse LaTeX2e math mode code.
  *
@@ -15,7 +15,7 @@
  *   the GNU General Public Licence version 2 or later.
  */
 
-/* 
+/*
 
 If someone desperately needs partial "structures" (such as a few cells of
 an array inset or similar) (s)he could uses the following hack as starting
@@ -109,7 +109,7 @@ void add(MathArray & ar, char c, MathTextCodes code)
 
 // These are TeX's catcodes
 enum CatCode {
-       catEscape,     // 0    backslash 
+       catEscape,     // 0    backslash
        catBegin,      // 1    {
        catEnd,        // 2    }
        catMath,       // 3    $
@@ -118,7 +118,7 @@ enum CatCode {
        catParameter,  // 6    #
        catSuper,      // 7    ^
        catSub,        // 8    _
-       catIgnore,     // 9       
+       catIgnore,     // 9
        catSpace,      // 10   space
        catLetter,     // 11   a-zA-Z
        catOther,      // 12   none of the above
@@ -127,7 +127,7 @@ enum CatCode {
        catInvalid     // 15   <delete>
 };
 
-CatCode theCatcode[256];  
+CatCode theCatcode[256];
 
 
 inline CatCode catcode(unsigned char c)
@@ -155,21 +155,21 @@ void catInit()
        fill(theCatcode + 'a', theCatcode + 'z' + 1, catLetter);
        fill(theCatcode + 'A', theCatcode + 'Z' + 1, catLetter);
 
-       theCatcode['\\'] = catEscape;   
-       theCatcode['{']  = catBegin;    
-       theCatcode['}']  = catEnd;      
-       theCatcode['$']  = catMath;     
-       theCatcode['&']  = catAlign;    
-       theCatcode['\n'] = catNewline;  
-       theCatcode['#']  = catParameter;        
-       theCatcode['^']  = catSuper;    
-       theCatcode['_']  = catSub;      
-       theCatcode['\7f'] = catIgnore;    
-       theCatcode[' ']  = catSpace;    
-       theCatcode['\t'] = catSpace;    
-       theCatcode['\r'] = catSpace;    
-       theCatcode['~']  = catActive;   
-       theCatcode['%']  = catComment;  
+       theCatcode['\\'] = catEscape;
+       theCatcode['{']  = catBegin;
+       theCatcode['}']  = catEnd;
+       theCatcode['$']  = catMath;
+       theCatcode['&']  = catAlign;
+       theCatcode['\n'] = catNewline;
+       theCatcode['#']  = catParameter;
+       theCatcode['^']  = catSuper;
+       theCatcode['_']  = catSub;
+       theCatcode['\7f'] = catIgnore;
+       theCatcode[' ']  = catSpace;
+       theCatcode['\t'] = catSpace;
+       theCatcode['\r'] = catSpace;
+       theCatcode['~']  = catActive;
+       theCatcode['%']  = catComment;
 }
 
 
@@ -198,7 +198,7 @@ public:
        ///
        bool isCR() const;
 
-private:       
+private:
        ///
        string cs_;
        ///
@@ -221,7 +221,7 @@ string Token::asString() const
 //bool operator==(Token const & s, Token const & t)
 //{
 //     return s.character() == t.character()
-//             && s.cat() == t.cat() && s.cs() == t.cs(); 
+//             && s.cat() == t.cat() && s.cs() == t.cs();
 //}
 //
 //bool operator!=(Token const & s, Token const & t)
@@ -433,9 +433,9 @@ string Parser::getArg(char lf, char rg)
        string result;
        char c = getChar();
 
-       if (c != lf)  
+       if (c != lf)
                putback();
-       else 
+       else
                while ((c = getChar()) != rg && good())
                        result += c;
 
@@ -476,7 +476,7 @@ void Parser::skipSpaceTokens(istream & is, char c)
 void Parser::tokenize(string const & buffer)
 {
        static bool init_done = false;
-       
+
        if (!init_done) {
                catInit();
                init_done = true;
@@ -490,13 +490,13 @@ void Parser::tokenize(string const & buffer)
 
                switch (catcode(c)) {
                        case catNewline: {
-                               ++lineno_; 
+                               ++lineno_;
                                is.get(c);
                                if (catcode(c) == catNewline)
                                        ; //push_back(Token("par"));
                                else {
                                        push_back(Token(' ', catSpace));
-                                       is.putback(c);  
+                                       is.putback(c);
                                }
                                break;
                        }
@@ -504,7 +504,7 @@ void Parser::tokenize(string const & buffer)
                        case catComment: {
                                while (is.get(c) && catcode(c) != catNewline)
                                        ;
-                               ++lineno_; 
+                               ++lineno_;
                                break;
                        }
 
@@ -519,7 +519,7 @@ void Parser::tokenize(string const & buffer)
                                                while (is.get(c) && catcode(c) == catLetter)
                                                        s += c;
                                                skipSpaceTokens(is, c);
-                                       }       
+                                       }
                                        push_back(Token(s));
                                }
                                break;
@@ -558,7 +558,7 @@ void Parser::dump() const
 }
 
 
-void Parser::error(string const & msg) 
+void Parser::error(string const & msg)
 {
        lyxerr << "Line ~" << lineno_ << ": Math parse error: " << msg << endl;
        dump();
@@ -568,7 +568,7 @@ void Parser::error(string const & msg)
 
 
 bool Parser::parse_lines(MathAtom & t, bool numbered, bool outmost)
-{      
+{
        MathGridInset * p = t->asGridInset();
        if (!p) {
                dump();
@@ -593,7 +593,7 @@ bool Parser::parse_lines(MathAtom & t, bool numbered, bool outmost)
                        //lyxerr << "reading cell " << row << " " << col << " "
                        // << p->ncols() << "\n";
                        //lyxerr << "ncols: " << p->ncols() << "\n";
-               
+
                        if (col >= p->ncols()) {
                                //lyxerr << "adding col " << col << "\n";
                                p->addCol(p->ncols());
@@ -612,7 +612,7 @@ bool Parser::parse_lines(MathAtom & t, bool numbered, bool outmost)
                                //      << row << " " << col << "\n";
                                break;
                        }
-                       
+
                        // skip the ampersand
                        getToken();
                }
@@ -666,7 +666,7 @@ bool Parser::parse_lines(MathAtom & t, bool numbered, bool outmost)
 
 
 bool Parser::parse_lines2(MathAtom & t, bool braced)
-{      
+{
        MathGridInset * p = t->asGridInset();
        if (!p) {
                lyxerr << "error in Parser::parse_lines() 1\n";
@@ -677,7 +677,7 @@ bool Parser::parse_lines2(MathAtom & t, bool braced)
                // reading a row
                for (MathInset::col_type col = 0; true; ++col) {
                        //lyxerr << "reading cell " << row << " " << col << " " << p->ncols() << "\n";
-               
+
                        if (col >= p->ncols()) {
                                //lyxerr << "adding col " << col << "\n";
                                p->addCol(p->ncols());
@@ -691,7 +691,7 @@ bool Parser::parse_lines2(MathAtom & t, bool braced)
                                //lyxerr << "less cells read than normal in row/col: " << row << " " << col << "\n";
                                break;
                        }
-                       
+
                        // skip the ampersand
                        getToken();
                }
@@ -750,7 +750,7 @@ bool Parser::parse_macro(string & name)
        }
 
        string    arg  = getArg('[', ']');
-       int       narg = arg.empty() ? 0 : atoi(arg.c_str()); 
+       int       narg = arg.empty() ? 0 : atoi(arg.c_str());
 
        if (getToken().cat() != catBegin) {
                lyxerr << "'{' in \\newcommand expected (2)\n";
@@ -906,7 +906,7 @@ void Parser::parse_into1(MathArray & array, unsigned flags, MathTextCodes code)
 
        while (good()) {
                Token const & t = getToken();
-       
+
 #ifdef FILEDEBUG
                lyxerr << "t: " << t << " flags: " << flags << "\n";
                //array.dump();
@@ -918,7 +918,7 @@ void Parser::parse_into1(MathArray & array, unsigned flags, MathTextCodes code)
                                continue;
 
                        flags &= ~FLAG_ITEM;
-                       if (t.cat() == catBegin) { 
+                       if (t.cat() == catBegin) {
                                // skip the brace and collect everything to the next matching
                                // closing brace
                                flags |= FLAG_BRACE_LAST;
@@ -978,7 +978,7 @@ void Parser::parse_into1(MathArray & array, unsigned flags, MathTextCodes code)
                        // ignore braces around simple items
                        if ((ar.size() == 1 && !ar.front()->needsBraces()
        || (ar.size() == 2 && !ar.front()->needsBraces()
-                                           && ar.back()->asScriptInset()))
+                                           && ar.back()->asScriptInset()))
        || (ar.size() == 0 && array.size() == 0))
                        {
                                array.push_back(ar);
@@ -996,17 +996,17 @@ void Parser::parse_into1(MathArray & array, unsigned flags, MathTextCodes code)
                        lyx::Assert(0);
                        add(array, '}', LM_TC_TEX);
                }
-               
+
                else if (t.cat() == catAlign) {
                        lyxerr << "found tab unexpectedly, array: '" << array << "'\n";
                        //lyxerr << "found tab unexpectedly\n";
                        add(array, '&', LM_TC_TEX);
                }
-               
+
                else if (t.cat() == catSuper || t.cat() == catSub) {
                        bool up = (t.cat() == catSuper);
-                       MathScriptInset * p = 0; 
-                       if (array.size()) 
+                       MathScriptInset * p = 0;
+                       if (array.size())
                                p = array.back()->asScriptInset();
                        if (!p || p->has(up)) {
                                array.push_back(MathAtom(new MathScriptInset(up)));
@@ -1023,12 +1023,12 @@ void Parser::parse_into1(MathArray & array, unsigned flags, MathTextCodes code)
 
                else if (t.cat() == catOther)
                        add(array, t.character(), code);
-               
+
                //
                // control sequences
-               //      
+               //
                else if (t.cs() == "protect")
-                       // ignore \\protect, will be re-added during output 
+                       // ignore \\protect, will be re-added during output
                        ;
 
                else if (t.cs() == "end")
@@ -1046,13 +1046,13 @@ void Parser::parse_into1(MathArray & array, unsigned flags, MathTextCodes code)
                        lyxerr << "found newline unexpectedly\n";
                        array.push_back(createMathInset("\\"));
                }
-       
+
                else if (t.cs() == "limits")
                        limits = 1;
-               
+
                else if (t.cs() == "nolimits")
                        limits = -1;
-               
+
                else if (t.cs() == "nonumber")
                        curr_num_ = false;
 
@@ -1071,7 +1071,7 @@ void Parser::parse_into1(MathArray & array, unsigned flags, MathTextCodes code)
                                parse_into(array.back()->cell(0), FLAG_ITEM);
                        }
                }
-               
+
                else if (t.cs() == "left") {
                        string l = getToken().asString();
                        MathArray ar;
@@ -1081,7 +1081,7 @@ void Parser::parse_into1(MathArray & array, unsigned flags, MathTextCodes code)
                        dl->cell(0) = ar;
                        array.push_back(dl);
                }
-               
+
                else if (t.cs() == "right") {
                        if (!(flags & FLAG_RIGHT)) {
                                //lyxerr << "got so far: '" << array << "'\n";
@@ -1091,24 +1091,24 @@ void Parser::parse_into1(MathArray & array, unsigned flags, MathTextCodes code)
                }
 
                else if (t.cs() == "begin") {
-                       string const name = getArg('{', '}');   
+                       string const name = getArg('{', '}');
                        if (name == "array" || name == "subarray") {
                                string const valign = getArg('[', ']') + 'c';
                                string const halign = getArg('{', '}');
                                array.push_back(MathAtom(new MathArrayInset(name, valign[0], halign)));
                                parse_lines(array.back(), false, false);
                        } else if (name == "split" || name == "cases" ||
-                                        name == "gathered" || name == "aligned") {
+                                        name == "gathered" || name == "aligned") {
                                array.push_back(createMathInset(name));
                                parse_lines(array.back(), false, false);
                        } else if (name == "matrix"  || name == "pmatrix" || name == "bmatrix" ||
-                                        name == "vmatrix" || name == "Vmatrix") {
+                                        name == "vmatrix" || name == "Vmatrix") {
                                array.push_back(createMathInset(name));
                                parse_lines2(array.back(), false);
-                       } else 
-                               lyxerr << "unknow math inset begin '" << name << "'\n"; 
+                       } else
+                               lyxerr << "unknow math inset begin '" << name << "'\n";
                }
-       
+
                else if (t.cs() == "kern") {
 #ifdef WITH_WARNINGS
 #warning A hack...
@@ -1117,7 +1117,7 @@ void Parser::parse_into1(MathArray & array, unsigned flags, MathTextCodes code)
                        while (1) {
                                Token const & t = getToken();
                                if (!good()) {
-                                       putback();      
+                                       putback();
                                        break;
                                }
                                s += t.character();
@@ -1183,13 +1183,13 @@ void Parser::parse_into1(MathArray & array, unsigned flags, MathTextCodes code)
                        //array.push_back(createMathInset(t.cs()));
                        array.push_back(MathAtom(new MathBoxInset(t.cs())));
                        // slurp in the argument of mbox
-       
+
                        MathBoxInset * p = array.back()->asBoxInset();
                        //lyx::assert(p);
                }
 #endif
 
-       
+
                else if (t.cs().size()) {
                        latexkeys const * l = in_word_set(t.cs());
                        if (l) {
@@ -1197,8 +1197,8 @@ void Parser::parse_into1(MathArray & array, unsigned flags, MathTextCodes code)
                                        //lyxerr << "starting font\n";
                                        //CatCode catSpaceSave = theCatcode[' '];
                                        //if (l->id == LM_TC_TEXTRM) {
-                                       //      // temporarily change catcode   
-                                       //      theCatcode[' '] = catLetter;    
+                                       //      // temporarily change catcode
+                                       //      theCatcode[' '] = catLetter;
                                        //}
 
                                        MathArray ar;
@@ -1229,7 +1229,7 @@ void Parser::parse_into1(MathArray & array, unsigned flags, MathTextCodes code)
 
                                else {
                                        MathAtom p = createMathInset(t.cs());
-                                       for (MathInset::idx_type i = 0; i < p->nargs(); ++i) 
+                                       for (MathInset::idx_type i = 0; i < p->nargs(); ++i)
                                                parse_into(p->cell(i), FLAG_ITEM);
                                        array.push_back(p);
                                }
@@ -1252,7 +1252,7 @@ void Parser::parse_into1(MathArray & array, unsigned flags, MathTextCodes code)
 
        if (panic) {
                lyxerr << " Math Panic, expect problems!\n";
-               //   Search for the end command. 
+               //   Search for the end command.
                Token t;
                do {
                        t = getToken();
index 45a7610b90fb2f6d773d395c0535f5bf9c58eef4..847accc2a689d01d8cdec425eb6cb2f43a72765b 100644 (file)
@@ -2,7 +2,7 @@
 /*
  *  File:        math_parser.h
  *  Purpose:     Declaration of parsing utilities for mathed
- *  Author:      Alejandro Aguilar Sierra <asierra@servidor.unam.mx> 
+ *  Author:      Alejandro Aguilar Sierra <asierra@servidor.unam.mx>
  *  Created:     January 1996
  *  Description: Parse LaTeX2e math mode code.
  *
@@ -100,7 +100,7 @@ enum MathTokenEnum
        ///
        LM_TK_SPECIAL,
        ///
-       LM_TK_ARGUMENT, 
+       LM_TK_ARGUMENT,
        ///
        LM_TK_NEWCOMMAND,
        ///
index 4c36ba1a0c9e2bc588dd665442b34f00703c3c69..b4d53521dbc943bb5bff9f84f5e1db93fd5107ec 100644 (file)
@@ -92,5 +92,3 @@ bool operator<(MathCursorPos const & p, MathCursorPos const & q)
                return p.idx_ < q.idx_;
        return p.pos_ < q.pos_;
 }
-
-
index 5ffa93ceaceee0e4513a6fd3c7a136f4faa47160..4365d8f8e9d3171761c3d9b76c4dd5b3024b255b 100644 (file)
@@ -5,12 +5,12 @@
 #include "math_xdata.h"
 
 
-/// Description of a position 
+/// Description of a position
 class MathCursorPos {
 public:
-       /// 
+       ///
        MathCursorPos();
-       /// 
+       ///
        explicit MathCursorPos(MathInset *);
 
        /// returns cell corresponding to this position
index 696e3b086caa9bc610f136e47625efa31ad87e7d..2a7185895da503e2a191bdedf227d855455f4927 100644 (file)
@@ -1,7 +1,7 @@
 /*
  *  File:        math_root.C
- *  Purpose:     Implementation of the root object 
- *  Author:      Alejandro Aguilar Sierra <asierra@servidor.unam.mx> 
+ *  Purpose:     Implementation of the root object
+ *  Author:      Alejandro Aguilar Sierra <asierra@servidor.unam.mx>
  *  Created:     January 1999
  *  Description: Root math object
  *
index 303aba5608061d5a668d0a4e3dcd18dc7ecbc6f5..46034c651f4cd0e568c6183a5f8b78df516820da 100644 (file)
@@ -1,8 +1,8 @@
 // -*- C++ -*-
 /*
  *  File:        math_root.h
- *  Purpose:     Declaration of the root object 
- *  Author:      Alejandro Aguilar Sierra <asierra@servidor.unam.mx> 
+ *  Purpose:     Declaration of the root object
+ *  Author:      Alejandro Aguilar Sierra <asierra@servidor.unam.mx>
  *  Created:     January 1999
  *  Description: Root math object
  *
index 010b8f98fc623005b0984499d565e245414be4d9..637411381edfd0d14ce2abd718f3503bd4922543 100644 (file)
@@ -85,7 +85,7 @@ int MathScriptInset::dy0(MathInset const * nuc) const
        int des = down().ascent();
        if (hasLimits(nuc))
                des += nd + 2;
-       else 
+       else
                des = max(des, nd);
        return des;
 }
@@ -99,7 +99,7 @@ int MathScriptInset::dy1(MathInset const * nuc) const
        int asc = up().descent();
        if (hasLimits(nuc))
                asc += na + 2;
-       else 
+       else
                asc = max(asc, na);
        asc = max(asc, mathed_char_ascent(font_, 'I'));
        return asc;
@@ -178,14 +178,14 @@ int MathScriptInset::ndes(MathInset const * nuc) const
 
 
 void MathScriptInset::metrics(MathMetricsInfo const & mi) const
-{      
+{
        metrics(0, mi);
 }
 
 
 void MathScriptInset::metrics(MathInset const * nuc,
        MathMetricsInfo const & mi) const
-{      
+{
        MathMetricsInfo m = mi;
        smallerStyleScript(m);
        MathNestInset::metrics(m);
@@ -199,21 +199,21 @@ void MathScriptInset::metrics(MathInset const * nuc,
 
 
 void MathScriptInset::draw(Painter & pain, int x, int y) const
-{  
+{
        //lyxerr << "unexpected call to MathScriptInset::draw()\n";
        draw(0, pain, x, y);
 }
 
 
 void MathScriptInset::metricsT(TextMetricsInfo const & mi) const
-{      
+{
        metricsT(0, mi);
 }
 
 
 void MathScriptInset::metricsT(MathInset const * nuc,
        TextMetricsInfo const & mi) const
-{      
+{
        if (hasUp())
                up().metricsT(mi);
        if (hasDown())
@@ -228,7 +228,7 @@ void MathScriptInset::metricsT(MathInset const * nuc,
 
 void MathScriptInset::draw(MathInset const * nuc, Painter & pain,
        int x, int y) const
-{  
+{
        if (nuc)
                nuc->draw(pain, x + dxx(nuc), y);
        else // if (editing())
@@ -242,7 +242,7 @@ void MathScriptInset::draw(MathInset const * nuc, Painter & pain,
 }
 
 void MathScriptInset::drawT(TextPainter & pain, int x, int y) const
-{  
+{
        //lyxerr << "unexpected call to MathScriptInset::draw()\n";
        drawT(0, pain, x, y);
 }
@@ -250,7 +250,7 @@ void MathScriptInset::drawT(TextPainter & pain, int x, int y) const
 
 void MathScriptInset::drawT(MathInset const * nuc, TextPainter & pain,
        int x, int y) const
-{  
+{
        if (nuc)
                nuc->drawT(pain, x + dxx(nuc), y);
        if (hasUp())
@@ -269,12 +269,12 @@ bool MathScriptInset::hasLimits(MathInset const * nuc) const
        if (limits_ == -1)
                return false;
 
-       // we can only display limits if the nucleus wants some 
+       // we can only display limits if the nucleus wants some
        if (!nuc)
                return false;
        if (!nuc->isScriptable())
                return false;
-       
+
        // per default \int has limits beside the \int even in displayed formulas
        if (nuc->asSymbolInset())
                if (nuc->asSymbolInset()->name().find("int") != string::npos)
@@ -341,7 +341,7 @@ bool MathScriptInset::idxLeft(MathInset::idx_type &,
 
 
 void MathScriptInset::write(WriteStream & os) const
-{  
+{
        //lyxerr << "unexpected call to MathScriptInset::write()\n";
        write2(0, os);
 }
@@ -372,7 +372,7 @@ void MathScriptInset::write2(MathInset const * nuc, WriteStream & os) const
 
 
 void MathScriptInset::normalize(NormalStream & os) const
-{  
+{
        //lyxerr << "unexpected call to MathScriptInset::normalize()\n";
        normalize2(0, os);
 }
@@ -383,11 +383,11 @@ void MathScriptInset::normalize2(MathInset const * nuc, NormalStream & os) const
        bool d = hasDown() && down().data_.size();
        bool u = hasUp() && up().data_.size();
 
-       if (u) 
+       if (u)
                os << "[sup ";
        if (d)
                os << "[sub ";
-       
+
        if (nuc)
                os << nuc << ' ';
        else
@@ -395,7 +395,7 @@ void MathScriptInset::normalize2(MathInset const * nuc, NormalStream & os) const
 
        if (d)
                os << down().data_ << ']';
-       if (u) 
+       if (u)
                os << up().data_ << ']';
 }
 
@@ -446,5 +446,3 @@ void MathScriptInset::octavize2(MathInset const * nuc, OctaveStream & os) const
        if (hasUp() && up().data_.size())
                os << "^(" << up().data_ << ')';
 }
-
-
index 15eb649f61acb3b82ac64a953413e19973a686f0..29049e9e27774eb60d0bfbfc7a52ff5942f10820 100644 (file)
@@ -117,7 +117,7 @@ private:
        bool hasLimits(MathInset const * nuc) const;
 
        /// possible subscript (index 0) and superscript (index 1)
-       bool script_[2]; 
+       bool script_[2];
        /// 1 - "limits", -1 - "nolimits", 0 - "default"
        int limits_;
        /// cached font
@@ -125,4 +125,3 @@ private:
 };
 
 #endif
-
index d9e992e27d3ba1bd21b15bd0f4e4b634e6bd837c..048ffd498a5a8b55195059d200430e0cbeeb68da 100644 (file)
@@ -34,7 +34,7 @@ public:
        void normalize(NormalStream &) const;
 
 private:
-       /// 
+       ///
        latexkeys const * key_;
 };
 
index d348218c2b857bc78b2bf0bc7fbdd9790854ca9f..01c50b98b0fe019d9493cb3ffd7098d8bf900889 100644 (file)
@@ -35,20 +35,20 @@ void MathSpaceInset::metrics(MathMetricsInfo const &) const
 
 
 void MathSpaceInset::draw(Painter & pain, int x, int y) const
-{ 
-       
+{
+
 // XPoint p[4] = {{++x, y-3}, {x, y}, {x+width-2, y}, {x+width-2, y-3}};
-       
+
 // Sadly, HP-UX CC can't handle that kind of initialization.
-       
+
        int xp[4];
        int yp[4];
-       
+
        xp[0] = ++x;             yp[0] = y - 3;
        xp[1] = x;                   yp[1] = y;
        xp[2] = x + width_ - 2;  yp[2] = y;
        xp[3] = x + width_ - 2;  yp[3] = y - 3;
-       
+
        pain.lines(xp, yp, 4, space_ ? LColor::latex : LColor::math);
 }
 
@@ -82,5 +82,3 @@ void MathSpaceInset::write(WriteStream & os) const
        if (space_ >= 0 && space_ < 6)
                os << '\\' << latex_mathspace[space_] << ' ';
 }
-
-
index 91b9197a8e7d11b1068d5c830d95769b1245ca2d..b00c832f5b75f4aa65bc174d4ec81804ab43d115 100644 (file)
@@ -13,7 +13,7 @@ MathSpecialCharInset::MathSpecialCharInset(char c)
 
 
 MathInset * MathSpecialCharInset::clone() const
-{   
+{
        return new MathSpecialCharInset(*this);
 }
 
@@ -43,7 +43,7 @@ void MathSpecialCharInset::metrics(MathMetricsInfo const & mi) const
 
 
 void MathSpecialCharInset::draw(Painter & pain, int x, int y) const
-{ 
+{
        drawChar(pain, font_, x, y, char_);
 }
 
index ab1e717c11f2b2392fe68a2d7f571b4c953d8a48..118760ed0cf853b2b8ebc2d4e1a0d058630834eb 100644 (file)
@@ -8,7 +8,7 @@
 #pragma interface
 #endif
 
-/** An inset for characters like {, #, and $ that need to be escaped 
+/** An inset for characters like {, #, and $ that need to be escaped
     when written out, but can be inserted by a single keystroke
     \author André Pönitz
  */
@@ -27,7 +27,7 @@ public:
        void write(WriteStream & os) const;
        ///
        void normalize(NormalStream &) const;
-       /// 
+       ///
        int ascent() const;
        ///
        int descent() const;
index 540efaf2a8833aae0b55fbb035d5940ea21f8cfb..4225bae7c0d96addc25a608bbdd9df1ac5fc24a7 100644 (file)
@@ -11,7 +11,7 @@
 
 
 class MathSplitInset : public MathGridInset {
-public: 
+public:
        ///
        explicit MathSplitInset(string const & name);
        ///
index 85a0053980588339bc2648e14f935e448f2ac34a..ccece1e1190e8557a8f3504fda18aa6ca3fd129e 100644 (file)
@@ -15,7 +15,7 @@ MathSqrtInset::MathSqrtInset()
 
 
 MathInset * MathSqrtInset::clone() const
-{   
+{
        return new MathSqrtInset(*this);
 }
 
@@ -30,8 +30,8 @@ void MathSqrtInset::metrics(MathMetricsInfo const & mi) const
 
 
 void MathSqrtInset::draw(Painter & pain, int x, int y) const
-{ 
-       xcell(0).draw(pain, x + 10, y); 
+{
+       xcell(0).draw(pain, x + 10, y);
        int const a = ascent_;
        int const d = descent_;
        int xp[4];
@@ -54,8 +54,8 @@ void MathSqrtInset::metricsT(TextMetricsInfo const & mi) const
 
 
 void MathSqrtInset::drawT(TextPainter & pain, int x, int y) const
-{ 
-       xcell(0).drawT(pain, x + 2, y); 
+{
+       xcell(0).drawT(pain, x + 2, y);
        pain.horizontalLine(x + 2, y - xcell(0).ascent(), xcell(0).width(), '_');
        pain.verticalLine  (x + 1, y - xcell(0).ascent() + 1, xcell(0).height());
        pain.draw(x, y + xcell(0).descent(), '\\');
index 6663718b20586529757615a558c172ddf4b4238f..73500944eb02a6cb3b29f791868372d2b8cbea67 100644 (file)
@@ -15,7 +15,7 @@ MathStackrelInset::MathStackrelInset()
 
 
 MathInset * MathStackrelInset::clone() const
-{   
+{
        return new MathStackrelInset(*this);
 }
 
@@ -26,7 +26,7 @@ void MathStackrelInset::metrics(MathMetricsInfo const & mi) const
        smallerStyleFrac(m);
        xcell(0).metrics(m);
        xcell(1).metrics(mi);
-       width_   = max(xcell(0).width(), xcell(1).width()) + 4; 
+       width_   = max(xcell(0).width(), xcell(1).width()) + 4;
        ascent_  = xcell(1).ascent() + xcell(0).height() + 4;
        descent_ = xcell(1).descent();
 }
index 699dffe402d6833346bc6123efebf4f4413c3657..7c2e8cd4758c2b220edd6f119651b3c231705821 100644 (file)
@@ -8,7 +8,7 @@
 #pragma interface
 #endif
 
-/** Stackrel objects 
+/** Stackrel objects
     \author André Pönitz
  */
 class MathStackrelInset : public MathFracbaseInset {
index c39a4e4ab717b6c934b30d50c924ee15add94f53..7ad73aa37eb89a0e83bcbb048b229cea2093195b 100644 (file)
@@ -27,7 +27,7 @@ MathStringInset::MathStringInset(string const & s, MathTextCodes t)
 
 
 MathInset * MathStringInset::clone() const
-{   
+{
        return new MathStringInset(*this);
 }
 
@@ -65,7 +65,7 @@ void MathStringInset::metrics(MathMetricsInfo const & mi) const
 
 
 void MathStringInset::draw(Painter & pain, int x, int y) const
-{ 
+{
        //lyxerr << "drawing '" << str_ << "' code: " << code_ << endl;
        drawStr(pain, font_, x, y, str_);
 }
@@ -82,11 +82,11 @@ void MathStringInset::maplize(MapleStream & os) const
        if (code_ != LM_TC_VAR || str_.size() <= 1) {
                os << ' ' << str_ << ' ';
                return;
-       }       
+       }
 
        // insert '*' between adjacent chars if type is LM_TC_VAR
        os << str_[0];
-       for (string::size_type i = 1; i < str_.size(); ++i) 
+       for (string::size_type i = 1; i < str_.size(); ++i)
                os << '*' << str_[i];
 }
 
@@ -96,11 +96,11 @@ void MathStringInset::octavize(OctaveStream & os) const
        if (code_ != LM_TC_VAR || str_.size() <= 1) {
                os << ' ' << str_ << ' ';
                return;
-       }       
+       }
 
        // insert '*' between adjacent chars if type is LM_TC_VAR
        os << str_[0];
-       for (string::size_type i = 1; i < str_.size(); ++i) 
+       for (string::size_type i = 1; i < str_.size(); ++i)
                os << '*' << str_[i];
 }
 
@@ -120,10 +120,8 @@ void MathStringInset::mathmlize(MathMLStream & os) const
 
 void MathStringInset::write(WriteStream & os) const
 {
-       if (math_font_name(code_)) 
+       if (math_font_name(code_))
                os << '\\' << math_font_name(code_) << '{' << str_ << '}';
-       else 
+       else
                os << str_;
 }
-
-
index f1aa039d2fa857e3cc81e408a2a766227788f757..58cfcd37834905523a379408900ae4d0cd32535b 100644 (file)
@@ -24,7 +24,7 @@ public:
        void metrics(MathMetricsInfo const & st) const;
        ///
        void draw(Painter &, int x, int y) const;
-       /// 
+       ///
        int ascent() const;
        ///
        int descent() const;
index 788a85edd05598673e4d7aa96dd40e48c2def5be..4b3115efcf7fb9b29333038bfaf48722a49c123f 100644 (file)
@@ -10,7 +10,7 @@
 
 
 class MathSubstackInset : public MathGridInset {
-public: 
+public:
        ///
        MathSubstackInset();
        ///
index edb659011a8220d4fcd58faa06c1de68db3b5a08..29b9f171ebd0850db80d82fdb0beedc3fbca0753 100644 (file)
@@ -124,8 +124,8 @@ LyXFont const & whichFontBaseIntern(MathTextCodes type)
                mathed_init_fonts();
 
        switch (type) {
-       case LM_TC_SYMB:        
-       case LM_TC_BOLDSYMB:    
+       case LM_TC_SYMB:
+       case LM_TC_BOLDSYMB:
                return MathFonts[FONT_SYMBOLI];
 
        case LM_TC_VAR:
@@ -495,8 +495,8 @@ named_deco_struct deco_table[] = {
        {"uparrow",        arrow,      0 },
        {"Uparrow",        Arrow,      0 },
        {"updownarrow",    udarrow,    0 },
-       {"Updownarrow",    Udarrow,    0 },     
-       
+       {"Updownarrow",    Udarrow,    0 },
+
        // Accents
        {"ddot",           ddot,       0 },
        {"dddot",          dddot,      0 },
@@ -510,7 +510,7 @@ named_deco_struct deco_table[] = {
        {"breve",          parenth,    1 },
        {"vec",            arrow,      3 },
        {"not",            slash,      0 },
-       
+
        // Dots
        {"ldots",          hline3,     0 },
        {"cdots",          hline3,     0 },
@@ -618,22 +618,22 @@ void mathed_draw_deco(Painter & pain, int x, int y, int w, int h,
                pain.line(x + w/2, y, x + w/2, y + h,
                          LColor::mathcursor, Painter::line_onoffdash);
                return;
-       }       
-       
+       }
+
        deco_struct const * mds = search_deco(name);
        if (!mds) {
                lyxerr << "Deco was not found. Programming error?\n";
                lyxerr << "name: '" << name << "'\n";
                return;
        }
-       
+
        int const n = (w < h) ? w : h;
        int const r = mds->angle;
        double const * d = mds->data;
-       
+
        if (h > 70 && (name == "(" || name == ")"))
                d = parenthHigh;
-       
+
        Matrix mt(r, w, h);
        Matrix sqmt(r, n, n);
 
@@ -750,7 +750,7 @@ char const * math_font_name(MathTextCodes code)
                "textrm"
        };
 
-       if (code >= LM_TC_RM && code <= LM_TC_TEXTRM) 
+       if (code >= LM_TC_RM && code <= LM_TC_TEXTRM)
                return theFontNames[code - LM_TC_RM];
        return 0;
 }
@@ -773,5 +773,3 @@ string convertDelimToLatexName(string const & name)
                return name;
        return "\\" + name + " ";
 }
-
-
index 962e34d219aafd6772424c18f72b397324ef8bd6..952dc816aeafae2d3e124ca388941ea55abeaf13 100644 (file)
@@ -98,7 +98,7 @@ void MathSymbolInset::metrics(MathMetricsInfo const & mi) const
 
 
 void MathSymbolInset::draw(Painter & pain, int x, int y) const
-{  
+{
        if (isRelOp())
                x += 3;
        MathTextCodes Code = code();
@@ -117,7 +117,7 @@ void MathSymbolInset::draw(Painter & pain, int x, int y) const
 
 
 bool MathSymbolInset::isRelOp() const
-{      
+{
        return sym_->type == "mathrel";
 }
 
@@ -200,5 +200,3 @@ void MathSymbolInset::infoize(ostream & os) const
 {
        os << '\\' << name();
 }
-
-
index 112401e823eeb1a425646e38f882bca38413272e..c06fa46ddab9a7b16bcb1273e84bd611b1d3c0a7 100644 (file)
@@ -15,7 +15,7 @@ MathUndersetInset::MathUndersetInset()
 
 
 MathInset * MathUndersetInset::clone() const
-{   
+{
        return new MathUndersetInset(*this);
 }
 
@@ -26,7 +26,7 @@ void MathUndersetInset::metrics(MathMetricsInfo const & mi) const
        smallerStyleFrac(m);
        xcell(0).metrics(m);
        xcell(1).metrics(mi);
-       width_   = max(xcell(0).width(), xcell(1).width()) + 4; 
+       width_   = max(xcell(0).width(), xcell(1).width()) + 4;
        ascent_  = xcell(1).ascent();
        descent_ = xcell(1).descent() + xcell(0).height() + 4;
 }
index bfb66fe126c02a1c4d158b17871a1bd308ed1077..35ed008fee2a534be75c964506031d01a61dae2b 100644 (file)
@@ -8,7 +8,7 @@
 #pragma interface
 #endif
 
-/** Underset objects 
+/** Underset objects
     \author André Pönitz
  */
 class MathUndersetInset : public MathFracbaseInset {
index ad14c66d1c7b015895156eb4853fceabaaca0727..3c8b54319a384220452ab2cda5384150c5d64be2 100644 (file)
@@ -57,7 +57,7 @@ void MathUnknownInset::normalize(NormalStream & os) const
 }
 
 
-void MathUnknownInset::metrics(MathMetricsInfo const & mi) const 
+void MathUnknownInset::metrics(MathMetricsInfo const & mi) const
 {
        whichFont(font_, LM_TC_TEX, mi);
        mathed_string_dim(font_, name_, ascent_, descent_, width_);
@@ -65,7 +65,7 @@ void MathUnknownInset::metrics(MathMetricsInfo const & mi) const
 
 
 void MathUnknownInset::draw(Painter & pain, int x, int y) const
-{ 
+{
        drawStr(pain, font_, x, y, name_);
 }
 
index 217d95a2f71324c3dbecc80c8e3894e99204c1a2..32959e666e14939fafb62b4499c43e4bd7111e9d 100644 (file)
@@ -17,7 +17,7 @@ MathXArrowInset::MathXArrowInset(string const & name)
 
 
 MathInset * MathXArrowInset::clone() const
-{   
+{
        return new MathXArrowInset(*this);
 }
 
@@ -34,7 +34,7 @@ void MathXArrowInset::metrics(MathMetricsInfo const & st) const
 
 
 void MathXArrowInset::draw(Painter & pain, int x, int y) const
-{ 
+{
        xcell(0).draw(pain, x + 5, y - 10);
        mathed_draw_deco(pain, x + 1, y - 7, width_ - 2, 5, name_);
 }
index e0bb7bac497f28c9356fd8dd96120a59c2cf983d..292d82d7b1861cb4a868bd3d9dad6c71cdb603c2 100644 (file)
@@ -25,7 +25,7 @@ MathXArray::MathXArray()
 
 
 void MathXArray::touch() const
-{      
+{
        clean_  = false;
        drawn_  = false;
 }
@@ -58,16 +58,16 @@ void MathXArray::metrics(MathMetricsInfo const & mi) const
                        q->metrics(p, mi);
                        ascent_  = max(ascent_,  q->ascent2(p));
                        descent_ = max(descent_, q->descent2(p));
-                       width_  += q->width2(p);        
+                       width_  += q->width2(p);
                        ++it;
                } else {
                        p->metrics(mi);
                        ascent_  = max(ascent_,  p->ascent());
                        descent_ = max(descent_, p->descent());
-                       width_  += p->width();  
+                       width_  += p->width();
                }
        }
-       //lyxerr << "MathXArray::metrics(): '" << ascent_ << " " 
+       //lyxerr << "MathXArray::metrics(): '" << ascent_ << " "
        //      << descent_ << " " << width_ << "'\n";
 }
 
@@ -130,13 +130,13 @@ void MathXArray::metricsT(TextMetricsInfo const & mi) const
                        q->metricsT(p, mi);
                        ascent_  = max(ascent_,  q->ascent2(p));
                        descent_ = max(descent_, q->descent2(p));
-                       width_  += q->width2(p);        
+                       width_  += q->width2(p);
                        ++it;
                } else {
                        p->metricsT(mi);
                        ascent_  = max(ascent_,  p->ascent());
                        descent_ = max(descent_, p->descent());
-                       width_  += p->width();  
+                       width_  += p->width();
                }
        }
 }
@@ -232,7 +232,7 @@ int MathXArray::dist(int x, int y) const
        else if (y > yo_ + descent_)
                yy = y - yo_ - descent_;
 
-       return xx + yy; 
+       return xx + yy;
 }
 
 
@@ -248,7 +248,7 @@ void MathXArray::boundingBox(int & x1, int & x2, int & y1, int & y2)
 void MathXArray::findPos(MathPosFinder & f) const
 {
        double x = xo_;
-       double y = yo_; 
+       double y = yo_;
        for (const_iterator it = begin(); it < end(); ++it) {
                // check this position in the cell first
                f.visit(x, y);
index 48518de561dd862032308162cd008284212541cb..41e4eedaab0665b418560266bdccf7bb0b8854c5 100644 (file)
@@ -77,7 +77,7 @@ public:
        const_iterator begin() const { return data_.begin(); }
        /// end iterator of the underlying MathArray
        const_iterator end() const { return data_.end(); }
-       
+
 public:
        /// the underlying MathArray
        MathArray data_;
index 4a48b4228dd662d8e0b62b6ecb194adab7a34d91..5f3489f3e3631cca333df6a07ce361334277baa3 100644 (file)
@@ -111,7 +111,7 @@ void MathXYArrowInset::draw(Painter & pain, int x, int y) const
                MathXArray const & t = targetCell();
                pain.line(s.xm(), s.ym(), t.xm(), t.ym(), LColor::math);
                xcell(1).draw(pain, (s.xm() + t.xm())/2, (s.ym() + t.ym())/2);
-               
+
        }
 }
 
index a9022ee6aeea2902cc297cde937b2eb207771e94..a6534e23b7da0b071ba295822506a9f48bf6a094 100644 (file)
@@ -13,7 +13,7 @@
 class MathXYMatrixInset;
 
 class MathXYArrowInset : public MathNestInset {
-public: 
+public:
        ///
        MathXYArrowInset();
        ///
index 1522fc4a013ff82338b012f7b657beec3a0f5cfb..3cabea91d596e10da81ba5a226d78e4d0a6dc527 100644 (file)
@@ -10,7 +10,7 @@
 
 
 class MathXYMatrixInset : public MathGridInset {
-public: 
+public:
        ///
        MathXYMatrixInset();
        ///