Commit Graph

43868 Commits

Author SHA1 Message Date
Jean-Marc Lasgouttes
37c34c5ca9 Fixup c52049bb83: -Werror is needed to test for warning flags
At least on my old clang++, this is required.

Fixes bug #12391.
2021-10-11 14:31:58 +02:00
Jean-Marc Lasgouttes
a5f1b15858 Make CoordCache assertions less annoying. 2021-10-09 12:25:29 +02:00
Jean-Marc Lasgouttes
0fff65a16a Avoid duplicate checks in CoordCache
The code is written in such a way that the elements are searched
several times. This can be expensive when there are a lots of insets
in the document.

Concerning the sanity checks, they are now conditionned on the
presence of assertion.

Related to bug #12297.
2021-10-08 18:17:19 +02:00
Jean-Marc Lasgouttes
e5bb491e2e Reduce the number of accesses to coord cache when drawing a math row
Each of these accesses is somewhat costly when using large branches
with lots of maths

Related to bug #12297.
2021-10-08 18:17:19 +02:00
Jean-Marc Lasgouttes
e09158efee Use unordered maps to store inset and math rows geometry.
Simply using unordered_map instead of map makes a big difference for
documents with lots of math insets in one text inset.

Related to bug #12297.
2021-10-08 18:17:19 +02:00
Scott Kostyshak
3ad94ec6d9 Minor refactor of previous commit
A bit easier to read and avoids unnecessary status.clear().
2021-10-07 20:40:12 -04:00
Daniel Ramoeller
b387ed52b1 Disable LFUN for last column/row deletion
Fix for #12380.
2021-10-07 20:40:12 -04:00
Juergen Spitzmueller
465b58a6df Check changed status after decimal sep has been edited 2021-10-06 18:06:09 +02:00
Richard Kimberly Heck
c732f7df09 New Brazillian Portuguese translation. 2021-10-06 12:00:04 -04:00
Yuriy Skalko
6a7c9d12f9 Amend d3c335a5d5 2021-10-05 17:10:51 +03:00
Juergen Spitzmueller
9a4a6ca079 Fix \cline calculation when last column has decimal alignment 2021-10-01 12:42:06 +02:00
Scott Kostyshak
4658781e56 Add regression test for font switch before comment
This is a tricky issue that was fixed at 9eab66eb.
2021-09-30 14:22:49 -04:00
Juergen Spitzmueller
9eab66ebb4 Close font switches before comments 2021-09-30 12:53:41 +02:00
Yuriy Skalko
d3c335a5d5 Remove useless casts reported by GCC with -Wuseless-cast option 2021-09-30 10:37:24 +03:00
Jean-Marc Lasgouttes
c52049bb83 Autoconf build: Fix the invalid test for '-Wno-deprecated-copy' flag
(shamelessly stolen from c26db650a1, which was for cmake build)

The original test was always successfull, even if the flag was invalid.

But checking for '-Wdeprecated-copy' instead yields to error if the
warning does not exist. Existent warning for 'deprecated-copy' implies
that 'no-deprecated-copy' also exist.
2021-09-29 18:16:06 +02:00
Kornel Benko
c26db650a1 Cmake build: Fix the invalid test for '-Wno-deprecated-copy' flag
The original test was always successfull, even if the flag was invalid.
But checking for '-Wdeprecated-copy' instead yields to error if the warning does not exist.
Existent warning for 'deprecated-copy' implies that 'no-deprecated-copy' also exist.
2021-09-29 17:53:50 +02:00
Daniel Ramoeller
0862042b28 SVG replacement of busy.gif
Fix for bug #10384.
2021-09-29 12:49:56 +02:00
Jean-Marc Lasgouttes
42abb26054 Make paragraph-goto and friends set paragraph to the top
Add parameter 'force' to scrollToCursor(...) to avoid the case where the
cursor is not set to top because it is already visible on screen.
Change screen offset in this method so that the paragraph is really at
the top of the screen. This part may cause unforeseen issues and needs care.

gotoInset: use the new force flag and do not trigger a redraw.
Instead, return a boolean telling whether redraw is needed.
In the code that use it, set an update flag instead of the extra redraw.

In the handling of paragraph-goto, also set the update flag instead of
triggering a repaint.

Remove Bufferview::scrollToCursor(), which was equivalent to showCursor().

Fixes bug #10425.
2021-09-29 12:16:39 +02:00
Yuriy Skalko
a9119c3fa8 Remove redundant declarations reported by GCC with -Wredundant-decls option 2021-09-28 20:59:21 +03:00
Jean-Marc Lasgouttes
7067f48fa7 typo 2021-09-28 11:25:48 +02:00
Kornel Benko
84655a07d8 Fix crash
Lyx crashes on export to pdf if used with sanitizer set to 'unspecified'.
Crash found by Scott.

Given that if we export without GUI, there is some weirdness here though.
1.) Why does lyx not crash if not using '-fsanitize' compile-option
2.) Why is export to pdf dependent on the screen-resolution
2021-09-28 10:33:24 +02:00
Yuriy Skalko
325c405541 Remove redundant semicolons reported by GCC with -Wextra-semi option 2021-09-28 11:28:43 +03:00
Pavel Sanda
05dd6614c4 Include docbook_copy.py in released tarball. 2021-09-27 22:07:07 +02:00
Jean-Marc Lasgouttes
3cdfb42cce Make rectangles have pointy corners
This only makes a difference in HiDpi mode.

Adaptation of the patch proposed by Daniel.

Fix for bug #12336.
2021-09-27 17:47:41 +02:00
Jean-Marc Lasgouttes
69834f1e0d Fixup 6bbd88ac: compilation fix for Qt4 2021-09-27 13:56:04 +02:00
Jean-Marc Lasgouttes
73865ce999 Whitespace 2021-09-27 11:53:59 +02:00
Thibaut Cuvelier
e9db9d3644 DocBook copy: add links to bug reports. 2021-09-27 01:46:01 +02:00
Thibaut Cuvelier
6d3be39587 DocBook copy: don't error if the file was already copied. 2021-09-27 01:15:16 +02:00
Thibaut Cuvelier
a464915f58 DocBook copy: large refactoring to improve readability. 2021-09-27 01:10:49 +02:00
Thibaut Cuvelier
e22f52e731 DocBook: make LilyPond work more reliably. 2021-09-27 00:39:10 +02:00
Thibaut Cuvelier
508badc78a DocBook: redirect LilyPond output to main LyX output to ease debugging. 2021-09-26 21:13:17 +02:00
Thibaut Cuvelier
e983676f6c DocBook: work around bug in LilyPond.
https://lists.gnu.org/archive/html/bug-lilypond/2021-09/msg00039.html
2021-09-26 21:00:59 +02:00
Thibaut Cuvelier
7c1d4fd3c4 DocBook: missing multicol test. 2021-09-26 19:10:22 +02:00
Thibaut Cuvelier
57e0b860cb DocBook: add the new script as DocBook copier. 2021-09-26 19:10:13 +02:00
Thibaut Cuvelier
f0537d72ee DocBook: add script to start LilyPond on the generated file.
Not yet used anywhere in the code for now (see next commit).
2021-09-26 18:15:09 +02:00
Thibaut Cuvelier
661fcb2628 Unused code. 2021-09-26 17:27:41 +02:00
Thibaut Cuvelier
b2c0604ad1 Typo. 2021-09-26 17:25:28 +02:00
Jean-Marc Lasgouttes
b3890d9eab Fix warning. 2021-09-24 18:45:08 +02:00
Jean-Marc Lasgouttes
6bbd88accf Improve (modestly) the performance of font metrics caches
This fixes two performance issues and improves the performance of
TextMetrics::redoParagraph by 15% in a workload that uses the cache a
lot. The difference will be much less when the cache is not used much.

1/ repetion of the hash code computation

The code
  if (cache.contains(key))
  	result = cache[key]:
is not efficient, since qHash(key) has to be computed twice.
To fix this a new Cache::object_str() method is added, which allows
  if (auto * obj = cache.object(key))
  	result = *obj;

2/ code of has code computation

Instead of using a verbose string that is complicated to build as
key, new key structs BreakAtKey and TextLayoutKey are introduced,
along with the relevant qHash() implementation.
2021-09-24 17:12:15 +02:00
Enrico Forestieri
9ae002b69f Fix bug #12373
Do not perform any autocorrection in the presence of a selection.
2021-09-24 10:17:32 +02:00
Kornel Benko
dd947300bc Amend dca39815: Fix a few warnings in Floating. 2021-09-24 10:08:02 +02:00
Thibaut Cuvelier
dca39815d3 Fix a few warnings in Floating. 2021-09-24 01:19:28 +02:00
Thibaut Cuvelier
e53af9e677 DocBook: add a LilyPond test. 2021-09-24 00:43:32 +02:00
Thibaut Cuvelier
db3efe4549 Amend 4fd6edf3
Escape paths in the generated RC file.
2021-09-23 23:40:21 +02:00
Thibaut Cuvelier
4fd6edf330 Find LilyPond on Windows too.
The main problem is that, while lilypond.exe exists, there is not lilypond-book.exe: the previous calls always failed, even though the file was there, just not called the right way.
2021-09-23 02:59:39 +02:00
Kornel Benko
4f46c22d03 Cmake build: Unify use of sanitizer
The configuration variable is LYX_DEBUG_SANITIZE
which can have following values:
"NONE"
"ADDRESS" Use address sanitizer (previously used with the variable LYX_ASAN)
"UNSPECIFIED" Use unspecified sanitizer
2021-09-21 11:27:13 +02:00
Thibaut Cuvelier
ffa1b1dcc7 DocBook: add inner tags for layouts.
This makes it possible to implement LilyPond as prescribed in https://lilypond.org/doc/v2.22/Documentation/usage/docbook.
2021-09-21 01:21:25 +02:00
Thibaut Cuvelier
7ee23ca885 XML: add a check for a typical case in the xml name space.
IGNORE is a typical placeholder for tags that should not be output, along with NONE. At some point, we should check if both are required, or if NONE is enough…
2021-09-21 01:21:25 +02:00
Thibaut Cuvelier
14ed5b2050 DocBook: start implementing LilyPond.
All the changes that can be achieved without C++ code changes.
2021-09-21 01:21:25 +02:00
Kornel Benko
687ccdbb32 Complete the FontTag typeinfo 2021-09-20 11:52:16 +02:00