]> git.lyx.org Git - features.git/log
features.git
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)

2 years agolanguages test file: Use new Tibetan font name
Scott Kostyshak [Thu, 9 Dec 2021 20:16:07 +0000 (15:16 -0500)]
languages test file: Use new Tibetan font name

Noto Sans Tibetan was not actually a sans font. On newer systems the
font is now Noto Serif Tibetan.

See, e.g., the package 'fonts-noto-core' in Ubuntu 21.04.

This change also fixes compilation of
supported-languages_polyglossia-XeTeX.lyx on Ubuntu 21.10.

2 years agoFix endless loop when breaking text
Jean-Marc Lasgouttes [Thu, 9 Dec 2021 15:43:16 +0000 (16:43 +0100)]
Fix endless loop when breaking text

For some reason, Qt can break strings before the first character
(although we try to prevent that). The code was not prepared to that,
now it is.

Remove a forgotten debug statement.

2 years agoctests: log a fixed issue (fr Linguistics.lyx)
Scott Kostyshak [Thu, 9 Dec 2021 04:03:43 +0000 (23:03 -0500)]
ctests: log a fixed issue (fr Linguistics.lyx)

2 years agofr/Linguistics.lyx: fixes
Juergen Spitzmueller [Wed, 8 Dec 2021 08:49:23 +0000 (09:49 +0100)]
fr/Linguistics.lyx: fixes

* Fix up markup in and localize examples
* Remove local layout from lyx2lyx conversion

2 years agoMathML: remove redundant mrow in InsetMathScript.
Thibaut Cuvelier [Wed, 8 Dec 2021 01:11:48 +0000 (02:11 +0100)]
MathML: remove redundant mrow in InsetMathScript.

https://www.lyx.org/trac/attachment/ticket/12221/0006-amends-to-a579128c-a68e9793-a68e9793.patch by lynx

2 years agoMathML: share some code for XArrow.
Thibaut Cuvelier [Wed, 8 Dec 2021 01:02:39 +0000 (02:02 +0100)]
MathML: share some code for XArrow.

2 years agoMathML: refactor the XArrow mappings as maps.
Thibaut Cuvelier [Wed, 8 Dec 2021 00:53:56 +0000 (01:53 +0100)]
MathML: refactor the XArrow mappings as maps.

2 years agoMathML: allow XArrow to stretch.
Thibaut Cuvelier [Wed, 8 Dec 2021 00:36:24 +0000 (01:36 +0100)]
MathML: allow XArrow to stretch.

Based on https://www.lyx.org/trac/ticket/12221#comment:10
by lynx

2 years agosymbols: update HTML entities and Unicode encodings for Greek letter variations.
Thibaut Cuvelier [Mon, 6 Dec 2021 21:35:26 +0000 (22:35 +0100)]
symbols: update HTML entities and Unicode encodings for Greek letter variations.

2 years agosymbols: don't encode vertical bars as nonexistent HTML entities.
Thibaut Cuvelier [Mon, 6 Dec 2021 21:19:36 +0000 (22:19 +0100)]
symbols: don't encode vertical bars as nonexistent HTML entities.

Excerpt from https://www.lyx.org/trac/ticket/12221#comment:11

Created by lynx

2 years agoRestore correct version check for AA_UseHighDpiPixmaps - amend change ae56fb6171
Stephan Witt [Tue, 7 Dec 2021 22:01:47 +0000 (23:01 +0100)]
Restore correct version check for AA_UseHighDpiPixmaps - amend change ae56fb6171

2 years agoctests: uninvert Seminar tests
Scott Kostyshak [Tue, 7 Dec 2021 18:25:39 +0000 (13:25 -0500)]
ctests: uninvert Seminar tests

These exports now succeed on an updated TL21 installation.

2 years agoctests: log fixed upstream polyglossia issues
Scott Kostyshak [Tue, 7 Dec 2021 18:03:39 +0000 (13:03 -0500)]
ctests: log fixed upstream polyglossia issues

Thanks to Jürgen for fixing these upstream Polyglossia regressions.

2 years agoFix the way the top and bottom selection are drawn
Jean-Marc Lasgouttes [Tue, 7 Dec 2021 17:15:01 +0000 (18:15 +0100)]
Fix the way the top and bottom selection are drawn

When a selection extends on more than a row, the space between the two
rows should always be painted in full. Otherwise, with layouts like
Chapter, the "Chapter" label may seem selected in part.

2 years agoMerge branch 'breakrows'
Jean-Marc Lasgouttes [Tue, 7 Dec 2021 16:06:21 +0000 (17:06 +0100)]
Merge branch 'breakrows'

With this merge, the way paragraphs are typeset changes. Paragraphs
are first tolenized as row elements, and these elements are then
broken into separate rows as needed to fit the margins. This allows to
reduce the amount of metrics computation and make LyX much faster in
the case of large insets.

Moreover, the code relies more on RofFlags enum, which desribes how an
inset or a row element should be typset. This aspect will be extended
in the future.

Some user for whom performance is very bad (which I cannot reproduce
unfortunately) have reported a 4-fold speedup. In general cases, the
speedup will be less impressive but still noticeable.

Related to bugs #12297 and #5861.

2 years agoOne less thing to do in PAINTING_ANALYSIS
Jean-Marc Lasgouttes [Tue, 12 Oct 2021 09:33:23 +0000 (11:33 +0200)]
One less thing to do in PAINTING_ANALYSIS

2 years agoIncrease metrics cache maximal size
Jean-Marc Lasgouttes [Tue, 5 Oct 2021 13:52:31 +0000 (15:52 +0200)]
Increase metrics cache maximal size

Increase the maximal size of the breakString cache (to compute where
to break lines) from 512kB to 10MB. This has a big impact of cache
hits on large file like the example in #12297, which is now 99%. On
this example the time taken by breakString decreases from 33.5us to
2.4us.

The string width cache has been increased fro 512kB to 1MB, but this
does not make such a big difference.

Additionally, comments and variable names have been improved.

Related to bug #12297.

2 years agoImprove row flushing
Jean-Marc Lasgouttes [Wed, 22 Sep 2021 13:09:26 +0000 (15:09 +0200)]
Improve row flushing

Add new row flags Flush and FlushBefore to let insets indicate whether
they cause flushing of current row (eg. newline) or of previous row
(e.g. display insets).

2 years agoSimplify setting of RTL in rows
Jean-Marc Lasgouttes [Wed, 22 Sep 2021 11:17:46 +0000 (13:17 +0200)]
Simplify setting of RTL in rows

Set RTL status at row creation, which allows to remove a parameter from
cleanupRow.

2 years agoBreak multi-row strings in one pass
Jean-Marc Lasgouttes [Mon, 6 Sep 2021 12:52:42 +0000 (14:52 +0200)]
Break multi-row strings in one pass

Replace FontMetrics::breakAt, which returned the next break point,
with FontMetrics::breakString, which returns a vector of break points.
To this end, an additional parameter gives the available width for
next rows.

Rename various variables and methods accordingly. Factor the code in
breakString_helper to be more manageable.

Adapt Row::Element::splitAt to return a bool on sucess and provide
remaining row elements in a vector. The width noted above has been
added as parameters.

Rename the helper function splitFrom to moveElements and rewrite the
code to be more efficient.

Remove type of row element INVALID, which is not needed anymore.

The code in TextMetrics::breakParagraph is now much simpler.

In Row::finalize, remove the code that computed inconditionnally the
current element size, and make sure that this width will be computed
in all code paths of Row::Element::splitAt.

2 years agoAdd operator<< for Row::Elements
Jean-Marc Lasgouttes [Mon, 20 Sep 2021 15:32:18 +0000 (17:32 +0200)]
Add operator<< for Row::Elements

This is useful for debugging.

2 years agoFix setting of row pos/endpos (overlapping rows)
Jean-Marc Lasgouttes [Thu, 2 Sep 2021 13:16:28 +0000 (15:16 +0200)]
Fix setting of row pos/endpos (overlapping rows)

In TextMetrics::breakParagraph, get rid of the fragile `pos' local
variable, which was not correctly updated. Rely on the endpos of the
last element in row instead.

Rewrite cleanupRow to rely on the endpos of last the row element to
set row endpos, instead of a `pos' parameter.

2 years agoGet rid of need_new_row boolean in breakParagraph
Jean-Marc Lasgouttes [Wed, 1 Sep 2021 14:54:28 +0000 (16:54 +0200)]
Get rid of need_new_row boolean in breakParagraph

Instead of having breakParagraph decide when breaking a row is
necessary, let Row::shortenIfNeeded set the row_flag of the last
element to request a row break. This was already done in splitAt.

This is in preparation of splitAt splitting in more than two elements.

2 years agoCentralize the code that removes trailing spaces from end row element.
Jean-Marc Lasgouttes [Tue, 31 Aug 2021 17:23:55 +0000 (19:23 +0200)]
Centralize the code that removes trailing spaces from end row element.

Move to Row::Element::rtrim the code in Row::shortenIfNeeded that
removes trailing spaces from last element in row, so that it can be
called when actually breaking a row.

Fixes bug found by Kornel.

2 years agoHandle the case where breakAt cuts after trailing space
Jean-Marc Lasgouttes [Tue, 31 Aug 2021 13:58:56 +0000 (15:58 +0200)]
Handle the case where breakAt cuts after trailing space

In this case, the extra element returned should empty but valid. The
row flag BreakAfter is set to indicate that we have a break there
(this principle will be used more generally in a forthcoming commit).

To detect that we cut at the trailing space, it is necessary to rely
on the difference between QTextLine::horizontalAdvance() and
QTextLine::naturalTextWidth() when the flag
QTextOption::IncludeTrailingSpaces is used: the trailing space is
taken into account in the later, but not in the former.

Somme comments have been added to make code intent clearer.

2 years agoWorkaround for Qt 4
Jean-Marc Lasgouttes [Mon, 30 Aug 2021 13:48:44 +0000 (15:48 +0200)]
Workaround for Qt 4

At least with Qt 4.8.7 on Ubuntu 16.04, QTextLine::lineWidth() can
return a bogus value, at least with Courier font. One hypothesis is
that the invisible characters that we use in breakAt_helper are given
a non-null width.

Work around it, although the exact bug has not been pinpointed.

2 years agoLast step of transition: use sortenIfNeeded again.
Jean-Marc Lasgouttes [Mon, 19 Jul 2021 22:07:13 +0000 (00:07 +0200)]
Last step of transition: use sortenIfNeeded again.

Change semantics of Row::shortenIfNeeded: instead of breaking the row
and returning a boolean, it returns the list of row elements that have
been removed (or broken) from the row. The logic of the method remains
the same.

Use shortenIfNeeded in breakParagraph. This was the last missing block.

Remove Row::breakAt and the old breakRow. Only bugs remain now :)

2 years agoImplement handling of row_flags for row breaking
Jean-Marc Lasgouttes [Sat, 17 Jul 2021 23:09:33 +0000 (01:09 +0200)]
Implement handling of row_flags for row breaking

To this end, add the helper function needsRowBreak which computes the
effect of two consecutive row flags. This function implements the
priorities described in RowFlags.h.

This function is called with the relevant flags, or NoBreak* when at
boundaries and updates need_new_row.

Some common code is factored in a new cleanupRow() helper.

2 years agoChange the way the element's width is updated.
Jean-Marc Lasgouttes [Sat, 17 Jul 2021 21:16:15 +0000 (23:16 +0200)]
Change the way the element's width is updated.

Remove the code that computed the width every 30 characters (yay!).
Make sure that finalizeLast() is called after inserting a row element in
a row in breakParagraph.

2 years agoIntroduce helper template to simplify breakParagraph code
Jean-Marc Lasgouttes [Sat, 17 Jul 2021 00:31:49 +0000 (02:31 +0200)]
Introduce helper template to simplify breakParagraph code

This is a semi-generic iterator for iterating over a container and
pretend that we add elements to it along the way.

2 years agoA set of easy fixes and missing features
Jean-Marc Lasgouttes [Thu, 15 Jul 2021 22:10:25 +0000 (00:10 +0200)]
A set of easy fixes and missing features

* show changebar when end of paragraph is changed.

* when row is finished, set endpos and right_boundary

* handle bidi.

2 years agoUse the new tokenizing and breaking code instead of breakRow.
Jean-Marc Lasgouttes [Tue, 13 Jul 2021 22:48:03 +0000 (00:48 +0200)]
Use the new tokenizing and breaking code instead of breakRow.

2 years agoBreak the paragraph's big row according to margins
Jean-Marc Lasgouttes [Tue, 13 Jul 2021 22:47:42 +0000 (00:47 +0200)]
Break the paragraph's big row according to margins

Still many features missing:
- handle insets that break rows (display math, newline, ...)
- handle rows that are too long by replacing the single call to
  breakAt with a call to a reworked Row::shortenIfNeeded.
- some easy things at the end of breakRow (bidi text, etc.).

2 years agoImplement Row::Element::row_flags
Jean-Marc Lasgouttes [Sun, 11 Jul 2021 22:07:59 +0000 (00:07 +0200)]
Implement Row::Element::row_flags

Move the enum definition RowFlags in its own include file, to avoid
loading Inset.h. Document it more thoroughly.

Rename RowAfter to AlwaysBreakAfter.

Add CanBreakInside (rows that can be themselves broken). This allow to
differentiate elements before bodyPos() and allows to remove a
parameter to shortenIfNeeded().

Make the Inset::rowFlags() method return int instead of RowFlags, as
should be done for all the bitwise flags. Remove the hand-made bitwise
operators.

Set R::E::row_flags when creating elements.
* INSET elements use the inset's rowFLags();
* virtual element forbid breaking before them, and inherit the *After
  flags from the previous element of the row;
* STRING elements usr CanBreakInside, except before bodyPos.

More stuff may be added later.

2 years agoCreate new method TM::tokenizeParagraph
Jean-Marc Lasgouttes [Sun, 11 Jul 2021 13:19:37 +0000 (15:19 +0200)]
Create new method TM::tokenizeParagraph

This contains large parts of breakRow, but creates a unique row for the paragraph.

The parts taken or not in redoParagraph are annotated.

The new method is not used yet.

2 years agoSmall Row cleanups
Jean-Marc Lasgouttes [Sun, 11 Jul 2021 13:33:33 +0000 (15:33 +0200)]
Small Row cleanups

Move declaration of RowList to Row.h

Move initialization of POD members of Row and Row::Element to declaration.

Make method isVirtual() depend on type.

Add new row element type INVALID and method isValid()

Make methods R::E::left/right_pos inline.

Add method R::E::splitAt() that returns an element containing the
remaining stuff, or an invalid element if nothing was split. breakAt
is now a simple wrapper around this function.

Add method R::push_back().

2 years agoChange FontMetrics::breakAt to return a position
Jean-Marc Lasgouttes [Sat, 10 Jul 2021 21:21:27 +0000 (23:21 +0200)]
Change FontMetrics::breakAt to return a position

Since we intend to break the row element in two, it is not good to
truncate the string too early.

Moreover, the row element width is now set at this point, even if no
breaking occurs.

2 years agoQt6 pixmaps are always HiDPI - avoid deprecate warning for setAttribute
Stephan Witt [Tue, 7 Dec 2021 09:02:05 +0000 (10:02 +0100)]
Qt6 pixmaps are always HiDPI - avoid deprecate warning for setAttribute

2 years agoAutomate Qt major version detection in macOS build script
Stephan Witt [Mon, 6 Dec 2021 06:51:26 +0000 (07:51 +0100)]
Automate Qt major version detection in macOS build script

2 years agoCare for consistent compiler flag values of macosx-version-min with ObjC and C++
Stephan Witt [Mon, 6 Dec 2021 06:46:35 +0000 (07:46 +0100)]
Care for consistent compiler flag values of macosx-version-min with ObjC and C++

2 years agoctests: log a fixed issue
Scott Kostyshak [Mon, 6 Dec 2021 03:07:06 +0000 (22:07 -0500)]
ctests: log a fixed issue

2 years agoDocBook: implement margin/sidenotes in Tufte.
Thibaut Cuvelier [Sun, 5 Dec 2021 21:53:36 +0000 (22:53 +0100)]
DocBook: implement margin/sidenotes in Tufte.

2 years agoDocBook: recognise Tufte's float types (margin*).
Thibaut Cuvelier [Sun, 5 Dec 2021 21:44:17 +0000 (22:44 +0100)]
DocBook: recognise Tufte's float types (margin*).

2 years agoQt 5.12.x requires at least MacOS 10.12
Stephan Witt [Sun, 5 Dec 2021 21:38:42 +0000 (22:38 +0100)]
Qt 5.12.x requires at least MacOS 10.12

2 years agoAmend change d1d22a1433e503c3f36aa982c2a7ec9d1f79273d - configure Mac compiler flags...
Stephan Witt [Sun, 5 Dec 2021 21:36:36 +0000 (22:36 +0100)]
Amend change d1d22a1433e503c3f36aa982c2a7ec9d1f79273d  - configure Mac compiler flags on Mac only

2 years agoInsetMathHull: fix column alignment for MathML.
Thibaut Cuvelier [Sun, 5 Dec 2021 19:11:47 +0000 (20:11 +0100)]
InsetMathHull: fix column alignment for MathML.

https://www.lyx.org/trac/attachment/ticket/12221/0005-mathmlize-mathhull-checks-for-alignment.patch by lynx

2 years agoMathStream: better order for the calls to tab() and cr().
Thibaut Cuvelier [Sun, 5 Dec 2021 18:15:06 +0000 (19:15 +0100)]
MathStream: better order for the calls to tab() and cr().

Part of https://www.lyx.org/trac/attachment/ticket/12221/0006-amends-to-a579128c-a68e9793-a68e9793.patch by lynx.

2 years agoSimilar fixes as 946ba7781c179752e450e98a0c356372323100a6
Thibaut Cuvelier [Sun, 5 Dec 2021 17:54:05 +0000 (18:54 +0100)]
Similar fixes as 946ba7781c179752e450e98a0c356372323100a6

2 years agoAmend a68e9793: duplicate tag delimiter end.
Thibaut Cuvelier [Sun, 5 Dec 2021 17:48:27 +0000 (18:48 +0100)]
Amend a68e9793: duplicate tag delimiter end.

2 years agointroduce LSMinimumSystemVersion for Mac package with automatic Qt-version based...
Stephan Witt [Sun, 5 Dec 2021 10:10:11 +0000 (11:10 +0100)]
introduce LSMinimumSystemVersion for Mac package with automatic Qt-version based detection plus configure option to choose it manually

2 years agoTypo in doc: capitalize "t" in "EndLabeltype"
Scott Kostyshak [Sat, 4 Dec 2021 20:17:36 +0000 (15:17 -0500)]
Typo in doc: capitalize "t" in "EndLabeltype"

2 years agoPrevent Outliner crash due to emptied toc value
Juergen Spitzmueller [Sat, 4 Dec 2021 16:53:03 +0000 (17:53 +0100)]
Prevent Outliner crash due to emptied toc value

This might need a more profound fix in the long term, see
https://marc.info/?l=lyx-devel&m=163588729224679&w=2

2 years agoWhen inserting text character in mathed, group in same \text when possible.
Jean-Marc Lasgouttes [Sun, 28 Nov 2021 13:33:45 +0000 (14:33 +0100)]
When inserting text character in mathed, group in same \text when possible.

When inserting € in a math cell, it is put in a text inset and the
cursor leaves the inset. However, inserting ¤ then leads to
\text{€}\text{¤}.

Therefore, try to see if there is a previous \text inset that can be
recycled and insert the new inset there in this case, leading to
\text{€¤}.

Fixes bug #11979.

2 years agoInsertTableWidget support for dark mode and improved resizing
Daniel Ramoeller [Mon, 22 Nov 2021 09:15:38 +0000 (10:15 +0100)]
InsertTableWidget support for dark mode and improved resizing

Fix for bug #12438.

2 years agoWhitespace
Juergen Spitzmueller [Thu, 25 Nov 2021 17:47:23 +0000 (18:47 +0100)]
Whitespace

2 years agoLet paragraph::requestSpellcheck() consider contained insets
Juergen Spitzmueller [Thu, 25 Nov 2021 16:04:58 +0000 (17:04 +0100)]
Let paragraph::requestSpellcheck() consider contained insets

if "check whole paragraph" has been requested.