]> git.lyx.org Git - lyx.git/log
lyx.git
2 years agoctests: log a fixed issue
Scott Kostyshak [Sun, 6 Feb 2022 13:13:12 +0000 (08:13 -0500)]
ctests: log a fixed issue

2 years agoDon't set open_font to false if lang hasn't been closed
Juergen Spitzmueller [Sun, 6 Feb 2022 09:02:17 +0000 (10:02 +0100)]
Don't set open_font to false if lang hasn't been closed

2 years agoDocBook: don't force outputting an <abstract> when it would only contain comments.
Thibaut Cuvelier [Sun, 6 Feb 2022 05:44:29 +0000 (06:44 +0100)]
DocBook: don't force outputting an <abstract> when it would only contain comments.

Before this patch, LyX would forcibly create an <abstract> tag even when there was no abstract in the document; this behaviour is sometimes desirable, but not when the abstract only contains comments (that's not valid DocBook: there must be a paragraph or assimilated within the abstract).

2 years agoDocBook: support @ in index when used for sorting.
Thibaut Cuvelier [Sun, 6 Feb 2022 05:20:50 +0000 (06:20 +0100)]
DocBook: support @ in index when used for sorting.

2 years agoAmend 109ea2be4a21ca93d22ab25703b3352a50fbbe3b
Thibaut Cuvelier [Sun, 6 Feb 2022 04:35:07 +0000 (05:35 +0100)]
Amend 109ea2be4a21ca93d22ab25703b3352a50fbbe3b

The Windows code wasn't adapted when a variable was renamed (unlike the Linux one).

2 years agoTools(listFontWithLang.pl): Discard use of deprecated perl-module Getopt::Mixed
Kornel Benko [Sat, 5 Feb 2022 19:04:06 +0000 (20:04 +0100)]
Tools(listFontWithLang.pl): Discard use of deprecated perl-module Getopt::Mixed

According to CTAN, this module is effectively obsolete.
Using Getopt::Long instead now, since it is also part
of the standard Perl distribution.

2 years agoDo not set open_font true if none was open
Juergen Spitzmueller [Fri, 4 Feb 2022 16:24:16 +0000 (17:24 +0100)]
Do not set open_font true if none was open

2 years agoDo not try to pop from an empty stack
Juergen Spitzmueller [Fri, 4 Feb 2022 16:23:52 +0000 (17:23 +0100)]
Do not try to pop from an empty stack

2 years agoTools(listFontWithLang.pl): Only Haramo.*Gothic fonts are sans serif
Kornel Benko [Mon, 31 Jan 2022 12:43:37 +0000 (13:43 +0100)]
Tools(listFontWithLang.pl): Only Haramo.*Gothic fonts are sans serif

(Harano.*Mincho are serif fonts, so don't treat them as 'sans')

2 years agoOops ! fixup 8c047143efbd
Jean-Marc Lasgouttes [Fri, 28 Jan 2022 19:16:38 +0000 (20:16 +0100)]
Oops ! fixup 8c047143efbd

2 years agoCode cleanup in GuiCompleter
Jean-Marc Lasgouttes [Fri, 28 Jan 2022 18:48:18 +0000 (19:48 +0100)]
Code cleanup in GuiCompleter

processUpdateFlags does nothing if the update flags are None==0.

2 years agoRevert 65b674ba4eff.
Pavel Sanda [Fri, 28 Jan 2022 17:12:45 +0000 (18:12 +0100)]
Revert 65b674ba4eff.

We do not for what crash was this fix intended, but we know
that the fix introduced freeze in xhtml exports (e.g. merged manual).

https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg216835.html

2 years agoForce redraw after completion
Jean-Marc Lasgouttes [Fri, 28 Jan 2022 16:13:30 +0000 (17:13 +0100)]
Force redraw after completion

Inside a math inset when completing macro names, it could lead to crashes.

Note that this processUpdateFlags is present when outside of this if() branch.

2 years agoComment: link to Beamer enumitem feature request
Scott Kostyshak [Thu, 27 Jan 2022 22:27:15 +0000 (17:27 -0500)]
Comment: link to Beamer enumitem feature request

2 years agoReplace $${python} directly in the converter constructor
José Matos [Thu, 27 Jan 2022 18:32:57 +0000 (18:32 +0000)]
Replace $${python} directly in the converter constructor

2 years agoFix compilation with gcc-12
José Matos [Thu, 27 Jan 2022 15:37:45 +0000 (15:37 +0000)]
Fix compilation with gcc-12

2 years agoCheck layout type when inserting inset over selection
Jean-Marc Lasgouttes [Mon, 24 Jan 2022 18:19:46 +0000 (19:19 +0100)]
Check layout type when inserting inset over selection

When inserting inset over a selection, the layout is transferred if
the inset covers full paragraphs.

This is not the right policy in the case of environments. Until proper
code is written and tested, limit ourselves to command layouts.

Fixes bug #12251.

2 years agoFix breaking of MANUAL_LABEL paragraph when label is too long
Jean-Marc Lasgouttes [Sun, 23 Jan 2022 19:55:18 +0000 (20:55 +0100)]
Fix breaking of MANUAL_LABEL paragraph when label is too long

Typical example is a Labeling layout which label is an inline equation
larger than the screen. Before this commit, the row would not get
broken at all.

Two parts in the patch:

1/ when breaking the row in shortenIfNeeded, mark the last element as
   AlwaysBreakAfter instead of BreakAfter, in case the next element is
   NoBreakBefore.

2/ when nothing could be done, as last resort keep the first element
   of the row only.

2 years agoNext runtime messages to be ommitted if compiled with clang using flag '-fsanitize'.
Kornel Benko [Sun, 23 Jan 2022 19:13:26 +0000 (20:13 +0100)]
Next runtime messages to be ommitted if compiled with clang using flag '-fsanitize'.

Prevent the return of impossible values for 'enum flags'.
For instance the result of '~Update::Force' at src/BufferView.cpp:3025 without this patch
is '4294967293'.

2 years agobrkstr2str_pos: avoid case where length is negative
Jean-Marc Lasgouttes [Sun, 23 Jan 2022 18:34:11 +0000 (19:34 +0100)]
brkstr2str_pos: avoid case where length is negative

The string that Qt sees is not the original string, since we add
zero-width nonbreaking spaces around it, plus an override character to
force rendering direction. This means that translating positions
between these two representation can be a bit tricky.

We use a max(foo, 0) here to make sure that our intermediate
computation is postive.

Fixes part of bug #12452.

2 years agoFix bug 12459
Juergen Spitzmueller [Sat, 22 Jan 2022 08:30:25 +0000 (09:30 +0100)]
Fix bug 12459

When checking for branch color, take into account that some branches
are defined in the master document only, some only in the child.

2 years agoOmit runtime messages if compiled with clang using flag '-fsanitize'.
Kornel Benko [Fri, 21 Jan 2022 10:02:09 +0000 (11:02 +0100)]
Omit runtime messages if compiled with clang using flag '-fsanitize'.

Setting sufficiently high value allows to use
ColorCode enums for new up to 32000 branch insets.
Previous setting printed messages if using more than 25 new branch insets.
"'ColorCode' ... src/Color.cpp:435:10: runtime error:
load of value 128, which is not a valid value for type"

2 years agoFixup 7485225c: better placement of deph bar
Jean-Marc Lasgouttes [Wed, 19 Jan 2022 17:08:47 +0000 (18:08 +0100)]
Fixup 7485225c: better placement of deph bar

Fixes #12243.

2 years agoMake LABEL_MANUAL label breakable when larger than the screen.
Jean-Marc Lasgouttes [Mon, 17 Jan 2022 16:33:21 +0000 (17:33 +0100)]
Make LABEL_MANUAL label breakable when larger than the screen.

This is what the situation was in 2.3.X.

2 years agoWhen clearing a row, always clear the whole text area width
Jean-Marc Lasgouttes [Mon, 17 Jan 2022 14:14:05 +0000 (15:14 +0100)]
When clearing a row, always clear the whole text area width

It is not a good idea to take into account the horizontal scrolling
that may have happened. For example, this leads to display glitches
when a Description label is larger than text width.

This explains why SingleParUpdate strategy did not work with home/end
on a long row.

2 years agoFix computation of LABEL_MANUAL label separation
Jean-Marc Lasgouttes [Mon, 17 Jan 2022 10:58:49 +0000 (11:58 +0100)]
Fix computation of LABEL_MANUAL label separation

The spacing of Labeling, Description and friends shall be computed
when breaking the row, not when tokenizing it. Indeed, this is the
right place to determine its correct value.

To this end add a new MARGINSPACE row element type.

This allows to remove TextMetrics::labelEnd, which is not used anymore.

2 years agoCompilation fix for Qt4
Jean-Marc Lasgouttes [Thu, 13 Jan 2022 18:34:46 +0000 (19:34 +0100)]
Compilation fix for Qt4

2 years ago Update & solve shortcut conflict in fr.po
jpc [Thu, 13 Jan 2022 16:39:49 +0000 (17:39 +0100)]
     Update & solve shortcut conflict in fr.po

2 years ago Update branch inset inversion explanation
jpc [Thu, 13 Jan 2022 16:33:36 +0000 (17:33 +0100)]
      Update branch inset inversion explanation

2 years agoRevert "Add UI for selecting backing store drawing strategy"
Jean-Marc Lasgouttes [Thu, 13 Jan 2022 16:09:42 +0000 (17:09 +0100)]
Revert "Add UI for selecting backing store drawing strategy"

The need for this variable is too rare to deserve being exposed in UI.

This reverts commit a3fd3a09f1aa0b6003fc3cf033e970bb7547a983.

2 years agoBetter handling of trailing spaces in rows.
Jean-Marc Lasgouttes [Tue, 28 Dec 2021 19:56:57 +0000 (20:56 +0100)]
Better handling of trailing spaces in rows.

When a string is broken at the margin by the Qt algorithm, the space
at which breaking occurred is automatically skipped in width
computation. However, the ending space of the string is taken into
account and is visible for example at paragraph end.

When the trailing space is followed by a displayed inset, then the
space should be skipped too, which means that the width of the last
row element has to be recomputed. For the sake of performance, the
width of the element without trailing spaces is computed in advance in
FontMetrics::breakString.

This "no space" width will be used when trimming a row element of its trailing
spaces instead of the original one.

Additionally, do not trim trailing spaces when the row is flushed.

Fixes bug #12449.

2 years ago#12157 Replace old with new banner in DMG background image
Stephan Witt [Mon, 10 Jan 2022 06:48:54 +0000 (07:48 +0100)]
#12157 Replace old with new banner in DMG background image

2 years ago#12423 fix a focus change problem
Stephan Witt [Sun, 9 Jan 2022 21:33:43 +0000 (22:33 +0100)]
#12423 fix a focus change problem

The search widget triggers a showEvent() in updateTitle() leading to setting the focus to the default push button.
The check in updateTitle() for the need to restore the title avoids superfluous show events and avoids the unwanted focus change.

2 years ago#12434 add GUI debug messages for pinch-to-zoom gesture
Stephan Witt [Sun, 9 Jan 2022 11:29:02 +0000 (12:29 +0100)]
#12434 add GUI debug messages for pinch-to-zoom gesture

2 years agoPinch to zoom fix
Daniel Ramoeller [Wed, 5 Jan 2022 14:27:46 +0000 (15:27 +0100)]
Pinch to zoom fix

Amendment to fix for #12434.

2 years agofix file name
Jean-Marc Lasgouttes [Sat, 8 Jan 2022 22:03:15 +0000 (23:03 +0100)]
fix file name

2 years agoDocument \draw_strategy in release notes
Jean-Marc Lasgouttes [Fri, 7 Jan 2022 16:58:33 +0000 (17:58 +0100)]
Document \draw_strategy in release notes

Also trim some whitespace.

2 years ago#12451 Adjust color cache on change of dark/light mode
Stephan Witt [Wed, 5 Jan 2022 07:26:18 +0000 (08:26 +0100)]
#12451 Adjust color cache on change of dark/light mode

2 years agoSet current cursor font when toggling emphasize
Jean-Marc Lasgouttes [Tue, 4 Jan 2022 17:58:55 +0000 (18:58 +0100)]
Set current cursor font when toggling emphasize

The change actually works for all font toggling with implicit selection.

Fixes bug #12450.

2 years agoAdd new placeholder $${python} to configure
José Matos [Tue, 4 Jan 2022 00:21:34 +0000 (00:21 +0000)]
Add new placeholder $${python} to configure

This ensures that we use a consistent Python interpreter in LyX.

$${python} is replaced by the Python version found.

Users can apply this in preferences and use the same version defined by
LyX.

2 years agoChange LFUN arg from "zoom" to "zoomlevel"
Scott Kostyshak [Mon, 3 Jan 2022 20:53:56 +0000 (15:53 -0500)]
Change LFUN arg from "zoom" to "zoomlevel"

This change is just to be more specific, to help when grepping and
reading.

The idea is from Daniel
(https://www.lyx.org/trac/ticket/12420?replyto=11#comment:11).

Amends cc787967 (and thus 49a17aaa).

2 years agoMake layout2layout compatible with Python 2 and 3
José Matos [Mon, 3 Jan 2022 19:59:42 +0000 (19:59 +0000)]
Make layout2layout compatible with Python 2 and 3

2 years agoRemove temporary code comment.
Stephan Witt [Mon, 3 Jan 2022 09:44:02 +0000 (10:44 +0100)]
Remove temporary code comment.

2 years ago#12434 add event handler for pinch-to-zoom gesture
Stephan Witt [Mon, 3 Jan 2022 06:37:03 +0000 (07:37 +0100)]
#12434 add event handler for pinch-to-zoom gesture

2 years agoFix bug #12447
Enrico Forestieri [Sun, 2 Jan 2022 17:49:44 +0000 (18:49 +0100)]
Fix bug #12447

Due to a thinko at 1fe75ae7 the code was not using the correct index.

2 years agoGuard new code for builds with OS X 10.11 SDK and lesser (part 2).
Stephan Witt [Sat, 1 Jan 2022 17:47:57 +0000 (18:47 +0100)]
Guard new code for builds with OS X 10.11 SDK and lesser (part 2).

2 years agoGuard new code for builds with OS X 10.11 SDK and lesser.
Stephan Witt [Sat, 1 Jan 2022 17:46:32 +0000 (18:46 +0100)]
Guard new code for builds with OS X 10.11 SDK and lesser.

2 years agoCorrect white space.
Stephan Witt [Sat, 1 Jan 2022 15:37:07 +0000 (16:37 +0100)]
Correct white space.

2 years agoQt6 QFontDatabase is a pure static class. Call the member functions directly.
Stephan Witt [Sat, 1 Jan 2022 09:06:07 +0000 (10:06 +0100)]
Qt6 QFontDatabase is a pure static class. Call the member functions directly.

2 years agoGuiGraphics: disable "Read from file" button if the values do not differ
Juergen Spitzmueller [Fri, 31 Dec 2021 13:32:59 +0000 (14:32 +0100)]
GuiGraphics: disable "Read from file" button if the values do not differ

2 years agoGuiGraphics: check more carefully whether we have a changed BB
Juergen Spitzmueller [Fri, 31 Dec 2021 13:32:13 +0000 (14:32 +0100)]
GuiGraphics: check more carefully whether we have a changed BB

2 years agoGuiGraphics: read the BB values also for new graphics
Juergen Spitzmueller [Fri, 31 Dec 2021 13:30:09 +0000 (14:30 +0100)]
GuiGraphics: read the BB values also for new graphics

that aren't in the cache yet.

2 years agoFix font inside footnote inset
Jean-Marc Lasgouttes [Fri, 3 Dec 2021 11:16:40 +0000 (12:16 +0100)]
Fix font inside footnote inset

An inset that resets its font (like Footnote) does not care at all
about enclosing font. Therefore the real starting point is the class
default font. This avoid cases where the footnote contents is forced
to \normalsize.

It turns out that the Greyedout note inset, did inherit font but was
declared as not doing it. This commmit changes the definition by
adding \normalfont\normalsize so that no inheritance happens.

Note that actually \normalfont resets everything but the font size.
This does not matter for footnote (which has its own font size) and
greyedout (which is fixed now), but may matter elsewhere. Also, I do
not know what the situation with HTML is.

2 years agoReduce the mix of python versions in configure.py in case of running it with python3
Stephan Witt [Fri, 31 Dec 2021 12:40:22 +0000 (13:40 +0100)]
Reduce the mix of python versions in configure.py in case of running it with python3

2 years agoAvoid python based lilypond-book detection if it's not needed - e.g. on Mac
Stephan Witt [Fri, 31 Dec 2021 10:54:14 +0000 (11:54 +0100)]
Avoid python based lilypond-book detection if it's not needed - e.g. on Mac

2 years agoAdd comment regarding fsanitize + Clang issue
Scott Kostyshak [Thu, 30 Dec 2021 16:37:12 +0000 (11:37 -0500)]
Add comment regarding fsanitize + Clang issue

We could not figure out the root issue, or at least not to the point
where we felt changing this code considering we could not trigger
any bug from a user perspective.

For now, we just add a comment in the code.

For more information, see our ML discussion here:

  https://www.mail-archive.com/search?l=mid&q=20211227113249.53bf5a63%40admin1-desktop

2 years agoUpdate sk.po
Kornel Benko [Wed, 29 Dec 2021 18:14:41 +0000 (19:14 +0100)]
Update sk.po

2 years agode.po
Juergen Spitzmueller [Wed, 29 Dec 2021 17:00:45 +0000 (18:00 +0100)]
de.po

2 years agoChange "Show Zoom Value" to "Show Zoom Level"
Scott Kostyshak [Wed, 29 Dec 2021 16:45:01 +0000 (11:45 -0500)]
Change "Show Zoom Value" to "Show Zoom Level"

See discussion at #12420.

Amends 49a17aaa.

2 years agoReg tests for language switching
Scott Kostyshak [Wed, 29 Dec 2021 15:17:53 +0000 (10:17 -0500)]
Reg tests for language switching

Use cases from #12352. The files correspond to
mwe-remove-bottom.23.lyx and mwe-remove-top.23.lyx. The only
differences are that I changed to FreeSans and FreeSerif for the
fonts.

2 years agoFix language environment with environments at inset begin/end (#12352)
Juergen Spitzmueller [Wed, 29 Dec 2021 15:07:40 +0000 (16:07 +0100)]
Fix language environment with environments at inset begin/end (#12352)

2 years agoRemove unused local variable
Stephan Witt [Wed, 29 Dec 2021 14:32:59 +0000 (15:32 +0100)]
Remove unused local variable

2 years agoFix TOC filtering with slashes (#12359)
Juergen Spitzmueller [Wed, 29 Dec 2021 13:43:52 +0000 (14:43 +0100)]
Fix TOC filtering with slashes (#12359)

Seems the * wildcard does not match these.

2 years agoUse Noto Sans Tibetan rather than Serif
Juergen Spitzmueller [Wed, 29 Dec 2021 12:44:40 +0000 (13:44 +0100)]
Use Noto Sans Tibetan rather than Serif

The sans is more complete and also seems to be more widely distributed.

2 years agoWhen row if empty, set endpos correctly.
Jean-Marc Lasgouttes [Tue, 28 Dec 2021 17:48:55 +0000 (18:48 +0100)]
When row if empty, set endpos correctly.

2 years agoUpdate sk.po
Kornel Benko [Tue, 28 Dec 2021 16:35:18 +0000 (17:35 +0100)]
Update sk.po

2 years agoStyle
Juergen Spitzmueller [Tue, 28 Dec 2021 08:42:31 +0000 (09:42 +0100)]
Style

2 years agoStyle
Juergen Spitzmueller [Tue, 28 Dec 2021 08:42:31 +0000 (09:42 +0100)]
Style

2 years agoAllow toggling of Zoom elements without buffer
Scott Kostyshak [Mon, 27 Dec 2021 18:40:56 +0000 (13:40 -0500)]
Allow toggling of Zoom elements without buffer

The elements are shown without a buffer so it's nice to be able to
toggle without one as well.

2 years agoChange label "Show Zoom" to "Show Zoom Value"
Scott Kostyshak [Mon, 27 Dec 2021 18:40:13 +0000 (13:40 -0500)]
Change label "Show Zoom" to "Show Zoom Value"

2 years agoHide the zoom in the status bar from the status bar context menu
Daniel Ramoeller [Tue, 2 Nov 2021 08:12:03 +0000 (09:12 +0100)]
Hide the zoom in the status bar from the status bar context menu

Fix for #12420.

2 years agoTypo
Jean-Marc Lasgouttes [Mon, 27 Dec 2021 18:38:10 +0000 (19:38 +0100)]
Typo

2 years agoctests: uninvert a DocBook export
Scott Kostyshak [Mon, 27 Dec 2021 16:17:29 +0000 (11:17 -0500)]
ctests: uninvert a DocBook export

The export now succeeds, likely due to Jürgen's improvements at
2eaf30c5.

2 years agoInvert two DocBook + LilyPond exports
Scott Kostyshak [Mon, 27 Dec 2021 16:09:21 +0000 (11:09 -0500)]
Invert two DocBook + LilyPond exports

This is due to an upstream issue:

  https://gitlab.com/lilypond/lilypond/-/issues/6187

For ML discussion, see here:

  https://www.mail-archive.com/search?l=mid&q=20211102011304.dmrcr7gjpxxwpd4o%40poole

2 years agoDo not protect \\ as of LaTeX 2021/06/01
Juergen Spitzmueller [Mon, 27 Dec 2021 15:31:09 +0000 (16:31 +0100)]
Do not protect \\ as of LaTeX 2021/06/01

2 years agoReg test for protect: xymatrix in figure caption
Scott Kostyshak [Mon, 27 Dec 2021 15:26:04 +0000 (10:26 -0500)]
Reg test for protect: xymatrix in figure caption

Use case from #6243.

2 years agoAdd FIXME
Juergen Spitzmueller [Mon, 27 Dec 2021 11:09:02 +0000 (12:09 +0100)]
Add FIXME

2 years agoRemove remaining math cprotection test.
Juergen Spitzmueller [Mon, 27 Dec 2021 10:52:25 +0000 (11:52 +0100)]
Remove remaining math cprotection test.

We'll see if someone comes up with a reproducible case, and if so,
whether ordinary protection works here as well.

See #6243

2 years ago\protect xymatrix in fragile context
Juergen Spitzmueller [Mon, 27 Dec 2021 10:42:30 +0000 (11:42 +0100)]
\protect xymatrix in fragile context

(\cprotect'ion not needed then).

2 years ago\protect substack in fragile context
Juergen Spitzmueller [Mon, 27 Dec 2021 10:37:59 +0000 (11:37 +0100)]
\protect substack in fragile context

(\cprotect'ion not needed then).

2 years agoRemove obsolete \cprotect'ion (#6243)
Juergen Spitzmueller [Mon, 27 Dec 2021 09:24:58 +0000 (10:24 +0100)]
Remove obsolete \cprotect'ion (#6243)

2 years agoWhen pasting text, keep line breaks when "parbreak is newline"
Jean-Marc Lasgouttes [Thu, 18 Nov 2021 15:36:29 +0000 (16:36 +0100)]
When pasting text, keep line breaks when "parbreak is newline"

This is much easier for listings, ERT or Verbatim.

Fixes bug #8026.

2 years agoDocBook: more explicit comment.
Thibaut Cuvelier [Sun, 26 Dec 2021 01:26:50 +0000 (02:26 +0100)]
DocBook: more explicit comment.

2 years agoDocBook: update basic.xml for the latest MathML and DocBook changes.
Thibaut Cuvelier [Sun, 26 Dec 2021 01:24:23 +0000 (02:24 +0100)]
DocBook: update basic.xml for the latest MathML and DocBook changes.

2 years agoAmend c734504d to fix a very bad nullptr dereferencing...
Thibaut Cuvelier [Sun, 26 Dec 2021 01:24:06 +0000 (02:24 +0100)]
Amend c734504d to fix a very bad nullptr dereferencing...

2 years agoRemove code that has been commented out for a long time.
Thibaut Cuvelier [Sun, 26 Dec 2021 01:14:34 +0000 (02:14 +0100)]
Remove code that has been commented out for a long time.

2 years agoctests: invert a docbook test for a cprotect case
Scott Kostyshak [Fri, 24 Dec 2021 02:24:28 +0000 (21:24 -0500)]
ctests: invert a docbook test for a cprotect case

The strange example file does not make sense for Docbook, as
described by Thibaut on the ML here:

  https://www.mail-archive.com/search?l=mid&q=CAK0LPyiHCsUMo0ZCbFrRBRTCD7G-rhw-z8G1of2kFGebBLddtA%40mail.gmail.com

2 years agoDocBook: in InsetFloat, detect the presence of a caption by generating it.
Thibaut Cuvelier [Fri, 24 Dec 2021 00:08:24 +0000 (01:08 +0100)]
DocBook: in InsetFloat, detect the presence of a caption by generating it.

This catches the case where the caption only contains a comment, as in export/export/latex/lyxbugs-resolved/cprotect/9313-comment-in-figure-float-caption. No duplicate work is performed to ensure the same level of performance as before.

2 years agoReg test for cprotect: float in par environment
Scott Kostyshak [Thu, 23 Dec 2021 20:10:26 +0000 (15:10 -0500)]
Reg test for cprotect: float in par environment

File from #7779.

2 years agoReg test for cprotect: comment in figure caption
Scott Kostyshak [Thu, 23 Dec 2021 03:45:39 +0000 (22:45 -0500)]
Reg test for cprotect: comment in figure caption

File from #9313.

2 years agoRegression test for cprotect, #7116
Scott Kostyshak [Thu, 23 Dec 2021 02:58:56 +0000 (21:58 -0500)]
Regression test for cprotect, #7116

Start a new directory of cprotect tests. There are many situations
where cprotect is needed so we can add files covering various
situations as we find them.

This particular test covers the case of special characters in URL
insets in footnotes.

2 years agoFindAdv: Added handling of some missing Hebrew characters
Kornel Benko [Tue, 21 Dec 2021 13:16:49 +0000 (14:16 +0100)]
FindAdv: Added handling of some missing Hebrew characters

2 years agoDo not repeatedly call main_font_encoding()
Juergen Spitzmueller [Mon, 20 Dec 2021 11:09:12 +0000 (12:09 +0100)]
Do not repeatedly call main_font_encoding()

This method impacts on performance and we store the value anyway in
the output params.

2 years agoParagraph::needsCProtection(): use inset list
Juergen Spitzmueller [Sun, 19 Dec 2021 14:39:49 +0000 (15:39 +0100)]
Paragraph::needsCProtection(): use inset list

rather than checking each pos whether it's an inset or not.

This was a significant performance bottleneck (particularly getInset()
itself seems slow).

2 years agoAdd UI for selecting backing store drawing strategy
Jean-Marc Lasgouttes [Fri, 17 Dec 2021 10:12:54 +0000 (11:12 +0100)]
Add UI for selecting backing store drawing strategy

The checkbox is hidden when backing store is enforced (wayland,
macOS). In practice, only X11 and Windows users will see it ; I only
have evidence of X11 people needing it, I can hide it for Windows
users too if necessary.

Fixes bug #12119.

2 years agoAdd lyxrc option to force the use of backing store
Jean-Marc Lasgouttes [Thu, 16 Dec 2021 11:38:19 +0000 (12:38 +0100)]
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

2 years agoAmend bea7ef04e (find's auto-wrap by default)
Scott Kostyshak [Thu, 16 Dec 2021 01:48:20 +0000 (20:48 -0500)]
Amend bea7ef04e (find's auto-wrap by default)

The default in the .ui is not considered in
GuiSearchWidget::restoreSession(), which sets a hard-coded default
if the stored setting is not found in the session file.

I'll start an ML discussion for whether the code in restoreSession()
should use the ui's default if the setting is not found in the
session.

2 years agoAvoid duplication of words on screen
Jean-Marc Lasgouttes [Wed, 15 Dec 2021 10:19:18 +0000 (11:19 +0100)]
Avoid duplication of words on screen

When giving up splitting a word sequence because it is not enough to
make the row short enough, make sure to clean up properly.

2 years agoImproved Qt framework configuration detection on macOS, add QtCore5Compat headers...
Stephan Witt [Sun, 12 Dec 2021 21:24:23 +0000 (22:24 +0100)]
Improved Qt framework configuration detection on macOS, add QtCore5Compat headers to configure based includes

2 years agoFix an overloaded-virtual warning for type mismatch of event parameter (Qt6)
Stephan Witt [Thu, 9 Dec 2021 20:58:14 +0000 (21:58 +0100)]
Fix an overloaded-virtual warning for type mismatch of event parameter (Qt6)