Commit Graph

25189 Commits

Author SHA1 Message Date
Juergen Spitzmueller
ed9a846200 Add missing empty line (par break) between pars with differing line spacing (#12638)
cherry-picked from 8c6db95135
2023-02-10 09:20:29 +01:00
Jean-Marc Lasgouttes
dfbf4c4839 upgrade boost to 1.75.0
Boost is updated to a more recent version to avoid many compilation
warnings. However, boost 1.76 introduces a brand new regex library.
Therefore, it was chosen to use the last version before that to
minimize changes.

The part that adapts our source to the new boost requirements is
backported from 09130d7a62.
2023-02-05 20:27:43 +01:00
Enrico Forestieri
8bc83f123a Fix bug #12633
Avoid recursion when validating a macro that is defined recursively.
This avoids a crash but the latex engine will choke on it, of course.
2023-01-28 09:03:49 +01:00
Stephan Witt
638e8e4c6c Avoid static members zoom_min_ and zoom_max_
Some compilers cannot use static class members by reference. std::min() and std::max() are passing parameters by const reference.
2023-01-05 18:48:46 -05:00
Juergen Spitzmueller
263e1045e2 Amend 14b108fc22 2022-12-05 08:24:36 +01:00
Pavel Sanda
ef1a2838ce Typo in new string. 2022-12-04 19:19:18 +01:00
Juergen Spitzmueller
8900b5a3aa Check encodability of math user macro names (#11855)
(cherry picked from commit 14b108fc22)
2022-12-04 18:51:58 +01:00
Juergen Spitzmueller
0f34a81ee8 GuiGraphic: delimit "Scale in LyX" (1--1000%)
Larger values will eventually crash LyX (see #12353), 0 or negative
values make the image disappear in the workarea and impossible to edit.

(cherry picked from parts of
commit 14d63f5be8)
2022-11-26 18:32:34 +01:00
Jean-Marc Lasgouttes
4c1a75a45c Fixup 52ea3679: make macro safer.
Taking advice from José.
2022-11-25 00:18:07 +01:00
Jean-Marc Lasgouttes
e829576bb7 Fix distcheck target
1/ The most annoying part was the error in po/. It turns out that reading
and understanding the po/Makevars file was the key. A simple change of
variable ensures that "make dist" does not try to rebuild lyx.pot.

2/ The way tests in src/ are defined meant that the
dependency-tracking files were not all deleted. This should be OK now.

(cherry picked from commit 9017581ecf)
2022-11-24 23:50:09 +01:00
Juergen Spitzmueller
7d70bb0f69 GuiLog: don't miss package warnings for packages with dashes 2022-11-24 18:14:38 +01:00
Jean-Marc Lasgouttes
08195c1d95 Fix potential crash with 32bit ucs4 codepoints
QChar codepoints are 16 bit, so it is not wise to pass blindly a
char_type value to the QChar constructor.

Use the already defined isSpace() helper tht takes care of this issue.

Related to #12519, which is only known to bite with Qt6 for now; this
bug is thus theoretical in 2.3.
2022-11-24 01:18:54 +01:00
Pavel Sanda
52ea367982 Qt4 compilable again 2022-11-23 23:41:22 +01:00
Jean-Marc Lasgouttes
c203a842fc Set a maximum value to zoom level
The minimal vamue is set to 10%, let's set the max to 1000%. This
avoids crashes when characters are too large.

The code is refactored to be more compact and the tests are more precise.

Fixes bug #12452.

(cherry picked from commit 5259b6ba62)
2022-11-23 18:51:53 +01:00
Juergen Spitzmueller
cd37ddc52c Fix crash when using Hebrew (bug 12464) 2022-11-23 12:28:59 +01:00
Juergen Spitzmueller
693112b3c2 Handle LFUN_FONT_DEFAULT is InsetTabular::Dispatch (fixes #12566) 2022-11-23 12:22:54 +01:00
Jean-Marc Lasgouttes
ca259d7529 Set current cursor font when toggling emphasize
The change actually works for all font toggling with implicit selection.

Fixes bug #12450.

(cherry picked from commit d44c63e2c6)
2022-11-22 21:30:03 -05:00
Richard Kimberly Heck
4af43b6d52 Fix #12524. From Enrico. 2022-11-22 21:28:14 -05:00
Jean-Marc Lasgouttes
75108675ba Make rectangles have pointy corners
This only makes a difference in HiDpi mode.

Adaptation of the patch proposed by Daniel.

Fix for bug #12336.

(cherry picked from commit 3cdfb42cce)
2022-11-22 21:22:13 -05:00
Juergen Spitzmueller
e9a5dd741e Only load subscript package with LaTeX < 2005/12/01 (#12387)
(cherry picked from commit d4d4654d63)
2022-11-22 21:19:53 -05:00
Jean-Marc Lasgouttes
483d4466fd Fixup 7485225c: better placement of deph bar
Fixes #12243.

(cherry picked from commit a64244b844)
2022-11-22 21:13:12 -05:00
Juergen Spitzmueller
cfd3abbdb0 Fix TOC filtering with slashes (#12359)
Seems the * wildcard does not match these.
2022-11-22 21:05:22 -05:00
Richard Kimberly Heck
b4ff3fb287 Backport fix for #11491. From Enrico. 2022-11-22 21:04:29 -05:00
Jean-Marc Lasgouttes
97dd1c4702 gcc 12 compilation fixes 2022-11-08 23:59:58 +01:00
Stephan Witt
c22119eb1c Use real path names for buffer lookup by name of temporary external files.
In case of path names for external files containing symbolic links the real path
and the logical path name may be different for the same file or directory.
LyX is using QDir::tempPath() to create the path name of the temporary directory.
The Qt implementation is free to return the logical or the real path name here and
it happens to be different for various platforms and versions.
The most stable and clean solution is to use the real path name consistently.

(cherry picked from commit f2f861f017)
2022-02-20 14:18:26 +01:00
Jean-Marc Lasgouttes
1def11d296 Add lyxrc option to force the use of backing store
LyX relies on a a backing store to draw when running under macOS or
Wayland, because Qt arbitrarily overwrites parts of the workarea
before we paint (and we paint only the parts that need to be painted).
However it seems that this is also necessary on X11 when the WM theme
is translucid. Since there is no way that I know of to detect this
situation, this patch adds a LyXRC setting to manually select this
drawing strategy.

Note that using a backing store is not always a good solution, since
this disables subpixel aliasing.

At this point there is no UI for the variable.

Fixes bug #12119

(cherry picked from commit c213eb7f75)
(cherry picked from commit 1ed9257c6d)
2022-01-13 17:24:28 +01:00
Stephan Witt
8b7c1d7800 #12247 disable Qt5 modifier hack for Qt-5.12 version or newer
backport of commit c5262f04a2
2021-10-31 10:35:15 +01:00
Stephan Witt
dd18429aaa #11925 Remove the gap between button frame and button background (by Daniel Ramoeller)
(cherry picked from commit 3d616bfc79)
2021-10-21 22:10:24 +02:00
Pavel Sanda
1c93e3e695 backport 6770fe5f38 2021-10-21 16:02:56 +02:00
Pavel Sanda
c2a9f55be8 Improve error msg. 2021-10-21 15:17:39 +02:00
Juergen Spitzmueller
c276c3e7b1 Do not change bibliography processor to default if it is not found
Rather than that, keep it with a warning that it is not available.
Fallback procedure (which maintains security measures) is done in
the conversion step.

This prevents document properties being silently changed on sharing.

(cherry picked from commit 3543626182)
2021-10-18 08:38:10 +02:00
Juergen Spitzmueller
c7d29be153 Provide proper fallback if a bibliography processor is not found
Check for appropriate fallbacks and warn user if the requested
bibliography processor is unavailable.

(cherry picked from commit f350072565)
2021-10-18 08:34:19 +02:00
Jean-Marc Lasgouttes
dfa97f80d9 Explicit InsetTableCell copy constructor
Use explicit default syntax (C++11).

Adapted from:
commit bff97ba76d
commit 3d46cc302b
2021-10-15 17:43:12 +02:00
Jean-Marc Lasgouttes
09b340a45e Fix more unintended copies in range-based for loops
Spotted by g++ 11.
2021-10-15 17:43:12 +02:00
Jean-Marc Lasgouttes
cca4b8d42a Avoid some more copies in range-based for loops
This triggers warnings with clang++ 10 and gcc 11.

(cherry-picked from commit 7035e230ca)
2021-10-15 17:43:12 +02:00
Jean-Marc Lasgouttes
4d410d0d32 Do not for copies in range-based for loops.
Spotted by clang++ 10.

(cherry picked from commit a85c48de5a)
2021-10-15 17:43:12 +02:00
Jean-Marc Lasgouttes
3beb9b326d Remove variable that is not used
Spotted by clang++ 13.

(cherry picked from commit d99502d915)
2021-10-15 15:51:13 +02:00
Pavel Sanda
cad91ec1bc Guard against possible referencing null.
Those checks might not be needed, but it's not self obvious from
the surrounding code. Because we already experienced crash from
similar change (cf 1c1c83eced), let's be prudent here.

https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg216414.html
2021-10-14 22:02:32 +02:00
Juergen Spitzmueller
1c1c83eced Prevent null pointer
No status entry needed (this bug crept in after the last release)
2021-10-12 07:42:21 +02:00
Juergen Spitzmueller
70d88f02e7 Yet another deprecation fix (this is the last one I am aware of)
(cherry picked from commit 9f92fc92bd)
(cherry picked from commit 67c85f54c4)
2021-06-03 17:01:07 +02:00
Juergen Spitzmueller
4d21c899a8 Set advanced repl_buffer internal as well (#12246) 2021-04-12 09:21:57 +02:00
Juergen Spitzmueller
9a32d7b07c Mark c&p buffers internal. Cures assertion (#12246) 2021-04-12 09:19:27 +02:00
Juergen Spitzmueller
c1e10c7185 Fix copy of multi-cells in table (#12196)
(cherry picked from commit ae892bff98)
2021-03-28 10:17:24 +02:00
Jean-Marc Lasgouttes
4b2bb08884 Fix display of emphasize in slanted text
Fixes bug #12175.

(cherry picked from commit 610ea7f4f5)
2021-03-27 19:32:15 +01:00
Scott Kostyshak
0f17c6a98f Fix Qt deprecation warns for setAutoCompletion()
This commit fixes a few warnings from Qt 5.14 like the following
one:

  error: ‘void QComboBox::setAutoCompletion(bool)’ is deprecated: Use setCompleter() instead. [-Werror=deprecated-declarations]

We only generated setAutoCompletion() from setting the property in
the .ui files. There does not seem to be a .ui file property that
generates setCompleter(). However, the default in both Qt5 [1] and
Qt4 [2] is to enable case-insensitive autocompletion, which seems to
be the same type of autocompletion as when we were relying on
setAutoCompletion(true). Thus, we can remove the properties that set
autocomplete to true. There is only one file, SearchUi.ui, where we
were turning off the autocompletion; we now do so using
setCompleter(0) in GuiSearch::GuiSearch().

[1] https://doc.qt.io/qt-5/qcombobox.html#setCompleter
[2] https://doc.qt.io/archives/qt-4.8/qcombobox.html#setCompleter

(manually cherry picked from commit 27ba830b8e)
2021-03-17 22:13:10 -04:00
Jean-Marc Lasgouttes
847312daea rawName() is only used with Qt4.
Fixes warning:
../../../../stable/src/frontends/qt4/GuiFontLoader.cpp:132:9: warning: ‘QString lyx::frontend::{anonymous}::rawName(const QString&)’ defined but not used [-Wunused-function]
  132 | QString rawName(QString const & family)
      |         ^~~~~~~
2021-03-13 21:57:35 +01:00
Juergen Spitzmueller
511abbf4ce Backport QTime related deprecation fix 2021-03-13 12:48:13 +01:00
Juergen Spitzmueller
9671f8ca20 Backport getContentsMargins() deprecation fix 2021-03-13 12:21:50 +01:00
Juergen Spitzmueller
1a3f150632 Backport QList::fromSet() deprecation warning 2021-03-13 12:19:38 +01:00
Juergen Spitzmueller
1a9bdb4452 Backport setTextColor deprecation fixes 2021-03-13 12:06:23 +01:00