Commit Graph

35483 Commits

Author SHA1 Message Date
Georg Baum
7ead59da40 Remove convert_kmap.py
This was used to convert LaTeX symbols in kmap files in 2007, we do not
need it anymore.
2016-06-04 19:09:44 +02:00
Georg Baum
960bcc71c1 Get rid of pseudo diffs when remerging strings
cmake sorts the input files for lyx_pot.py internally, but autotools use a
shell pattern like *.ui on the command line, so the order may be different
on different machines. It is more robust not to require any sorting from the
caller, so lyx_pot.py sorts now internally.
2016-06-04 17:33:19 +02:00
Georg Baum
bf60696ee6 update test references for ba2b86fa 2016-06-04 17:00:17 +02:00
Georg Baum
6bd5263405 Work around limited SVG support (bug #9778)
Qt only supports SVG 1.2 tiny, so we prefer to convert on our own if an
explicit converter is defined and the converter cache is used (otherwise
the conversion would be too expensive).
2016-06-04 09:09:33 +02:00
Kornel Benko
73f33d67d7 Update sk.po 2016-06-03 21:41:38 +02:00
Pavel Sanda
48c4763b86 typo 2016-06-03 11:19:02 -07:00
Jean-Marc Lasgouttes
508518ad95 Take inset dimension into account in row signature
In some cases, the insets may change height or width without changing
the other apsects of the row.

Fixes bug #6991 and #10182.
2016-06-03 11:21:09 +02:00
Pavel Sanda
d5933fc5b5 Comment only 2016-06-02 22:48:58 -07:00
Pavel Sanda
ba2b86fa5d Introduce basic support for microtype.sty.
https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg192743.html
2016-06-02 22:48:58 -07:00
Scott Kostyshak
6a2219bc6f Support a changed log message in newest LuaTeX
The version of LuaTeX that ships with TeX Live 2016 now gives the
following message after processing a document that yields no pages
of output:

"warning  (pdf backend): no pages of output."

The lowercase "n" in "no" is a change that caused our parser not to
pick up the message.
2016-06-02 22:59:05 -04:00
Scott Kostyshak
1e8b925c07 Output file from (xe|lua)latex is PDF, not DVI
A few parts of our code depend on correctly identifying the output
format of LaTeX commands. One specific bug is that because the
output file was not correctly set, it was not removed after an
error. For example, this commit fixes the following bug:

1. Create a new document that contains "hello\blah" where \blah is
in an ERT box.
2. Compile with PDF (LuaTeX). You'll get an error because of \blah.
3. Close the error dialog.
4. Remove the text "hello" and compile again with PDF (LuaTeX).

The error dialog is shown and the "Show Output Anyway" button is
enabled. If you click it, it shows the previously compiled PDF (with
the text "hello"). With this commit, the button is correctly
disabled (and the output file is deleted).
2016-06-02 22:41:26 -04:00
Scott Kostyshak
831c057593 Generalize a comment
An output file does not have to be a DVI.
2016-06-02 22:34:50 -04:00
Uwe Stöhr
f14d7c8a6f Win installer: port last change 2016-06-03 01:30:29 +02:00
Uwe Stöhr
ed0d002166 Tutorial.lyx: port last change 2016-06-03 01:29:59 +02:00
Georg Baum
eade4ceb92 Export svg in xhtml, not svgz (bug 10160)
LyX did not distinguish compressed and uncompressed svg files previously.
Therefore XHTML export of vector graphics did use svgz images directly, which
is not supported by browsers. If svg and svgz are treated as two formats then
all works fine. This is also consistent with the loadable image formats
reported by qt: It reports both svg and svgz.
The gunzip dependency in converters is not new (it is already used internally),
but the gzip dependency is new, so it might not be available on windows.
This is not important at the moment, since we do not yet need to convert svg
to svgz, I only added the converter for completeness.
2016-06-02 22:34:28 +02:00
Georg Baum
8d255ced2a Do not duplicate jpg format
Some qt versions report both "jpeg" and "jpg" as loadable file extensions.
In this case the jpg format was added twice previously. This does not happen
anymore with the new code, and it works as well if only "jpg" or only "jpeg"
is reported.
2016-06-02 22:31:27 +02:00
Georg Baum
d2424c6998 Improve debug output
Now we have only one line per format, not two. The output looks the same now
as in GuiApplication.cpp for the qt formats.
2016-06-02 22:17:19 +02:00
Uwe Stöhr
9151a008a7 Win installer: security issues in ImageMagick require new installer 2016-06-02 00:46:16 +02:00
Georg Baum
232e4d1f7e Update imported gettext code from gettext 0.19.7
This might help with the spurious .pot file update error in 'make distcheck'.
At least it does not break anything.
2016-06-01 21:45:38 +02:00
Pavel Sanda
b356df7fcf glitch in lfundoc 2016-06-01 00:20:50 -07:00
Uwe Stöhr
82518e4602 de.po: some translations 2016-05-31 23:15:56 +02:00
Uwe Stöhr
b540bc1c42 ErrorListUi.ui: correct an expression 2016-05-31 23:15:07 +02:00
Georg Baum
9df45c383a Force native line endings for .po files
As discussed on the list some time ago. cmake produces .po files already in
native line endings. Only autotools on mingw might produce wrong line endings
now, but I am pretty sure that nobody updates .po files using autotools on mingw.
2016-05-31 22:43:09 +02:00
Jean-Marc Lasgouttes
51ee267c6e Allow automatic text direction in Painter::text()
It is wrong to assume that direction is left-to-right when no indication exist.

Add a new enum with values LtR, RtL and Auto to be used as argument of
the private text() methods. When direction is Auto, let Qt decide how
the string shall be layed out.

Fixes bug #10169.
2016-05-31 11:52:30 +02:00
Kornel Benko
d88a813701 Update sk.po 2016-05-31 09:18:29 +02:00
Kornel Benko
246d4bdf66 Cmake export tests: Added testcases for erroneous xhtml exports 2016-05-31 09:13:35 +02:00
Uwe Stöhr
eb9a118553 Win installer: 2 bugfixes 2016-05-31 01:25:07 +02:00
Guillaume Munch
1cc14a31ca TocWidget: fix an erroneous collapse and optimise updates based on profiling
TocModels::reset() in GuiView::structureChanged() collapses the TocWidget, and
therefore requires an update right after, which was missing.

In fact, profiling TocWidget::updateView() shows that delaying the update is
good only for fast keypresses (essentially movement). It costs 5% of a
char-forward operation in a document with approx. 100 table of contents
items. The update optimisation has been rewritten to take this data into
account.
2016-05-31 00:14:13 +01:00
Guillaume Munch
78a5c87781 TocWidget: fix part of #9825 2016-05-31 00:14:13 +01:00
Guillaume Munch
6a662cbb27 TocModel: clean-up 2016-05-31 00:14:13 +01:00
Guillaume Munch
6aceb3558a GuiDelimiters: display at least (and at most?) 4 columns 2016-05-31 00:14:13 +01:00
Guillaume Munch
ef8b8ebcfd GuiDelimiter: Synchronise the vertical scrollbars 2016-05-31 00:14:13 +01:00
Guillaume Munch
8aaa79cfb6 ShortcutPrefs: hide empty lfuns for which there is already a binding 2016-05-31 00:14:13 +01:00
Guillaume Munch
b53d07897b ShortcutPrefs: clean-up 2016-05-31 00:14:13 +01:00
Guillaume Munch
2b6d0ae3de Show names of debug modes in the debug panel
Sometimes it's hard to know which is which from a translation of the description
alone.
2016-05-31 00:14:13 +01:00
Uwe Stöhr
b4ab194216 UserGuide.lyx: update 2 images 2016-05-30 23:20:49 +02:00
Jean-Marc Lasgouttes
47c0b3cc05 Update PAINTING_ANALYSIS
Remove all the tasks that have been performed.
2016-05-30 14:55:41 +02:00
Jean-Marc Lasgouttes
0311718215 Split TextMetrics::setRowHeight in three parts
The new functions parBottomSpaging and parTopSapcing return below/above each paragraph.

This allows to remove the TopBottomSpace argument and makes the code a
bit clearer.
2016-05-30 14:55:41 +02:00
Jean-Marc Lasgouttes
e39e4cf96b Do not require an extra pit parameter when a row is available
Now that Row has a pit() member, it is possible to use it instead of passing an extra pit_type parameter to a function which already has access to a Row.
2016-05-30 14:55:41 +02:00
Jean-Marc Lasgouttes
4c19c5149d RowPainter const cleanup
Change the various paint* helpers to take a single row element as argument.

Do not update x_ in the various paint* helpers. Constify them. Update x_ in paintText and paintOnlyInsets instead.

Remove an empty call to paintForeignMark in paintInset (the call did nothing since orig_x == x_ at this point).
2016-05-30 14:55:41 +02:00
Jean-Marc Lasgouttes
095c390fe2 Update PAINTING_ANALYSIS and add a new task 2016-05-30 14:55:41 +02:00
Jean-Marc Lasgouttes
656b7f5ab7 Set vertical margins in redoParagraph, not setRowHeight
It is actually easier to set the 20 pixels margin in redoParagraph, since it is not necessary to take newlines in account when deciding what is the real last row of the paragraph.

Moreover this solves the following bug (present in 2.1.x too): when the document ends with a newling, the bottom margin disappears.

Update PAINTING_ANALYSIS with new tasks.
2016-05-30 14:55:41 +02:00
Jean-Marc Lasgouttes
598f7e4a45 Cleanup Painter text() API
* remove optional arguments to the helpers that use a FontInfo
* add a textwidth argument to the text() methods that are used by rowpainter.

Now textwidth is only computed if a null value was passed to the
text() method. This means that in the use case of rowpainter, no
textwidth needs to be computed.
2016-05-30 14:55:41 +02:00
Jean-Marc Lasgouttes
333f6fcf07 Make the different Painter::text void methods
The textwidth value that was returned is not used anymore. Now in some
cases we can avoid to compute it at all.
2016-05-30 14:55:41 +02:00
Jean-Marc Lasgouttes
51b1cfab72 Do not use the return value of Painter::text for logos
This will allow to get rid of this return value (and avoid computing it).
2016-05-30 14:55:41 +02:00
Jean-Marc Lasgouttes
ac759b4368 Rewrite setRowHeight using row information
The initial values for maxasc and maxdes (renamed from maxdesc) is obtained as a maximum of max ascents/descents of all row elements.

This allows to get rid of Paragraph::highestFontInRange and FontList::highestInRange.

Some auxilliary variables declarations are also moved to where they are needed.
2016-05-30 14:55:41 +02:00
Jean-Marc Lasgouttes
1751626776 Simplify redoParagraph by merging duplicate code
Let breakRow return a boolean indicating whether an additional row is
required (after a newline) and use that to replace the code that added
an extra row when a paragraph ends with a newline.
2016-05-30 14:55:41 +02:00
Jean-Marc Lasgouttes
78eaf8333b Update PAINTING_ANALYSIS
Some things were wrong, and some new ideas are added (some are done in
this branch already).
2016-05-30 14:55:41 +02:00
Jean-Marc Lasgouttes
fc73ebc16c Make the non-drawing cases faster in TextMetrics::drawParagraph
There are two main cases:
* when drawing is disabled from the start, use a simplified code that only paints insets (in order to cache positions).
* when the row is not visible, do the same.

The goal of this optimization is to be able to always run a no-drawing draw after the metrics have been computed.
2016-05-30 14:55:41 +02:00
Jean-Marc Lasgouttes
96fee0ed7a Move some horizontal scrolling code from TextMetrics to BufferView
It is better to have all the code in the same place, and it will avoid code duplication later.
2016-05-30 14:55:41 +02:00