Commit Graph

26479 Commits

Author SHA1 Message Date
Jean-Marc Lasgouttes
e06e2e24e7 Revert part of 56e012be: hardcode again "too small" preview size
It seems that the use of zoom in determining the size of the minimal
value was a bad idea.

It still think that the situation is not very satisfying, we need a new idea.
2020-05-28 20:43:01 +02:00
Kornel Benko
b7cac34d96 Findadv: 2 more possible out of range access cases corrected 2020-05-26 18:49:50 +02:00
Kornel Benko
8dd2ac7171 Findadv: Do not use out of range index into a string
Thanks Scott. Crashing if using _GLIBCXX_DEBUG preprocessor setting
2020-05-26 15:58:23 +02:00
Juergen Spitzmueller
5b2479176b tex2lyx: reset language after polyglossia lang environment has been closed
Fixes #11878
2020-05-26 10:15:52 +02:00
Jean-Marc Lasgouttes
8d51b3e7bb Simplify code by using initializer lists for vectors.
{ REFERENCE_NEXT, NOTE_NEXT } can be used as a value for a
vector<FuncCode> since C++11.
2020-05-23 17:10:17 +02:00
Jean-Marc Lasgouttes
7761e1317e Fix first draw of auto-open inset
note-next and reference-next should trigger an update so that metrics
are updated when the cursor ends up in an auto-open inset.

Fixes bug #11870.
2020-05-23 16:50:04 +02:00
Richard Kimberly Heck
44dc38e120 Revert part of 47973dc2b, which was causing bug #11873. 2020-05-22 23:43:44 -04:00
Richard Kimberly Heck
a2b21e3cd4 Fix more warnings and simplify a tiny bit. 2020-05-19 18:06:20 -04:00
Richard Kimberly Heck
6942dc9fb4 Fix warnings 2020-05-19 17:08:38 -04:00
Richard Kimberly Heck
ca417d2c87 Fix warnings 2020-05-18 01:15:50 -04:00
Richard Kimberly Heck
d7dde0c723 Fix warnings. 2020-05-18 00:46:58 -04:00
Richard Kimberly Heck
2de99c5dd9 Fix bug #11456.
Add cancel button and take no action if we're canceled.
2020-05-18 00:28:36 -04:00
Richard Kimberly Heck
b2517d60b8 Fix bug #11405.
We don't actually prevent hidden buffers from being dirty, so we need
to save them if they are.
2020-05-18 00:07:56 -04:00
Richard Kimberly Heck
a96ec2db45 Remove debugging code. Thanks Scott! 2020-05-17 20:59:34 -04:00
Richard Kimberly Heck
e1615f4107 Const-ness, and a missing Class declaration. I do not understand
why this ever worked.
2020-05-17 20:52:58 -04:00
Richard Kimberly Heck
5d9e175256 Fix copy-paste error.
See bug #11869.
2020-05-17 20:52:18 -04:00
Richard Kimberly Heck
c6b3f35c8c Properly check return values so TIMEOUT is recognized. 2020-05-17 14:58:15 -04:00
Enrico Forestieri
49098aa318 Fix bug #11854
The code was checking only for particular vertical alignment requests
in order to decide to nest a standard array into a 1x1 ams matrix.
However, also vertical lines are not possible in ams matrices.
2020-05-17 18:15:00 +02:00
Juergen Spitzmueller
6057fba90a Fix indentation 2020-05-17 15:18:38 +02:00
Juergen Spitzmueller
0328ecd019 Properly close and reopen lyxdeleted macro at font change
Fixes #11867, amends [28da0f4360a/lyxgit]
2020-05-17 14:54:59 +02:00
Juergen Spitzmueller
602ac1401e return from switch
we don't break in this switch
2020-05-17 13:57:31 +02:00
Juergen Spitzmueller
f2243a3bc7 Disable bookmarksopenlevel SL when bookmarksopen is false
Fixes #11289
2020-05-16 10:31:48 +02:00
Juergen Spitzmueller
92ba05c53b Assign InsetBibtex to appropriate toc level
Fixes #11863
2020-05-15 10:14:22 +02:00
Juergen Spitzmueller
11dc817e9d Check class options for uncodable glyphs
Fixes #11865
2020-05-15 09:50:25 +02:00
Jean-Marc Lasgouttes
fc5b22a2f1 Get rid of lyx::next uses for RandomAccessList
These uses are inefficient (a loop really) and require that pit_type
is ptrdiff_t.

Instead, RandomAccesslist::constIterator is renamed to iterator_at and
a version adding a non-const iterator is added. Additionally, the
method retirns end() when position is equal to the size of the
container (see #11861).

lyx::next and lyx::prev are removed, and std::prev is used in the few
places where the code requires it (for no good reason IMO).
2020-05-14 10:35:49 +02:00
Richard Kimberly Heck
97bbcf2b9b Remove include no longer needed 2020-05-13 14:54:16 -04:00
Richard Kimberly Heck
b0def618f8 Simplify. 2020-05-13 14:49:01 -04:00
Richard Kimberly Heck
5353cf90c0 Replace functors in ExternalTemplate.cpp. 2020-05-13 14:42:52 -04:00
Richard Kimberly Heck
ce33715d2b Don't make copies! 2020-05-13 14:23:27 -04:00
Richard Kimberly Heck
47973dc2b4 Remove a couple more functors from PrevewLoader. 2020-05-13 13:33:27 -04:00
Richard Kimberly Heck
1e904625b2 Remove functors in PreviewLoader.cpp.
Also fix some warnings.
2020-05-13 13:33:27 -04:00
Jean-Marc Lasgouttes
c756749991 Revert "Get rid of lyx::next uses for RandomAccessList"
This is not ready (see #11861).

This reverts commit 6d97e39934.
2020-05-13 10:45:25 +02:00
Juergen Spitzmueller
2663e3845e Move \PassOptionsToPackage before the first package loaded
Fixes #11862
2020-05-13 08:48:08 +02:00
Jean-Marc Lasgouttes
e52af39864 Avoid a warning 2020-05-12 17:42:50 +02:00
Jean-Marc Lasgouttes
6d97e39934 Get rid of lyx::next uses for RandomAccessList
These uses are inefficient (a loop really) and require that pit_type
is ptrdiff_t.

Instead, RandomAccesslist::constIterator is renamed to iterator_at and
a version adding a non-const iterator is added.

lyx::next and lyx::prev are removed, and std::prev is used in the few
places where the code requires it (for no good reason IMO).
2020-05-12 17:29:21 +02:00
Richard Kimberly Heck
b1a0f7ac54 Fix typo (from Thibaut) 2020-05-08 13:32:08 -04:00
Richard Kimberly Heck
195c0bfbad Rename some routines 2020-05-05 11:19:21 -04:00
Richard Kimberly Heck
5989160154 Remove functors in IndicesList.cpp. 2020-05-05 11:19:21 -04:00
Richard Kimberly Heck
958958453f Replace functors in Format.cpp. 2020-05-05 11:16:28 -04:00
Richard Kimberly Heck
7f875d7dac Replace functor in BranchList 2020-05-05 11:16:24 -04:00
Richard Kimberly Heck
c506f304bc Fix a number of issues that were stopping compilation with MSVC 19.
Patch from Thibaut Cuvelier, modified slightly by me (mostly for style).
2020-05-04 19:45:58 -04:00
Richard Kimberly Heck
91265c1f46 Missing include according to VC19 2020-05-04 14:19:29 -04:00
Richard Kimberly Heck
d6a7ec506e s/requires_/required_/ for code consistency 2020-05-04 14:05:44 -04:00
Richard Kimberly Heck
3b09ef61a6 Fix remaining (I think) requires keyword issues. 2020-05-04 13:46:01 -04:00
Scott Kostyshak
23abb5aaa3 Fix commented out code
Since the if condition changed at af4ee1a4, the "else" in the
comment needed correction.
2020-05-04 09:27:35 -04:00
Scott Kostyshak
af4ee1a487 Only set dummy X11 selection if we do not own it
Before, we would continually set the selection to the empty string,
to maintain ownership. This causes problems with clipboard managers
GPaste and CopyQ. Further, in theory this should have better
performance since checking ownership should be faster than setting.

A disadvantage of this change is that the timestamp of the selection
will be old at this point in the code. However, when the selection
is requested, we put the selection contents at that point so the
selection timestamp should be accurate then. Further, the selection
contents are not accurate at this point in the code (they are just
the empty string), so it is not clear whether having an accurate
timestamp is beneficial.

Fixes #11715.
2020-05-04 08:58:56 -04:00
Juergen Spitzmueller
210c4aa9a2 Use translated GUI name of counter in button label 2020-05-04 09:28:07 +02:00
Juergen Spitzmueller
5171b7ea6c Keep sort order of counter actions 2020-05-04 09:22:35 +02:00
Richard Kimberly Heck
5f5cb7eea7 Fix warnings by using size_t as the loop variable. 2020-05-03 15:02:40 -04:00
Richard Kimberly Heck
e8800373e6 is_utf8 is always passed a char. 2020-05-03 15:02:25 -04:00