The functions reverseDirectionNeeded() and reverseDirectionNeeded() do
not rely on the Bidi class. The first one is changed into a Cursor
method, and the second one is replaced with explicit code.
Since commit 7ac70092, lyx::dispatch returns a DispatchResult const &,
which is ignored in the cases below. Nevertheless, the windows
compiler complains that it does not know this type. Gcc and clang can
deal with it without problem.
The bug workaround added an extra repaint, which can be very bad when
editing large tables.
It turns out that the bug this is trying to fix is due to the handling
of LFUN_LINE_END in InsetMathGrid. Adding the same code as in
InsetMathNest fixes the problem.
The workaround can therefore be removed.
Now the minibuffer toolbar is "auto" by default. It is opened by
command-execute (M-x) and closed when the command is executed without error.
* make lyx::dispatch return a DispatchResult struct
* there is a new MINIBUFFER type of toolbar, that can be used for this use.
* remove special handling of M-x in minnibuffer; Escape can be used instead. Fix focus in this case.
* when minibuffer toolbar is "auto", make the toolbar close itself after
- a command has been executed without error
- an empty command has been executed
- the Escape key has been used
[this is actually commit fdcff02a, which was later reverted at dd61d8cf]
There is a mismatch between the way text is tokenized in Row objects
and the way it is shown on screen. When metrics are computed,
continuous spell checking has not been done yet. Yet, the row painter
explicitly breaks words at spell status boundaries. This creates
problem with a text like "PMP," (see bug #9649), where there is a
negative kerning before the comma.
This is solved by not taking in account spell status when drawing
text, and drawing spell underlines separately.
* replace Paragraph::isSameSpellRange with new method getSpellRange.
* merge RowPainter::paintChars into RowPainter::paintFromPos
* move the actual text painting code into the new paintTextAndSel.
* merge some code from paintFromPos to paintMisspelledMark
* in paintMisspelledMark, scan the string which needs to be annotated
and add dashed line below text marked as misspelled.
Fixes bug #9649.
This avoids warnings with windows compiler. It is a pity that even
clang does not give those. Maybe I missed them with the large amount
of boost warnings that it spits.
There is a second solution in the code which uses some undocumented Qt
stuff, but it does not work in some cases. The best is to rely on the
documented way.
There is no need for real-valued line width in painters. Actually, this even leads to uneven dashes for continuous spell checker.
The new code is supposed to be equivalent to the old one, just more readable. From this, we can try to see whether some lines need to be made thicker on HiDPI screens.
Length::inBP() returned the wrong values for most units. I guess that this was
caused by the default case in the switch statement: It did probably exist
before the other units were added.
inBP() is now correct for all units except the font dependent ones em, ex and
mu and the percent units: For these only approximate values are returned,
since not all needed information is available.
LaTeXFeatures defines \textcommabelow and \textcommaabove based on a
generic \LyXTextAccent and declares TextCompositeCommands for the Baltic
letters in the T1 font encoding, using \textcommaabove for the small letter g
and \textcommabelow else.
This allows overwriting of the composite definition for other font encodings.
Especially, it does not interfere with the polish/baltic font encoding L7x
(supported by LatinModern and TeXGyre fonts) that provides pre-composed
glyphs.
Greek characters with perispomeni (tilde) accent were not properly shown
in the output document, because the "textgreek" feature re-defined \~ in
a way incompatible with lgrenc.def since version 0.8 (2013-05-13)
(package greek-fontenc).
The compatibility-definition is required for older versions of the font setup
(before the move of "lgrenc.def" from "babel" to "greek-fontenc").
It is now done with "ProvideTextCommand" to not overwrite the more complete
implementation in lgrenc.def.
With the compatibility definition, combined diacritics with tilde
must be input with the tilde first (e.g. \~>, not \>~).
"unicodesymbols" is changed accordingly.
Also, some LICRs for combining Greek diacritical characters were added to
Unicodesymbols.
Add font encodings auto-set by babel.
Set font encoding for georgian to the babel default.
Remove InternalEncoding from languages that use a font encoding
compatible to T1.
Change (LaTeX input) encoding for Serbian (cyrillic) and Romanian.
See #9652 for details.
When the cursor had idx > 0 (since math-display does merging anyways),
reset cursor to the start of the inset. This looks less strange than
setting it at the end.
Now at least the basic case of a displayed equation with cursor
somewhere at top-level is handled correctly.
The math-display lfun operates at top level in the math inset.
Therefore, when the cursor is in an inner inset, it will after the
lfun be moved at top level. Unfortunately, there is no way that I know
f to detect this in Inset::doDispatch.
Even if we could, as things stand, it is difficult to keep the cursor in the
inner inset, especially if the inner inset moves : this happens for
example when moving from eqnarray to inline maths.
Therefore this fix is the best I can think of now.
Fixes part of bug #9664.
This fixes bug #9615.
The "notermination" flag tells LyX, that terminating an LICR macro with {} is
not necessary. This is normally the case for all macros with non-alphabetical
name (e.g. \{).
However, combining diacritical characters are converted to *accent macros*,
which expect an argument (the base character).
In Unicode, the base character precedes the combining character,
in LaTeX the combining character precedes the base character.
LyX changes the order of the two characters to get this right,
e.g. "x" + "combining tilde" becomes "\~{x}".
In the special case there is no preceding character (e.g. at the start of the
document or a paragraph), Unicode shows the combining diacritical character
without base character.
The replacement is currently not "terminated" (e.g. "\~"), because of the
"notermination=text" flags in "unicodesymbols".
The accent macros take the *following* character as base character, which is
clearly not intended.
In case of a paragraph consisting of just one combining diacritical character,
LaTeX compilation fails with an error.
With the patch, LyX writes the accent macros with an empty argument,
e.g. "\~{}", the output is similar to the view in the GUI with the diacritical
character on its own, not on the follwoing character.
We do not currently have any Arabic documents, but when we do, these
fonts will be used for the tests that use system fonts.
They can be installed on Debian-type systems from the
'fonts-sil-scheherazade' package.
Both marvosym and bbding define the "Cross" macro.
To prevent a compilation error due to conflicting definitions,
we undefine the "Cross" macro if both packages are required.
It turns out that it is always better using the copy of the MacroData
for updating the macro_ pointer to avoid problems related to the cursor
position.
* Take into account the filesystem encoding for the zip export on *nix
such that the representation of filenames in the zip archive is not
mangled, when possible. This only concerns the way filenames are displayed
as their creation in the filesystem was nevertheless correct.
* On Windows, try to obtain the command line parameters from the wide char
representation by directly accessing the platform APIs through ctypes.
This allows to also deal with filenames not exactly representable using
the current code page and corrects a bug resulting in silently dropping
those kind of filenames.
This effectively makes the horizontal size policy "minimum", which
makes it clear that there is no advantage for this widget of
increasing the horizontal size past the minimum, allowing other
GUI elements to use the horizontal space if useful.
This change for caseCB is consistent with wordsCB and searchbackCB.
This can happen when a macro is copied and then the document where
it is defined is closed. In this case, the macro survives in the
cut stack but the the buffer pointer is dangling.
Now the minibuffer toolbar is "auto" by default. It is opened by
command-execute (M-x) and closed when the command is executed without error.
* make lyx::dispatch return a DispatchResult struct
* there is a new MINIBUFFER type of toolbar, that can be used for this use.
* remove special handling of M-x in minnibuffer; Escape can be used instead. Fix focus in this case.
* when minibuffer toolbar is "auto", make the toolbar close itself after
- a command has been executed without error
- an empty command has been executed
- the Escape key has been used
The 'using namespace std' at the top of the file makes it quite difficult to
understand which abs is used: double std::abs<double>(double) or
int ::abs(int)? Now it is explicit, and the code does not change in subtle
ways if somebody removes the using statement.