]> git.lyx.org Git - features.git/commit
Improve spacing of BOX elements
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 2 Dec 2016 14:58:39 +0000 (15:58 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 2 Dec 2016 15:14:12 +0000 (16:14 +0100)
commit2acc4fc54c178744467b89b469f10bda90bb0310
treec343bd279e1b8676a52509d45e6d1cfa51e49933
parent190d312e354da3bafffe5976967cc29f2cbf490a
Improve spacing of BOX elements

Tweak the algorithm so that a BOX math row element can have some
spacing. To this end, MathRow::before/after do not look at the type of
an element for deciding when to skip it, but rather to its math class.

In the new setting, the spacing algorithm works on all elements, but
skips the MC_UNKNOWN elements as if they were not present. As a
consequence, the two element types BEGIN and END have been replaced by
a single DUMMY (they can be recognized from their class).

To simply the code, add a new `mclass' argument to the
MathRow::Element constructor (default is MC_UNKNOWN).
src/mathed/InsetMath.cpp
src/mathed/MathMacro.cpp
src/mathed/MathRow.cpp
src/mathed/MathRow.h