This trivial patch makes scrolling-by-selection smoother by dividing
the step size and the time between steps by 8 when generating
synthetic events in work area.
The scrolling speed is unchanged, but the result is visually better.
Instead of generating code and parsing it to add <mtext>...</mtext> at
the right spots, this commit honors the text mode setting that was
already present in the codebase to generate it automatically.
This is the work of two helper methods in MathMLStream:
* beforeText() notices when the stream is in text mode and that a
<mtext> has not yet been generated. In this case it inserts it, so
that raw text can be emitted afterwards.
* beforeTag() checks whether a <mtext> needs to be closed at this
point, and does it if needed.
To make this work, the code now tracks the nesting level in the
stream, and compares it the what the level was when text mode has been
enabled using the SetMode helper function.
In order to avoid later bugs, member os() that allows to access the
underlying stream of MathMLStream is removed. This required many <<
operators to become friends of MathMLStream.
In InsetMathBox, rename splitAndWrapInMText() to mathmlizeHelper(),
which is not just a method that sets text mode inside a <mrow>
element.
In InsetMathFont and InsetMathHull, the explicit generation of nesting
in <mtext>...</mtext> can be removed now.
Fixes bug #13069.
This is preparatory work for fixing ticket #13069.
Remove direct accesses to the underlying stream of MathMLStream in
InsetMathChar, InsetMathSpecialChar, and in all << operators other
than MathMLStream << docstring. This will allow to add a hook later in
this operator.
Move default values of MathMLStream private members to their definition.
Get rid of line_ member, which is not used.
When using system colors it may happen (on windows 11 in particular)
that the background color is actually translucid. This is not
something we are prepared to handle and it creates ghosts on screen.
The fix is easy: the alpha channel of the colors is set to 255.
Fixes bug #13084.
The recordUndo() call is very wrong, since we may be inserting over a
selection covering several paragraphs (undo itself works at paragraph
granularity).
recordUndoSelection() is the right operation in this case. It is
equivalent to recordUndo() when there is no selection.
It is used in lib/Makefile.am and we were relying some autoconf macros
to define it as a side-effect. This is not the case anymore as of
autoconf 2.72.