Commit Graph

37040 Commits

Author SHA1 Message Date
Uwe Stöhr
5e059d349a Win installer: add packages necessary for Unicode math support
- and one for Arabic script languages like Urdu
2017-04-06 00:10:51 +02:00
Uwe Stöhr
808339790c support to indent formulas
- adds support for the general document class option fleqn
- adds support to specify the formula indentation
- fileformat change
2017-04-05 22:22:47 +02:00
Jean-Marc Lasgouttes
60810e0ae2 Use assertions to declare things we know for sure
Doing it that way makes coverity happy.
2017-04-05 11:53:17 +02:00
Jean-Marc Lasgouttes
7b0e732eeb Check both lower and upper bound for tainted loop limit
In these cases, the lower bound is not that important, but coverity insists on it.
2017-04-05 11:36:40 +02:00
Jean-Marc Lasgouttes
abc0aaec12 Replace coverity annotation by an assertion
And reorganize the code a bit.
2017-04-05 11:29:51 +02:00
Uwe Stöhr
51afcd4f4c LaTeXConfig.lyx: add the noto fonts 2017-04-05 01:19:40 +02:00
Uwe Stöhr
d2a8be38b2 FuncCode.h: correct a date 2017-04-05 00:06:37 +02:00
Uwe Stöhr
e575e7eebd Add support to cross out characters
- adds support for the command \xout of the LateX package ulem
- fileformat change
2017-04-05 00:01:19 +02:00
Uwe Stöhr
d81deed121 latexfonts: correct previous commit
this went in accidentally
2017-04-04 23:08:45 +02:00
Uwe Stöhr
7aaa85915f latexfonts: support for the Noto fonts
- fileformat change
- the support to scale the sf and the tt fonts can be added later, see enhancement #10611
2017-04-04 23:02:47 +02:00
Uwe Stöhr
50e21b7166 configure.py: add support for Python 3 on Windows
fixes the last missing part of bug #9006 (hopefully)
2017-04-04 22:35:49 +02:00
Jean-Marc Lasgouttes
aa62b1ad49 Try another way of convincing coverity that everything is fine
We have a false positive here, but annotating with coverity[] comments
is not very convenient. Let's try to use good old assertions instead.
2017-04-04 09:38:43 +02:00
Uwe Stöhr
d683cc2147 Win installer: add 2 fonts to packages list 2017-04-04 02:08:49 +02:00
Uwe Stöhr
86cd1a9c97 tex2lyx: support for the cochineal fonts 2017-04-04 00:19:14 +02:00
Jean-Marc Lasgouttes
91b58cc633 Revert "Possible fix for bug #10295."
This reverts commit 9b0b45dc81.

(committed by mistake)
2017-04-03 12:29:09 +02:00
Jean-Marc Lasgouttes
0005876d17 When converting, indicate clearly when buffer should exist
This makes coverity happy, and makes out code a tiny tiny bit better
commented.
2017-04-03 12:25:17 +02:00
Richard Heck
9b0b45dc81 Possible fix for bug #10295.
As it was, the comparison buffer was sharing a DocumentClass with
one of the compared buffers. I don't fully understand why this was
causing a problem, since we use a shared_ptr. But this patch creates
a new DocumentClass for the new buffer.
2017-04-03 11:03:18 +02:00
Enrico Forestieri
66aa52ff20 Fix bug #10581
Tell the math parser that we are parsing a macro definition, so that
it doesn't try to return a verbatim copy in case of failure.
2017-04-03 00:26:49 +02:00
Enrico Forestieri
e36c661c61 Fix bug #10554
The \lyxdeleted macro cannot cope with \newpage & co.
2017-04-02 23:56:25 +02:00
Tommaso Cucinotta
621ccc5e4e Restrict file cache expiry time to positive values. 2017-04-02 14:55:33 +02:00
Uwe Stöhr
ccfbfdaf2b VSpace.cpp: fix 2 compiler warnings
A division can always lead to a non integer.
2017-04-01 19:54:33 +02:00
Jean-Marc Lasgouttes
758de9577d Improve drawing of math roots (\sqrt and \root)
This is preliminary work to make roots look more like in TeX output:

* correct font size for root order

* set minimum size of the root from the max ascent descent of the
  font. This is what TeX does.

* fix drawing, and in particular horizontal size.

More needs to be done, in particular:

* handle zooming and dpi correctly by removing hardcoded pixel values.

* factor the code for the two types of roots in one.
2017-03-31 18:55:08 +02:00
Jean-Marc Lasgouttes
da590925cd Work around bug in QTextLine::xToCursor
With RtL text, the method can be non-monotonic wrt x value (which is a
Qt bug). To work around this, we check whether positions adjacent to
those returned by xToCursor look better. Depending on whether the new
x position is too small or too large, we look backward or forward for
a better solution.

The performance is probably not great, but this is only needed for
user interactions, so the performance penalty should not be a problem.

Fixes #10569.
2017-03-31 16:56:06 +02:00
Jean-Marc Lasgouttes
db7054da9f Model lyx_exit() to tell coverity what it does 2017-03-31 16:51:02 +02:00
Jean-Marc Lasgouttes
ad20dac17f Catch another exception
Spotted by coverity.
2017-03-31 14:00:46 +02:00
Jean-Marc Lasgouttes
ba39d2de04 Play again with coverity annotation
The documentation is scarce and it is difficult to see what notation
is right.
2017-03-31 13:59:29 +02:00
Jean-Marc Lasgouttes
f14ce3f2ef Handle exception thrown by Buffer::emergencyWrite
Spotted by coverity
2017-03-31 13:39:27 +02:00
Jean-Marc Lasgouttes
6b2444a7df Replace coverity annotation by assertions 2017-03-31 11:47:47 +02:00
Jean-Marc Lasgouttes
cb888293d4 A better way to tell coverity that we do not care about result 2017-03-31 11:38:30 +02:00
Jean-Marc Lasgouttes
d54578a951 When scanning CVS skip unreadable lines
Spotted by coverity.
2017-03-31 11:33:34 +02:00
Jean-Marc Lasgouttes
21ecd4528a Tell coverity that LAPPERR kills LyX too. 2017-03-31 11:31:44 +02:00
Jean-Marc Lasgouttes
08561eba3f Followup to e10db6c7: handle InsetCitation too. 2017-03-31 11:23:28 +02:00
Jean-Marc Lasgouttes
5890e9b831 When destructing a workarea, ignore buffer exceptions
Spotted by coverity, but probably harmless.
2017-03-31 11:17:00 +02:00
Jean-Marc Lasgouttes
e10db6c7dd Annotate destructors to please coverity
Coverity flags this code as not handling exception that may happen in buffer().

My own analysis is that this can never happen because isBufferValid()
does check whether buffer_ is null.

Any insght appreciated. The commit should be expeanded to more cases, actually.
2017-03-31 10:58:43 +02:00
Kornel Benko
0d6c64a4eb Cmake build: Project names *should* be uniq 2017-03-30 14:01:56 +02:00
José Matos
dc7ac99d18 Get the file system encoding from sys instead of the locale 2017-03-29 14:24:34 +01:00
José Matos
67bf174b10 lyx2lyx: convert iteritems -> items to be compatible with python 2 and 3 2017-03-29 12:34:53 +01:00
Jean-Marc Lasgouttes
f043541ebd Missing initialization in 555338048
Thanks to coverity.
2017-03-29 12:04:42 +02:00
Jean-Marc Lasgouttes
555338048d Add possibility for command inset to inherit enclosing font
The RenderButton object now has this property. It is set depending on
the value of inheritFont() method that is currently only set for
InsetRef, InsetBibtex and InsetCitation.

Fixes bug #10258
2017-03-28 13:57:34 +02:00
Enrico Forestieri
a5377ead20 Account for unicode chars in tempdir path on Windows 2017-03-28 12:05:52 +02:00
Jean-Marc Lasgouttes
31cd421bcd Limit multirow to 100 columns in mathed
Spotted by coverity, this avoids a blocking loop when parsing.
2017-03-28 11:43:12 +02:00
Jean-Marc Lasgouttes
4488c45d09 Make LFUN_REPEAT more robust by limiting to 10000 iterations 2017-03-28 11:30:18 +02:00
Jean-Marc Lasgouttes
bc7704a78e Limit the amount of derivatives in external CAS
The (arbitrary) limit is 1000.

Pointed out by coverity. A bad value could lock LyX.
2017-03-28 11:17:35 +02:00
Jean-Marc Lasgouttes
5c03cb340c Use convert instead of a stream to read LFUN_REPEAT count
At least coverity should find it safer.
2017-03-28 11:04:39 +02:00
Jean-Marc Lasgouttes
f58d7dfe7b Try a simpler way to tell coverity that we do not care about the result 2017-03-28 10:53:45 +02:00
Enrico Forestieri
d996ec8992 On windows, use the unicode version of ShellExecute 2017-03-28 01:32:59 +02:00
Jean-Marc Lasgouttes
f7768c994d When running latex one needs to have a proper buffer
Calms down coverity
2017-03-27 17:43:18 +02:00
Jean-Marc Lasgouttes
522f3517e1 Handle properly exception that can be thrown by to_local8bit
Remove the use of this function in GuiAlert.

This was spotted by coverity
2017-03-27 16:13:26 +02:00
Enrico Forestieri
91ca310d1d Amend 16d5c49b
Remove redundant action when toggling the dashes check box.
2017-03-27 15:08:30 +02:00
Enrico Forestieri
b6f8a84a35 Fix #9732: Inconsistent font properties for the preview and superscript insets 2017-03-27 15:00:43 +02:00