Commit Graph

37917 Commits

Author SHA1 Message Date
Guillaume Munch
e5d2678339 Fix missing OutlinerName in simplecv 2017-03-20 00:13:08 +01:00
Enrico Forestieri
72a488d7e6 Fix output of en- and em-dashes with TeX fonts
This commit fixes the regression introduced in 2.2 about the
output of en- and em-dashes. In 2.2 en- and em-dashes are output as
the \textendash and \textemdash macros when using TeX fonts, causing
changed output in old documents and also bugs (for example, #10490).

Now documents produced with older versions work again as intended,
while documents produced with 2.2 can be made to produce the exact
same output by simply checking "Don't use ligatures for en-and
em-dashes" in Document->Settings->Fonts.

When exporting documents using TeX fonts to earlier versions, in order
to avoid changed output, a zero-width space character is inserted after
each en/em-dash if dash ligatures are allowed. These characters are
removed when reloading  documents with 2.3, so that they don't accumulate.
2017-03-19 20:50:34 +01:00
Juergen Spitzmueller
1a8fd56333 Consider text-mode accents of the form {\v a} in BiblioInfo
Fixes #9340.
2017-03-19 16:15:03 +01:00
Guillaume Munch
4f3c3a794e repair Cursor::x_target mechanism (#10168) 2017-03-19 14:41:54 +01:00
Guillaume Munch
ac6d3ffb6a Regularly check if preview is modified when visible on screen
In case one cannot rely on QFileSystemWatcher.
2017-03-19 14:41:54 +01:00
Guillaume Munch
ad16347b08 Regularly check if graphics is modified when visible on screen (#10596)
In case one cannot rely on QFileSystemWatcher.

see https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg199112.html
2017-03-19 14:41:54 +01:00
Guillaume Munch
c779e9806e Cosmetic 2017-03-19 14:41:17 +01:00
Guillaume Munch
9926927fb1 Ressurect old FileMonitor à la Frankenstein
ActiveFileMonitor combines QFileSystemWatcher with the previous checksum
approach.
2017-03-19 14:41:17 +01:00
Guillaume Munch
6c4b9c97cb Blocking signals also blocks the notification of file creation (#10595) 2017-03-19 14:41:17 +01:00
Guillaume Munch
fa9ab74ffa Correct ownership
One can now delete a file monitor if a blocker is active.
2017-03-19 14:41:17 +01:00
Juergen Spitzmueller
1eba2c92da Improve BibTeX name parsing #4
Handle name prefix (aka "von" part) as a separate entity, just like
BibTeX and Biblatex do. This allows to omit or reposition it in
accordance to the current style ("Goethe, Johann Wolfgang" or
"von Goethe, Johann Wolfgang" or "Goethe, Johann Wolfgang von" are all
valid and used).

LyX's name parser should now be on par with BibTeX's.
2017-03-19 14:03:48 +01:00
Juergen Spitzmueller
7489cab6c9 Replace "junior" with the more generic term "suffix". 2017-03-19 13:33:56 +01:00
Juergen Spitzmueller
5fdcca4c06 Improve BibTeX name parsing #3
Correctly handle name suffix ("Jr.-part")
2017-03-19 12:42:18 +01:00
Juergen Spitzmueller
9f4df64f23 Allow for simple conditions in name scheme.
I.e., only output a comma between last and first name if there is
a first name.
2017-03-19 11:45:42 +01:00
Juergen Spitzmueller
08500c1a7c Improve BibTeX name parsing #2
Also consider grouping when looking for name separators.

Cases such as {{Barnes and Noble, Inc.}} are now handled correctly.
2017-03-19 11:44:22 +01:00
Juergen Spitzmueller
ee26e7fadf Improve BibTeX name parsing #1
Consider groupings of name parts via {...}
2017-03-19 11:41:33 +01:00
Scott Kostyshak
82705a0e8a Fix typo in comment 2017-03-18 11:36:00 -04:00
Juergen Spitzmueller
be945a0656 Use "Prename Surname" format for basic numeric styles. 2017-03-18 15:35:45 +01:00
Guillaume Munch
340d747fff Clean up
Only keep one dynamic-cast. This fixes coverity warnings.
2017-03-18 15:09:07 +01:00
Juergen Spitzmueller
5b71349450 Input stdciteformats to the cite engines directly
not to individual layouts.

Possibly fixes #10582
2017-03-18 11:26:23 +01:00
José Matos
ef6ff7fb53 lyx2lyx: Remove UTF-8 BOM if present in the lyx file 2017-03-15 10:06:30 +00:00
Jean-Marc Lasgouttes
5d29527916 Output debug message when creating bad length
Coverity is right to say that we should check the return value.
2017-03-14 15:20:09 +01:00
Jean-Marc Lasgouttes
c6213b1b20 Another forgotten unreachable `return' that is not needed
The compilers we use now do not care, but coverity complains.
2017-03-14 14:46:02 +01:00
Jean-Marc Lasgouttes
7a124ab861 Fixup commit 50060053
Fix two instances where theFormats() was used instead of a local parameter.

Fix layout test.
2017-03-14 14:26:26 +01:00
Jean-Marc Lasgouttes
7d4b8b7606 Only accept non-negative lyxscale parameters
Since lyxscale is unsigned, a negative value would lead to a very
large positive value.

Spotted by coverity.
2017-03-14 14:25:08 +01:00
Richard Heck
50060053e3 Move the global formats and system_formats variables into the
LyX singleton.

Mostly, this is very boring, but it might be good if someone would
check what I did about the dummy implementation in tex2lyx.
2017-03-13 23:40:29 -04:00
Jean-Marc Lasgouttes
591f5780e4 Use FileName::lastModified() intead of stat() in DepTable
This patch removes explicit calls to stat() in the DepTable code. The
original motivation was to get read of a stat() invokation where the
error condition was not checked (spotted by coverity).
2017-03-13 17:06:42 +01:00
Jean-Marc Lasgouttes
b8c0891427 Remove optimization that avoids drawing some math inset cells.
It is not clear that the optimization is a gain, but it is clear that
it has a cost: some elements of formulas will not be present in the
position cache.

Fixes bug #10520.
2017-03-13 11:44:48 +01:00
Jean-Marc Lasgouttes
a69bae0c99 Make InsetMathNest::editXY more robust
If no reasonable cell has been found to put the cursor in (maybe
because the cell exist but is not in the cache), exit gracefully.

Fixes bug #10520
2017-03-13 11:44:22 +01:00
Jean-Marc Lasgouttes
a2bfe0042d Do not use the global variable `formats' in Formats class
Using this global variable in the class is clearly a bug. If we wanted
to avoid doing it by mistake, the variable should be moved to the LyX
singleton.

Also add an underscore to the private variable formatlist_.
2017-03-13 11:39:26 +01:00
Richard Heck
322331c53a Fix problem noted at bug #10582.
When we have a name with more than two parts, but no "von",
it was coming out as, e.g.:
	Obama, Barack Hussain Obama
i.e., with the last name appearing twice.

Also adds a check for names without spaces, which would have given:
	Pele, Pele

This was not the original issue at #10582, so that bug is still
open (though I cannot reproduce it).
2017-03-12 16:43:15 -04:00
Richard Heck
8414c38e4b Whitespace and const'ing. 2017-03-12 16:27:36 -04:00
Guillaume Munch
797bb2df14 Fix compilation with 5 <= qt < 5.4 2017-03-11 22:22:27 +01:00
Jean-Marc Lasgouttes
5d8918f68f Compilation fix
It is actually better to compile code before pushing changes...
2017-03-11 20:51:39 +01:00
Jean-Marc Lasgouttes
d6d412c49e Limit the size of strings we read from RCS
This calms down Coverity which fears than an evil RCS repository would break LyX.
2017-03-11 20:46:32 +01:00
Kornel Benko
fe5807483d Update sk.po 2017-03-11 10:15:32 +01:00
Juergen Spitzmueller
d4e0f0ff8a de.po 2017-03-11 09:21:06 +01:00
Scott Kostyshak
3db74fa92d When catching exception, give error on STDERR
The error is reported in the GUI, but for the terminal we must write
explicitly to STDERR.

For a specific example of this type of exception, see the previous
commit, 72c3dbd.
2017-03-11 02:56:31 -05:00
Scott Kostyshak
72c3dbd02c Change a warning to an error if missing include
If an included file is not found, it seems impossible that the final
output would be correct. Before this commit, when exporting on the
command line, LyX would create the PDF and exit with a zero error
code so unless the user was monitoring the terminal output, they
would not know there is a problem.

This change is consistent with 1a374a93.
2017-03-11 02:51:49 -05:00
Guillaume Munch
24f68aff8d Nonsense for whoever insists on using gcc4.6 & qt4.8 in 2017 2017-03-11 00:50:57 +01:00
Guillaume Munch
f96d7a8b2c Remove legacy FileMonitor 2017-03-11 00:50:57 +01:00
Guillaume Munch
a4fae021f2 Replace FileMonitor with FileMonitor2 in RenderPreview 2017-03-11 00:50:57 +01:00
Guillaume Munch
e3a1396813 Replace FileMonitor with FileMonitor2 in GraphicsCacheItem
Remove dead code
2017-03-11 00:50:57 +01:00
Guillaume Munch
22ce6636ef Clarify dialog 2017-03-11 00:50:57 +01:00
Guillaume Munch
0cb85e9206 Disable edition when external modifications are detected
Introduce a distinction between being read-only and having the read-only flag. A
buffer is read-only if either it has been externally modified or if it has the
read-only flag.
2017-03-11 00:50:57 +01:00
Guillaume Munch
b6b56d8518 Notification of external modification inspired by gedit 2017-03-11 00:50:57 +01:00
Guillaume Munch
299242bb16 New LFUN buffer-external-modification-clear 2017-03-11 00:50:57 +01:00
Guillaume Munch
656bc46892 Clean-up 2017-03-11 00:50:57 +01:00
Guillaume Munch
1e57fd12b1 Display externally modified status 2017-03-11 00:50:57 +01:00
Guillaume Munch
7c123507a4 Whitespace 2017-03-11 00:50:57 +01:00