Commit Graph

22857 Commits

Author SHA1 Message Date
Jean-Marc Lasgouttes
89dca6d3a9 Be careful about accounting for the right margin
In computeRowMetrics, the right margin of the row shall be taken in account when the text is not left-aligned. Rewrite the code in terms of the available width `w' to avoid this pitfall.
2015-11-06 14:35:21 +01:00
Günter Milde
4d2074b378 Fix encoding-setting of child document with LuaTeX and TeX-fonts 2015-11-05 10:55:43 +01:00
Jean-Marc Lasgouttes
576159156e Avoid using pointer after it has been invalidated
The pointer macroInset points to a vector element. When another element is inserted in this vector, some reallocation occur and the pointer points to a deleted element.

This does not crash LyX by default, but it is bad enough to make valgrind cry.

See ticket #9804.
2015-11-05 10:01:04 +01:00
Jean-Marc Lasgouttes
eb1e85b096 Try to avoid horizontal scrolling with wide insets.
There was a problem with end of paragraph markers. By design, wide insets choose their size without taking in account the marker. This should not lead to unneeded horizontal scrolling.

Part of ticket #9807.
2015-11-05 09:57:42 +01:00
Georg Baum
60a648c572 Remove unused declarations 2015-11-04 21:41:00 +01:00
Jean-Marc Lasgouttes
a5822a2976 Allow quotes in PDF text properties
PDF properties (Author, Title...) need to be quoted properly when writing (normal operation and tex2lyx). Also, reading them requires to use Lexer::getString() directly, because >> uses next(), which does not handle escapes.

Fixes bug #9830.
2015-11-04 12:18:01 +01:00
Günter Milde
f739c98fd7 Fix some XeTeX + TeX-fonts regressions introduced by fixing #9740.
hyperref expects LICR macros for non-ASCII chars in the PDF Header Information.
As hyperref provides good coverage for \inputencoding{utf8}, we try
this if the current input encoding does not support a character.

With XeTeX, we do not load inputenc and cannot use \inputencoding.
However, utf-8 works out of the box so we can write the content in UTF8.
2015-11-04 11:21:22 +01:00
Uwe Stöhr
62a69584e6 achemso.layout: add a flex inset
- this one is in achemso since version 3.8

- fileformat change
2015-11-04 01:18:13 +01:00
Enrico Forestieri
1c94995aef Fix bug ##9627: Make the document name available to preview insets
The \jobname macro is redefined for the preview snippets such that
it contains the name of the document without extension. This is
harmless because the moment it is redefined, TeX has already chosen
the name of the output and log files. On the other hand, any use
of \jobname in preview snippets is now consistent with what one
obtains after exporting and compiling by hand.
2015-11-04 00:36:41 +01:00
Enrico Forestieri
76dfde36d4 Fix bugs #2645 (export BIBINPUTS) and #6634 (Better support for external files in ERT)
Other than BIBINPUTS, also BSTINPUTS and TEXFONTS are exported.
They do not replicate the setting for TEXINPUTS but are set such
that the current dir (i.e., the temp dir) and the document dir
are also searched for bibtex and fonts related files.
2015-11-03 23:28:36 +01:00
Guillaume Munch
a0783e1527 Amend f441590c 2015-11-03 15:27:25 +00:00
Günter Milde
338f0174cf Fixme for the partial patch for #9740 (XeTeX with TeX fonts), 2015-11-03 12:29:07 +01:00
Guillaume Munch
21eea1e77a Capitalization 2015-11-03 03:54:52 +00:00
Guillaume Munch
f441590c8e Add "Open Containing Directory" button to the log dialog (#9211, #9834)
It takes the place of the "Copy to Clipboard" button which was redundant.
2015-11-03 03:54:52 +00:00
Enrico Forestieri
f8bfc8405e Fix bug #7657: Detect inkscape from the configure script
On Windows, if inkscape is not found in the PATH, search for it
in the registry and store its full path in lyxrc.defaults.
2015-11-02 23:46:14 +01:00
Jean-Marc Lasgouttes
cb8c52bd0c Fix compilation with clang++ 3.6.2. 2015-11-02 16:14:43 +01:00
Jean-Marc Lasgouttes
5e0e676530 Disable setting vertical lines when using a formal table
The code in InsetTabular disables the toolbar icons and menu entries related to vertical lines.

The code in GuiTabular disables vertical lines in the Settings dialog.
Note that there was a bug in
GuiSetBorders::set(Left|Right|Top|Bottom)Enabled, where the borders
did not get drawn correctly.

Fixes bug #9816
2015-11-02 15:58:40 +01:00
Jean-Marc Lasgouttes
1f81cd7b65 Set current font correctly after inset-select-all
Since we modify directly the cursor, it is wise to make sure that the current font is updated.

Fixes bug #9719.
2015-11-02 14:35:50 +01:00
Jean-Marc Lasgouttes
1f0d210ab5 Fix algorithm that computes horizontal scroll offset
Rewrite the logic completely:
* fix cases where the offset was reset unnecessarily
* fix cases where the row was scrolled too much: as soon as a side of the row is completely visible, there is no need to scroll more.
* fix cases where offset would never reset
2015-11-02 11:17:36 +01:00
Jean-Marc Lasgouttes
1db691c2f5 Fix wrong reset of horizontal scolling of current row
This partially reverts commit 0f1fdaaa9, but only redraws the current
row when the value returns by getPos is obviously false. It would also
be possible to check whether the current cursor has all its insets in
cache instead.

A better fix should be found, but this is unfortunately not 2.2 stuff.

Fixes bugs #9796 and #9812.
2015-11-02 11:11:39 +01:00
Guillaume Munch
f6be7d89ef Fix bug #9813
tex/row correspondance for \end{tabular}.
2015-11-02 00:07:21 +00:00
Juergen Spitzmueller
a9b8cdca9e Varwidth module provided by d.iabo
See #9417.
2015-11-01 11:00:23 +01:00
Scott Kostyshak
0911915b6a Typo 2015-10-31 02:12:31 -04:00
Kornel Benko
ea70c1ff0d Cmake tests: Display process while executing for target updatetex2lyxtests
The execution took some time and the messages were delayed
until all test files were processed. Now as each testfile
is processed, the appropriate messages are printed.

There is also a new target: cleanupdatetex2lyxtests
It is the same as updatetex2lyxtests, but removes also
some extra created files from the source directory.
2015-10-30 13:28:20 +01:00
Kornel Benko
9b1f459f77 Cmake tests: Remove the use of file(TIMESTAMP...)
Cmake versions prior to 2.8.11 don't know this command, but
our minimal requirenment is 2.6.4

Thank to Vincent, it is replaced by using 'if(file1 IS_NEWER_THAN file2)' comparision.
2015-10-29 11:07:34 +01:00
Scott Kostyshak
0ca63f4e27 Disable "Show Output Anyway" button if empty file
Sometimes when compilation fails a PDF file is created but is empty
and the viewer gives an error when trying to view it. One such
example is compiling the current lib/examples/PDF-comment.lyx file
with TeX fonts and the following version of LuaTeX:

  beta-0.80.0 (TeX Live 2015) (rev 5238)
2015-10-29 02:27:27 -04:00
Kornel Benko
e430586ec3 Cmake tests: Get rid of use of command 'env', which is not available under Windows. 2015-10-28 17:59:28 +01:00
Jean-Marc Lasgouttes
b5871decc0 Justify row correctly after double space
The wordSpacing property of a QFont object applies only once when there are multiple spaces between words. Therefore Row::Element::countSeparators shall not count spaces, but groups of spaces.

Fixes bug #9808.
2015-10-28 14:03:01 +01:00
Jean-Marc Lasgouttes
febbcf7f6c Fix painting of selection with change tracking
When partially selecting an element, the selected text color was not
the same as when selecting it completely.

Fixes bug #9809.
2015-10-28 10:40:10 +01:00
Günter Milde
c061e339f9 Clarify the FIXME for PDF-info encoding. 2015-10-28 10:31:08 +01:00
Günter Milde
3d521cfcac Update the FIXME for PDF-info encoding. 2015-10-28 10:16:41 +01:00
Uwe Stöhr
2c1851e2ec moderncv.layout: update some styles and add new ones
- support for at least modernCV 1.5 (layout will still work with moderncv 1.3 as before)
- fileformat change
2015-10-28 02:27:32 +01:00
Georg Baum
1eaa2366bf Make language nesting code more readable
This is a tiny simplification that makes understanding the code more easy and
will help in fixing the remaining regressions. The logic remains the same, no
export test result is changed.
2015-10-27 22:36:52 +01:00
Jean-Marc Lasgouttes
f7e639c818 Fix commit 32edb659
A bad test meant an embarassing red line on the left.

This is still bug #9807.
2015-10-26 11:39:58 +01:00
Günter Milde
2aa65fdc8d Fix the partial patch for #9740 (XeTeX with TeX fonts), part 2. 2015-10-26 00:51:38 +01:00
Jean-Marc Lasgouttes
32edb65985 Avoid showing vertical scroll mark when not necessary
Now the mark if only shown when editable text is outside of the row.

Fixes bug #9807.
2015-10-26 00:01:28 +01:00
Günter Milde
36b9645b5d Fix the partial patch for #9740 (XeTeX with TeX fonts). 2015-10-25 12:12:10 +01:00
Stephan Witt
23a3148c02 Fix a missing-braces warning for initialization of subobject 2015-10-24 21:10:36 +02:00
Stephan Witt
2a3b54d57b For Mac OS: Additional check for Control and Meta modifier swap state.
Starting with Qt 5 the modifiers aren't reported correctly for disabled swap.
Until this is fixed it is corrected by reverting the modifier mask to check for.
2015-10-24 21:08:10 +02:00
Georg Baum
d5ed835225 Revert the box alignment part of 8010b90c
The horizontal alignment changes caused a regression for documents in older
formats. This could have been fixed by adding the following lines to the
format entry for 489 in development/FORMAT:

	Previously, the horizontal position was ignored except for the
	following parameter combinations:
	- fixed width and type Boxed and without inner box
	- fixed width and any type   and with    inner box and with makebox
	Now, it is also used for the parameter combination below:
	- makebox is not used and not (type Boxed and without inner box)

and a corresponding conversion to convert_BoxFeatures() in
lib/lyx2lyx/lyx_2_2.py. However, it was decided to revert the box alignment
changes instead: The box alignment can contradict the paragraph alignment. A
better way to avoid the additional space that can be created by paragraph
alignment (which was the motivation for implementing box alignment) is the
same as for table cells (see noTrivlistCentering() in src/Paragraph.cpp).
This would be a file format change and it is too late now for 2.2.0.

See http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg188147.html for the
complete discussion (subject "Regression in lyx2lyx box alignment").
2015-10-23 22:08:38 +02:00
Uwe Stöhr
a685e5601c InsetMathNest.cpp: add \sideset to the autocomplete list
fixes bug #9810
2015-10-23 05:20:51 +02:00
Guillaume Munch
671c7e12e5 Amend bb344452
Repair the senseless truncation on long file names
2015-10-21 15:02:12 +01:00
Guillaume Munch
7a60c96dfa msvc: Proper fix for compilation of TexRow
This bug in MSVC 10 was fixed at e948caf6, but the workaround belongs to
strfwd.h.

Thanks Vincent and Georg.
2015-10-20 21:29:19 +02:00
Vincent van Ravesteijn
990446c0e1 msvc: Move implementation of numpunct<> functions to cpp file
These functions use lyx::from_ascii which means they need to include
docstring.h, but that results in a circular include.
2015-10-20 21:28:40 +02:00
Vincent van Ravesteijn
42e5353f8a Revert "msvc: Fix compilation of TexRow"
This reverts commit 10d7f6d479.
2015-10-20 19:22:36 +02:00
Günter Milde
1523fc6023 Partial fix for #9740 "XeTeX/LuaTeX with TeX fonts problems".
Fixes output for 3 of the 4 test lyx-files.

Includes "FIXME"s at places where further action is required to get the XeTeX
export right but I don't know how.
2015-10-20 19:16:25 +02:00
Guillaume Munch
9d7c3a4876 Amend bb344452 2015-10-20 16:23:25 +01:00
Günter Milde
a0e2d48a56 Update the fileformat number in the tex2lyx test's expected output.
This needs to be done with every fileformat change!
2015-10-20 17:09:54 +02:00
Jean-Marc Lasgouttes
b14c0530eb Assorted cppcheck fixes
Remove member disp_ that is defined both in Cursor and CursorData classes

Pass parameter of convert<T>(docstring const) templates as const reference for performance.
2015-10-20 09:58:46 +02:00
Guillaume Munch
6f2e86dff2 TexRow: fix return value on invalid row input.
Caused loops with Sweave & Knittr compilation.
2015-10-20 00:51:27 +01:00