]>
git.lyx.org Git - features.git/log
Jean-Marc Lasgouttes [Mon, 10 Apr 2017 08:27:08 +0000 (10:27 +0200)]
Better implementation for corssOutLines
When trying to do implement a LaTeX feature on screen, it is always
good to see how LaTeX does it, just in case it is easy to implement on
our side.
Then we have a correct output at all DPI sizes.
Kornel Benko [Mon, 10 Apr 2017 07:57:40 +0000 (09:57 +0200)]
Make output of check_Length.cpp more human readable.
Stephan Witt [Sat, 8 Apr 2017 19:01:17 +0000 (21:01 +0200)]
update canAutoOpenFile/autoOpenFile implementation to new MacOSX API, avoid deprecated calls
Stephan Witt [Sat, 8 Apr 2017 18:58:16 +0000 (20:58 +0200)]
#9006 care to make prefs2prefs.py python 3 compatible
Kornel Benko [Sat, 8 Apr 2017 09:43:39 +0000 (11:43 +0200)]
Update sk.po
Uwe Stöhr [Sat, 8 Apr 2017 02:55:22 +0000 (04:55 +0200)]
tex2lyx: fix the preamble output
- LyX has new preamble tags. Although that they are not relevant for LaTeX they must be created by tex2lyx nevertheless
- also fix an issue that the formula indentation was always output
- update the tex2lyx tests accordingly
Uwe Stöhr [Sat, 8 Apr 2017 02:13:05 +0000 (04:13 +0200)]
update tex2lyx tests to latest file format
Uwe Stöhr [Sat, 8 Apr 2017 01:30:21 +0000 (03:30 +0200)]
Length.cpp: add new unit representing \baselineskip
- fileformat change
Uwe Stöhr [Sat, 8 Apr 2017 00:55:00 +0000 (02:55 +0200)]
InsetTabular.cpp: handle crossed-out text
Uwe Stöhr [Sat, 8 Apr 2017 00:16:05 +0000 (02:16 +0200)]
GuiDocument.cpp: commit missing part
This should have been committed with the previous commit but failed for an unknown reason.
Uwe Stöhr [Sat, 8 Apr 2017 00:12:35 +0000 (02:12 +0200)]
MathsUi.ui. move formula indentation to text layout as requested by Jmarc
Uwe Stöhr [Fri, 7 Apr 2017 23:39:08 +0000 (01:39 +0200)]
MathsUi.ui: next attempt to make it look correct also under Linux
Guillaume MM [Sun, 2 Apr 2017 19:04:06 +0000 (21:04 +0200)]
MathAtom is a unique_ptr
Fix coverity suggestion of defining a move constructor
Kornel Benko [Fri, 7 Apr 2017 16:51:35 +0000 (18:51 +0200)]
Make runtests.py python3 ready
Tex2lyx tests with ctest depend on it
Jean-Marc Lasgouttes [Fri, 7 Apr 2017 10:04:02 +0000 (12:04 +0200)]
Avoid using buffer() which might throw an exception
Actually buffer_ is always valid on this codepath, but coverity is not
able to see that.
Jean-Marc Lasgouttes [Fri, 7 Apr 2017 09:02:36 +0000 (11:02 +0200)]
Avoid using theServer() for no reason
All it brings us is threatening to throw an exception to scare coverity off.
Uwe Stöhr [Fri, 7 Apr 2017 00:14:34 +0000 (02:14 +0200)]
MathsUi.ui: adjust dimensions as requested
Uwe Stöhr [Thu, 6 Apr 2017 23:52:48 +0000 (01:52 +0200)]
BufferParams.cpp; initialize formula_indentation with default value
- Buffer.cpp: formula_indentation will not always be output/written -> erase it
Jean-Marc Lasgouttes [Thu, 6 Apr 2017 13:13:24 +0000 (15:13 +0200)]
Row::Element::x2pos: go to nearest point also over insets
getPosNearX, which is the only user of x2pos, should always return the
nearest position.
In editXY, there is a need to return the position where the inset
stands, but it is done using checkInsetHit.
This is a simplification of commit
eb4a2a19 , which has been reverted
at
01f0ab64a .
Fixes part of bug #10569.
Jean-Marc Lasgouttes [Sat, 1 Apr 2017 11:09:23 +0000 (13:09 +0200)]
Revert "When selecting text with the mouse, inset selection happens in the middle"
This reverts commit
eb4a2a190f2640d2a6ab7146cfcc347e70b57044 .
Jean-Marc Lasgouttes [Thu, 6 Apr 2017 13:08:50 +0000 (15:08 +0200)]
editXY: make cursor positionning correct over non editable inset
Instead of using complicated (and wrong) code, it is better to use
getPosNearX here.
Also simplify the code by removing temporary variables.
Fixes part of #10569.
Jean-Marc Lasgouttes [Thu, 6 Apr 2017 13:05:19 +0000 (15:05 +0200)]
Set boundary correctly in getPosNearX
The code that looks whether neighbor block has a different direction
should look to the left or to the right depending on the direction of
the current block.
Fixes part of bug #10569
Jean-Marc Lasgouttes [Thu, 6 Apr 2017 11:48:32 +0000 (13:48 +0200)]
Require automake 1.14 and autoconf 2.65
This allows to fix distclean properly, since we know that
subdir-objects is used. When it is the case, it is not a good idea for
a Makefile to use a source file which is under the control of another
one. This could not be made to work work with old automake versions
(<1.14).
Therefore we refer directly to object files in Makefile.am instead of
source files. The actually leads to less compilation in tex2lyx.
Update the code here and there to remove compatibility hacks. Update
documentation.
Re-enable the layout test and fix the Length test, which was ovewriting
memory in test_inPixels() because lyxrc did not had a correct layout.
Jean-Marc Lasgouttes [Wed, 5 Apr 2017 15:10:13 +0000 (17:10 +0200)]
Make it clear that current_view_ is available when needed
In particular the LATTEST in createView tells coverity that creating a
view sets it as current_view_.
Scott Kostyshak [Thu, 6 Apr 2017 04:34:51 +0000 (00:34 -0400)]
Document new behavior of "delete" LFUNs
- Describe the change in RELEASE-NOTES.
- Update the example for inset-forall.
This commit follows
71623b88 .
Scott Kostyshak [Thu, 6 Apr 2017 04:13:32 +0000 (00:13 -0400)]
Keep RELEASE-NOTES as ASCII
Might as well make it as simple as possible.
Scott Kostyshak [Thu, 6 Apr 2017 02:08:10 +0000 (22:08 -0400)]
Remove "Bummer" from the "Save failed!" message
There is a small chance that the user could get offended by this
nonchalant word in a data loss situation.
For discussion, see
https://www.mail-archive.com/search?l=mid&q=
20170401043945 .7bpmrdugtqo6dw3j%40steph
Uwe Stöhr [Thu, 6 Apr 2017 01:07:58 +0000 (03:07 +0200)]
MathsUi.ui: adjust the size to fit better
Uwe Stöhr [Wed, 5 Apr 2017 22:10:51 +0000 (00:10 +0200)]
Win installer: add packages necessary for Unicode math support
- and one for Arabic script languages like Urdu
Uwe Stöhr [Wed, 5 Apr 2017 20:22:47 +0000 (22:22 +0200)]
support to indent formulas
- adds support for the general document class option fleqn
- adds support to specify the formula indentation
- fileformat change
Jean-Marc Lasgouttes [Wed, 5 Apr 2017 09:53:17 +0000 (11:53 +0200)]
Use assertions to declare things we know for sure
Doing it that way makes coverity happy.
Jean-Marc Lasgouttes [Wed, 5 Apr 2017 08:22:52 +0000 (10:22 +0200)]
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.
Jean-Marc Lasgouttes [Wed, 5 Apr 2017 08:20:01 +0000 (10:20 +0200)]
Replace coverity annotation by an assertion
And reorganize the code a bit.
Uwe Stöhr [Tue, 4 Apr 2017 23:19:40 +0000 (01:19 +0200)]
LaTeXConfig.lyx: add the noto fonts
Uwe Stöhr [Tue, 4 Apr 2017 22:06:37 +0000 (00:06 +0200)]
FuncCode.h: correct a date
Uwe Stöhr [Tue, 4 Apr 2017 22:01:19 +0000 (00:01 +0200)]
Add support to cross out characters
- adds support for the command \xout of the LateX package ulem
- fileformat change
Uwe Stöhr [Tue, 4 Apr 2017 21:08:45 +0000 (23:08 +0200)]
latexfonts: correct previous commit
this went in accidentally
Uwe Stöhr [Tue, 4 Apr 2017 21:02:47 +0000 (23:02 +0200)]
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
Uwe Stöhr [Tue, 4 Apr 2017 20:35:49 +0000 (22:35 +0200)]
configure.py: add support for Python 3 on Windows
fixes the last missing part of bug #9006 (hopefully)
Jean-Marc Lasgouttes [Tue, 4 Apr 2017 07:35:55 +0000 (09:35 +0200)]
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.
Uwe Stöhr [Tue, 4 Apr 2017 00:08:49 +0000 (02:08 +0200)]
Win installer: add 2 fonts to packages list
Uwe Stöhr [Mon, 3 Apr 2017 22:19:14 +0000 (00:19 +0200)]
tex2lyx: support for the cochineal fonts
Jean-Marc Lasgouttes [Mon, 3 Apr 2017 10:29:09 +0000 (12:29 +0200)]
Revert "Possible fix for bug #10295."
This reverts commit
9b0b45dc81e8f1bc5cf370f0a9a8f60b8d93f4e6 .
(committed by mistake)
Jean-Marc Lasgouttes [Mon, 3 Apr 2017 10:25:17 +0000 (12:25 +0200)]
When converting, indicate clearly when buffer should exist
This makes coverity happy, and makes out code a tiny tiny bit better
commented.
Richard Heck [Mon, 3 Apr 2017 00:59:23 +0000 (20:59 -0400)]
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.
Enrico Forestieri [Sun, 2 Apr 2017 22:26:49 +0000 (00:26 +0200)]
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.
Enrico Forestieri [Sun, 2 Apr 2017 21:56:25 +0000 (23:56 +0200)]
Fix bug #10554
The \lyxdeleted macro cannot cope with \newpage & co.
Tommaso Cucinotta [Sun, 2 Apr 2017 12:55:33 +0000 (14:55 +0200)]
Restrict file cache expiry time to positive values.
Uwe Stöhr [Sat, 1 Apr 2017 17:54:33 +0000 (19:54 +0200)]
VSpace.cpp: fix 2 compiler warnings
A division can always lead to a non integer.
Jean-Marc Lasgouttes [Fri, 31 Mar 2017 16:50:14 +0000 (18:50 +0200)]
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.
Jean-Marc Lasgouttes [Fri, 31 Mar 2017 14:56:06 +0000 (16:56 +0200)]
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.
Jean-Marc Lasgouttes [Fri, 31 Mar 2017 14:51:02 +0000 (16:51 +0200)]
Model lyx_exit() to tell coverity what it does
Jean-Marc Lasgouttes [Fri, 31 Mar 2017 12:00:46 +0000 (14:00 +0200)]
Catch another exception
Spotted by coverity.
Jean-Marc Lasgouttes [Fri, 31 Mar 2017 11:59:29 +0000 (13:59 +0200)]
Play again with coverity annotation
The documentation is scarce and it is difficult to see what notation
is right.
Jean-Marc Lasgouttes [Fri, 31 Mar 2017 11:38:35 +0000 (13:38 +0200)]
Handle exception thrown by Buffer::emergencyWrite
Spotted by coverity
Jean-Marc Lasgouttes [Fri, 31 Mar 2017 09:47:47 +0000 (11:47 +0200)]
Replace coverity annotation by assertions
Jean-Marc Lasgouttes [Fri, 31 Mar 2017 09:38:30 +0000 (11:38 +0200)]
A better way to tell coverity that we do not care about result
Jean-Marc Lasgouttes [Fri, 31 Mar 2017 09:33:34 +0000 (11:33 +0200)]
When scanning CVS skip unreadable lines
Spotted by coverity.
Jean-Marc Lasgouttes [Fri, 31 Mar 2017 09:31:44 +0000 (11:31 +0200)]
Tell coverity that LAPPERR kills LyX too.
Jean-Marc Lasgouttes [Fri, 31 Mar 2017 09:23:28 +0000 (11:23 +0200)]
Followup to
e10db6c7 : handle InsetCitation too.
Jean-Marc Lasgouttes [Fri, 31 Mar 2017 09:16:08 +0000 (11:16 +0200)]
When destructing a workarea, ignore buffer exceptions
Spotted by coverity, but probably harmless.
Jean-Marc Lasgouttes [Mon, 27 Mar 2017 14:18:14 +0000 (16:18 +0200)]
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.
Kornel Benko [Thu, 30 Mar 2017 12:01:56 +0000 (14:01 +0200)]
Cmake build: Project names *should* be uniq
José Matos [Wed, 29 Mar 2017 13:24:34 +0000 (14:24 +0100)]
Get the file system encoding from sys instead of the locale
José Matos [Wed, 29 Mar 2017 11:34:53 +0000 (12:34 +0100)]
lyx2lyx: convert iteritems -> items to be compatible with python 2 and 3
Jean-Marc Lasgouttes [Wed, 29 Mar 2017 10:03:57 +0000 (12:03 +0200)]
Missing initialization in
555338048
Thanks to coverity.
Jean-Marc Lasgouttes [Thu, 23 Jun 2016 17:45:10 +0000 (19:45 +0200)]
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
Enrico Forestieri [Tue, 28 Mar 2017 10:05:52 +0000 (12:05 +0200)]
Account for unicode chars in tempdir path on Windows
Jean-Marc Lasgouttes [Tue, 28 Mar 2017 09:41:27 +0000 (11:41 +0200)]
Limit multirow to 100 columns in mathed
Spotted by coverity, this avoids a blocking loop when parsing.
Jean-Marc Lasgouttes [Tue, 28 Mar 2017 09:30:18 +0000 (11:30 +0200)]
Make LFUN_REPEAT more robust by limiting to 10000 iterations
Jean-Marc Lasgouttes [Tue, 28 Mar 2017 09:17:35 +0000 (11:17 +0200)]
Limit the amount of derivatives in external CAS
The (arbitrary) limit is 1000.
Pointed out by coverity. A bad value could lock LyX.
Jean-Marc Lasgouttes [Tue, 28 Mar 2017 09:02:21 +0000 (11:02 +0200)]
Use convert instead of a stream to read LFUN_REPEAT count
At least coverity should find it safer.
Jean-Marc Lasgouttes [Tue, 28 Mar 2017 08:52:59 +0000 (10:52 +0200)]
Try a simpler way to tell coverity that we do not care about the result
Enrico Forestieri [Mon, 27 Mar 2017 23:32:59 +0000 (01:32 +0200)]
On windows, use the unicode version of ShellExecute
Jean-Marc Lasgouttes [Mon, 27 Mar 2017 15:43:18 +0000 (17:43 +0200)]
When running latex one needs to have a proper buffer
Calms down coverity
Jean-Marc Lasgouttes [Mon, 27 Mar 2017 14:08:22 +0000 (16:08 +0200)]
Handle properly exception that can be thrown by to_local8bit
Remove the use of this function in GuiAlert.
This was spotted by coverity
Enrico Forestieri [Mon, 27 Mar 2017 13:08:30 +0000 (15:08 +0200)]
Amend
16d5c49b
Remove redundant action when toggling the dashes check box.
Enrico Forestieri [Mon, 27 Mar 2017 13:00:43 +0000 (15:00 +0200)]
Fix #9732: Inconsistent font properties for the preview and superscript insets
José Matos [Mon, 27 Mar 2017 10:35:29 +0000 (11:35 +0100)]
lyx2lyx: fix #9006 (python3 with non-utf8 encoding as the system default)
This patch fixes lyx2lyx running on python 3 for those systems
where the default encoding is not UTF-8, since open by default
uses the default system encoding.
José Matos [Mon, 27 Mar 2017 10:26:58 +0000 (11:26 +0100)]
lyx2lyx: remove trailing whitespaces from lyx_1_6.py
José Matos [Mon, 27 Mar 2017 09:36:30 +0000 (10:36 +0100)]
lyx2lyx: more descriptive member name (document.start -> document.initial_format)
José Matos [Mon, 27 Mar 2017 09:16:31 +0000 (10:16 +0100)]
lyx2lyx: Cosmetic clean up of the lyx_2_?.py files.
Remove the duplicated \# -*- coding: utf-8 -*-
lines that show in the third line.
As far as I know they are not used, the first line though is used
by python and text editors (emacs, vi & co) to get the file encoding.
That will also work in the second lines (because of the shebang convention)
but not in other lines.
Remove trailing whitespaces.
Uwe Stöhr [Sun, 26 Mar 2017 22:04:25 +0000 (00:04 +0200)]
uk.po: translation update for master by Yuri
Juergen Spitzmueller [Sun, 26 Mar 2017 16:11:32 +0000 (18:11 +0200)]
de.po: improve a string
Juergen Spitzmueller [Sun, 26 Mar 2017 16:10:30 +0000 (18:10 +0200)]
Translate file filters for external material
Juergen Spitzmueller [Sun, 26 Mar 2017 15:56:47 +0000 (17:56 +0200)]
GuiExternal: use proper model/view separation and sort the templates
Juergen Spitzmueller [Sun, 26 Mar 2017 13:41:33 +0000 (15:41 +0200)]
de.po
Juergen Spitzmueller [Sun, 26 Mar 2017 13:32:01 +0000 (15:32 +0200)]
Split external_templates to individual *.xtemplate files
This makes it easier to add new templates or change existing ones
in the user directory.
Fixes: #3983
The CMake changes should be double-checked.
Kornel Benko [Sat, 25 Mar 2017 11:43:53 +0000 (12:43 +0100)]
Cmake build: Set cache variables correctly
In case of LYX_EXTERNAL_MYTHES==AUTO, the setting never made it into cache.
Jean-Marc Lasgouttes [Fri, 24 Mar 2017 15:44:14 +0000 (16:44 +0100)]
Fix coverity issues about exceptions
There a some exceptions related to the fact that BOOST_ASSERT throws
an unhandled exception, which is fait enough. This is handled by
uploading a modeling file to coverity.
The second batch of issues are related to the use of lexical_cast in
convert.cpp. We use now a wrapper around boost::lexical_cast that does
not throw but return empty strings instead. I am not sure actually of
when lexical_cast could fail.
Jean-Marc Lasgouttes [Fri, 24 Mar 2017 14:54:16 +0000 (15:54 +0100)]
Try alternative syntax for signaling false positive
Jean-Marc Lasgouttes [Fri, 24 Mar 2017 14:51:26 +0000 (15:51 +0100)]
Check return value of regex_match instead of looking at first match
Spotted by coverity.
Jean-Marc Lasgouttes [Fri, 24 Mar 2017 14:25:42 +0000 (15:25 +0100)]
Two places where coverity urges us to limit string length
These two issues make sense, but there are probably others.
Jean-Marc Lasgouttes [Fri, 24 Mar 2017 14:06:13 +0000 (15:06 +0100)]
Pass big parameters by address
Spotted by coverity.
Jean-Marc Lasgouttes [Thu, 17 Nov 2016 15:17:49 +0000 (16:17 +0100)]
Reduce horizontal spacing for simple inline equations
Jean-Marc Lasgouttes [Wed, 8 Feb 2017 15:42:14 +0000 (16:42 +0100)]
Linearize macros in box edit mode too.
The special mode used by macros where the macro name is displayed as
grey text in a box is now one of the possible marker types for any
inset. The new code puts the macro name below the text, which means
that only the text below the current line will be moved. This makes
edition much more comfortable. The grey border around the contents has
been removed too.
The marker_type enum has been moved from Inset to InsetMath. A
markerMargin() function returns the horizontal margin required on each
side for the marker. Only the corner-type markers MARKER and MARKER2
need some.
A new BOX_MARKER enum value has been added and is taken care of in
afterMetricsMarkers (renamed from metricsMarkerVertical) and
drawMarkers.
The InsetMath::marker() macro now takes a BufferView pointer as
argument, so that the marker type can depend on editing state.
MathRow::metrics now makes changes to the MathRow object when needed.
The specific metrics/draw code in MathMacro has been removed and
replaced by assertions. Code in addToMathRow and marker is adapted to
reflect the cases where linearization is possible.
Juergen Spitzmueller [Tue, 21 Mar 2017 09:24:31 +0000 (10:24 +0100)]
Correct FORMAT documentation
Enrico Forestieri [Mon, 20 Mar 2017 22:59:16 +0000 (23:59 +0100)]
Further amendment to
72a488d7
Rephrase positively the check box for the output of en- and em-dashes
and disable it when using non-TeX fonts. The state of the check box
is remembered, so that toggling the non-TeX fonts check box does not
cause information loss.
Jean-Marc Lasgouttes [Mon, 20 Mar 2017 14:03:09 +0000 (15:03 +0100)]
Fix compilation warning in DepTable.cpp
Enrico Forestieri [Mon, 20 Mar 2017 14:08:17 +0000 (15:08 +0100)]
Also account for development versions