Commit Graph

25236 Commits

Author SHA1 Message Date
Scott Kostyshak
8d2b121ef5 Do not show master's errors if compiling child
If a master document is compiled and has errors, and then a child is
compiled without error, the errors from the master compilation were
shown.

The setup of the relevant code is the following:

  processingThreadFinished() calls errors().  errors() makes the
  assumption that if it is called, there must have been an error
  somewhere.

The logic of the setup is the following:

  processingThreadFinished() knows whether there was an error on
  the most recent preview/export, although it doesn't know whether
  the error is from master or child (i.e. does not know whether the
  user was compiling the child, or whether master-buffer-view was
  called).  Inside error(), if there is no error in the child, it is
  assumed the error is from master.

For the above logic to work, errors() should only be called if there
was an error.

This commit fixes #11106 and preserves the fix to #7330.
2018-04-08 09:51:01 -04:00
Juergen Spitzmueller
2ecc3b09c6 Set correct path to (biblatex) bibliography databases that are entered relative to child documents.
Fixes: #11105
2018-04-07 22:09:06 +02:00
Jean-Marc Lasgouttes
503c7c1688 When inserting math inset, put cursor selection in the correct cell
The original use case for this bug is entering an overset inset when
there is a selection. The expected result was to have the selection
pasted in main text, but the result was to have it in the cell.

Insets already have idxFirst() that is able to set cursor to the
"entry" cell of an inset. This patch introduces firstIdx(), which is
the index of this cell and uses it in idxFirst() (idem for
lastIdx/idxLast).

As a consequence, several instances of idxFirst/idxLast can be removed.

Now for the real fix: the two places where the cell in which selection
is inserted seem to be:
* Cursor::macroModeClose
* Cursor::handleNest

These two methods are changed to insert material in the entry cell
instead of cell 0.

idxFirst/Last methods are added to InsetMathRoot and InsetMathStackrel
so that the natural entry point is the nucleus of those insets.

Finallly, a typo is fixed in InsetMathNest::edit() where enter_front
computation was incorrect.
2018-04-05 11:22:02 +02:00
Jean-Marc Lasgouttes
c5ca503d92 Makes caret height adapt to context in mathed.
Set current cursor font in MathData::metrics()

Also make sure that caret dimension in mathed is not larger than inset
height.
2018-04-04 15:11:13 +02:00
Juergen Spitzmueller
37404df686 Do not use \tablefootnote in minipages
Minipages provide their own working \footnote's

Should also go to 2.3.x.
2018-04-04 10:53:40 +02:00
Richard Heck
d9ebf6e2c7 Fix bug #11102.
Ignore deleted material when generating a proposed label.
2018-04-03 18:39:28 -04:00
Pavel Sanda
1a4404944b Upstreaming compilation patch needed for Gentoo. 2018-04-02 15:39:56 +02:00
Richard Heck
b4d885ac69 8-char tab stops are too big in the preamble editor. 2018-04-01 22:07:21 -04:00
Richard Heck
e666b5eced Fix bug 11099.
Adds simple search/find functionality to preamble.
2018-04-01 22:07:16 -04:00
Scott Kostyshak
fc59688dbc Give full pref path in doc for date-insert
Give intermediate steps to get to "Date format" in preferences.

This change is the result of the following discussion:

  https://latex.org/forum/viewtopic.php?f=19&t=31333
2018-03-31 01:04:57 -04:00
Juergen Spitzmueller
1efef5542b Adapt to new hunspell C++ ABI
Fixes: #10547

CMake support still missing.
2018-03-29 18:43:11 +02:00
Juergen Spitzmueller
a9a7f38488 Prevent that a full source preview of a child clears the master's bibfiles cache.
See #9158
2018-03-27 14:29:25 +02:00
Juergen Spitzmueller
346d31d38d Fix use of default biblio_style
Fixes: #11088
2018-03-26 15:50:35 +02:00
Juergen Spitzmueller
6415d986ba amend 1c623ffe8f 2018-03-22 23:37:19 +01:00
Juergen Spitzmueller
1c623ffe8f Use separate BibInfo for child
This is used when the file is compiled standalone

Fixes: #11083
2018-03-22 15:52:23 +01:00
Richard Kimberly Heck
83b1ac3b55 Fix bug #11084.
Allow unicode-insert to accept a sequence of codepoints.
2018-03-21 23:08:38 -04:00
Jean-Marc Lasgouttes
c2456ae609 Fix initialzation order in FuncRequest
Fixes bug #11080.
2018-03-19 14:59:43 +01:00
Jean-Marc Lasgouttes
ae473b012a Fix default spellchecker when only Enchant is available
This has been annoying me for ages.
2018-03-19 14:07:03 +01:00
Jean-Marc Lasgouttes
af795b80d8 Make it possible to select (not)native file dialogs at run time
Add a new LyXRC variable use_native_filedialog (true by default) that
allows to select the kind of FileDialog we want at runtime.
2018-03-19 11:17:33 +01:00
Juergen Spitzmueller
126e0c3dac Open ExternalInset dialog on first tab for new insets
Fixes: #11081
2018-03-18 18:30:48 +01:00
Juergen Spitzmueller
3face5e119 Properly fix math packages table in Document Settings
Fixes: #10777
2018-03-18 12:11:26 +01:00
Juergen Spitzmueller
3366c49f80 strip braces from minted caption 2018-03-17 18:28:54 +01:00
Juergen Spitzmueller
bd77d8ad61 small fixup in tex2lyx lstlistings/inputminted support. 2018-03-17 18:26:47 +01:00
Juergen Spitzmueller
f3c5bcd2be tex2lyx: complete minted support (inputminted)
Also fix some whitespace issues in minted inset import.
2018-03-17 16:45:05 +01:00
Juergen Spitzmueller
63b67fee83 tex2lyx: add beamer test file 2018-03-17 13:20:48 +01:00
Juergen Spitzmueller
d93076c128 tex2lyx: handle makebeamertitle 2018-03-17 12:39:13 +01:00
Juergen Spitzmueller
7e3a41bd15 tex2lyx: clear latexparam after use. 2018-03-17 12:38:53 +01:00
Juergen Spitzmueller
79728dcde9 tex2lyx: do not eat empty paragraphs if keepempty is true
Fixes: #11078
2018-03-17 12:19:50 +01:00
Juergen Spitzmueller
506ae2d2ea tex2lyx: add support for LaTeXParam
Part of #11068
2018-03-16 12:58:01 +01:00
Juergen Spitzmueller
6a0f0d28a5 Add support for xcharter font.
File format change.

Patch by Yuriy Skalko.
2018-03-15 15:44:49 +01:00
Juergen Spitzmueller
c74e399981 tex2lyx: support for beamer text styles with overlays
E.g. things like \textbf<article>{foo} have to be imported as insets.

Part of #11068
2018-03-14 14:38:18 +01:00
Juergen Spitzmueller
e51265b5f3 tex2lyx: More work on beamer support
* Implement list item overlay support (\item<arg>)
* Implement itemcommand support (e.g., \overprint<arg>)
* Fix general list argument placement

Part of: #11068
2018-03-14 08:40:47 +01:00
Juergen Spitzmueller
4d30e00da8 amend ab4e9adf86 2018-03-13 16:01:13 +01:00
Juergen Spitzmueller
ab4e9adf86 Fix known_escaped_chars 2018-03-13 13:00:58 +01:00
Juergen Spitzmueller
949de66956 tex2lyx: towards beamer overlay argument support.
Implemented: Overlay and standard overlay arguments for commands
and environments.

Still missing:
* List item overlay
* itemcommand overlay (\overprint)
* overlay via LatexParam (e.g., Flex:ArticleMode)

Needs fixing:
* General list argument (\begin{itemize}[arg])
* nested content in a frame with no title (empty par)
2018-03-12 14:56:28 +01:00
Pavel Sanda
8725614e3f Fix Undocked Outliner & multiple window crashes (#11004).
There are more independent crashes occuring in this scenario and this
fix targets only one of them, in particular the one in which different
window's outliner sends outliner command to a wrong window. The fix
itself gives an option for lfun to know which window it belongs to.

https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg203619.html
2018-03-12 14:34:24 +01:00
Pavel Sanda
e41c80e224 Paint \dot & \ddot more like a dot
https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg204183.html
2018-03-12 13:41:46 +01:00
Juergen Spitzmueller
f30474a26c update test 2018-03-11 19:50:22 +01:00
Juergen Spitzmueller
386d9953e8 amend 11e4a24e6e 2018-03-11 19:49:28 +01:00
Juergen Spitzmueller
8184f08f4a tex2lyx: update quote handling
* Consider new quote styles
* Consider changed quote styles
* Try to be a bit smarter with ambiguous quotation marks
2018-03-11 18:05:50 +01:00
Juergen Spitzmueller
e5e6e16274 Update tex2lyx tests after cc6f2dae82 2018-03-11 18:05:50 +01:00
Juergen Spitzmueller
cc6f2dae82 tex2lyx: support tipa \t*{} macro. 2018-03-11 11:46:37 +01:00
Juergen Spitzmueller
a3836d9909 tex2lyx: support for URW Classico, MinionPro and the new Libertine fonts. 2018-03-11 11:12:42 +01:00
Uwe Stöhr
d3c51876a9 add support for the PT fonts
- fileformat change
- I also started https://wiki.lyx.org/LyX/NewInLyX24 for new features
2018-03-10 19:59:48 +01:00
Juergen Spitzmueller
b8adb0f933 Update tex2lyx tests. 2018-03-10 16:15:29 +01:00
Juergen Spitzmueller
ad5dbbfd65 tex2lyx/TODO: update 2018-03-10 15:48:49 +01:00
Juergen Spitzmueller
d325f79f5c tex2lyx: add support for lstinputlisting 2018-03-10 15:40:51 +01:00
Juergen Spitzmueller
11e4a24e6e tex2lyx: get rid of another large if-else if chain. 2018-03-10 15:00:30 +01:00
Juergen Spitzmueller
0f4c902705 tex2lyx: make nested CJK parsing slightly less dumb.
Fixes: #9562
2018-03-10 14:58:55 +01:00
Juergen Spitzmueller
b2ccdae228 Amend 15fd17d83f 2018-03-10 14:22:51 +01:00
Juergen Spitzmueller
15fd17d83f tex2lyx: support for \includeonly 2018-03-09 17:27:55 +01:00
Juergen Spitzmueller
247e1a223d tex2lyx: handle whitespace in table column declaration.
Fixes: #10804
2018-03-09 14:18:03 +01:00
Juergen Spitzmueller
3e7aebe966 tex2lyx/TODO: small tweak. 2018-03-09 13:57:29 +01:00
Juergen Spitzmueller
9e5ab04a6c This works already. 2018-03-09 13:43:12 +01:00
Juergen Spitzmueller
af6933c06f tex2lyx: chapterbib support 2018-03-09 13:30:52 +01:00
Juergen Spitzmueller
cba38881d6 tex2lyx: honor grouping in optional arguments.
E.g., \cite[{a literal ] character}]{key}
2018-03-09 13:14:13 +01:00
Juergen Spitzmueller
0513622fd0 Fix copy and paste error in 6659304f7f 2018-03-09 12:29:07 +01:00
Juergen Spitzmueller
0bc192bfff Revert "Revert "tex2lyx: towards proper support of "literal"/"latexified" inset commands""
I did not intend to revert this. Sorry for the noise.

This reverts commit 74d9277909.
2018-03-09 12:18:49 +01:00
Juergen Spitzmueller
599b1222f7 Reset buffer language only if we have something to reset.
Fixes: #11063
2018-03-09 12:15:19 +01:00
Juergen Spitzmueller
74d9277909 Revert "tex2lyx: towards proper support of "literal"/"latexified" inset commands"
This reverts commit 6659304f7f.
2018-03-09 11:32:09 +01:00
Uwe Stöhr
1174279967 tex2lyx: parse \xymatrix
LyX's \xymatrix support relies on math therefore put it into math and parse its content

fixes bug #10638
2018-03-09 04:53:33 +01:00
Juergen Spitzmueller
6659304f7f tex2lyx: towards proper support of "literal"/"latexified" inset commands
We now report whether the attempt to recode the macros to glyphs
succeeded. If yes, we set "literate" to false, if not to true.

Also, do not attempt to recode for non-latexifying fields.

Fixes: #9563
2018-03-08 15:05:01 +01:00
Jean-Marc Lasgouttes
e90b6f5a3b Add cell number to current state in devel mode
This value is added when inside a texted inset with several cells
(aka a tabular inset).
2018-03-07 11:54:40 +01:00
Jean-Marc Lasgouttes
dc2ad44562 Make pmprof use the correct unit in report 2018-03-07 11:54:40 +01:00
Juergen Spitzmueller
e43ba7cf46 Braces need to be escaped as well on LATEXIFY
part of #9563
2018-03-06 18:17:01 +01:00
Juergen Spitzmueller
7a22ce7c09 tex2lyx: support alignment pseudo-environments.
Fixes: #7857
2018-03-06 17:54:32 +01:00
Juergen Spitzmueller
27584f5f70 Fix local polyglossia switch for Arabic
We need to lowercase the language again (it's \begin{Arabic},
but \textarabic)

Fixes: #11057.
2018-03-06 15:31:43 +01:00
Juergen Spitzmueller
1dcb2a0976 tex2lyx: fix subfloat import
Fixes: #10385
2018-03-06 10:35:55 +01:00
Uwe Stöhr
a30972a39c tex2lyx/text.cpp: fix a typo 2018-03-05 17:37:50 +01:00
Juergen Spitzmueller
cbf2a329c9 Do not force singlebyte encoding for listings with XeTeX/LuaTeX.
Fixes: #11056
2018-03-05 15:39:27 +01:00
Juergen Spitzmueller
4bc379ea67 Small update of TODO 2018-03-05 14:57:16 +01:00
Juergen Spitzmueller
b94bb37e53 parse_text (tex2lyx): get rid of the monstrous if-then-else clause
Rather than that, continue in the loop if a condition is met.

This fixes tex2lyx for MINGW, which has a cluase-nesting threshold.

Fixes: #9552
2018-03-05 09:08:14 +01:00
Juergen Spitzmueller
0915e81481 tex2lyx: support qualified citation lists (biblatex) 2018-03-04 20:12:27 +01:00
Juergen Spitzmueller
1a3dbbf07a tex2lyx: refsection and bibbysection support (biblatex) 2018-03-04 17:29:59 +01:00
Juergen Spitzmueller
f22213a04f tex2lyx: support biblatex
(qualified citation lists and multibib not yet supported)
2018-03-04 16:46:31 +01:00
Juergen Spitzmueller
476401a76f tex2lyx: consider options passed via \PassOptionsToPackage 2018-03-04 16:45:37 +01:00
Juergen Spitzmueller
ccb9ae9670 tex2lyx: import straight quotation marks as ERT
This assures that they are output as straight quotations marks (e.g.,
babel shorthands).

Fixes: #75 [sic!]
2018-03-04 12:08:08 +01:00
Pavel Sanda
9cdae51688 Allow reload if buffer is externally modified.
Follow-up of 2df82c4a44.
2018-03-02 20:48:08 +01:00
Pavel Sanda
3cb271ceda Filter in citation dialog is not respected when reloading databaze. 2018-03-02 00:50:32 +01:00
Juergen Spitzmueller
21b347a2f8 Fix RTL tabular output with bidi package (i.e., polyglossia)
Fixes: #9686
2018-02-27 19:03:42 +01:00
Richard Heck
94222e6170 Re-amend ca4426e5. 2018-02-26 16:18:49 -05:00
Juergen Spitzmueller
00d4144352 No manual intervention needed for polyglossia (bidi) and RTL numbers.
See https://tex.stackexchange.com/a/256837/19291
2018-02-26 17:06:31 +01:00
Richard Heck
ef5d741ba5 Amend ca4426e5.
Thanks for Patrick De Visschere for noticing.
2018-02-25 17:23:46 -05:00
Juergen Spitzmueller
5ddd377a0a Take actual font height (ascent, descent) into account when drawing placeholder box for graphics
Fixes: #11048
2018-02-25 17:21:01 +01:00
Pavel Sanda
2df82c4a44 We don't want external change to automatically marked the buffer dirty.
https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg203995.html
2018-02-25 14:53:48 +01:00
Enrico Forestieri
7e9c4d4091 Fix bug #10927 2018-02-24 12:48:02 +01:00
Richard Heck
ab6b4679e6 Fix bug #10918. 2018-02-24 01:06:36 -05:00
Richard Heck
77a7df1003 Fix bug #10890. 2018-02-24 01:04:20 -05:00
Richard Heck
1a74a654e8 Fix bug #10879. 2018-02-24 01:01:34 -05:00
Richard Heck
f22954b89d Fix bug #10939. 2018-02-24 00:49:31 -05:00
Richard Heck
2a78c1c662 Fix bug #10938. 2018-02-24 00:44:26 -05:00
Richard Heck
8281a81b10 Fix bug #10937. 2018-02-24 00:40:03 -05:00
Richard Heck
12db09aac2 Fix bug #10936. 2018-02-24 00:36:55 -05:00
Richard Heck
c86184ce3d Fix bug #10934. 2018-02-24 00:35:27 -05:00
Richard Heck
b98cb77364 Fix bug #10933. 2018-02-24 00:32:14 -05:00
Richard Heck
c0e79898c3 Fix bug #10932. 2018-02-24 00:30:24 -05:00
Richard Heck
6d565300be Fix bug #10930. 2018-02-24 00:28:37 -05:00
Richard Heck
6ef17af2b7 Fix bug #10929. 2018-02-24 00:25:56 -05:00
Richard Heck
92742f63bc Fix bug #10926, and some for loops. 2018-02-24 00:20:03 -05:00
Richard Heck
68b959ff06 Fix bug #10924. 2018-02-24 00:08:28 -05:00
Richard Heck
e857fee741 Fix bug #10920, and some for loops. 2018-02-24 00:04:34 -05:00
Richard Heck
9326edbd1b Fix bug #10917, and some for loops. 2018-02-23 23:59:40 -05:00
Richard Heck
c67eed8ccb Fix bug #10916. 2018-02-23 23:54:24 -05:00
Richard Heck
2f68fb5101 Fix bug #10915. 2018-02-23 23:47:05 -05:00
Richard Heck
a919d5b14a Fix bug #10913. 2018-02-23 23:43:59 -05:00
Richard Heck
854e7151e3 Fix bug #10911. 2018-02-23 23:42:32 -05:00
Richard Heck
0f812b0e41 Fix bug #10909. 2018-02-23 23:38:31 -05:00
Richard Heck
cc42634665 Fix bug #10908. 2018-02-23 23:35:17 -05:00
Richard Heck
59e6610d8a Fix bug #10904. 2018-02-23 23:29:52 -05:00
Richard Heck
55462786d0 Fix bug #10903. 2018-02-23 23:28:31 -05:00
Richard Heck
9762ba5d38 Fix bug #10901. 2018-02-23 23:17:57 -05:00
Juergen Spitzmueller
e0a5babde7 Add literal param to InsetInclude
This is used by lstinput

File format change.

Fixes: #10544.
2018-02-23 08:58:16 +01:00
Juergen Spitzmueller
ed331bedd6 tex2lyx: do not force default bibliography style if none is set
Some classes provide a \bibliographystyle, so we must not output any
\bibliographystyle if none is set in the TeX file.

Fixes: #10673
2018-02-23 07:43:19 +01:00
Richard Heck
224e56c935 Fix bug #10817.
Respect 'literal' setting when calculating longest bibitem.
2018-02-22 15:40:05 -05:00
Richard Heck
f8e8877f83 Respect "literal" setting when entering citation via LyX server.
This requires moving the bool that tracks this somewhere that it
is visible from BufferView. It seemed to make sense to put it as
a static member of InsetCitation.
2018-02-22 15:28:01 -05:00
Pavel Sanda
4ad98b9491 Fix little bit the garbled output for translators. 2018-02-22 20:55:35 +01:00
Jean-Marc Lasgouttes
f4693ef8ab Improve documentation of inset-(begin|end)(|-select)
Make it clear that it can go at the beginning/end of the document.
2018-02-22 17:05:22 +01:00
Juergen Spitzmueller
820ec38da7 Handle comments in options
Things like
pdfpagemode=UseOutlines%None,UseOutlines,UseThumbs,FullScreen

was not imported correctly (the comment was not stripped)

Fixes the rest of #5737
2018-02-22 11:24:43 +01:00
Richard Heck
2afd21bd21 Make InsetCitation's params work like other classes. 2018-02-22 01:02:02 -05:00
Richard Heck
61fa57ad4c Fix bug #10897. 2018-02-22 00:55:10 -05:00
Richard Heck
a2bd2e2dcc Fix bug #10896. 2018-02-22 00:49:35 -05:00
Richard Heck
a50d4710b3 Fix bug #10895. 2018-02-22 00:44:39 -05:00
Richard Heck
9dcaf40452 Fix bug #10893. 2018-02-22 00:34:52 -05:00
Richard Heck
59498fa0cd Fix bug #10892. 2018-02-22 00:33:28 -05:00
Richard Heck
ca4426e553 Fix bug #10888. 2018-02-22 00:29:31 -05:00
Richard Heck
2e13deb561 Fix bug #10886. 2018-02-22 00:23:37 -05:00
Richard Heck
c1d8efcf4b Fix bug #10883. 2018-02-22 00:21:41 -05:00
Richard Heck
4393388508 Fix bug #10882. 2018-02-22 00:20:19 -05:00
Richard Heck
4d88ef32da Fix bug #10881. 2018-02-22 00:17:46 -05:00
Richard Heck
470d83de1e Fix bug #10880. 2018-02-22 00:15:07 -05:00
Richard Heck
1c59eb9688 Fix bug #10866. 2018-02-22 00:12:24 -05:00
Richard Heck
1febf443a7 Fix bug #10863. 2018-02-22 00:09:01 -05:00
Juergen Spitzmueller
8a703573ea Implement IsTocCaption for normal layouts.
But use default "true" to maintain current behavior if not explicitly
stated otherwise.

Fixes: #11045
2018-02-21 16:37:07 +01:00
Alexander Dunlap
cca365f26c save session when we save a buffer
Implements enhancement #10712.
2018-02-21 11:53:19 +01:00
Juergen Spitzmueller
ab6bd5e319 Fix list of viewable formats in view/update menu.
Also fix list in (currently unused) Export toolbar button.

Fixes: #11044
2018-02-21 10:17:10 +01:00
Juergen Spitzmueller
578cf77f6f Localize items in view/update popup icons
Fixes: #11040
2018-02-20 16:42:01 +01:00
Jean-Marc Lasgouttes
9296344b9a Kill macro mode when using LFUN_ESCAPE
Add a `cancel' boolean to macroModeClose() that just removes all trace
of what has been entered instead of finalizing it.

When entering a macro in mathed, let LFUN_ESCAPE invoke
macroModeClose(true). The new semantics of LFUN_ESCAPE in mathed is
thus to abort the input of a macro name.

Fixes bug #9251.
2018-02-20 13:49:17 +01:00
Jean-Marc Lasgouttes
56e012be83 Improve metrics of equations. More work remains to be done.
Use proper value for above/below skip (12pt) instead of the hardcoded
12 pixels.

Add forgotten skip before display math preview.

Make "too small preview" size dpi-dependent.
Make gap in front of equation (what is it good for, BTW?) dpi-dependent.
2018-02-19 18:36:33 +01:00
Juergen Spitzmueller
0bf8865122 escape label in included listings
Also use docstring rather than string.

Fixes part of #10544
2018-02-19 17:15:31 +01:00
Juergen Spitzmueller
3ad7eed374 grammar 2018-02-18 09:19:03 +01:00
Jean-Marc Lasgouttes
5861df7172 Another go at fixing string metrics
This time, it is the problems with \int in esint and cmex that we are
trying to work around. This code is becoming too complicated to my
taste.
2018-02-17 16:57:35 +01:00
Juergen Spitzmueller
8f9b733e67 Skip insets when checking for uncodable chars to paste.
Fixes paste of quote insets to ERT/chunk.
2018-02-17 12:27:26 +01:00
Juergen Spitzmueller
0d806799aa Adapt to new ChkTeX return values.
As of v. 1.7.7, chktex has four exit values. Only consider the program
failed with EXIT_FAILURE (1). This is backwards compatible to chktex
up to v. 1.7.5 and later patched versions included in TeXLive, where
there was the distinction EXIT_FAILURE (program failed) and EXIT_SUCCESS
(program successfully run, with or without something to report).

Note that ChkTeX v. 1.7.5 and 1.7.6 vanilla (as included in MikTeX) also
returned EXITE_FAILURE if ChkTeX found something to report.

We do not, and never did, support this case.

Fixes: #9989 (after ChkTeX 1.7.7. is released).
2018-02-17 11:25:28 +01:00
Juergen Spitzmueller
47e85b37eb Disable unsupported ref types in mathed.
Also repair prettyref in InsetMathRef.

Part of #9798
2018-02-14 17:18:24 +01:00
Richard Heck
5ee3396459 Fix crash when citeengine is unknown. 2018-02-12 16:27:14 -05:00
Jean-Marc Lasgouttes
a25b48f86c Use parMetrics to access the par_metrics_ map
In cursorY, it is dangerous to access par_petrics_[0], since one does
not know whether metrics have been computed for this paragraph (which
may be off-screen).

It is safer to use parMetrics(0), that will compute the paragraph
metrics as needed.

Fixes bug #8120.
2018-02-12 17:11:09 +01:00
Jean-Marc Lasgouttes
1dba36c7ce Implement buffer-anonymize more efficiently
The work is done now in Paragraph::anonymize().

Move the handling of the lfun to Buffer class.
2018-02-12 14:38:28 +01:00
Juergen Spitzmueller
1437ae3f9c Disable BUFFER_EXPORT and BUFFER_EXPORT_AS while buffer is processed
I am rather irritated we didn't do this already, since synchronous runs
with BUFFER_VIEW or BUFFER_UPDATE leads to all sorts of problems,
including crashes.

Fixes the crash in #8338 (but not the bug itself).
2018-02-11 09:50:38 +01:00
Juergen Spitzmueller
be4d49ebd1 amend 71fea63326 2018-02-10 19:02:35 +01:00
Juergen Spitzmueller
71fea63326 Disable CheckTeX while buffer is processed
Since CheckTeX itself processes the tex file, a synchronous run with
a TeX process can lead to all sorts of conflicts, including crashes.

Fixes: #7434.
2018-02-10 18:18:43 +01:00
Juergen Spitzmueller
dadec50a18 Fix race condition in processFuncRequestQueue
The issue here was that the element was only removed from the queue
after the func request was processed, but within that process, other
function could access the queue, so the queue could even be empty
when this function finally wanted to remove the item.

Fixes: #10406.
2018-02-10 15:35:12 +01:00
Juergen Spitzmueller
4311571b9d Fix Windows compiler warning about double declaration of "it"
See #10912
2018-02-10 08:23:18 +01:00
Pavel Sanda
a3ad39c770 Cosmetics per JMarc's suggestions. 2018-02-09 23:46:56 +01:00
Enrico Forestieri
8e8b3f6104 Avoid an infinite loop
When pasting "\big" without any following delimiter, avoid
processing the same token again and again. For unknown reasons,
the delim docstring turns out to always be not empty: even when
it simply contains a '0' (no delimiter follows), its length is 1.

Fixes bug #11027.
2018-02-09 23:42:24 +01:00
Juergen Spitzmueller
3cc98a9bf6 tex2lyx: normalize bib and bst paths
Fixes: #7637
2018-02-09 13:23:50 +01:00
Juergen Spitzmueller
398e026250 Fix child document regex in scanLogFile
Several problems:
* The regex failed at names such as 1_text_2_text.tex
  (returned "2_text.tex)
* The regex failed at names such as 12_text.tex
  (returned "2_text.tex)
* Masters with digits in the name (2018_text.tex) were
  tracked as their own children
2018-02-09 11:46:43 +01:00
Pavel Sanda
b7caaf6196 Proper naming of LFUN_SET_GRAPHICS_GROUP. 2018-02-08 21:59:41 +01:00
Pavel Sanda
6e1ca3a4f2 Group similar lfuns. 2018-02-08 21:53:08 +01:00
Pavel Sanda
b88ed81e7f Unify graphics-groups inside marked block functionality.
Fixes #11026.

https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg203683.html
2018-02-08 21:33:37 +01:00
Juergen Spitzmueller
6e4e086900 Reset cur.pit() when pasting into tables.
The number of paragraphs can change here, so pit() can become invalid.

Fixes: #9983
2018-02-08 19:06:35 +01:00
Juergen Spitzmueller
9987adb2a7 Revert "Mark follow-up paragraphs in a paragraph group as nested."
This reverts commit 761a542551.
2018-02-08 17:00:41 +01:00
Juergen Spitzmueller
2f6ada6644 Consider class-provided citation engines
Do not attempt to load, nor allow to set, a different engine in this
case.

Fixes: #11022
2018-02-08 13:25:19 +01:00
Juergen Spitzmueller
84658d37e2 Remove createTempFile method
and use the new and safer tempFileName() method instead for the creation
of temporary directories
2018-02-08 12:16:30 +01:00
Juergen Spitzmueller
9e2928be68 Re-add method to get a temporary file name without persistent QTemporaryFile object
This is needed for cases where the temp file has to be manually removed
at some point (e.g., if temp files are used as conversion target, and
the initial file only serves as a placeholder), since QTemporaryFile
objects cannot be manually removed at least on Windows (they are always
kept open internally even after close()). See
​http://lists.qt-project.org/pipermail/interest/2013-August/008352.html

In order to avoid race conditions due to duplicate names (the issue why
the old method was removed), we record all used temp file names.

Fixes: #9139
2018-02-08 11:31:23 +01:00
Pavel Sanda
41f59527d1 * comment 2018-02-07 23:24:05 +01:00
Pavel Sanda
1e5b471d58 * comment 2018-02-07 23:19:20 +01:00
Juergen Spitzmueller
c6861923f0 Add missing break and polish formatting. 2018-02-07 10:16:05 +01:00
Juergen Spitzmueller
92990adc23 Do not use English, but the context language, when pasting from math
Fixes: #2596
2018-02-06 14:10:12 +01:00
Juergen Spitzmueller
e85704020b Do not use English, but the context language, when pasting from LaTeX
Fixes: #9199
2018-02-06 13:20:45 +01:00
Juergen Spitzmueller
6236bcb653 Add missing connection.
This activates the OK/Apply when a biblatex style file is changed
manually
2018-02-06 12:45:22 +01:00
Pavel Sanda
96cb9e9cea forgotten glitch 2018-02-03 22:43:00 +01:00
Pavel Sanda
89b7f12a3b LFUN_DOC_ANONYMIZE -> LFUN_BUFFER_ANONYMIZE per JMarc's suggestion. 2018-02-03 22:05:49 +01:00
Pavel Sanda
c19c3899d1 Add LFUN_DOC_ANONYMIZE, quick fix for #7259. 2018-02-02 23:42:56 +01:00
Pavel Sanda
a76334c78a * doxy 2018-02-02 23:42:33 +01:00
Juergen Spitzmueller
5ce36019e5 Enable CompressorProxy for all Workareas (incl. EmbeddedWorkarea)
This fixes the Advanced F&R.
2018-02-01 14:58:49 +01:00
Jean-Marc Lasgouttes
173f9282e0 Fix Cursor::sanitize
This is a follow-up to 02028c0b12.

Fix two bugs introduced when moving Cursor::sanitize() to CursorData:

* the setBuffer that is supposed to set buffer from bufferview became
  a no-op.

* new_word_ is now part of CursorData, but it is sanitized only in
  Cursor::sanitize().

Additionally, make all protected CursorData data members private to enforce
encapsulation.
2018-01-31 23:07:59 +01:00
Jean-Marc Lasgouttes
2e633645ed Make CursorData::checkNewWordPosition() more robust
Before accessing things like new_word_.lastpos(), it is better to make
sure that new_word_ points to something that exists. Therefore, the
call to fixIfBroken() is moved in first position.

Other changes: inTexted() is replaced by a more general test that
current inset has not changed; test idx() in addition to pit().
2018-01-31 16:26:45 +01:00
Günter Milde
0d9708ef04 Use LaTeX macros instead of Latin transcription for Greek characters.
Use the LaTeX internal character representation (LICR) macros
provided by lgrenc.def (since version 0.8 from 2013-05-13)
in lib/unicodesymbols. This fixes the PDF bookmarks (except for the
legacy input encoding iso-8859-7) and solves the problem of a missing
"v" character in Libertine LGR fonts (see lyx-users from 2018-01-29).

The ctest unicodesymbols/008-greek-and-coptic_iso8859-7_pdf2" now fails
(due to #9681). This is not a regression, as it is already
"unreliable" (wrong output, Latin character instead of Greek).

Drop compatibility definition of \~ as perispomeni accent
(that was required with lgrenc.def < 0.8).
2018-01-30 22:31:08 +01:00
Jean-Marc Lasgouttes
63a4e82874 Add support for enchant 2.x
As of enchant 2.x, it is required to create a Broker instance instead
of relying on a static one provided by the library.

Add autoconf and cmake (courtesy of Kornel) tests that check whether
one can indeed instantiate a Broker object, and act on the result in a
new broker() helper function.

Fixes bug #10986.
2018-01-30 12:11:22 +01:00
Jean-Marc Lasgouttes
c2ed75fd37 Fixup 6b6fa94c: coverity says there are more possible exceptions.
The bulk of the changes is indentation.
2018-01-29 15:06:32 +01:00
Jean-Marc Lasgouttes
6b6fa94c91 Catch exceptions to please coverity
Actually, the possible exception path is from replaceEnvironmentPath.
It would be better if coverity was able to asses that our hardcoded
regexp:s are correct.
2018-01-29 13:50:09 +01:00
Juergen Spitzmueller
10f02c4160 Whitespace 2018-01-29 08:37:25 +01:00
Richard Heck
d3ee87eea2 Fix bug #11055.
See also https://marc.info/?l=lyx-devel&m=151709211602688&w=2.
2018-01-28 23:37:20 -05:00
Richard Heck
d24a1c8fa4 Whitespace. 2018-01-28 23:37:20 -05:00
Juergen Spitzmueller
5db4d712ef Differentiate Buffer strings and GUI strings in citeengines
The former need to be translated to the buffer language, the latter to
the GUI language.

Fixes: #10946
2018-01-27 14:29:41 +01:00
Jean-Marc Lasgouttes
253b935f65 Make sure to add at least one element in row if possible
breakRow should only produce an empty row when there is nothing left
in the paragraph.

Fixes bug #10996.
2018-01-27 12:32:52 +01:00
Juergen Spitzmueller
e2160ec960 Use proper localization chain for Box special width/height
Fixes: #11000
2018-01-27 12:26:01 +01:00
Juergen Spitzmueller
6ed7bbbf7e Make another GUI string translatable
Part of #10999.
2018-01-27 11:20:11 +01:00
Juergen Spitzmueller
26755a015e Make GUI string translatable
Part of #10999
2018-01-27 10:57:33 +01:00
Jean-Marc Lasgouttes
d789a3c941 Fix embarrassing thinko (fixup 1a969fa4a6)
Now people know for sure that I sometimes forget to test that code
actually works before committing. It was so straightforward, what
could possibly go wrong?
2018-01-26 10:06:28 +01:00
Juergen Spitzmueller
f924ef2966 Properly communicate forced encodings
This is currently only relevant fo InsetListings, which falls back to
a fixed-width encoding under specific conditions. It is now possible
to query the inset about that and report the correct encoding in
DocIterator::getEncoding.

Addresses the second part of #10995
2018-01-26 08:38:52 +01:00
Juergen Spitzmueller
7b169de401 Account for custom encoding in DocIteratior::getEncoding
Addresses #10995
2018-01-26 08:37:06 +01:00
Jean-Marc Lasgouttes
1a969fa4a6 New method zoomedPixel to compute pixel amount also in HiDpi
The function does not use for now any information from the BufferView
(only lyxrc), but this should eventually change if we want to honor
multi monitor setups properly.
2018-01-25 22:08:35 +01:00
Enrico Forestieri
144f06a00c Correctly output a single char_type
On platforms where char_type is typedef'd to an integral type
rather than to wchar_t, when using the insertion operator <<
a single char_type is output as the number corresponding to the
code point of the character rather than as the character itself.
In this case, one has to use put().
2018-01-25 09:40:36 +01:00
Jean-Marc Lasgouttes
e63b891de5 Better debug message 2018-01-24 14:05:57 +01:00
Juergen Spitzmueller
5fce313ffc Fix output of quote ligatures with TeX font LuaTeX
Fixes: #10988
2018-01-21 12:24:02 +01:00
Richard Heck
f8ca747109 Introduce Inset::asInsetGraphics.
Then use it to avoid explicit LyXCode checks in the graphic group
code.
2018-01-20 23:00:15 -05:00
Juergen Spitzmueller
2f854bdf8c remove unnecessary braces 2018-01-20 10:39:18 +01:00
Jean-Marc Lasgouttes
76a8ca27a7 Set endlabel color correctly when there is a selection
Current code would change the color of static endlabel when the
_start_ of line is selected. This is only used with hollywood and
broadway layouts, though.

Change the box endlabel painting code to use Color_selectiontext as needed.

Follow-up to bug #10972.
2018-01-16 14:10:30 +01:00
Jean-Marc Lasgouttes
654cded167 Partial cleanup of the row selection code
This is preliminary work, this code still feels too complicated for
its own good.

Let Row::isMarginSelected return false when Row::selection() is false
(the other changes are indentation).

This allows to remove the test for selection() in
setSelectionAndMargins, so that begin/end_margin_sel are always set
correctly.

Add clearSelectionAndMargins() instead of calling directly setSelection
(which is now private) with arguments (-1, -1).

Fixes bug #10972.
2018-01-15 17:20:34 +01:00
Pavel Sanda
46826155a8 * LFUN_BUFFER_RELOAD - allow dropping of the changes.
Useful in scripts.
2018-01-13 19:19:18 +01:00
Juergen Spitzmueller
e57b245d0b Work around auto-bibitem insertion when separating bibliography environment
Manually delete bibitem insets in the separator line.

In the long term, such things should not happen at all.

Candidate for 2.3.x.
2018-01-13 15:12:10 +01:00
Juergen Spitzmueller
a09ceda2c4 Once more rework outline wrt environments.
* Fixes UNDO issues
* Takes care of some special cases

Signed-off-by: Juergen Spitzmueller <spitz@lyx.org>
2018-01-13 14:51:01 +01:00
Juergen Spitzmueller
bceaa7f929 Fix loop while separating
getMaxDepthAfter() gives wrong result here.

Fixes: #10979

Signed-off-by: Juergen Spitzmueller <spitz@lyx.org>
2018-01-13 09:59:09 +01:00
Jean-Marc Lasgouttes
2ba00ecb7b Initialize properly class member
Spotted by coverity.
2018-01-12 16:54:32 +01:00
Juergen Spitzmueller
aab58fed6b Use qt4-compatible connect() syntax.
Signed-off-by: Juergen Spitzmueller <spitz@lyx.org>
2018-01-12 15:42:04 +01:00
Jean-Marc Lasgouttes
57d6835a90 Spacing 2018-01-12 12:27:03 +01:00
Jean-Marc Lasgouttes
706c9f2aa5 Fixup 27eb415d: do not define mymkdir() when it is not used.
Pleases coverity.
2018-01-12 12:24:58 +01:00
Guillaume MM
43e4b80734 Install a new compressor
A brand new event compressor based on Kuba Ober's cleverly simple
solution: <https://stackoverflow.com/a/21006207>.

Fix #9362, #9461, #9933: Lyx suddenly gets keyboard keys wrong, and
deadlocks

Fix #9790: LyX should perform key event compression (for improving the
remote X connections one would also need to implement
Qt::WA_KeyCompression)

Fix #10516: slowness on repeated arrow keys with IBus and Qt5

Patch pulled from
https://github.com/gadmm/lyx-unstable/commit/bf5a1efb0db5bfc2b

Signed-off-by: Juergen Spitzmueller <spitz@lyx.org>
2018-01-12 11:03:07 +01:00
Juergen Spitzmueller
2ae51a9bb9 Complement the movement handling of environments
Make sure moved environments (such as frames) are separated from their
new neighbours in all directions.

This completes 07665d1dca
2018-01-12 10:44:01 +01:00
Juergen Spitzmueller
974553d858 Fix Null-checking issue detected by Coverity. 2018-01-11 13:43:35 +01:00
Juergen Spitzmueller
0fc14060b1 Amend 07665d1dca
We need to disable auto-nesting here.
2018-01-11 13:09:04 +01:00
Juergen Spitzmueller
07665d1dca Handle movement of environments better
Make sure moved environments (such as frames) are separated from their
new neighbours.
2018-01-11 10:48:47 +01:00
Günter Milde
fcc1cffb1a Do not write LICR macro if character is encodable.
No hardcoded conversion of literal dashes to
\textemdash and \textendash macros.
2018-01-10 15:31:32 +01:00
Pavel Sanda
8c24070c85 RCS: commit undo allowed only in unlocked state. 2018-01-10 10:47:48 +01:00
Jean-Marc Lasgouttes
1de6d3f3f0 Simplify code using range-based for loops 2018-01-08 15:16:58 +01:00
Kornel Benko
6093a3a9b1 Cmake build: Use test/dummy_functions.cpp instead of support/tests/dummy_functions.cpp
Test-programms in src/tests are now handled the same as in autoconf.
2018-01-08 12:58:28 +01:00
Jean-Marc Lasgouttes
66c677b946 Fix ghost caret
This fixes a regression in e64ea357, where a test has been (badly)
tightened to avoid that two consecutive rows may be redrawn to get rid
of caret ghosts. The test prohibited empty rows from being redrawn.

Moreover, improve the test of cursor boundary to avoid the case where
cursor position is already 0.

Fixes bug #10952.
2018-01-08 11:54:57 +01:00
Jean-Marc Lasgouttes
4f21f788b4 Looks like these are not needed for tests in support/ 2018-01-08 11:20:06 +01:00
Jean-Marc Lasgouttes
586890f09e Make #include directories explicit 2018-01-08 11:19:15 +01:00
Jean-Marc Lasgouttes
3aa10c8dba Fix compilation in monolithic mode 2018-01-06 20:46:06 +01:00
Jean-Marc Lasgouttes
af9f3fe8bd Remove unused variables 2018-01-06 15:48:36 +01:00
Guillaume MM
94c65074e0 Fix preview with a nested preview not being shown (#10795)
Regression at db581113.
2018-01-06 02:39:51 -05:00
Jean-Marc Lasgouttes
d77b05db80 Move the inPixels(MetricsBase) help from Length to MetricsBase.
A basic class like Length should not depend on something from
frontend.

This change allows to remove several dummy implementations of
theFontMetrics().
2018-01-05 20:14:04 +01:00
Jean-Marc Lasgouttes
806f40dbd4 Update buffer when an inset or an INFO inset has bee inserted
This is important for info inset, since if updateBuffer needs to be
run in redoParagraph (for the macro code), crashes can happen.

Fixes bug #10944.
2018-01-05 19:32:17 +01:00
Jean-Marc Lasgouttes
76f0a3dd4e Remove 'premature optimization' that proved buggy
At some time it seemed like a good idea in breakRow() to return early
when the row was bound to be empty. It turns out that this creates two
symptoms:

* empty paragraphs will not have an end of paragraph marker

* since row width is not correctly computed in this case, caret ghosts
  can appear in master.

This commit removes the oprimization and replace the do {} while()
construct to a straightforward while() {}.

Related to bug #10952.
2018-01-05 19:15:40 +01:00
Richard Heck
f130f7713f Fix bug #10951.
The Buffer member for the remembered definition_ was not being set.
2018-01-04 15:12:16 -05:00
Juergen Spitzmueller
32efb91438 Do note attempt to nest more than possible. 2018-01-04 18:38:08 +01:00
Juergen Spitzmueller
9a1eeb8cbb Properly handle color none.
Fixes: #5870
2018-01-03 13:20:05 +01:00
Juergen Spitzmueller
f965d23633 Disable useless environment-split function at the core. 2018-01-03 13:16:07 +01:00
Juergen Spitzmueller
7d2764fb9e Use the command-alternatives sequence as defined in menus.bind
Otherwise, the shortcut is not displayed in the menu.
2018-01-03 10:58:30 +01:00
Juergen Spitzmueller
da57a6135e Amend 761a542551 once more.
As it is designed now, Static label is the only case that makes sense.
2018-01-03 08:55:35 +01:00
Juergen Spitzmueller
55349823f0 Limit 761a542551 to the case where we have a label. 2018-01-02 18:05:43 +01:00
Jean-Marc Lasgouttes
39a8000589 Do not use Application for a 'cancel export' boolean
It is not good for a support function to depend of anything outside of
it, especially Application.

Here the boolean that indicates that export should be canceled is put
in Systemcall. This allows to remove all the dummy theApp() function
that have been added here and there for linking needs.
2018-01-02 16:01:07 +01:00
Günter Milde
d852bbd5d9 Fix a comment.
Ligating of -- to en dashes occure also in teletype fonts.
With some 8-bit fonts, em and en dashes are not copied
exported from the PDF (but this is not limited to dashes in teletype).
With LatinModern, PDF export works fine
MWE:
\documentclass[]{article}
%\usepackage{lmodern}
\usepackage[T1]{fontenc}
\begin{document}
Hallo \texttt{Welt --Welt ---Welt}
Hallo Welt --Welt ---Welt
2018-01-02 09:28:04 +01:00
Jean-Marc Lasgouttes
9428ad56b9 Fix 'make check' 2018-01-01 23:55:34 +01:00
Juergen Spitzmueller
8f86feb260 Prepend "Insert " in the context menu for environment separators. 2018-01-01 13:40:49 +01:00
Juergen Spitzmueller
ebc3fee728 mention new option 2018-01-01 12:41:00 +01:00
Juergen Spitzmueller
8a6fa01d14 LyXAction.cpp: Whitespace and line breaking fixes. 2017-12-31 18:57:27 +01:00
Juergen Spitzmueller
99ae8d58c8 Another case where nesting needs to be preserved. 2017-12-31 14:43:45 +01:00
Juergen Spitzmueller
761a542551 Mark follow-up paragraphs in a paragraph group as nested.
This gives a more consistent indication of what belongs to an environment
(and semantically, such paragraphs are synonymous to nested standard
paragraphs)

Addresses part of #9261.
2017-12-31 10:37:35 +01:00
Juergen Spitzmueller
167c38377c Use real cursor pit, not the modified one. 2017-12-31 09:41:43 +01:00
Juergen Spitzmueller
857e70eb83 Maintain nesting when separating outer environment 2017-12-30 18:54:39 +01:00
Juergen Spitzmueller
c8abe0cf7b Move environment-split from Edit to Insert, as requested. 2017-12-30 17:54:09 +01:00
Juergen Spitzmueller
612536305b Don't show append function where it does not make sense. 2017-12-30 17:04:10 +01:00
Juergen Spitzmueller
5c704b5dd1 Revert "Fix environment-split when at pos 0 of a frame title."
This reverts commit 1ff34a973d.
2017-12-30 16:26:20 +01:00
Juergen Spitzmueller
1ff34a973d Fix environment-split when at pos 0 of a frame title.
This introduces a force argument to argument-insert that inserts
arguments even if they are already there. We need this here in order
to prevent DEPM.
2017-12-30 12:50:48 +01:00
Juergen Spitzmueller
27901b3a06 Fix environment-split previous problem spotted by Joel
Special case: append from the separator paragraph.
2017-12-30 11:54:37 +01:00
Richard Heck
d188a36fc2 Fix bug #10835.
VCS InsetInfos were broken by the switch at 2e934fc5f8 to using
updateBuffer to handle them. But we do not really want to go through
that routine in a clone, not for those insets, whose contents we
want to be the same as in the original Buffer.

Also fixes some issues noted in discussion of this bug: Failure to
update after context menu switch; failure to re-calculate shortcuts,
which can change.
2017-12-29 16:09:15 -05:00
Richard Heck
60cb7a1683 Minor code simplification. 2017-12-29 16:00:58 -05:00
Richard Heck
a765f465da Fix problem with BibTeX error reporting.
We only want to abort this process if the process was killed.
Also fix some style issues.
2017-12-29 11:12:17 -05:00
Juergen Spitzmueller
3a4b233dbd Properly implement IsTocCaption for Arguments in standard TOC
Fixes: #10631

Candidate for 2.3.x.
2017-12-29 11:51:24 +01:00
Juergen Spitzmueller
f3b89e4c72 Add IsAutoNestedBy
This is complementary to AutoNests: Styles can determine which other
style should auto-nest them. This is particularly useful for modules
that add new styles which should be auto-nested in a given context.
2017-12-29 10:36:03 +01:00
Juergen Spitzmueller
d6fb2abbea Some AutoNest polishment.
* Rename Nests to AutoNests
* Do it when changing from any style
2017-12-29 10:03:00 +01:00
Juergen Spitzmueller
8c56e89240 EndNests in Layout::write() 2017-12-28 17:56:48 +01:00
Juergen Spitzmueller
99ecc6e2c9 Implement auto-nesting.
Now layouts can specify other layouts that should be nested in and
after the current one (if the layout is switched from the current one
and if it follows a paragraph in the current one).

This is particularly useful for things such as the beamer frames, where
particular layouts are practically always nested.
2017-12-28 17:44:54 +01:00
Juergen Spitzmueller
87a6c75d9d Introduce environment-split before
This one prepends the new environment rather than appending it.

Easy way to add a new beamer frame before the current one.
2017-12-28 14:17:40 +01:00
Juergen Spitzmueller
2907160fff Introduce environment-split previous
This one checks for an environment in the previous paragraph (outside
the nesting scope).
2017-12-28 12:28:01 +01:00
Juergen Spitzmueller
dfaa4e9466 Fix footnotes in table with RevTeX4
These classes come with their own working implementation of table
footnotes, so we are not supposed to use the tablefootnote or
footnote package.

Also add missing outliner name.
2017-12-27 15:43:40 +01:00
Juergen Spitzmueller
87960e3dd8 Open intitle command explicitly also for passthru. 2017-12-27 11:49:54 +01:00
Juergen Spitzmueller
a2f886d526 Use TeXOnePar for the inpreamble layouts
This considers paragraph language and spacing (and simplifies the code)
2017-12-26 13:11:00 +01:00
Juergen Spitzmueller
e55e9c842f Fix inpreamble styles. 2017-12-26 11:40:58 +01:00
Richard Heck
61b1a20185 Fix crash after cancellation code.
I thought we didn't use clones when exporting from the command line.
We probably shouldn't.
2017-12-25 13:07:58 -05:00
Juergen Spitzmueller
69f41b54b8 Improve error msg 2017-12-25 12:22:45 +01:00
Juergen Spitzmueller
54846d2d93 Prevent to paste uncodable characters into verbatim
Since we now have proper encoding here, we can set this restriction.
2017-12-24 17:14:05 +01:00
Juergen Spitzmueller
931f87f508 Introduce "inherit" encoding for latex_language
This gets rid of the hardcoded latin1 encoding for verbatim. Instead,
verbatim now inherits the encoding from the context, which is what is
actually wanted here.

Fixes: #9012, #9258
2017-12-24 17:10:42 +01:00
Richard Heck
2335d196b4 Put the dummy tex2lyx support where it is supposed to be. 2017-12-23 15:04:40 -05:00
Richard Heck
320edd1c24 Whitespace. 2017-12-23 14:47:38 -05:00
Richard Heck
56071d2fb0 Dummy theApp() method should return a pointer. 2017-12-23 14:40:18 -05:00
Juergen Spitzmueller
49e3f8e830 Fix switch of language and line spacing in InTitle commands.
Fixes: #9332, #10849
2017-12-23 13:27:10 +01:00
Richard Heck
6c407a9571 Fix puzzling warning. 2017-12-22 22:03:54 -05:00
Richard Heck
176eee2420 Improve error message when LaTeX process is killed. 2017-12-22 21:56:02 -05:00
Kornel Benko
35eabe1ea7 Fix linking errors for check_filetools, check_trivstring, check_convert, check_lstrings
This may amend f1df7e478d
2017-12-22 07:19:13 +01:00
Richard Heck
b5e5c2576a Allow makeindex, nomencl, and bibtex runs to be canceled, too. 2017-12-21 18:55:39 -05:00
Richard Heck
12b03b30f4 Allow LaTeX processes to be canceled. 2017-12-21 18:55:39 -05:00
Richard Heck
cf782dfc68 Converter infrastructure for cancellation of background processes. 2017-12-21 18:55:39 -05:00
Richard Heck
165c9e92a4 Systemcall infrastructure for canceling background processes. 2017-12-21 18:55:39 -05:00
Richard Heck
f1df7e478d Fix linking errors. Someone else will have to tell me if this
is the best way to do it.
2017-12-21 18:55:39 -05:00
Richard Heck
76214e6012 LFUN and basic code to enable cancellation of background
processes.
2017-12-21 18:55:39 -05:00
Kornel Benko
89b248a219 Tex2lyx tests: adapt some check files for expected output
This amends 40a3a44
2017-12-21 05:58:49 +01:00
Jean-Marc Lasgouttes
40a3a44aa2 tex2lyx: do not keep the Flex prefix for Flex insets names
While there is code in LyX that handles this, tex2lyx should respect
the format that LyX produces and the Flex: prefix is gone since
cfeddb92 in 2014.

In particular, this prefix is known to cause assertion when undoing a
document setting change.
2017-12-20 16:00:39 +01:00
Juergen Spitzmueller
74607702a5 Fix typo.
This had the effect that for file dialogs supposed to use two buttons,
only the second one was displayed, while file dialogs supposed to use
one button did not have a button at all.

Candidate for 2.3.x and 2.2.x.
2017-12-20 12:17:04 +01:00
Juergen Spitzmueller
25a17d72e1 Get rid of idiosyncratic accelerator syntax 2017-12-20 11:37:13 +01:00
Jean-Marc Lasgouttes
4cb5cc0c7d Reintroduce the spacing around delimiters
This spacing was wrongly removed at 361bd53b as part of the
introduction of proper spacing btween elements, but it only introduces
some breathing space around the delimiters. This will not be necessary
anymore when/if we use proper delimiters from the cmex10 font.
2017-12-20 11:22:21 +01:00
Jean-Marc Lasgouttes
68614e9783 Do not draw inactive math corners when they have mathbg color
By default, inactive math corners are invisible. In practice they are
annoying because they are visible when selecting text, and they can
also overwrite some parts of the equation.

The code in Inset::drawMarkers2, which is only used for maths, is
moved to InsetMathHull. Moreover, the inactive corners are not drawn
when they have the same color as the math background. A better way to
achieve this would be to set the color to transparent, but we do not
support this yet.
2017-12-19 23:32:47 +01:00
Juergen Spitzmueller
3add3e2eae Thinko.
Thanks, Kornel!
2017-12-17 12:53:40 +01:00
Juergen Spitzmueller
64b94f81be Do not rely on babel quotation macros for encodings other than [O]T1
Babel falls back to OT1 in these cases, which gives wrong output got the
guillemots

Fixes: #10947
2017-12-17 12:17:45 +01:00
Juergen Spitzmueller
1371dbb240 Amend d56a5447f3
LaTeX only breaks after dashes (even though unicode suggests optional
line breaks also before em dashes).
2017-12-17 09:19:26 +01:00
Uwe Stöhr
6c6cf5e071 use https:// in the first line of .lyx files
- also support to detect https via tex2lyx
2017-12-17 02:24:26 +01:00
Juergen Spitzmueller
d56a5447f3 Consistent output of breakable/non-breakable dashes on all TeX engines.
Fixes: #10839
2017-12-16 16:12:26 +01:00
Richard Heck
4c093a50c2 Fix #10871 compiler warnings. 2017-12-16 09:58:52 -05:00
Richard Heck
e869ec4bc9 Fix #10869 compiler warnings. 2017-12-16 09:55:25 -05:00
Richard Heck
fb93733fee Fix #10867 compiler warnings. 2017-12-16 09:45:38 -05:00
Richard Heck
fab87917ea Properly fix #10863 compiler warnings.
Also change a few variable names, so as not to use "it" with
range-based for loops.
2017-12-16 09:30:12 -05:00
Richard Heck
0a87aa0247 Revert "Fix #10863 compiler warnings."
This reverts commit b684ec39ea.
2017-12-16 09:22:41 -05:00
Uwe Stöhr
5ebff51e99 gzstream.cpp: whitespace fix 2017-12-16 13:09:39 +01:00
Richard Heck
71005d6c10 Fix #10894 compiler warnings. 2017-12-16 00:59:07 -05:00
Richard Heck
37f8efe9f7 Fix #10891 compiler warnings. 2017-12-16 00:55:45 -05:00
Richard Heck
05c876568a Fix #10887 compiler warnings. 2017-12-16 00:50:35 -05:00
Richard Heck
8a1377f6ff Fix #10884 compiler warnings. 2017-12-16 00:48:34 -05:00
Richard Heck
e0672b36f3 Fix #10874 compiler warnings. 2017-12-16 00:46:16 -05:00
Richard Heck
69d46542ed Fix #10872 compiler warnings. 2017-12-16 00:03:36 -05:00
Richard Heck
63d96191b1 Fix #10868 compiler warnings. 2017-12-15 23:59:19 -05:00
Richard Heck
08010eba51 Fix #10865 compiler warnings. 2017-12-15 23:54:50 -05:00
Richard Heck
81cf4e971d Fix #10864 compiler warnings. 2017-12-15 23:53:45 -05:00
Richard Heck
b684ec39ea Fix #10863 compiler warnings. 2017-12-15 23:50:23 -05:00
Richard Heck
b1adf98037 Fix #10862 compiler warnings. 2017-12-15 23:47:20 -05:00
Richard Heck
608124728d Fix #10859 compiler warnings. 2017-12-15 23:43:47 -05:00
Richard Heck
b954f478e3 Fix #10858 compiler warnings. 2017-12-15 23:41:32 -05:00
Richard Heck
1182e303b1 Fix #10852 compiler warnings. 2017-12-15 23:28:33 -05:00
Richard Heck
27eb415d25 Probably fix #10850 compiler warnings. 2017-12-15 23:25:51 -05:00
Richard Heck
126c088b27 Fix #10906 compiler warnings. 2017-12-15 23:20:57 -05:00
Richard Heck
6d1a3bc9a3 Fix #10907 compiler warnings. 2017-12-15 23:13:39 -05:00
Jean-Marc Lasgouttes
2316435f2f Use a backing store on macOS
Qt on macOS does not respect the Qt::WA_OpaquePaintEvent attribute and
clears the widget backing store at each update. Therefore, we use our
own backing store in this case.

This restores a simplified version of the code that was removed at 24c29908.
2017-12-15 17:30:20 +01:00
Jean-Marc Lasgouttes
4f3734f024 Use static_assert instead of LATTEST
Fixes bug #10928
2017-12-14 16:22:46 +01:00
Jean-Marc Lasgouttes
8eb736b23b Remove duplicate variable
Fixes bug #10922
2017-12-14 16:03:30 +01:00
Jean-Marc Lasgouttes
0f18bb54cc Change parameter name
It was a same as a Row member

Fixes bug #10921.
2017-12-14 16:00:00 +01:00
Jean-Marc Lasgouttes
eebea6284d Simplify code in BiblioInfo.cpp
... and avoid MSVC warning

Fixes bug #10905
2017-12-14 15:43:04 +01:00
Jean-Marc Lasgouttes
6936c1b4fa Fix MSVC warning
Take this occasion to simplify the code.

Fixes bug #10402.
2017-12-14 13:39:37 +01:00
Jean-Marc Lasgouttes
b9b6e4c083 Kill MSVC warning
Fixes bug #10900.
2017-12-14 13:04:52 +01:00
Jean-Marc Lasgouttes
4cfa5a9d2a Avoid assignment in if() clause
The optimization they provide is not worth it IMO.

Fixes bugs #10898, #10899, #10940.
2017-12-14 12:56:02 +01:00
Jean-Marc Lasgouttes
cd9e42dc35 Improve UndoGroupHelper and use it more
Now the helper class contains logic that checks whether buffer are
known before closing them. This avoids potential crashes.

Use it in different places to siplify code. It is not clear at this
point whether it should be used everywhere.

Followup to bug #10847.
2017-12-13 11:10:49 +01:00
Jean-Marc Lasgouttes
8b107f0490 Handle properly undo groups in embedded work areas
When a buffer is in an embedded work area (adv. find&replace), it is
not found by BufferList:::exists(), and therefore the undo group
created in GuiApplication::dispatch and in the handling of
LFUN_COMMAND_SEQUENCE will not be closed.. Crashes can ensue, as
described in Ubuntu bug:
https://bugs.launchpad.net/bugs/1737429

The solution is to introduce BufferList::isInternal and act on it.

Fixes bug #10847.
2017-12-13 10:46:54 +01:00
Uwe Stöhr
4d0c1c030c GuiApplication.cpp: remove unused includes 2017-12-13 02:59:05 +01:00
Juergen Spitzmueller
7821cb7133 Missing "icon" in description of "info-insert"-function 2017-12-09 09:52:44 +01:00
Jean-Marc Lasgouttes
0d6a38f3d4 Remove unused variables 2017-12-08 12:16:51 +01:00
Uwe Stöhr
bb14e6434b InsetBranch.cpp: remove an unused include 2017-12-06 19:55:14 +01:00
Uwe Stöhr
c19c21034b InsetXXX.cpp: remove unused and duplicated includes 2017-12-06 19:35:53 +01:00
Juergen Spitzmueller
7e34e65943 Recreate citation label after paste
Fixes: #10829
2017-12-06 09:11:18 +01:00
Jean-Marc Lasgouttes
6cb6f78ae9 Fixup 16af6e7c
Avoid an extra pixel above horizontal rule.
2017-12-04 11:20:13 +01:00
Jean-Marc Lasgouttes
16af6e7c50 Implement display of roots more faithfully
This is a follow-up to 758de957.

- unify the metrics and drawing of \sqrt and \root using helper
  functions mathed_root_metrics and mathed_draw_root.

- compute the vertical spacing above the nucleus of the root following
  rule 11 of the TeXbook. In particular, it is different in inline and
  display style.

- draw the root glyph without hard-coded pixel values. Make the line
  width depend on the zoom.

more work is needed to implement properly rule 11:

- Ideally, we should use sqrt glyphs from the math fonts. Note that
  then we would get rule thickness from there.

- The positioning of the root MathData is arbitrary. It should
  follow the definition of \root...\of... in The Texbook in
  Apprendix B page 360.

Fixes bug #10814.
2017-12-04 10:58:08 +01:00
Juergen Spitzmueller
83f214d636 Do not escape makeindex chars in bibitemWidest. 2017-12-03 12:04:39 +01:00
Juergen Spitzmueller
1a78e9787e nomenclWidest(): take (proper) formatting into account. 2017-12-03 11:57:11 +01:00
Juergen Spitzmueller
938c44590c Fix thinko from b68701c4da 2017-12-03 11:36:09 +01:00
Scott Kostyshak
b3f7eb6af3 Set array length from int const 2017-12-02 13:07:14 -05:00
Enrico Forestieri
f84acc0e34 Avoid asserting when reading the session file
Fixes #10824.
2017-12-02 10:46:46 +01:00
Juergen Spitzmueller
b68701c4da Escape (makeindex) special chars in nomencl if !literate
Fixes: #10825
2017-12-01 13:39:38 +01:00
Juergen Spitzmueller
718a353b49 Implement l7n for nomenclature. 2017-12-01 10:10:06 +01:00
Jean-Marc Lasgouttes
f3656600f9 Use UndoGroupHelper to track undo group lifetime 2017-11-29 14:55:56 +01:00
Jean-Marc Lasgouttes
da79317ce2 Use range-based for loop. 2017-11-29 14:52:50 +01:00
Jean-Marc Lasgouttes
cc7364dfc5 Better handling of multiple buffers in UndoGroupHelper
It may happen that the buffers are visited in order buffer1,
buffer2, buffer1. In this case, we want to have only one undo group
in buffer1. The solution is to replace buffer_ with a set<Buffer*>.

A use case among others is InsetLabel::updateReferences.
2017-11-29 14:46:15 +01:00
Jean-Marc Lasgouttes
6df9cbef95 Remove unused BufferView member 2017-11-29 12:27:57 +01:00
Jean-Marc Lasgouttes
ae60749f89 Make sure that rows are repainted when they get (un)selected
The bug is the following: when selecting several paragraphs quickly
enough, some rows do not get selected.This is a consequence of the
removal of row crc, which lead to not taking into account the
selection status of the row in the decision to repaint.

The solution chosen here is to add a Row::change() helper function to
modify row members. This will set the Row changed status whenever the
value of the member changes.
2017-11-29 11:38:33 +01:00
Richard Heck
5f9f3e49da Fix #10819: Set title for print nomencl dialog. 2017-11-26 22:00:14 -05:00
Kornel Benko
3b9705da19 Cmake build: Add option to use native file dialog also for linux 2017-11-26 18:50:53 +01:00
Richard Heck
a6258b93bc Remove useless code.
runparams was a temporary anyway.
2017-11-24 18:36:09 -05:00
Richard Heck
ab63e72fcb Minor code re-organization 2017-11-24 18:15:27 -05:00
Jean-Marc Lasgouttes
d01dd54bf1 Fixup e64ea357
Cursor at end of paragraph should be treated as if boundary was on.
2017-11-24 23:36:28 +01:00
Jean-Marc Lasgouttes
34285cc683 Handle properly top/bottom of inset with mac-like cursor movement
The correct behavior is to go to position 0 going up from first row,
and to end of row when going down on last row.

The targetx value of the cursor is not updated, which makes cursor
movement more natural.

Fixes bug #10701.
2017-11-23 15:52:08 +01:00
Jean-Marc Lasgouttes
e64ea3576c Avoid some caret ghosts
When the caret is at end of row, if may happen that it is drawn after
the end of the row. In this case caret blinking will not work
properly. This patch extends the row background on the left and right
by Inset::TEXT_TO_INSET_OFFSET. This is only a hack that will not work
if the caret has a ridiculous width like 6.

Additionally, introduce some (disabled) debug code that numbers the
rows on screen by painting order.

Finally, make the code that detects whether the caret was in a given
row more precise (take boundary into account).

Fixes (mostly, see above) bug #10797.
2017-11-23 15:38:17 +01:00
Juergen Spitzmueller
538b38f78c Longtable: only output the caption contents in a caption row.
Fixes: #10791
2017-11-20 10:59:09 +01:00
Juergen Spitzmueller
84f7dafe89 Disable non-functional table rotation for longtables
In the long run, proper longtable rotation via [pdf]lscape should
be implemented.

See #9194
2017-11-19 14:34:19 +01:00
Juergen Spitzmueller
5017a0a1c6 Allow footnotes in floating tables via tablefootnote package
See #808.
2017-11-19 12:56:40 +01:00
Juergen Spitzmueller
aaa6150089 Fix footnote output in description item
Fixes: #9387
2017-11-19 10:41:17 +01:00
Juergen Spitzmueller
3affde3957 Fix footnote output in tables outside floats and longtable header/footer
Fixes: #808 (sic!), #5869
2017-11-19 10:41:17 +01:00
Juergen Spitzmueller
0842e22f45 InsetExternal: update renderer after preview status change
This fixes a crash when changing instant preview prefs while
document with previewed external inset is opened.

Fixes: #10785
2017-11-12 14:46:28 +01:00
Jean-Marc Lasgouttes
9e2da4a3ea Remove row crc computation
This computation did not make sense anymore since we began to put the
contents in the Row object. The fact that it worked was a coincidence.

Instead, we set rows as changed() on creation and reset that once they
have been drawn. This will allow in the future for a finer definition
of what to redraw or not.

Also update the PAINTING_ANALYSIS document
2017-11-11 13:24:08 +01:00
Jean-Marc Lasgouttes
4858bb3bb6 Store change bar information in row element
It is wrong to compute this at paint time. In general, painting a row
should not require any access to a paragraph object, but we are far
from there now.
2017-11-11 13:24:08 +01:00
Juergen Spitzmueller
dd45c67468 Whitespace 2017-11-10 14:57:19 +01:00
Richard Heck
8b9d1b8601 Attempt to fix bug 9158 using updateBuffer.
Along the lines suggested by JMarc, we now collect the list of bibfiles
in use in the updateBuffer routines. This actually does simplify the code
quite a bit. See the discussion there for reasons to go this way.
2017-11-07 11:36:41 -05:00
Uwe Stöhr
56670d7322 GuiDocument.cpp: change back alignment for column with package names
- as discussed in bug #10777 the first column should be left-aligned
2017-11-05 13:39:09 +01:00
Richard Heck
4ec80c1865 Convert for loops to range-based iterators i Buffer.cpp.
No intended change of behavior. The ones that use DocIterators and
ParIterators cannot yet be changed, but they could be if we provided
the right sorts of methods, perhaps.
2017-11-04 22:15:01 -04:00
Uwe Stöhr
a69f1a9e16 GuiDocument.cpp: fix bug 10777
- the column width must be as wide as the column header text
- also center the radiobuttons in the table
- also use alternating colors for the table rows
2017-11-02 22:25:26 +01:00
Juergen Spitzmueller
f2b6ff0870 Swap prefs format 24 and 25, since the former will not be backported. 2017-11-02 16:40:05 +01:00
Juergen Spitzmueller
891a7ef79f Collapsable -> Collapsible (part 5)
Preferences update and prefs2prefs routine.

This was forgotten in the process.
2017-11-02 16:26:45 +01:00
Enrico Forestieri
7e51b5f301 Fix #10778 (issue with CJK and language nesting)
When using CJK, don't try to close a language that was never
opened before, such as when it is the main language.
2017-11-02 10:41:08 +01:00
Juergen Spitzmueller
b851a349b6 Enable OK/Apply buttons when resetting to class defaults. 2017-11-01 12:03:54 +01:00
Richard Heck
400ee6824a Minor code re-organization. 2017-10-27 11:50:51 -04:00
Jean-Marc Lasgouttes
02028c0b12 Move some Cursor methods to CursorData
Basically, everything that does not depend on a BufferView should move
there. Some methods that do not seem to need a BufferView, like
selHandle or IdxFirst or push actually depend on it and could not be
moved.

This allows to simplify a few uses of recordUndo helpers.

- Move some methods to DocIterator: nextMath, prevMath, getPossibleLabel,
  getEncoding;

- Move some methods to CursorData: setCursor, setCursorSelectionTo,
  (setCursorTo|normal|reset)Anchor, (set|clear)Selection,
  sel(|ection)(Begin|End), selectionAsString, info, currentState,
  (mark|clear|check)NewWordPosition, fixIfBroken, sanitize, all undo
  related methods, reset, isInside, leaveInset, current mode;

- kill some unused methods: macromode, replaceWord, setScreenPos, touch,
  markInsert, markErase;

- Move code around to group things, and add a few comments (a lot remains to be done).

This changes lead to some related changes in other classes: removal,
change of parameter.

No intended change.
2017-10-25 16:20:27 +02:00
Jean-Marc Lasgouttes
785c6d4e05 Fix comment 2017-10-25 12:16:16 +02:00
Jean-Marc Lasgouttes
8d8988de47 Allow multiple calls to processUpdateFlags before redraw
The goal of this commit is to ensure that a processUpdateFlags call
that requires no redraw will not override a previous one that did
require a redraw.

To this end, the semantics of the flag argument is now different: its
value is now OR'ed with a private update_flags_ variable. This
variable is only reset after the buffer view has actually been
redrawn.

A new Update::ForceRedraw flag has been added. It requires a full
redraw but no metrics computation. It is not used in the main code
(yet), but avoids to compute metrics repeatedly in consecutive
processUpdateFlags calls.

The process is now as follows:
- if flags is just None, return immediately, there is nothing to do.
- the Force flag is honored (full metrics computation) and replaced
  with ForceDraw.
- the FitCursor flag is honored and removed from the flags.
- the SinglePar update is added if ForceDraw is not in flags and only
  the current par has been modified.

The remaining flags are only then added to the BufferView update
flags, and the update strategy is computed for the next paint event.

Finally the dubious call to updateMacros in updateMetrics has been
removed for performance reasons.
2017-10-24 22:25:29 +02:00
Juergen Spitzmueller
76f49fad78 Implement ParamInfo::HANDLING_LTRIM and use it to ltrim InsetBibitem
output

See #9847.
2017-10-23 08:20:58 +02:00
Guillaume MM
6503073070 Fix math mode for InsetMathMacro on output
After 6642152e, user macros were no longer wrapped in \ensuremath. In 2.2 and
before, InsetMathMacro behaved as follow:

* Textmode global symbols are wrapped in \text when in math.

* Other global symbols, and user macros, are wrapped in \ensuremath when in
  text.

* Undefined macros (ERT) are wrapped neither in \text nor in \ensuremath.

This is also consistent with the documentation of MathEnsurer in
mathed/MathStream.h.

This patch defines InsetMathMacro::currentMode() accordingly (respectively
TEXT_MODE, MATH_MODE and UNDECIDED_MODE) and uses it to determine the output.

After this patch, there is a mismatch between screen and pdf output for user
macros in \text. This is not a regression wrt 2.2 and is because linearization
does not satisfy currentMode() currently.
2017-10-23 00:08:19 +02:00
Enrico Forestieri
d58d3f6774 Account for shadowed system macros
Part of #10694.
2017-10-22 23:09:37 +02:00
Juergen Spitzmueller
70b0df85c8 Do not add deleted text to inset button label.
Fixes: #10775
2017-10-22 19:08:10 +02:00
Enrico Forestieri
7f23ca912c Fix issue with change-tracked deleted display math
- If a display math not starting a new paragraph is deleted, the
  current \lyxdeleted macro (if any) must be closed and a new one
  started, otherwise the display math will be shifted up.

- Use \linewidth instead of \columnwidth because the former will adapt
  to the reduced horizontal width in list environments, avoiding shifting
  to the right the diplay math.
2017-10-22 13:12:33 +02:00
Richard Heck
4483a8f1fb We do not want to trim whitespace in the fallback, either. 2017-10-19 10:15:03 -04:00
Richard Heck
9f56f97d8e Fix bug #9847.
Spaces are, amazingly, allowed at the end of bibliography keys. So we
introduce a new parameter allowing getVectorFromString not to trim
whitespace, and then use it.
2017-10-18 16:42:47 -04:00
Enrico Forestieri
3b43fbfbb1 Speed up exit time
Instantiating a single QSettings and using it for each ui element
can significantly shorten the time required to save the various
states at exit. The speed up can be better appreciated on *nix,
where the settings are saved on disk, rather than on Windows where
they are held in memory (in the registry).
2017-10-18 13:12:20 +02:00
Juergen Spitzmueller
88a0666d6c Do not scan BibTeX files multiple times in a collectBibKeys() procedure.
Scanning is rather slow, so this improves performance in specific
situations (multiple inclusion of larger files in master/child or
chapterbib context)
2017-10-18 09:20:31 +02:00
Jean-Marc Lasgouttes
b4294a7b06 Revert "Allow multiple calls to processUpdateFlags before redraw"
The concept is correct, but it seems a bit too disruptive.

This reverts commit c19c54dd5b.
2017-10-17 20:10:11 +02:00
Richard Heck
b8206a0832 Use of div for labels causes validation errors. See #8843. 2017-10-16 21:37:52 -04:00
Richard Heck
c2f88695ba Revert "ABOVE and CENTERED labels need special treatment."
This reverts commit 08bf9781ee.
2017-10-16 21:28:44 -04:00
Richard Heck
f1e1739d62 Remove "support::" in Buffer.cpp, since we are using namespace. 2017-10-16 16:22:53 -04:00
Richard Heck
0bcb9732c5 Rename Paragraph::setBuffer to Paragraph::setInsetBuffers, to avoid
confusion about what this routine does.
2017-10-16 15:48:47 -04:00
Richard Heck
66e1819ad1 Fix the way that the Buffer gets set on undo.
Previously, we went through the entire Buffer and set it for every
single inset. Now we just do it for the insets we pasted.
2017-10-16 15:48:47 -04:00
Jean-Marc Lasgouttes
c19c54dd5b Allow multiple calls to processUpdateFlags before redraw
The goal of this commit is to ensure that a processUpdateFlags call
that requires no redraw will not override a previous one that did
require a redraw.

To this end, the semantics of the flag argument is now different: its
value is now OR'ed with a private update_flags_ variable. This
variable is only reset after the buffer view has actually been
redrawn.

A new Update::ForceRedraw flag has been added. It requires a full
redraw but no metrics computation. It is not used in the main code
(yet), but avoids to compute metrics repeatedly in consecutive
processUpdateFlags calls.

Finally the dubious call to updateMacros in updateMetrics has been
removed for performance reasons.
2017-10-16 11:05:52 +02:00
Juergen Spitzmueller
c466baaa5b Collapsable -> Collapsible (part 2)
The current spelling is not strictly wrong, but flagged as unusual or
historical by some authorities. It is also found fault with many
spell checkers. Thus we decided to move to the more standard "-ible"
form once and for all.

See #10678 for discussion

This part covers the most tricky part: the internal naming.
Translations and layouts will follow.

This will all also all be backported to 2.3.x, for the sake of backwards
compatibility (cherry-picking).
2017-10-16 10:12:21 +02:00
Juergen Spitzmueller
648ddd25ec Collapsable -> Collapsible (part 1)
The current spelling is not strictly wrong, but flagged as unusual or
historical by some authorities. It is also found fault with many
spell checkers. Thus we decided to move to the more standard "-ible"
form once and for all.

See #10678 for discussion

This part only covers the usage in comments and the like. More to follow.

This will all also all be backported to 2.3.x, for the sake of backwards
compatibility (cherry-picking).
2017-10-16 10:03:05 +02:00
Richard Heck
4a71db4d14 Typo. 2017-10-15 22:06:02 -04:00
Richard Heck
a7677bfbec Revert "Fix bug #8782."
This caused slowness on undo and redo that was reported at
https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg202292.html

This reverts commit 02847641a8.
2017-10-15 20:53:48 -04:00
Richard Heck
2e934fc5f8 Remove updateInfo() calls in favor of doing the relevant work
in updateBuffer().

This is in response to a reported crash. See
	https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg202217.html
Commit af381a2f addressed the crash, and is worth doing anyway. But
this also makes sense.

Also adds a flag to tell us whether we need to recalculate the
relevant information. In some cases, there is no need to do so
more than once. (Note that, with the existing code, we *never*
recalculate, which would have given rise to bugs.)
2017-10-15 20:53:15 -04:00
Enrico Forestieri
c16ccdb5fd Fix issue with regular expressions
At least with gcc 6.4, if the first parameter passed to
regex_match() is afterward changed, the second one gets
corrupted. This is avoided by using a temporary string.
2017-10-15 15:29:33 +02:00
Juergen Spitzmueller
c462fadff5 Some improvements to the graphics dialog
* Describe the viewport/bb situation more accurate
* Use generic term "coordinates", since bb and viewport are flavor-specific
* Add some tooltips
* Increase the width of the options widget.
2017-10-13 11:25:55 +02:00
Juergen Spitzmueller
aaf17b08a8 Fix PDF output of clipped graphics with recent graphics package
The previous redirection of the senseless option "bb" to "viewport" in
PDFLaTeX output has been removed in a recent graphics package update.

This breaks documents, since clipped graphics silently stop displaying.

This change restores the previous output by using "viewport" instaed of
"bb" for non-PS/DVI output, while leaving PS/DVI untouched (where "bb"
and "viewport" behave differently.

Fixes: #7910
2017-10-12 15:38:59 +02:00
Jean-Marc Lasgouttes
e7122d7926 Some improvements related to Debug::PAINTING
Avoid blinking the cursor when these debug messages are active.
This avoids a lot of debug information.
2017-10-11 17:39:02 +02:00
Jean-Marc Lasgouttes
6956cea323 fix broken comment 2017-10-11 17:33:45 +02:00
Jean-Marc Lasgouttes
88d0390724 Do not forget to set cursor current font when selecting
Fix several unreleated cases where the `selecting' code path did not
reset cursor font correctly. This leads to a caret that does not have
the correct size, and can cause caret droppings with the new display
scheme.
2017-10-11 11:59:58 +02:00
Enrico Forestieri
ce4f39d414 Fix issue with language switch in Arguments insets
In some insets such as Arguments, a local language switch has to be
used. However, if the language inside the inset was set to be equal
to the outer language, the code decided not to switch language. But
then got confused and tried to close a switch that was never opened.
This patch forces the switch even if the outer language is the same.
2017-10-11 09:13:11 +02:00
Stephan Witt
2232ea389b Add description comment for the lyxconvert utility 2017-10-09 08:06:27 +02:00