Move the code that forbids character insertion in its own helper function.
Call this function before doing a recordUndo. This avoids to mark the
document dirty in cases where nothing happens.
Part of bug #10721.
This fixes an error in the preview generation with polyglossia
and bidi that prevents snippet generation (and consequently also
"math as image" xhtml output).
Fixes: #10716.
Due to the peculiarities of Windows, it may happen that
pdftocairo is built without png support when compiled on this
platform. Unless explicitly requested (maybe for some peculiar
application and certainly not for usual distros), this is
highly improbable to occur on other platforms.
Using a regular expression to find /src/ or \src\ in a string is overkill,
and since regexes can throw exceptions, it makes coverity nervous.
The new code is simpler anyway.
We have a mix in this file of boolean stored as such or as strings.
This translates to values written as true/false or 1/0 in .lyx files.
In this case, the value of use_minted could only be true, since the
char * pointer is non null.
Also add some else clauses.
Spotted by coverity.
This is a consequence of e91572a0, although it is not clear why. The
contextMenuEvent code of the workarea should not delegate context
menu when it cannot honor it.
Also fix a small memory leak.
Fixes bug #10616.
The code in InsetLabel::updateReferences code changes reference insets
in potentially several buffers. When recording undo, it is important
to use the right undo stack, otherwise crashes can ensue.
Once it is done, it is neccessary to create undo groups as needed.
This is done using UndoGroupHelper. This demonstrates a shortcoming of
UndoGroup helper: if a buffer is encountered in two seperate
occasions, two undo groups will be created for this buffer. This is
not correct.
Fixes bug #10643.
This is not needed for recent cmake versions, but since we expect
also older cmake version be used, sort the list nevertheless.
See https://reproducible-builds.org/ for why this matters.
Amends b8e3615
While 522516d9 was too strong and broke mathed, d0acc3e570 is too
lenient and can accept insets (mathed/CommandInset, InsetInfo) that
have a positive nargs() but are not editable (because they encapsulate
something).
Therefore the best solution for now is to use editable() in text and
isActive() in mathed, until those two things are merged.
Part of #10667.
(required because filesystems return listings in undeterministic order)
to generate Resources.qrc and thereby Resources.cpp and the lyx binary
in a reproducible way
Setting LC_ALL=C because sort order might vary with locales.
See https://reproducible-builds.org/ for why this matters.
Fixes#10711.
Could not find a suitable tex font for the following tests:
export/doc/uk/Intro_pdf4_texF
export/examples/uk/splash_pdf4_texF
export/examples/minted-filelisting_pdf4_texF
Pygments versions prior to 2.0 only accept lower case names for lexers.
This commit makes sure to always use lower case names for the language
that is written in the LaTeX file, while retaining the proper casing
for the presentation in the GUI, which is dictated by compatibility
with the listings package. Moreover, if one switches from listings
to minted in a document, the language combo is properly updated even
if the used language had attached a dialect (a concept not shared by
minted), or even when importing a LaTeX document with tex2lyx.
In some (not yet understood) situations, the paragraph metrics cache
is empty in generateSyntheticMouseEvent(). We just avoid a crash in
this case, but there is probably an underlying problem that deserves
being fixed.
Fixes bug #10324.