This means that, when a string contains high-plane Unicode characters,
the length of a docstring and the corresponding QString will be
different: Qt will encode these characters using several 16bit
characters.
We have additionally to take into account QTBUG-25536, which implies
that sometimes qstring_to_ucs4(toqstr(s)) !=s. It is not clear whether
this bug can be a problem in other places.
Fixes bug #10443.
(cherry picked from commit 5d85a42bf0)
1. We must always output all (diverging) options, including
default options; if not, default options might get overwritten.
2. Do not output options in \setotherlanguage, since we might have
multiple "other languages" varieties from the same language (such
as naustrian, nswissgerman). And the options are output for the
language switches anyway.
Hence, LaTeXFeatures::getPolyglossiaLanguages() does not have to record
varieties. This was not done correctly anyway, since the map allowed
for one entry per language only.
The code is much simpler now and can be actually understood.
As a byproduct, fix bug #10424.
(cherry picked from commit a700d657b3)
(cherry picked from commit 2037cc5ef5)
(cherry picked from commit 4159cf97c1)
(cherry picked from commit 695b0cc33b)
When using polyglossia, lyx was making a real mess when changing
language inside nested insets. The \begin{language} and
\end{language} commands were not well paired such that they could
easily occur just before and after the start or end of an
environment. Of course this was causing latex errors such that
"\begin{otherlanguage} ended by \end{environment}".
Fixes#9633
Single quotes are special to our parser and must be either escaped or
quoted if they are part of a filename, otherwise they are stripped out.
Fixes#10342.
Add an exception to the conversion of "missing character" warnings into errors.
The PGF package deliberately uses the dummy font "nullfont" to suppress output.
Therefore, warnings about missing characters in "nullfont" are really only warnings.
Also updated the comment: "Missing character" warnigns are especially widespread
in XeTeX/LuaTeX but can also happen with "classical" 8-bit TeX.
Feel free to port this to branch.
The window title is built from the current file name and its
mofidication state. We use our own code instead of the automatic title
bar provided when windowFileName() is set because
1/ Qt does not keep the full path name
2/ Qt does not yield a nice application name
3/ Qt separates file name and app name with an em-dash. It seems that
only KDE does that: Gnome does not, Windows does not either. I do not
think that we can/want to detect a KDE environment at run-time.
The "read only" and "version control" status are shown in the status bar:
* for read only we use the tab read only emblem (with the right size)
* for version control, we show the name of the backend (using a new
vcname() method of the backend).
The iconText() of the view is not updated anymore, since this is
deprecated in Qt5.
(cherry picked from commit 82808fea04)
(cherry picked from commit 9313f8565b)
(cherry picked from commit bbe36ce6ce)
(cherry picked from commit 7cbc0c16a8)
Do not assume that the /systemlyxdir path prefix in \origin refers
to the system directory of the running instance, but check through
some heuristics what the real system dir is. In this way, a document
in the system dir of any other LyX installation is correctly spotted
and the \origin tag properly updated. For example, one can use an
installed version of lyx to edit a document in the lib/doc dir of a
git repo and obtain the same result as when running lyx in place.
(cherry picked from commit ade098e289)
If the first character in the first cell of an aligned math environment is
'[', and the environment does not use top or bottom vertical alignment,
then LyX did write the '[' unprotected so that it got misinterpreted as
optional argument, both when reading the .lyx file in LyX and when reading
the .tex file in LaTeX => data loss!
The fix is to output an empty optional argument in this case, which is
interpreted as default alignment both by LyX and LaTeX. It would also be
possible to output \[ in the first cell instead, but this would be more
difficult to implement.
This is a fixup to commit 39329935. The two fixes are
* add forgotten offset `y' when drawing the line
* in order to have a continuous vertical line, draw from the offset of
the previous row.
Fixes bug #10363.
(cherry-picked from a27ff136)
We do already have docx, but xlsx was missing. This is a separate format
because of the MIME type. nd because some users might need converters which
can only handle one format. Now the spreadsheet template does not hide the
fact anymore that it can deal with xlsx files as well.
When the Qt directory is specified by --with-qt-dir, the tools
are only searched for in the corresponding bin subdir and their
full path is retained, so that it is not necessary modifying the
PATH and PKG_CONFIG_PATH environment variables to select a custom
Qt version. Otherwise, if qtchooser is detected early in the PATH,
the generic names are attempted with proper arguments to select the
desired Qt version (e.g., "moc -qt=qt5" if --enable-qt5 is specified).
Failing all of the above, the generic names with and without proper
suffixes (either -qt4 or -qt5) are checked in the PATH.
Eventually, a check is performed and a warning is issued if the
selected tools do not match the chosen Qt libraries.
This removes the submenu indirection in Insert and the type changer in
contextual menu. Interestingly, the code was there, but it did not
work at all.
(cherry picked from commit e7a33cacf1
and made compatible with C++98)