Commit Graph

189 Commits

Author SHA1 Message Date
Jean-Marc Lasgouttes
ea3cdb1552 QString only uses UTF-16, not UCS-4
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)
2016-11-04 17:56:02 +01:00
Daniel Ramöller
3372c0cf55 In Color Preferences "frame of button" should be "button frame"
Fixes #10135.
(cherry picked from commit f054721410)
2016-11-03 16:44:48 +01:00
Juergen Spitzmueller
008c229041 Fix usage of multiple varieties of the same polyglossia language.
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.
2016-11-02 18:04:26 +01:00
Jean-Marc Lasgouttes
065cd36922 Reimplement RowPainter::paintSelection() using row elements
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)
2016-11-02 11:10:05 +01:00
Uwe Stöhr
22d30bf86e ar.po: translations by Hatim 2016-11-01 15:07:50 +01:00
Tommaso Cucinotta
f1b8635789 status update for commit 33103ebc 2016-11-01 09:57:43 +01:00
Juergen Spitzmueller
20e667e208 Use Buffer::validate() when previewing single paragraph
We used to use BufferParams::validate(), which does not validate the
paragraphs.
2016-11-01 08:29:28 +01:00
Juergen Spitzmueller
d190ae7787 Issue an error message if conflicting languages are used
Some languages are only supported by Babel, some only by Polyglossia.

If these are combined, we issue an error message now.

Fixes: #10456
2016-10-31 10:26:35 +01:00
Juergen Spitzmueller
9e2d101d5c Handle | verbatim in index insets. 2016-10-31 10:22:43 +01:00
Enrico Forestieri
0dd7505ec6 Sort the language nesting mess with polyglossia
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
2016-10-30 00:16:50 +02:00
Enrico Forestieri
3508c7bc8a Quote filenames used for forward-search with SumatraPDF
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.
2016-10-27 04:16:04 +02:00
Enrico Forestieri
f8d3a8860b In mathed, require xcolor instead of color when appropriate
Fixes bug #10417.
2016-10-27 03:18:29 +02:00
Guillaume Munch
14745174ec status.22x 2016-10-26 18:38:24 +02:00
Jean-Marc Lasgouttes
ca2379d98a Forgot this. 2016-10-26 16:20:02 +02:00
Jean-Marc Lasgouttes
10b8421ed6 Remove unused methods in anononymous namespace
These have been flagged by gcc 6.
(cherry picked from commit 4065f596ad)
2016-10-26 15:15:54 +02:00
Jean-Marc Lasgouttes
d03a07b93a Fix compiler warning from clang 3.9
(cherry picked from commit fbba865d28)
2016-10-26 15:14:38 +02:00
Jean-Marc Lasgouttes
1d4d07b66e When selecting special logos, set their color correctly
Adapted from 860accd01f.
2016-10-26 11:19:49 +02:00
Jean-Marc Lasgouttes
3f8289e7b5 Forgot this. 2016-10-26 10:58:52 +02:00
Uwe Stöhr
cc214a0e16 Arabic Shortcuts.lyx: new translation by Hatim 2016-10-25 23:35:14 +02:00
Enrico Forestieri
4ad8be330e Show on screen font changes for text-in-math 2016-10-25 20:24:26 +02:00
Günter Milde
ded70f24f6 Fix #10394 Do not error on missing characters in "nullfont".
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.
2016-10-23 17:16:26 +02:00
Juergen Spitzmueller
2dfc12b254 Improve bibliography info (general)
Consider all thesis types.
2016-10-23 08:15:04 +02:00
Guillaume Munch
190e88e148 status.22x 2016-10-22 20:07:42 +02:00
Guillaume Munch
fe960404fc amend b1ffe77535 2016-10-22 20:07:42 +02:00
Guillaume Munch
8d335f813f status.22x 2016-10-22 20:07:42 +02:00
Richard Heck
60bef140b5 Whitespace
(was: "Status and configure for 2.2.3." form 2.2.3-staging

It became empty after rebasing 2.2.3-staging onto 2.2.3.)
2016-10-22 20:06:35 +02:00
Juergen Spitzmueller
37d30288af Fix LaTeX output of fixed-width cells with decimal separator
This follows Uwe's suggestions (and discharges my own).

The result is not ideal, but there is currently no ideal solution.

Fixes: #9568
2016-10-22 19:27:53 +02:00
Juergen Spitzmueller
0be77e2eb2 Implement wrapping in next-change (#10388). 2016-10-22 19:25:07 +02:00
Juergen Spitzmueller
5c4fa40849 Move wrap check for simple search/replace to lyxfind
This gets rid of some dirty dispatch tricks and fixes wrap-around
on replace and in the spellchecker

Fixes: #10378
2016-10-22 19:20:26 +02:00
Jean-Marc Lasgouttes
447254eb59 Update boost to version 1.62. 2016-10-22 16:28:52 +02:00
Juergen Spitzmueller
f23924e824 Refs dialog redesign. 2016-10-21 22:05:54 +02:00
Juergen Spitzmueller
54248a6e98 Citation dialog redesign 2016-10-21 22:03:19 +02:00
Juergen Spitzmueller
98eeaceb5e Fix label display in linguistic examples 2016-10-21 19:20:23 +02:00
Uwe Stöhr
b040985a2b sv.po: updates from Jim 2016-10-20 01:01:13 +02:00
Jean-Marc Lasgouttes
e4998f21b0 Set window title according to platform UI
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)
2016-10-17 10:51:46 +02:00
Jean-Marc Lasgouttes
25640ce39c Make *-lyxformat-* backup files use .lyx~ extension
At least now they look like real backup files.

(cherry picked from commit d12ebb00b9)
2016-10-17 10:27:40 +02:00
Jean-Marc Lasgouttes
181ecc51a7 Do not hardcode required packages for Note inset
This does not change the default behavior, but allows to customize it.

(cherry picked from commit db12707655)
2016-10-17 10:22:45 +02:00
Juergen Spitzmueller
90ffcf41eb Sanitize Ref dialog validation.
Fixes: #10376
2016-10-16 11:49:06 +02:00
Uwe Stöhr
46c2e2b5d6 uk.po: update from Yuri for 2.2.x 2016-10-15 22:50:08 +02:00
Richard Heck
127af8efb4 Back to development. 2016-10-15 15:55:08 -04:00
Enrico Forestieri
ae0679926e Improve systemlyxdir handling
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)
2016-09-25 12:09:24 -04:00
Uwe Stöhr
2020fbce6e pt_BR.po: updates from Georger 2016-09-17 12:58:33 +02:00
Georg Baum
701f10a502 Fix data loss with [ in first cell of aligned
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.
2016-09-12 20:56:05 +02:00
Jean-Marc Lasgouttes
69f0efd797 Set vertical lines in math arrays correctly on Y axis
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)
2016-09-09 09:56:44 +02:00
Georg Baum
7e37dc20eb Add xlsx format
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.
2016-09-08 20:54:40 +02:00
Juergen Spitzmueller
a7d0a7369d Update docs wrt Separator 2016-09-08 10:33:12 +02:00
Juergen Spitzmueller
03f889a46c Remove duplicate context menu item
Fixes: #10368
2016-09-07 09:53:26 +02:00
Juergen Spitzmueller
7d52d37662 Fix for recent luatex versions. 2016-09-04 17:35:11 +02:00
Enrico Forestieri
874bbe2166 If available, use qtchooser to select correct Qt tools
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.
2016-08-29 22:35:09 +02:00
Jean-Marc Lasgouttes
9e44cd672a Simplify menus when there is only one caption type
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)
2016-08-29 13:49:50 +02:00