Thibaut Cuvelier
a579128c06
DocBook: for MathML, mrow removal for more cases
...
By lynx: https://www.lyx.org/trac/attachment/ticket/12221/0003-tag-insertion-unification-for-bold-char-delim-dots-exfunc-.patch
2021-05-25 03:29:20 +02:00
Thibaut Cuvelier
5eddfe509b
DocBook: for MathML, refactor InsetMathScript::mathmlize to improve readability and lower redundancy.
2021-05-25 03:21:21 +02:00
Thibaut Cuvelier
1cbac6fcb4
DocBook: for MathML, mrow removal from decoration, script, frac
...
By lynx: https://www.lyx.org/trac/attachment/ticket/12221/0002-mrow-removal-from-decoration-script-frac.patch
2021-05-25 03:15:48 +02:00
Thibaut Cuvelier
e4996026b7
DocBook: for MathML, use display="block" for non-inline formulae.
...
By lynx:
https://www.lyx.org/trac/attachment/ticket/12221/0001-docbook-display-equation.patch
2021-05-25 02:34:04 +02:00
Thibaut Cuvelier
7a210e4c9a
DocBook: missing signal connection in GUI for MathML prefix.
2021-05-25 00:00:08 +02:00
Thibaut Cuvelier
de77854275
DocBook: fix MathML prefix in root tag.
...
Patch written by lynx: https://www.lyx.org/trac/ticket/12229
2021-05-24 23:55:11 +02:00
Thibaut Cuvelier
39a9e370c7
DocBook: fix handling of footnotes.
...
A <para> was missing inside starting at 441c6a93
.
2021-05-24 23:36:37 +02:00
Daniel Ramoeller
c6c6576515
Open backup files via file open dialog
...
Fix for bug #12266 .
Also: Option to open any files as is standard in other apps.
2021-05-20 13:24:37 -04:00
Jean-Marc Lasgouttes
67c85f54c4
Fixup 9f92fc92
: improve FIXME in SystemcallPrivate::startProcess
...
I wanted to remove the test Qt >= 5.15, but now I see that it is
not possible because of QProcess::splitCommand.
Neverthless, the best would be to change parsecmd.
2021-05-20 13:20:20 +02:00
Juergen Spitzmueller
70bcffca9c
Add missing counter code
2021-05-07 13:38:43 +02:00
Juergen Spitzmueller
6431a9ab13
Make Dock Widgets SubWindows in general ( #12170 )
2021-05-06 17:56:53 +02:00
Juergen Spitzmueller
67762aaf08
Allow counter insets in pass thru
2021-05-06 14:44:42 +02:00
Juergen Spitzmueller
9586c51c3f
GuiSearch: prevent Tab key to switch to work area (part of #12170 )
...
QWidget::focusNextPrevChild() passes over to the parent (which is the
work area here) if the current window is not a dialog (isWindow()) or
a sub-window (window flag Qt::SubWindow).
We set the latter here to prevent this unwanted behavior.
Let's see if there are side-effects.
2021-05-06 12:27:38 +02:00
Juergen Spitzmueller
fb8b484b7f
Tab order for search pane
2021-05-06 12:25:32 +02:00
Jean-Marc Lasgouttes
e4b80698be
Cache icons of dynamic menu buttons
...
The current code would load the same icons again and again and LyX
memory footprint would grow.
Tentative fixe to bug #12271 .
2021-05-05 14:53:25 +02:00
Scott Kostyshak
5d96ee69eb
Revert "Revert "Only set dummy X11 selection if we do not own it""
...
This reverts commit 1b704b6267
.
(the initial reversion was done unintentionally)
2021-05-04 12:34:35 -04:00
Scott Kostyshak
423ddb1199
Revert "Revert "Fix commented out code""
...
This reverts commit 313d9fa4d0
.
(the initial reversion was done unintentionally)
2021-05-04 12:34:21 -04:00
jpc
313d9fa4d0
Revert "Fix commented out code"
...
This reverts commit 23abb5aaa3
.
2021-05-04 18:01:16 +02:00
jpc
1b704b6267
Revert "Only set dummy X11 selection if we do not own it"
...
This reverts commit af4ee1a487
.
2021-05-04 18:00:50 +02:00
Juergen Spitzmueller
eb86239e36
Replace deprecated slot
2021-04-17 15:13:02 +02:00
Juergen Spitzmueller
511ba894ff
Fix toqstr(chart_type) with Qt6 ( #12252 )
2021-04-17 15:10:26 +02:00
Jean-Marc Lasgouttes
0acf594df2
Improve the description of Inset::inheritFont()
...
The existing descriptions were obsolete (see e.g. ticket #10263 ).
2021-04-13 10:37:25 +02:00
Jean-Marc Lasgouttes
441c6a9359
Revert "Fix bug #10263 "
...
A series of commits, culminating at 812ff7de
, pushed a few days later,
fixes the bug at its root. This one is not needed anymore to fix
This reverts commit 001f5a4786
2021-04-13 10:21:25 +02:00
Juergen Spitzmueller
ebb34a4614
Set advanced repl_buffer internal as well ( #12246 )
2021-04-11 18:06:11 +02:00
Juergen Spitzmueller
e5370827db
Mark c&p buffers internal. Cures assertion ( #12246 )
2021-04-11 17:25:17 +02:00
Jean-Marc Lasgouttes
f41f88ac2d
Revert "The foot inset does not inherit fonts"
...
Due to braindead semantics, this is not possible.
This reverts commit 59f63602f5
.
2021-04-10 13:44:07 +02:00
Jean-Marc Lasgouttes
59f63602f5
The foot inset does not inherit fonts
...
Fixes bug #12238 .
2021-04-09 19:06:28 +02:00
Jean-Marc Lasgouttes
c9146e5be0
Fixup f3a0e8ff
: costly thinko
...
When the buffer stuff has been updated, the Buffer::needUpdate()
should be reset to false. This was forgotten in f3a0e8ff
.
Fixes performance issues with MergedManuals, for example. UpdateBuffer
would be run again and again when selecting text.
2021-04-09 18:15:31 +02:00
Jean-Marc Lasgouttes
b08a653f35
We only support gcc >= 4.9.
2021-04-07 17:17:05 +02:00
Jean-Marc Lasgouttes
e33567cdcb
Make fall through explixcit
2021-04-07 17:13:43 +02:00
Jean-Marc Lasgouttes
e96a656b4d
Fixup 0f0ad1f7
: cut and paste error
2021-04-07 16:23:29 +02:00
Jean-Marc Lasgouttes
0f0ad1f715
Make bookmarks display configurable
...
Introduce a GUI-less LyXRC member bookmarks_visibility. This is
experimental and will not be documented for 2.4.0. Having the code
present will allow to (1) improve it gradually and (2) fix the many
bookmarks bugs that it exposes.
The corresponding tag is \experimental:bookmarks_visibility, which is
intentionally weird.
Three possible values:
* none: no bookmark display
* margin: display the bookmark in margin
* inline: display the bookmark at cursor position.
The default margin has been made wider so that there is room for the
bookmark. This was necessary anyway. The margin bookmark is now
displayed correctly in full screen with limited text width.
Margin display still needs some improvements when several bookmarks
are on the same row.
Mostly fixes bug #2496 .
2021-04-07 16:19:20 +02:00
Enrico Forestieri
8ec32dc3f9
Do not dereference null pointer
...
Part of #12226
2021-04-07 00:15:12 +02:00
Jean-Marc Lasgouttes
557d33b7e5
Fix compilation for clang 3.7 with libc++
2021-04-06 12:07:42 +02:00
Jean-Marc Lasgouttes
b2912339d0
Fix drawing of indicators for tracked changes and horizontal scrolling.
...
1/ fix horizontal position of the insets
This is adapted from parts of racoon's patch for bug #12131 .
2/ fix height of the indicators when at the top or bottom of document,
by using the row's contents_dim() to measure is height.
3/ fix partial blinking of horizontl scrolling marks when editing table.
Fixes bug #12171 .
2021-04-05 19:24:59 +02:00
Richard Kimberly Heck
eb2e8e1579
Polish
2021-04-03 17:58:46 -04:00
Enrico Forestieri
7a6ad48495
Use font metrics for computing the size of math decorations
...
It was an error using an absolute size instead of one relative to the
size of the used font. It was requiring using the physical dpi of the
screen and caused #12222 . Now everything is computed with respect to
the metrics of the font and should be automatically correct.
Fixes #12222 .
2021-04-03 18:37:10 +02:00
Pavel Sanda
9d1031771e
Fix #4658 : showing diff between original and emergency files.
...
https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg215796.html
2021-04-03 13:19:53 +02:00
Enrico Forestieri
472953dbe1
Replace obsoleted signal QComboBox::activated(QString)
...
Since Qt 5.14 this signal is named textActivated.
2021-04-01 21:17:41 +02:00
Enrico Forestieri
570cd84ddc
Replace obsoleted signal
...
Since Qt 5.14 this signal is named textHighlighted.
2021-04-01 20:31:11 +02:00
Enrico Forestieri
eeb36e808c
Change cursor shape for clickable math insets
...
Currently, only InsetMathRef and InsetMathSpace are clickable.
2021-04-01 16:59:55 +02:00
Richard Kimberly Heck
fb5cb3ed03
Show the label for a cross-reference in the TOC.
2021-03-28 11:05:31 -04:00
Richard Kimberly Heck
65d0c96855
Revert "By default, use an argument's menu string as its label string."
...
Committed by accident.
This reverts commit affd6101bd
.
2021-03-26 13:58:28 -04:00
Richard Kimberly Heck
942d3cab32
Change "Local Layout" button to "Local Class".
...
This is for choosing a local document class/layout file. The tooltip
uses the 'class' language already, and "Local Layout" conflicts with
the way that term is used elsewhere in the dialog.
2021-03-26 13:37:14 -04:00
Richard Kimberly Heck
affd6101bd
By default, use an argument's menu string as its label string.
...
If one wants different label strings, then provide those first.
2021-03-26 13:37:14 -04:00
Jean-Marc Lasgouttes
9ff27f8ce0
Produce an error on bad debug level values
...
Add new funciton Debug::badValue, that returns the first bad value in a debug
setting string.
Use it to parse the -dbg comand line option and to control the
execution of the debug-level-set lfun.
Use range-based loops in a few places.
2021-03-26 17:55:54 +01:00
Jean-Marc Lasgouttes
0429b580e6
Fixup 4671214f
: add comment
2021-03-26 14:26:15 +01:00
Kornel Benko
a9b0f5faae
Cmake build with qt6 on MAC
...
Patch from P. De Visschere
Citing:
I also must exclude the QMacPasteboardMimeGraphics class in
GuiApplication.cpp since QMacPasteboard is not available anymore with qt6.
and add an #include <QStandardPaths> in support/Package.cpp (I suppose
this will pose no problem for qt5 but have not checked it, it's only
needed with USE_MACOSX_PACKAGING)
2021-03-26 13:11:44 +01:00
Daniel Ramoeller
4671214f3d
Keep caret visible when small
...
Fix for ticket #12190 .
2021-03-26 12:43:11 +01:00
Jean-Marc Lasgouttes
efbc37926f
Set explicitly outer font when inserting text inset.
...
Now it is possible to set this font directly instead of relying on
metrics() side effects. Do that to avoid crashes due to bad
interactions.
This implements the new scheme that was mentionned in 5a58ca65
.
Fixes bug #12204 .
2021-03-25 11:26:44 +01:00
Jean-Marc Lasgouttes
06a7731274
Move code responsible to set TextMetrics outer font to InsetText
...
This code was previously in InsetCollapsible for no good reason.
Move it to a new function InsetText::setOuterFont, which can now be
called for other purposes.
Part of investigation of bug #12204 .
2021-03-24 20:28:19 +01:00
Jean-Marc Lasgouttes
56bd50ea6c
Move getFont and getLabelFont from InsetCollapsible to Inset
...
Also move around getLayout and isPassThru.
Part of investigation of bug #12204 .
2021-03-24 20:04:27 +01:00
Scott Kostyshak
b2b68c3ee7
Update tex2lyx tests
2021-03-24 13:08:28 -04:00
Jean-Marc Lasgouttes
d03435bc77
Remove tweaks of [pm]i.base.font in InsetCaption
...
Captions do not reset font settings (try to insert caption in emph context).
Part of investigation of bug #12204 .
2021-03-24 16:27:05 +01:00
Jean-Marc Lasgouttes
b37929fdb3
Remove unneeded InsetFootlike::metrics/draw() methods
...
The font is already set to the buffer font when called from
TextMetrics::redoParagraph and RowPainter::paintInset, because
inheritFont() is false.
Part of investigation of bug #12204 .
2021-03-24 16:25:43 +01:00
Kornel Benko
92a50fa273
Cmake build Qt6: Remove some redundant statements.
2021-03-24 11:42:39 +01:00
Thibaut Cuvelier
6102327d3b
Improve tool tip for the new DocBook MathML-prefix option.
2021-03-23 22:32:16 +01:00
Thibaut Cuvelier
7a1e048f44
Amend 0f782b0d
: add the required changes to lyx2lyx.
2021-03-23 21:12:45 +01:00
Thibaut Cuvelier
6a5288e31e
DocBook: add the MathML-namespace prefix in the GUI.
2021-03-23 00:32:45 +01:00
Thibaut Cuvelier
0f782b0ded
DocBook: add a parameter to change the namespace prefix for MathML.
2021-03-23 00:32:45 +01:00
Kornel Benko
02a3705496
Amend 635a7d77
: Allow compiling with Qt6 with cmake
...
Thanks Scott for checking.
TODO: Check compilation on Windows and Mac.
2021-03-22 16:19:10 +01:00
Enrico Forestieri
6fa973b377
Fix Qt6 deprecation warning about QString::fromUcs4
2021-03-21 17:15:08 +01:00
Juergen Spitzmueller
4a5ae39e8b
Revert "Fix Qt6 deprecation warning (QString::fromUcs4(uint))"
...
This reverts commit 52dff70641
.
2021-03-21 16:59:25 +01:00
Juergen Spitzmueller
2c553df178
Replace obsoleted signal
...
This has been obsoleted in Qt5 and dropped in Qt6
2021-03-21 12:51:38 +01:00
Juergen Spitzmueller
52dff70641
Fix Qt6 deprecation warning (QString::fromUcs4(uint))
2021-03-21 12:38:47 +01:00
Juergen Spitzmueller
15c6d4c6b3
Fix Qt6 deprecation warning (QMouseEvent::x() ::y())
2021-03-21 12:38:05 +01:00
Juergen Spitzmueller
cbc55548a3
Fix Qt6 deprecation warning (QEvent::globalPos())
2021-03-21 12:37:17 +01:00
Juergen Spitzmueller
b7f983bc47
Address Qt6 deprecation warning (QLibraryInfo::location())
2021-03-21 12:30:34 +01:00
Juergen Spitzmueller
9ccbc11bf3
Fix unused variable warning with Qt6
2021-03-21 12:30:01 +01:00
Eugene Chornyi
4421b721e4
Make all a synonym of any in cmd debug mode
2021-03-21 09:59:23 +01:00
Enrico Forestieri
34ffa80c4c
Fix latex syntax highlighting with Qt6
2021-03-17 10:17:10 +01:00
Enrico Forestieri
968be3f209
Fix copy&paste error
2021-03-17 08:59:04 +01:00
Pavel Sanda
4e2f8dbbeb
Qt4 compil fix
2021-03-16 09:39:05 +01:00
Enrico Forestieri
7cb2a10eb8
Amend 635a7d77
...
With a multiscreen setup and Qt6, make sure to get the geometry
of the screen containing the widget.
2021-03-15 18:35:58 +01:00
Enrico Forestieri
635a7d77dd
Allow compiling with Qt6
...
This commit allows compiling LyX with Qt6 when using autotools.
For a successful compilation the following 2 conditions must be met.
1) The Qt6 qmake has to come first in PATH, so that the command
"qmake -v | grep -o 'Qt version .'" returns "Qt version 6".
2) The --enable-qt6 switch has to be passed to the configure command.
If --enable-qt6 is used but Qt6 is not found, Qt5 is tried as a fallback.
If also Qt5 is not found, configuring for Qt4 is attempted.
If --enable-qt6 is not used, then things go as usual. This means that Qt5
is tried first and then Qt4, unless --disable-qt5 is used, in which case
Qt4 is directly attempted. This means that existing scripts should
continue working unmodified.
LyX should compile with Qt6 on windows and linux, and possibly also on
mac, but I could not test that. However, it is not guaranteed that it
works as it should. In particular I am not sure that I got right the
conversion from QRegExp to QRegularExpression. For sure, the syntax
highlighting seems to not work right. Someone in the know should take
a look at that. I am able to load documents and compile them but some
thourough testing is needed. However, when compiling for Qt5 or Qt4,
I tried to make sure that the functionality is preserved.
2021-03-15 17:09:09 +01:00
Juergen Spitzmueller
d5263f857e
Amend [1bf53d47a5b8/lyxgit]
2021-03-14 16:48:04 +01:00
Juergen Spitzmueller
1bf53d47a5
Use customizable zoom context menu
...
Based on a proposal by Daniel (#12187 )
2021-03-14 16:41:44 +01:00
Juergen Spitzmueller
d29d2f48fd
Toom value: back to QLabel, this time with custom context menu
2021-03-14 12:04:12 +01:00
Juergen Spitzmueller
663f198001
Properly set minimum width with QToolButton
2021-03-14 09:42:28 +01:00
Juergen Spitzmueller
ac1b3f0ba2
Fix indentation
2021-03-13 12:17:31 +01:00
Juergen Spitzmueller
b272e4bfb0
Fix ct in table cell pasting
2021-03-12 17:44:33 +01:00
Juergen Spitzmueller
ae892bff98
Fix copy of multi-cells in table ( #12196 )
2021-03-12 17:44:33 +01:00
Jean-Marc Lasgouttes
ac8948b8e0
Fixup 86bfa10a
: add checks before updating bookmarks
...
When doing cut and paste, it can happen that inset_owner_ is null, or
that the inset is not related to a buffer.
2021-03-12 17:42:02 +01:00
Yuriy Skalko
4ec5d33551
Set correct Windows console code page since all LyX output is in UTF-8
2021-03-12 18:15:33 +02:00
Juergen Spitzmueller
71268e859d
Set zoom value after menu
...
Fixes initial size with styles that show a menu indicator
2021-03-12 16:30:50 +01:00
Juergen Spitzmueller
9f92fc92bd
Yet another deprecation fix (this is the last one I am aware of)
2021-03-12 12:14:42 +01:00
Juergen Spitzmueller
934c6480c0
Add forgotten parent
2021-03-12 10:54:46 +01:00
Juergen Spitzmueller
10f4f2113a
Fix deprecation warning (from|toTime_t)
2021-03-12 10:32:03 +01:00
Juergen Spitzmueller
26459a2cf5
Address another deprecation warning.
...
One left to go.
2021-03-12 10:10:33 +01:00
Juergen Spitzmueller
1a35afbe8f
Fix deprecation warning
2021-03-11 19:06:03 +01:00
Juergen Spitzmueller
8a605ca8ad
Add option to toggle zoom slider to zoom statusbar menu
2021-03-11 18:41:52 +01:00
Daniel Ramoeller
2710ec0840
Option to hide the zoom slider
...
Fix for bug #12187 .
2021-03-11 18:41:52 +01:00
Juergen Spitzmueller
f525bded59
Add menu to statusbar zoom value
2021-03-11 18:14:46 +01:00
Juergen Spitzmueller
7a000652c0
Do not scale statusbar icons
...
This leads to stretched icons.
2021-03-11 17:24:19 +01:00
Juergen Spitzmueller
a49abd7383
Remove zoom slider ticks
...
This doesn't align well
2021-03-11 17:24:19 +01:00
Jean-Marc Lasgouttes
447a1056b4
Fix bookmarks-goto inside insets.
...
A stupid oversight, as far as I can see.
2021-03-11 16:16:11 +01:00
Jean-Marc Lasgouttes
86bfa10abb
Adjust bookmark position when inserting/deleting from paragraph
...
Without this, bookmarks positions drift when editing.
2021-03-11 16:00:32 +01:00
Jean-Marc Lasgouttes
b87a81c394
Fixup fbf22bb3
: really avoid screen-jumping with mouse click.
...
It turns out that the commit from gadmm's lyx-unstable has been
cherry-picked at the wrong place! However I believe that both changes
are necessary.
With this second patch, I do see that some screen jumping is avoided.
Fixes bug #7457 .
2021-03-10 10:43:45 +01:00
Jean-Marc Lasgouttes
776807a536
Constification
2021-03-10 10:43:45 +01:00
Jean-Marc Lasgouttes
9a2b8c87cd
Code reformatting.
2021-03-10 10:43:45 +01:00
Jean-Marc Lasgouttes
87e59caebe
Constify some Paragraph::Private methods
2021-03-09 16:46:05 +01:00
Jean-Marc Lasgouttes
5d8f3a9307
Fix debug output of FunCode
...
Outputing the FuncCode enum to a stream using the << operator does not
work well. Actually I am not sure whether the << operator in LyXAction
is supposed to work (don't we need an enum class for that?).
2021-03-09 16:26:44 +01:00
Juergen Spitzmueller
dee329a21f
Revert "Attempt to align slider and buttons in a widget"
...
This reverts commit ad44f4f448
.
2021-03-09 14:50:23 +01:00
Juergen Spitzmueller
ad44f4f448
Attempt to align slider and buttons in a widget
2021-03-09 14:23:13 +01:00
Juergen Spitzmueller
f07a588b25
Fix cut and paste error
2021-03-09 13:03:33 +01:00
Pavel Sanda
f298072012
Revert 7e5c42593e
.
...
https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg215733.html
Main issue is git log does not return >0 when file does not exists.
Other possible issues to check - cvs might want to connect to server
with cvs log. In large git archives reaching the proper record might take
longer time than ls-files.
2021-03-09 12:46:23 +01:00
Juergen Spitzmueller
f2e33b8c3e
Use real minus char
2021-03-09 10:10:48 +01:00
Juergen Spitzmueller
ebb7ee7d5f
Add +/- buttons to zoom slider
2021-03-09 08:42:27 +01:00
Daniel Ramoeller
3c43a01ba2
Smaller zoom slider on macOS
...
Fix for #12189 .
2021-03-09 07:34:33 +01:00
Stephan Witt
6273c1f66d
Amend change 07122f066b
- correct string access.
2021-03-08 21:26:58 +01:00
Eugene Chornyi
167dfbc92c
Fix bug 11998
...
If started from console, the console is the parent process, which can be attached. If started not from console, parent process does not exist and the block is skipped.
2021-03-08 19:35:18 +01:00
Juergen Spitzmueller
b9fb2a236e
Keep zoom label width constant ( #12186 )
2021-03-08 07:33:37 +01:00
Juergen Spitzmueller
cf75003119
Disable zoom slider when there is no buffer open ( #12185 )
2021-03-07 19:15:57 +01:00
Juergen Spitzmueller
0a3f856bc1
Update zoom display after zoom has been set
2021-03-07 18:35:40 +01:00
Juergen Spitzmueller
c8feef2e23
Add way to remove items from document dictionary
2021-03-07 18:23:07 +01:00
Stephan Witt
07122f066b
Refactoring: move check for match in spellignore() to buffer params.
2021-03-07 17:46:01 +01:00
Juergen Spitzmueller
430327152a
Fix per-document dictionary with Mac
2021-03-07 17:25:31 +01:00
Juergen Spitzmueller
be6dc7dd5d
Show zoom value in statusbar
2021-03-07 17:21:52 +01:00
Juergen Spitzmueller
bc300585f7
Properly set initial zoom value
...
This depends on settings
2021-03-07 17:09:03 +01:00
Juergen Spitzmueller
128346d03d
Fix zoom slider with mouse wheel
2021-03-07 15:18:28 +01:00
Juergen Spitzmueller
9aad98836d
Fix for Qt < 5.11
2021-03-07 14:33:13 +01:00
Juergen Spitzmueller
b07084df2d
Add ticks to zoom slider
2021-03-07 14:29:55 +01:00
Jean-Marc Lasgouttes
610ea7f4f5
Fix display of emphasize in slanted text
...
Fixes bug #12175 .
2021-03-07 13:32:34 +01:00
Juergen Spitzmueller
bdb006543b
Zoom slider
2021-03-07 13:29:23 +01:00
Stephan Witt
2cf86771ed
Amend 07396ab244
- fix compilation error for Apple spell checker.
2021-03-07 10:46:31 +01:00
Stephan Witt
3f75fb7a48
Amend 07396ab244
- fix white space.
2021-03-07 10:46:00 +01:00
Juergen Spitzmueller
a0a7ba7cce
Update tex2lyx tests
2021-03-07 08:24:01 +01:00
Juergen Spitzmueller
0b42f77551
\\spellchecker_ignore: use LyX language name rather than langcode
2021-03-07 08:21:23 +01:00
Enrico Forestieri
7545698380
Fix bug #12181
...
The context menu for InsetMathRef is now usable.
InsetMathRef still misses support for RefStyle and thus the
corresponding entries are omitted from the menu. But this would
be a different bug.
2021-03-06 23:36:58 +01:00
Daniel Ramoeller
5d269df606
Do not toggle on (all) layouts in force plain
...
Fix for #12179 .
2021-03-06 20:25:52 +01:00
Jean-Marc Lasgouttes
4210f4c9cc
Compilation fix
2021-03-06 19:58:18 +01:00
Juergen Spitzmueller
31dc0acbb8
Layout fix
2021-03-06 17:45:06 +01:00
Juergen Spitzmueller
07396ab244
Meet per-document spelling dictionaries ( fixes #86 [sic!])
...
Now who can beat that? ;-)
2021-03-06 16:53:33 +01:00
Juergen Spitzmueller
92c6c3b950
fix indendation
2021-03-06 16:15:10 +01:00
Enrico Forestieri
5a43b86141
Allow context menus in mathed
...
It is now possible to get a context menu for math insets.
InsetMathSpace was already providing a specific context menu,
but it was never triggered because the math hull inset is not
descendable. It is still so, but now when a context menu is
requested all the insets inside the math hull are examined.
If the inset under the cursor provides a context menu, it
is shown instead of the general math one.
Fixes #12100 .
2021-03-05 21:21:41 +01:00
Juergen Spitzmueller
f1f475e1d3
Add LFUN_FONT_NO_SPELLCHECK
2021-03-05 18:23:38 +01:00
Jean-Marc Lasgouttes
4828dfb441
Indicate that we do not use a return value
...
Please Coverity.
2021-03-05 13:12:58 +01:00
Jean-Marc Lasgouttes
f5340fd6d9
Fix missing initialization
...
Spotted by Coverity.
2021-03-05 13:06:10 +01:00
Jean-Marc Lasgouttes
e6a7da3b22
Fix warning when not using Qt regexps
2021-03-05 11:54:11 +01:00
Juergen Spitzmueller
23fc1b270d
Remove redundant call (amend 2b7fae04f3
)
2021-03-05 07:54:17 +01:00
Juergen Spitzmueller
2b7fae04f3
Fix limiting of absurdly large input to thesaurus ( #10528 )
2021-03-05 07:51:49 +01:00
Juergen Spitzmueller
64095a0af2
Fix wrap with Spellchecker after ignore ( #10383 )
2021-03-04 18:02:04 +01:00
Juergen Spitzmueller
a57cdd0d30
Remove confusing and unusual "Find Next" button from spellchecker dialog ( #8931 )
2021-03-04 16:54:01 +01:00
Juergen Spitzmueller
8718d01770
Style
2021-03-04 14:52:39 +01:00
Juergen Spitzmueller
5920591b52
refillToolbars() does not need to be public
2021-03-04 14:51:58 +01:00
Juergen Spitzmueller
812b6f7d69
Allow for runtime (dark/light) mode switch
2021-03-04 12:35:38 +01:00
Enrico Forestieri
be2c12ba40
Fix bug #9601
...
Make sure emphasized text in mathed has correct shape and color.
2021-03-04 11:58:44 +01:00
Jean-Marc Lasgouttes
009efa195b
Avoid pointless 'undefined flex inset' errors
...
When switching class, it does not make sense to flag flex insets that
are undefined if they were already undefined before.
Part of bug #12163 .
2021-03-04 10:08:46 +01:00
Daniel Ramoeller
fde432493d
Fix Disable Editing "Lock" icon protrudes into tab title on macOS
...
On macOS the Disable Editing "Lock" icon protrudes into tab title
Also, since the close button is on the left, the lock is better positioned on the right.
The detour via QIcon is to avoid a pixelated pixmap (because in LyX pixmaps don't adjust by default to the device's pixel ratio correctly).
Also
Fix for bug #12160 .
2021-03-02 18:38:14 +01:00
Jean-Marc Lasgouttes
fbf22bb3f3
Fix random scrolling inside nested insets
...
Happened when the BufferView was resized (e.g. math toolbars were
displayed/hidden).
Backported from gadmm's lyx-unstable tree
https://gitlab.com/gadmm/lyx-unstable/-/commit/a868bc034cea4c
Possible fix to bug #7457 .
2021-03-02 18:10:12 +01:00
Juergen Spitzmueller
e2f3dd5f6a
Consider selection scope when DEPM after CT acceptance/rejection ( #2166 )
...
This fixes a crash and DEPM overshooting.
2021-03-02 09:15:33 +01:00
Juergen Spitzmueller
d49c4abb43
Merge branch 'master' of git.lyx.org:lyx
2021-03-02 08:36:42 +01:00
Jean-Marc Lasgouttes
f92f2f95ff
Cleanup High DPI support
...
Disable for Qt >= 6 (this is the default now).
Disable for macOS (does it in its own way).
2021-03-02 08:22:02 +01:00
Juergen Spitzmueller
f28affd421
Merge branch 'master' of git.lyx.org:lyx
2021-03-02 07:04:03 +01:00
Jean-Marc Lasgouttes
234886f6eb
Add Qt platform name in About dialog
2021-03-01 19:15:49 +01:00
Enrico Forestieri
bb2c1c3485
Amend c2facb8c
...
Make sure the base of a script is not empty before accessing it.
2021-03-01 10:08:08 +01:00
Enrico Forestieri
52ce0ff49a
Fix bug #11007
...
The math color inset inherits the mode of the containing inset.
This mode is inferred by the kind of font in effect. Setting the
right mode allows to insert spaces where these should be allowed.
Another small glitch was that the selection was always parsed in
math mode, so that any space was swallowed, even if the inset would
allow them.
2021-02-28 22:32:11 +01:00
Juergen Spitzmueller
0e54e01756
grammar
2021-02-28 17:38:01 +01:00
Juergen Spitzmueller
939dc4076f
Prevent infinite loop with instant search on Mac ( #12161 )
...
The search dialog was repeatedly feeded with the same string, and a
new search was triggered.
2021-02-28 17:36:06 +01:00
Enrico Forestieri
61db164302
Fix bug #11444
2021-02-28 14:56:42 +01:00
Juergen Spitzmueller
1205018286
Use a proper filter bar in the outliner
2021-02-28 13:57:24 +01:00
Daniel Ramoeller
2a8cac75f4
Adjust adv. find & replace pane spacing
...
Partial fix of bug #12152 .
2021-02-28 13:13:30 +01:00
Daniel Ramoeller
11548c523a
Adjust code preview spacing
...
Partial fix of bug #12152 .
2021-02-28 13:10:03 +01:00
Daniel Ramoeller
55f2445278
Adjust outliner spacing
...
Partial fix for #12152 .
2021-02-28 13:06:14 +01:00
Juergen Spitzmueller
5573825202
HiDPI support for search indicators ( #12162 )
...
Requires Qt5
2021-02-28 12:35:29 +01:00
Richard Kimberly Heck
170f06089d
Add a bit of debugging code
2021-02-27 20:34:29 -05:00
Enrico Forestieri
7b526d6461
Fix bug #3751
...
We lack the necessary font (cmb10) for drawing bold uppercase greek
letters. It would be overkill adding it for this sole purpose, so
adopt the same poor man's bold strategy used with \boldsymbol.
2021-02-27 21:40:28 +01:00
Richard Kimberly Heck
0895b76f1e
Fix bug #12169
...
Patch from Daniel.
2021-02-27 13:27:05 -05:00
Enrico Forestieri
195b928f92
Fix bug #3294
2021-02-27 14:49:55 +01:00
Kornel Benko
a3e10cd067
FindAdv: Added handling of some chars found in unnicodesymbols
2021-02-27 14:14:28 +01:00
Enrico Forestieri
c2facb8c56
Fix cursor navigation in \overbrace and \underbrace
...
Due to the way these decorations are implemented, entering
them with the cursor (either form right or left) required
pressing two times cursor left or right.
Fixes #2264
2021-02-26 20:30:41 +01:00
Daniel Ramoeller
d74367a96e
Use document mode on work area and docks on macOS
...
- More fittingly (plain) looking tabs for documents and docks.
- Also macOS fix for bug #9391 .
2021-02-26 20:01:43 +01:00
Jean-Marc Lasgouttes
42b23f3fb2
Display bookmarks in the workarea (take 2).
...
The bookmarks are shown with circled numbers in the right margin (or
the left margin in RTL mode). A new color "bookmarks" has been added.
Currently bookmark 0 (the return position) is not displayed because it
is very disturbing in practice.
To make this work, a new method BookmarksSection::bookmarksInPar
retuns the list of bookmarks in a paragraph along with their position.
Force redraw when using bookmark-save and bookmark-clear.
Caveats:
- this solution does not show the precise position of the bookmark
(this is supposedly not a problem).
- if several bookmarks are on the same row, they will currently be
garbled. It would be easy to make sure that only one is shown ; what
would be more difficult would be to move the second bookmark lower.
- it is possible to make sure that the markers are correctly centered
in the margin, and that the margin size is large enough to hold the
marker (I did not try all fonts).
Fixes bug #2496 .
2021-02-26 19:09:25 +01:00
Jean-Marc Lasgouttes
e4ab91d802
Revert "Display bookmarks in the workarea."
...
This will be replaced by a different version.
This reverts commit 99e636ae7b
.
2021-02-26 18:07:39 +01:00
Richard Kimberly Heck
946d112ee6
Allow to call cap::switchBetweenClasses without an ErrorList.
...
It turns out that we usually don't care about the errors and so
were creating dummy ErrorList objects in several places.
2021-02-25 21:49:50 -05:00
Jean-Marc Lasgouttes
3e3ad2937c
Remove assertion that is not necessary.
...
It may happen that there are errors when doing undo, crashing does not
help in this case.
Fixes bug #12163 .
2021-02-25 20:00:41 +01:00
Jean-Marc Lasgouttes
d7a4f47e7d
Improve HiDpi handling
...
Add code stolen from QBitTorrent that enables properly HiDpi handling.
HighDpi support is set by default starting with Qt 5.6.
Support for fractional scaling is added for Qt >= 5.14.
Hopefully fixes bug #12060 .
2021-02-25 19:24:22 +01:00
Enrico Forestieri
3cf5a064db
Amend 368e983a
2021-02-23 21:48:54 +01:00
Enrico Forestieri
368e983abb
Fix bug #12165
2021-02-23 20:00:50 +01:00
Jean-Marc Lasgouttes
f59dafe898
Fix cursor position when undoing inset-dissolve.
...
When invoking inset-dissolve with the cursor in front of the inset,
add recordUndo call to make sure that the cursor is at the right
class.
Fixes bug #12164 .
2021-02-23 19:24:54 +01:00
Enrico Forestieri
2629bd6dfb
Improve fix for #12153
...
Use a WYSIWYM approach instead of a WYSIWYG one.
2021-02-23 17:34:19 +01:00
Juergen Spitzmueller
55da675efa
FancyLineEdit: use QLineEdit's own clear button with Qt >= 5.2
2021-02-23 16:53:15 +01:00
Jean-Marc Lasgouttes
a5fd5d3cd2
"12 pixels ought to be enough for anyone"
...
Fixes bug #12153 .
2021-02-22 19:35:08 +01:00
Daniel Ramoeller
e050435314
Adjust label size to directory names in About
...
Fix for bug #11946 .
2021-02-22 07:19:28 +01:00
Jean-Marc Lasgouttes
41d29ce387
Reduce the value of (above|below)displayskip
...
The value of 10pt is too large, use a 'mean' value of 8.5pt.
Tentative fix to bug #12153 .
2021-02-21 20:40:09 +01:00
Pavel Sanda
9e734339e9
Compile with gcc 4.9 again.
2021-02-21 20:05:06 +01:00
Thibaut Cuvelier
5b9929c9d7
Amend 61657bd610
...
Restore indentation to be more consistent.
2021-02-21 13:15:10 +01:00
Enrico Forestieri
4e0d7f753b
Draw real dots
...
A new method for drawing ellipses has been added to the painter
and used for drawing real dots for math decorations and the various
\cdots, \ddots, \vdots, etc., latex commands.
2021-02-21 00:39:12 +01:00
Thibaut Cuvelier
61657bd610
DocBook: convert a first ERT.
2021-02-20 20:29:34 +01:00
Juergen Spitzmueller
269c583967
ProgressView: fix initial tab.
2021-02-20 08:10:01 +01:00
Richard Kimberly Heck
9c5f743575
Fix bug #12152 .
...
Patch from Daniel.
2021-02-19 17:31:36 -05:00
Thibaut Cuvelier
358e4ace56
DocBook: implement prepended/appended arguments for all kinds of elements.
...
Previously, it was just in InsetText.
2021-02-19 17:38:38 +01:00
Kornel Benko
77e8037f84
FindAdv: Do not distinguish between different math constructs
...
This means that searching math-mode will find instances also in
math-environments like align*, multline, ...
2021-02-19 17:12:38 +01:00
Yuriy Skalko
110862b09f
Fix setting of math matrix size with mouse
2021-02-19 18:06:04 +02:00
Enrico Forestieri
7114de5175
Fix bug #12148
2021-02-19 02:19:06 +01:00
Juergen Spitzmueller
ed2f3dae5c
Select search string after inserting from find buffer
2021-02-18 15:56:32 +01:00
Jean-Marc Lasgouttes
65b674ba4e
Fix a crash when closing tabs
...
Although I do not know how to reproduce the crash, the change makes sense.
This is backported from gadmm's lyx-unstable tree
261ce4ea98
2021-02-18 15:54:29 +01:00
Juergen Spitzmueller
9ee73dbb30
GuiSearch: properly display indicators in dark mode
2021-02-18 15:44:27 +01:00
Daniel Ramoeller
672ff09634
Fix Undo with search-string-set
...
Makes it possible to use the find combobox's internal undo feature to undo a set search string.
2021-02-18 13:09:30 +01:00
Juergen Spitzmueller
b6945764a4
Do not report false find with empty string in instant search
2021-02-18 13:00:41 +01:00
Juergen Spitzmueller
a7e6dcc31d
GuiSearch: make search options visible/accessible in minimal mode
2021-02-18 07:33:26 +01:00
Scott Kostyshak
6e8b3906df
Fix an instance of -Werror=misleading-indentation
...
Full GCC output is:
/home/scott/lyxbuilds/master/repo/src/insets/InsetText.cpp: In member function ‘void lyx::InsetText::docbook(lyx::XMLStream&, const lyx::OutputParams&, lyx::InsetText::XHTMLOptions) const’:
/home/scott/lyxbuilds/master/repo/src/insets/InsetText.cpp:713:5: error: this ‘for’ clause does not guard... [-Werror=misleading-indentation]
713 | for (auto const & arg : appendedArguments)
| ^~~
/home/scott/lyxbuilds/master/repo/src/insets/InsetText.cpp:717:2: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’
717 | if (writeOuterTag) {
| ^~
2021-02-17 23:01:54 -05:00
Thibaut Cuvelier
6df4597e02
DocBook: force paragraphs in HTML cells to allow for nested tables.
...
CALS still invalid because it forbids nested tables.
2021-02-17 23:32:23 +01:00
Thibaut Cuvelier
da92c9a950
DocBook: spurious spaces in table attributes.
2021-02-17 23:25:41 +01:00
Thibaut Cuvelier
bfa67b1f88
DocBook: TODO is outdated, table type is checked within docbookRow.
2021-02-17 22:55:37 +01:00
Thibaut Cuvelier
adc7820d45
DocBook: add support for DocBookArgumentAfterMainTag.
2021-02-17 21:09:21 +01:00
Enrico Forestieri
2fdee24959
Correctly show deleted url with change tracking
...
This fixes the issue reported here:
https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg202545.html
I could not find an open ticket about it.
2021-02-17 19:51:01 +01:00
Juergen Spitzmueller
80cb0650e4
Clean up previous selections with empty searchstr on instant
2021-02-17 16:55:55 +01:00
Juergen Spitzmueller
ab1cc8e1c2
Consider case (in)sensitivity when querying special char insets
2021-02-17 15:50:54 +01:00
Juergen Spitzmueller
ca160da07d
GuiSearch: separate findClicked() slot from more general function
...
the latter one is also accessed by different paths than clicking
2021-02-17 14:48:31 +01:00
Juergen Spitzmueller
180fca2fcd
Fix Find button with search as you type
2021-02-17 14:32:26 +01:00
Juergen Spitzmueller
05004e138f
FancyLineEdit: reformat using our indentation style
...
No change in function
2021-02-17 12:46:37 +01:00
Juergen Spitzmueller
50783d94a8
Advanced F&R: Improve code on Return key
2021-02-17 09:51:09 +01:00
Juergen Spitzmueller
a2a5656d07
Adv F&R: indicate search direction
2021-02-17 09:50:57 +01:00
Juergen Spitzmueller
5ed0dddcf2
Adv F&R: Fix accelerator conflicts
2021-02-17 09:49:25 +01:00
Juergen Spitzmueller
7ad70c908b
Add accelerator
2021-02-17 09:08:26 +01:00
Jean-Marc Lasgouttes
3f093dd103
Fixup 824d1c99
: do not change the semantics of leftMargin(pit_type)
...
In the row painter, when painting a centered label, one wants to get
the left/right margin of the non-first rows (without indent). It was a
bad idea to change leftMargin(pit) to do that, because its semantics
are unclear and the the code depends on the fact that this function does
strange things when the paragraph is empty...
Fixes bug #12118 .
2021-02-16 20:27:48 +01:00
Juergen Spitzmueller
fe44b3c0fa
GuiSpellchecker: resolve accelerator conflicts
2021-02-16 19:13:13 +01:00
Juergen Spitzmueller
76db3c3f85
GuiThesaurus: complement lyxfind options
2021-02-16 16:33:30 +01:00
Juergen Spitzmueller
109e98d945
GuiSearch: Properly delegate focus
2021-02-16 13:30:31 +01:00
Jean-Marc Lasgouttes
a7c1a39b5b
Make selections vertically tighter.
...
Introduce a new Row::contents_dim(), which height is restricted to the
row contents and does not contain any extra vertical spacing.
Rely on this for painting selections: if the selection starts on row,
for example, the ascent of the contents dim is considered. If ot was
started above, then the full dim is used.
Fixes bug #3899 .
2021-02-16 12:29:40 +01:00
Jean-Marc Lasgouttes
090e9a6c36
Keep the useful parts of reverted commits
...
Keep from 907f0207
the introduction of BufferView::top/bottomMargin()
and the setting of the top/bottom margin of the document. The
difference is that the extra height is still added to the relevant
rows, and not only to the paragraph metrics.
Keep from f41ca959
the reduction of top/bottom margin for Adv F&R
workareas.
2021-02-16 12:29:40 +01:00
Jean-Marc Lasgouttes
a40ca1430e
Revert "Improve handling of top and bottom margin"
...
This reverts commit 907f020724
.
2021-02-16 12:29:40 +01:00
Jean-Marc Lasgouttes
810b86560a
Revert "Reduce top/bottom margin for Adv F&R workareas"
...
This reverts commit f41ca959fd
.
2021-02-16 12:29:40 +01:00
Jean-Marc Lasgouttes
2c2ae5ecd8
Revert "Fix correction of row in getPitAndRowNearY"
...
This reverts commit 08a3405181
.
2021-02-16 12:29:40 +01:00
Jean-Marc Lasgouttes
f6c87c63c1
Revert "Make sure that top/bottom margins are visible when needed"
...
This reverts commit a78eb4471f
.
2021-02-16 12:29:40 +01:00
Juergen Spitzmueller
213a3bc557
Add/fix some tooltips
2021-02-16 10:02:47 +01:00
Juergen Spitzmueller
119e8c08d4
Fix replace all in selection with change tracking
2021-02-16 09:42:17 +01:00
Pavel Sanda
1ba3307226
GuiSearch did not work with num. keypad enter
2021-02-16 08:52:21 +01:00
Juergen Spitzmueller
5980afaee0
Add support for search/replace within selection ( #2548 )
2021-02-16 08:11:09 +01:00
Juergen Spitzmueller
df4da34836
GuiCitation: Add missing connection
2021-02-16 07:32:01 +01:00
Enrico Forestieri
a0a0119b48
Account for true dpi
...
We have to account for the physical rather than logical dpi.
See #12132 .
2021-02-15 22:43:36 +01:00
Richard Kimberly Heck
01dc665a25
Make continuous spellcheck the default.
...
Convert old preferences to preserve previous setting, as well.
2021-02-15 11:03:43 -05:00
Richard Kimberly Heck
93e7ab1f3e
Do not write \default_view_format if it is empty.
2021-02-15 10:55:37 -05:00
Juergen Spitzmueller
c4fbd0d913
Initialize F&R dialog with selected text ( #8448 )
2021-02-15 16:04:17 +01:00
Richard Kimberly Heck
bdd7e26b3e
Fix warning
2021-02-15 09:48:37 -05:00
Juergen Spitzmueller
e5958e3ca8
GuiSearch: catch Esc
2021-02-15 15:37:58 +01:00
Juergen Spitzmueller
958213ee52
Improve instant search
2021-02-15 14:12:07 +01:00
Juergen Spitzmueller
f4a91f6e9e
Correct tooltip
2021-02-15 11:32:42 +01:00
Juergen Spitzmueller
f59b8cb657
GuiSearch: Add auto-wrap option
2021-02-15 11:30:03 +01:00
Juergen Spitzmueller
22542700a7
Attempt at "search as you type"
2021-02-15 10:53:23 +01:00
Stephan Witt
3841304f80
Use explicit initialization for plain pointer to buffer view.
2021-02-15 10:03:39 +01:00
Juergen Spitzmueller
b2a317c037
Sett forward to true by default in search string parsing
2021-02-15 09:44:27 +01:00
Juergen Spitzmueller
d85c09ae14
GuiSearch: Replace icons on buttons by characters
2021-02-15 08:57:13 +01:00
Juergen Spitzmueller
7869437691
Forgot l7n flag
2021-02-15 08:42:15 +01:00
Pavel Sanda
b497baeea3
Guisearch Qt4 compatibility
2021-02-14 22:44:33 +01:00
Stephan Witt
d65e7a8c87
Additional check for clipboards find buffer support - otherwise Qt complains with unsupported clipboard mode
2021-02-14 22:18:07 +01:00
Jean-Marc Lasgouttes
5a58ca6576
Fix caret height when inserting new inset
...
For now, the simplest thing to do it to compute metrics in all cases
before calling setCurrentFont().
In 2.5, a better approach will be to add a new virtual function
InsetText::setFont that will set correctly TextMetrics::font_ (a cache
of the reference font).
Fixes bug #12126 .
2021-02-14 21:39:15 +01:00
Jean-Marc Lasgouttes
8117172d8a
Fixup 051b6ce6
: fix drawing of EndLabelString
...
Fixes bug #12122 .
2021-02-14 20:09:35 +01:00
Stephan Witt
3d616bfc79
#11925 Remove the gap between button frame and button background (by Daniel Ramoeller)
2021-02-14 19:04:52 +01:00
Juergen Spitzmueller
c4c62f7185
Remove duplicate header
2021-02-14 19:03:31 +01:00
Stephan Witt
a476cc4839
#8055 add support for system-wide find buffer on Mac
...
Command-E is standard for paste to find buffer on Mac. That's why the key binding is changed appropriately.
2021-02-14 18:56:25 +01:00
Stephan Witt
0bd9a8be3d
Proper initialization of private member bv_ of GuiSearchWidget
2021-02-14 18:48:42 +01:00
Juergen Spitzmueller
4db1a08450
Let replace combo enabled if replace buttons are disabled.
2021-02-14 18:23:54 +01:00
Juergen Spitzmueller
1cc615fa95
Remove empty layout
2021-02-14 18:20:27 +01:00
Juergen Spitzmueller
234c6b5c8b
Remove resolved FIXME
2021-02-14 18:15:33 +01:00
Juergen Spitzmueller
28239bf996
Frame takes less space than GroupBox
2021-02-14 18:12:38 +01:00
Richard Kimberly Heck
7c9eaa248d
nullptr
2021-02-14 12:05:45 -05:00
Richard Kimberly Heck
fe38f02cde
Update release notes for bookmark shortcuts
2021-02-14 11:46:27 -05:00
Richard Kimberly Heck
98f3ef0924
Amend 2baa3a46a6
.
2021-02-14 11:41:25 -05:00
Juergen Spitzmueller
2baa3a46a6
Transform simple search dialog to dock widget ( #2625 )
...
Also solves #8054
2021-02-14 17:18:00 +01:00
Kornel Benko
48528d0ff0
FindAdv: Use global declaration for findOne() to be usefull for unit tests
...
cherry-pick from unit-test-adoption/dff4779b06b, author: Yuriy Skalko <yuriy.skalko@gmail.com>
2021-02-14 09:08:23 +01:00
Thibaut Cuvelier
25d3d16360
Amend ac98f21f
2021-02-14 05:36:37 +01:00
Thibaut Cuvelier
ac98f21f8c
DocBook: for books only, create a preface around the first few elements so that the result is valid.
...
Books can only contain parts and chapters, not single sections or text after the abstract.
2021-02-14 05:20:36 +01:00
Enrico Forestieri
11392b7b33
Fix arrows at ends of math decorations
...
For math decorations with arrows at both ends the code was simply
stretching a prototype symbol, thus distorting the arrows.
Another drawing mode is introduced allowing to draw an element by
maintaining its aspect ratio also when it has to be drawn at the
other end of a decoration. An element drawn using this mode is simply
shifted to the other side by adding either the width or the height,
and a finer adjustment can be obtained by specifying an additional
horizontal or vertical shift.
2021-02-14 01:25:07 +01:00
Thibaut Cuvelier
d8c6bc7c1f
Stop using a GCC extension for an unprintable character in regex.
2021-02-13 18:23:20 +01:00
Richard Kimberly Heck
c6dfc70367
Show python info in About LyX
2021-02-13 11:53:14 -05:00
Kornel Benko
fe792d7efe
FindAdv: Tweak language settings
...
Language settings will be ignored if
a.) User selects if with setIgnoreFormat("language", true, true)
or
b.) The pattern does not contain lang-specs other than the default language of document
or
c.) The pattern contains math parts
2021-02-13 16:20:23 +01:00
Juergen Spitzmueller
f8021672ad
Address some deprecation warnings
2021-02-13 15:23:45 +01:00
Juergen Spitzmueller
9089839055
Resolve accelerator conflicts
2021-02-13 07:57:10 +01:00
Thibaut Cuvelier
d18dff22b5
DocBook: add the DocBookNoFontInside layout configuration.
2021-02-13 05:09:59 +01:00
Stephan Witt
46bb8f22c9
#8055 correct processing of LFUN_WORD_FIND option flags for repeated search operations
2021-02-13 04:47:44 +01:00
Enrico Forestieri
400cb1b80f
Fix small glitch with \underXXXarrow and \overXXXarrow
...
When the argument is long enough, the arrow in the on-screen representation
was not covering the first or the last glyphs. For example, using
\overrightarrow{abcdefghijklmnopqrstuvwxyz}
the 'a' was drawn outside the covering arrow.
2021-02-12 23:56:27 +01:00
Enrico Forestieri
2ba8ebab67
Slightly increase size of math decorations
...
Correspondingly tweak some shapes for better results.
Part of #12132 .
2021-02-12 23:16:03 +01:00
Jean-Marc Lasgouttes
1cbbe5c3aa
Do not redraw cursor twice with Page Up/Down
...
Just recompute metrics instead of triggering a full redraw. The old
behavior was that, when the document was less that one page long, the
cursor would blink to the top of the document before going to its
correct position.
2021-02-12 18:35:07 +01:00
Jean-Marc Lasgouttes
a78eb4471f
Make sure that top/bottom margins are visible when needed
...
When the cursor is at the top, it is important to make sure that, not
only its row is visible, but also the extra margin at the beginning of
the document, that was added at 907f0207
.
Fixes part of bug #12123 .
2021-02-12 18:35:07 +01:00
Jean-Marc Lasgouttes
08a3405181
Fix correction of row in getPitAndRowNearY
...
Now that the ascent of the paragraph metrics is not necessarily the
ascent of the first row (see 907f0207
), the test is too strict. Now it
is more symmetrical wrt the !up case.
Note that changing this part of code is associated with a
non-negligible risk of creating a bug elsewhere.
Fixes part of bug #12123 .
2021-02-12 18:35:06 +01:00
Juergen Spitzmueller
b75fc70561
Adapt comment
2021-02-12 14:43:56 +01:00
Juergen Spitzmueller
7f90e3b7d2
Introduce search-string-set ( #8055 )
...
This stores its argument, the currently selected text or the word under
cursor in the search cache that is used by word-find[-backward|-forward]
if no argument is given to those.
Prerequisite for a feature apparently expected on the Mac.
2021-02-12 14:30:50 +01:00
Juergen Spitzmueller
fbef5e687a
Use dialog-show in icon names
...
(and search for them also with dialog-toggle counterpart lfuns)
Fixes #12137
2021-02-12 12:18:51 +01:00
Juergen Spitzmueller
d1ea8a40af
GuiSearch: catch global shortcuts to find forwards/backwards ( #11170 )
2021-02-12 10:50:47 +01:00
Juergen Spitzmueller
c24c82d986
Correctly handle internal clipboard in cell paste
2021-02-11 16:45:27 +01:00
Juergen Spitzmueller
59bead6dfa
Properly fix broken cursor (part of #12134 )
2021-02-11 14:53:02 +01:00
Kornel Benko
4cd80de69e
FindAdv: Ignore math hull if searching for normal text
...
Helps to find strings inside math also if the pattern does not use math hull.
Needed due to the algorithm-change of searching text.
2021-02-11 14:03:46 +01:00
Juergen Spitzmueller
9721a5cc6b
Set GUI name for local greyedouttext color ( #12130 )
2021-02-11 09:05:42 +01:00
Juergen Spitzmueller
456b2b0e8b
Fix indentation
2021-02-11 08:08:37 +01:00
Juergen Spitzmueller
2175899f17
Re-initiate module filter after dialog re-opening ( #12128 )
2021-02-11 08:07:55 +01:00
Juergen Spitzmueller
ad1e7da1fb
Assure filtered module items are not editable ( #12127 )
2021-02-11 07:57:09 +01:00
Richard Kimberly Heck
2874384414
Fix bug #10646 .
2021-02-10 16:04:25 -05:00
Juergen Spitzmueller
65f96abfec
Make delimiter icons a bit smaller
2021-02-10 11:40:56 +01:00
Jean-Marc Lasgouttes
939d25561d
DEPM: do not fix cursor pit if it was in a different cell
...
This bug has been here forever.
Fixes bug #12117 .
2021-02-10 10:22:36 +01:00
Jean-Marc Lasgouttes
d2f23c303c
Remove left/right spacing around top/left buttons
...
This makes collapsible insets look better.
Fixes #10323 .
2021-02-10 10:22:36 +01:00
Juergen Spitzmueller
c2822d684b
Add LFUN_LYXFILES_OPEN
...
This opens the new templates/examples dialog and creates a view if
necessary (#12106 ).
2021-02-10 09:36:32 +01:00
Juergen Spitzmueller
e35574b3ce
Store the AuthorList in the cut stack
...
Otherwise we crash when we paste text with markup into a different buffer
that has change tracking disabled (in this case, markup is now kept).
2021-02-09 16:54:21 +01:00
Juergen Spitzmueller
7cccfe5515
BulletsModule: disable size widget with custom bullet ( #12011 )
2021-02-09 11:01:45 +01:00
Juergen Spitzmueller
11b7714fc1
Use SVG icons in itemize bullet selector
...
This scales much better than the current png solution, is HiDPI- and
darkmode-ready
2021-02-09 10:32:16 +01:00
Richard Kimberly Heck
080b5107c7
Do not show completion cursor if completion is inactive
2021-02-08 18:48:06 -05:00
Jean-Marc Lasgouttes
c311451518
Fix math class code in InsetMathColor
...
The current code is too naïve and asserts on MC_UNKNOWN class.
See discussion here:
https://marc.info/?l=lyx-devel&m=161267112524889&w=2
2021-02-08 13:13:21 +01:00
Stephan Witt
80e20e86be
#11682 amend change 4d4dc96b06
- check Qt version for all Qt::ApplicationState occurances
2021-02-08 09:04:18 +01:00
Stephan Witt
4d4dc96b06
#11682 open new window on Mac if there is none and LyX is activated via dock
2021-02-07 18:53:40 +01:00
Juergen Spitzmueller
233cfed333
GuiDelimiter: properly calculate widget width
2021-02-07 17:24:59 +01:00
Juergen Spitzmueller
0afae1f97d
GuiDelimiter: fix tabstop access
...
DialogButtonBox not yet included, though.
2021-02-07 17:00:20 +01:00
Juergen Spitzmueller
fa56a5eb98
Adjust selection color of delimiter icons
2021-02-07 12:32:11 +01:00
Enrico Forestieri
3cf5a71463
Amend [5ed01cd6/lyxgit]
...
This commit takes into account also the case in which a prime follows
a superscript, a case not explicitly mentioned in bug 1633.
This case has to be accounted for in a different way. We cannot look
ahead when exporting, so we simply tell TeXMathStream to output an
empty group if we just output a superscript and a prime comes next.
2021-02-06 20:07:31 +01:00
Juergen Spitzmueller
5c1a6468ac
GuiDelimiter: use highlight text color if icon is selected
2021-02-06 16:25:55 +01:00
Juergen Spitzmueller
7c33e2fc08
GuiDelimiter: store delimiter name in UserRole
2021-02-06 15:33:13 +01:00
Juergen Spitzmueller
1fe75ae72c
GuiDelimiter: cleanup and fix crash
2021-02-06 15:09:54 +01:00
Juergen Spitzmueller
fcc832ebeb
GuiDelimiter: use SVG icons rather than relying on font ( #12085 )
2021-02-06 14:05:46 +01:00
Jean-Marc Lasgouttes
720f439868
Fix default limits value for (under|over)brace
...
Fixes bug #12107 .
2021-02-05 14:37:26 +01:00
Enrico Forestieri
5ed01cd616
Avoid double superscript errors
...
Fixes #1633
2021-02-05 01:03:09 +01:00
Enrico Forestieri
8202e4e571
Disable direct insertion of multiple spaces in mathed text
...
Fixes #1311
2021-02-04 21:20:45 +01:00
Thibaut Cuvelier
2720ac5dda
The menu Options has been renamed Tools.
2021-02-04 20:30:43 +01:00
Pavel Sanda
ded8c873f4
Attempt on #12066 .
...
Some lfuns are handled directly in GuiApplication while handling
of menu hiding in fullscreen was done on the level of GuiView.
We'll see if this code movement breaks in different scenarios,
but quick grep suggested that the only other way to guiview
dispatch is through drag&drop when menu isn't involved.
2021-02-03 22:06:14 +01:00
Jean-Marc Lasgouttes
9f899a17fa
Force redraw of all bufferviews after zoom in/out
...
Add a new ForceAll update flag that forces to update metrics and
redraw all buffer views.
The situation in multi windows setting is very fragile and will need
to be adressed properly in the 2.5 cycle.
2021-02-03 15:42:11 +01:00
Kornel Benko
8d17594a33
FindAdv: Ignore '\ensuremath{' while searching
...
but keep contents
e.g. '\ensuremath{abc}' ==> 'abc'
2021-02-03 12:21:16 +01:00
Enrico Forestieri
b475cf8707
Amend [bc806084/lyxgit]
...
Rise a bit \dot, \ddots & co., as with some fonts they might
be drawn too close to the symbol they decorate.
2021-02-03 11:45:52 +01:00
Juergen Spitzmueller
8d5da386c4
Amend [b6c089afa4/lyxgit].
2021-02-03 10:23:17 +01:00
Richard Kimberly Heck
bd0044f9d5
Fix bug #11351 .
...
Patch from Daniel.
2021-02-02 17:34:25 -05:00
Richard Kimberly Heck
7b6db55f28
Use a static map so we don't have to reinitialize every time.
2021-02-02 17:30:57 -05:00
Richard Kimberly Heck
b6c089afa4
Fix #12104
2021-02-02 17:23:00 -05:00
Enrico Forestieri
d999d8e8d9
Improve alignment of math decorations
...
This patch takes into account the skewness of a character for properly
align a decoration. Unfortunately, the required amount of shift depends
on single chars, so that the recently introduced FontMetrics::italicSlope()
method cannot be used with all characters. A heuristics that produces
satisfactory results is using the italic slope only with characters whose
italic correction (kerning) is zero.
Part of #11491
2021-02-02 19:39:52 +01:00
Enrico Forestieri
bc806084cd
Improve appearance of dots at higher zoom levels
...
Make \dot, \ddot and friends more round when increasing zoom
Part of #11491
2021-02-01 20:02:37 +01:00
Enrico Forestieri
9f3920447e
Make math decorations scalable with zoom level
...
Fixes #11491
2021-02-01 02:53:00 +01:00
Juergen Spitzmueller
1bc7e73c74
Fix highlighting of cursor context in View Source ( #12099 )
...
This also considers dark mode,
2021-01-31 17:54:54 +01:00
Enrico Forestieri
04c0cce43e
Fix make check
...
We have to explicitly link zlib after [197ea636/lyxgit].
2021-01-31 15:21:23 +01:00
Kornel Benko
3a1b19c5c3
FindAdv: Optimization
...
Using unordered_map instead of map.
Reasons:
1.) The relevant maps contain 166(Keys) and 649(Accents) entries.
This mean that average access with 'map' needs 8 to 10 compares to find the value.
2.) Since we are using at least c++11, the unordered_map is available
2.) increasing the maps (in future) needs not to be considered anymore, because
the access-time will not increase.
2021-01-31 09:53:06 +01:00
Enrico Forestieri
c79ec4114e
Change backspace behavior in align type equations
...
When hitting backspace in the first position of a cell in mathed,
if the cell is part of an array, the whole array is dissolved
and the sole cell content pasted in the containing environment.
But if the cell is part of an eqnarray or align math hull type, the
cursor is simply (and unexpectedly) taken out of the whole equation,
which is left unchanged.
This patch makes backspace equivalent to the cursor left key in those
cases, while leaving the behavior unchanged in all other ones.
Fixes #11678
2021-01-31 00:51:15 +01:00
Daniel Ramoeller
d008ca2539
Preserve multirow/-column content on deletion of subrows/columns ( #11380 )
2021-01-30 17:03:33 +01:00
Juergen Spitzmueller
c567c78e90
Add ProvideInsetLayout and ModifyInsetLayout ( #12098 )
...
This complements ProvideStyle and ModifyStyle.
2021-01-30 15:56:31 +01:00
Juergen Spitzmueller
897ee2ed88
Do not overwrite InsetLayout font/color
2021-01-30 15:16:12 +01:00
Juergen Spitzmueller
c8e04eb2f4
Whitespace
2021-01-30 15:11:18 +01:00
Juergen Spitzmueller
be14b73787
Fix a null pointer dereference spotted by coverity
2021-01-30 13:46:47 +01:00
Juergen Spitzmueller
c83526c3ca
Revert "No need to set background color of a newly created branch."
...
This breaks color initialization with new branches in dark mode.
This reverts commit 5145694cd0
.
2021-01-30 09:16:15 +01:00
Juergen Spitzmueller
9dd71b9e4a
Recent multirow finally allows multiple paragraphs
2021-01-30 09:15:14 +01:00
Enrico Forestieri
22ee249c3e
Allow pasting references to mathed
...
A reference can be directly inserted into mathed but cannot be pasted
because the pasted material is returned in plain text format. This patch
allows getting a string from the cut stack in a suitable format allowing
the math parser to actually create an InsetRef.
Fixes #11539
2021-01-30 01:32:40 +01:00
Jean-Marc Lasgouttes
b1efc5a48e
Initialize properly IconInfo struct
...
Spotted by coverity.
2021-01-29 18:57:13 +01:00
Jean-Marc Lasgouttes
5366666c83
Copy/paste error in BranchList::setColors
...
Spotted by coverity.
2021-01-29 18:51:19 +01:00
Jean-Marc Lasgouttes
ef091ca0ea
ChangesMonitor: beware of exceptions in destructor
...
There may be an exception is the paragraph does not have an owner. In
this case, there is nothing to do anyway.
Spotted by coverity.
2021-01-29 18:45:50 +01:00
Jean-Marc Lasgouttes
bbae2c8c2a
FindAndReplaceOptions: initialize properly matchAtStart
...
Spotted by coverity.
2021-01-29 18:35:38 +01:00
Jean-Marc Lasgouttes
5145694cd0
No need to set background color of a newly created branch.
...
Fixes a null pointer dereference spotted by coverity.
2021-01-29 18:29:55 +01:00
Jean-Marc Lasgouttes
dca5646163
LengthValidator: initialize properly positive_
...
Spotted by coverity.
2021-01-29 18:17:16 +01:00
Jean-Marc Lasgouttes
90bceb65d3
Initialise correctly branch_list_id_
...
Reported by coverity.
2021-01-29 18:07:37 +01:00
Juergen Spitzmueller
fd8b3c148f
Cosmetics
2021-01-29 15:46:46 +01:00
Juergen Spitzmueller
6d05e78168
Do not output \maketitle in table cells if the table is in the title
2021-01-29 15:45:54 +01:00
Jean-Marc Lasgouttes
911b01a3ca
Fixup f3a0e8ff
: Reset needUpdate after buffer update
2021-01-29 14:31:10 +01:00
Enrico Forestieri
070270fdc7
Avoid deprecation warnings
...
In Qt 5.15 many deprecation warnings are issued, presumably for
helping the port to Qt 6. They are really a load but can be
shuten up by using -DQT_NO_DEPRECATED_WARNINGS, except for the ones
about MidButton, AdjustToMinimumContentsLength, and DefaultLocaleLongDate.
This change should not affect compilation with Qt 4, as all changes are
backward compatible (only Qt versions prior 4.5 could be affected).
2021-01-29 13:12:29 +01:00
Juergen Spitzmueller
52196d6c48
Set proper multirow size in X table columns
2021-01-29 10:15:36 +01:00
Jean-Marc Lasgouttes
f3a0e8ff9a
Run updateBuffer when adding/merging changes
...
Following 4a4ded22
, the enabling of some change-related functions is
handled in updateBuffer. However, this method is not ran at every
document change for performance reasons.
This patch adds code to every place that modifies
Paragraph::Private::changes_ that checks whether the `changedness' of
the paragraph, err... changes.
To this end, a new helper struct is introduced that remembers
paragraph state at contruction time, and compares it to new state in
the destructor.
New forceUpdate/needUpdate methods are added to Buffer class, since
the cursor is in general not available in the places where these
changes are made.
Fixes bug #12074 .
2021-01-28 11:30:05 +01:00
Juergen Spitzmueller
aa781a4891
Update tex2lyx tests
2021-01-28 10:28:57 +01:00
Juergen Spitzmueller
b42c5dd7d6
Add frontispiece layout to KOMA classes
2021-01-28 10:24:28 +01:00
Jean-Marc Lasgouttes
48e7b1d01e
Make InsetCaption label localizable
...
Part of bug #10531 .
2021-01-27 10:32:18 +01:00
Jean-Marc Lasgouttes
bb8278e6ce
Fix InsetCaption in RTL environment.
...
This requires to add a new mutable member, rtl_, to remember this context.
Part of bug #10531 .
2021-01-26 17:58:11 +01:00
Juergen Spitzmueller
c5e5dda0ef
Some minor polishment
2021-01-26 14:50:14 +01:00
Juergen Spitzmueller
27e7eb4b14
Fix copy-paste error ( #12092 )
2021-01-26 14:48:12 +01:00
Jean-Marc Lasgouttes
cb3db8b4cf
InsetCaption: move intialization to declaration
2021-01-26 10:18:31 +01:00
Juergen Spitzmueller
76eae4572e
Introduce InputGlobal ( #12087 )
...
This is a variant of Input for layout files that only searches build
and system directories and thus allows "InputGlobal name.inc" in a user
file name.inc that attempts to modify its global counterpart.
2021-01-26 08:42:39 +01:00
Richard Kimberly Heck
10c7954ffb
Const
2021-01-25 14:35:37 -05:00
Juergen Spitzmueller
82a8ed4d55
Allow to move multiple (selected) columns/rows ( #9045 )
2021-01-25 19:00:50 +01:00
Jean-Marc Lasgouttes
6bf8a0ade8
Disable respectOSkbd checkbox
...
This is not ready yet. See discussion in #6450 .
2021-01-25 18:35:41 +01:00
Jean-Marc Lasgouttes
ea0049aec8
Do not disable DEPM paragraph deleting when FreeSpacing is true.
...
This is an old issue that never got fixed.
Fixes bug #10413 .
2021-01-25 17:41:20 +01:00
Juergen Spitzmueller
b90c3fdfa1
GuiTabular: only apply changed features ( #10450 )
2021-01-25 11:00:06 +01:00
Kornel Benko
5d8cacf3ec
FindAdv: Select search for language-format depending on document language.
...
In case of search with format:
If the pattern contains language spec different to the document language
then do not ignore language setting.
Also renamed 'matchstart' in FindAndReplaceOptions to 'matchAtStart'
2021-01-25 10:52:14 +01:00
Juergen Spitzmueller
a05c7b3555
Fix alignment missetting with multirows ( #10826 )
2021-01-25 09:09:07 +01:00
Juergen Spitzmueller
4029680413
Fix on-screen vertical alignment in some table cells ( #7757 )
2021-01-24 15:28:37 +01:00
Juergen Spitzmueller
e2a66df3b8
LFUN_FILE_OPEN: Strip quotes from argument ( #12091 )
2021-01-24 14:48:55 +01:00
Juergen Spitzmueller
f84007bd53
Fixup tex2lyx parse_cell_content method
2021-01-23 15:50:39 +01:00
Juergen Spitzmueller
7f78050957
Fix metrics of varwidth cells ( #12089 )
2021-01-23 15:22:09 +01:00
Juergen Spitzmueller
8d09fb5bf0
Support non-default styles in multirow
2021-01-23 14:53:51 +01:00
Juergen Spitzmueller
5979a01b1d
Allow paragraph and line breaks in multirow ( #12083 )
2021-01-23 14:24:54 +01:00
Juergen Spitzmueller
526d2841df
tex2lyx: support extended varwidth table cells
2021-01-23 09:33:52 +01:00
Juergen Spitzmueller
af550b4589
update tex2lyx tests
2021-01-23 08:19:21 +01:00
Juergen Spitzmueller
7bd072e750
Fix status of tabular function
2021-01-23 08:10:55 +01:00
Kornel Benko
961e393b95
FindAdv: Make search for text in deleted regions configurable.
...
The function call 'search-ignore deleted false'
makes findadv to search also deleted parts,
while 'search-ignore deleted true' will omit these parts.
2021-01-22 21:11:28 +01:00
Juergen Spitzmueller
0b0757916e
Format incremented to 605: Extended variable table cell support
...
- Multicolumn now supports multiple paragraphs in non-fixed-width context.
- Multicolumn now supports valign in non-fixed-width context.
- varwidth columns now properly align horizontally and vertically.
2021-01-22 19:16:43 +01:00
Kornel Benko
469b43c791
FindAdv: Do not search in deleted text.
2021-01-22 17:03:54 +01:00
Juergen Spitzmueller
6775d7c3a2
Prevent more local colors from leaking ( #6626 )
2021-01-22 10:34:41 +01:00
Kornel Benko
d81673ecf0
FindAdv: Fix backward search and search for special char '{' and '}'
...
Change effects mostly searches with ignored format search.
Backwards search is much slower, but at least more or less working.
2021-01-21 13:39:25 +01:00
Juergen Spitzmueller
0fa0ba455f
Do not paint change mark for individual table cell insets ( #12077 )
2021-01-21 09:04:29 +01:00
Juergen Spitzmueller
514cd87970
Prevent branch background color from leaking out of the document
...
This is assured by a unique branchlist ID that is now part of the branch
color name
2021-01-21 08:09:41 +01:00
Kornel Benko
5f6027281d
Amend c041bb66
: Unintended debug output slipped in
2021-01-20 17:10:39 +01:00
Juergen Spitzmueller
06605a587f
Account for spaces in paths to templates ( #12082 )
2021-01-20 17:05:10 +01:00
Juergen Spitzmueller
ee475b62fa
Do not rely on hardcoded color when determining boxbgcolor
2021-01-20 14:15:48 +01:00
Juergen Spitzmueller
024980cf43
Do not rely on hardcoded color when determining notefontcolor
2021-01-20 13:58:24 +01:00
Juergen Spitzmueller
3375dccef6
Set LaTeX color for notefontcolor ( #9283 )
2021-01-20 13:57:44 +01:00
Juergen Spitzmueller
77c8a2df0f
Ass method to add a latexname to a local color (needed for #9283 )
2021-01-20 13:55:48 +01:00
Kornel Benko
c041bb667a
FindAdv: Fix interpretation of match-results
...
Since commit c600906d92
all matches are match-results of examined strings starting
with a character of the same cursor depth, we can be sure to match the same string again if:
1.) the number of characters to the end of the examined strings match.
2.) the match-lengths are identical
2021-01-20 12:41:37 +01:00
Juergen Spitzmueller
b1afdf1c19
Correct disabled graphics scale string ( #9443 )
2021-01-20 12:06:22 +01:00
Juergen Spitzmueller
65af4e44bb
Final touch on lyxgreyedout
2021-01-20 11:14:24 +01:00
Juergen Spitzmueller
e3e8b600eb
Further simplification of lyxgreyedout definition
...
Also fix an issue in RTL/LuaTeX
2021-01-20 11:04:16 +01:00
Juergen Spitzmueller
f2a204a82d
Centralize lyxgreyedout definition with RTL and polish LaTeX output
2021-01-20 10:28:33 +01:00
Juergen Spitzmueller
0b31fcd083
Use different color for change-tracked greyedout text ( #12025 )
...
We use a blended version of the normal lyxadded and lyxdeleted colors
2021-01-20 08:59:52 +01:00
Juergen Spitzmueller
59869417b8
Comment
2021-01-20 08:05:17 +01:00
Juergen Spitzmueller
1d613827c6
Do not output tracked deleted paragraph break in listings ( #10418 )
2021-01-20 07:38:33 +01:00
Jean-Marc Lasgouttes
566b4de5cd
Fix off-by-one condition when right clicking over selection
...
Fixes bug #10429 .
2021-01-19 19:24:10 +01:00
Jean-Marc Lasgouttes
5908bb3ea6
Cleanup button handling in InsetInclude
...
The include inset has its own button_ object, that hides the button_
object of the InsetCommand parent. Remove that.
Remove the hand-made caching that uses the set_label_ boolean.
Let metrics() and draw() use the inherited methods. This requires to
use setBroken as needed and to implement inheritFont.
The use of InsetCommand::draw is what restores the hover effect.
Fixes bug #10415 .
2021-01-19 19:24:10 +01:00
Juergen Spitzmueller
64b22a6d80
update tex2lyx tests
2021-01-19 18:33:22 +01:00
Kornel Benko
052cad8b17
FindAdv: Reduce the count of debug messages
2021-01-19 17:54:17 +01:00
Juergen Spitzmueller
7b762ee950
Branch: Implement separate static colors in dark mode
...
Set colors now apply to the active mode only. Matching reversed colors
are produced for the other mode if no color is assigned yet.
File format change.
2021-01-19 17:04:04 +01:00
Juergen Spitzmueller
81c19502c1
Consider darkmode when inserting new branch
2021-01-19 13:28:21 +01:00
Jean-Marc Lasgouttes
4062cbd278
Remove RenderButton::button_box_, which is unused.
2021-01-19 11:27:54 +01:00
Juergen Spitzmueller
8cf6b34738
Update color table in branch list
2021-01-19 09:22:07 +01:00
Juergen Spitzmueller
3f1799b2c8
Add method to check whether LyX runs in dark mode
2021-01-19 09:21:36 +01:00
Juergen Spitzmueller
29f98ab245
Use isDarkMode() method
2021-01-19 08:37:05 +01:00
Kornel Benko
3259f3c73e
FindAdv: Remove dead code
...
+ correct detection of backspaced '{' and '}' in regex with format search enabled
2021-01-18 17:06:05 +01:00
Kornel Benko
96f9c8fb19
FindAdv: Amend2 dacd2c45
: Handle search for '{' and '}'
...
Allow for using 'a{2,7}' to find 2 to 7 consecutive chars 'a'
2021-01-18 16:06:40 +01:00
Kornel Benko
dacd2c45b7
FindAdv: Amend ec387b6d
: Handle search for '{' and '}'
...
1) Take care of different input if changed the search-mode (with/without format)
This amends ec387b6d
2) Make the braces used in text to be treated as single characters
e.g. transform '\braceleft' to some unicode value
3) Try to use '$' as 'end of sequence' in regex
We have to remove '}' and '\n' chars from the examined string
2021-01-18 12:17:57 +01:00
Juergen Spitzmueller
2225f0ed61
Update tex2lyx tests
2021-01-18 10:49:42 +01:00
Juergen Spitzmueller
9a6f7ece97
Add option to revert graphics colors in dark mode ( #12076 )
...
This amends [5d47a7ee57506/lyxgit]
2021-01-18 10:46:16 +01:00
Juergen Spitzmueller
6766ca2c99
Update tex2lyx tests
2021-01-18 10:01:09 +01:00
Juergen Spitzmueller
057753dc75
Allow semantic colors in branches and use semantic background color by default
...
Addresses most crucial part of #12075
File format change
2021-01-18 09:56:53 +01:00
Kornel Benko
ec387b6d65
FindAdv: Handle search for '{' and '}'
...
In format-search the chars '{' and '}' are understood as latex parentheses, which normally are not
part of text and are discarded.
Instead we fake them as if they were a char like \backslash or \guilemotright or such.
2021-01-18 01:10:07 +01:00
Juergen Spitzmueller
a4e6f0dead
Add some more hints to empty margin widgets ( #11424 )
2021-01-17 17:49:45 +01:00
Kornel Benko
c600906d92
FindAdv: Optimizing forward search
...
Still not as fast as quick search
Also started to remove some unused code.
2021-01-17 13:35:07 +01:00
Juergen Spitzmueller
5d47a7ee57
Try to automatically handle transparent pictures in darkmode ( #12076 )
...
We'll see how this plays in practice.
2021-01-17 11:03:21 +01:00
Juergen Spitzmueller
606a404632
Extend non-default margins tooltip ( #11424 )
2021-01-17 10:18:45 +01:00
Kornel Benko
7b8e26e3ad
FindAdv: Search for innermost depth needed if matched string not inside some other inset.
2021-01-15 17:12:41 +01:00
Richard Kimberly Heck
fd74bddffc
Keep dialog connected to cross-ref inset after Apply.
...
This does not actually have any effect yet, due to the fact that
disconnectAfterApply returns true (and this is a GuiDialog).
2021-01-15 11:12:25 -05:00
Richard Kimberly Heck
a9bb062fc3
Keep dialog connected to External inset after Apply
2021-01-15 11:12:25 -05:00
Richard Kimberly Heck
bd555eebe2
Keep dialog connected to BibTeX inset after Apply
2021-01-15 11:12:25 -05:00
Richard Kimberly Heck
997bf3ecb7
Revert unintended commit from before
2021-01-15 11:12:25 -05:00
Kornel Benko
ea5e16d075
Replace calls from make_unique to lyx::make_unique
...
After advice from Yuriy Skalko to satisfy compilation with clang8
2021-01-15 11:36:14 +01:00
Kornel Benko
dff9438a36
FindAdv: Discard the optional arguments of \part, \chapter, ...
...
Not easy selectable anyway, and hard to use while searching.
2021-01-14 23:25:58 +01:00
Richard Kimberly Heck
be19fdee3a
Try to catch some other cases of inappropriate TOC updating in internal bufers.
2021-01-14 14:20:55 -05:00
Richard Kimberly Heck
e7b9aa672f
Fix crash reported by Kornel.
...
See https://marc.info/?l=lyx-devel&m=161058233016780&w=2 .
Internal Buffers do not have TOCs associated with them, so we should
not try to update them. This fixes Kornel's crash, but there may be
other instances of the problem.
2021-01-14 14:17:51 -05:00
Juergen Spitzmueller
f24fa552de
Fix crash (missing Buffer update)
2021-01-14 17:17:58 +01:00
Kornel Benko
a7590d33e3
FindAdv: Add handling of regex char '^' at start also for search with disabled format
...
lyxfind.cpp:
handle \mathcircumflex inside regex
output_latex.cpp:
don't mark extra end of parameters if no options involved
2021-01-14 14:44:21 +01:00
Kornel Benko
9bdd0b31db
Fix #12069 : Broken search
...
Do not count ignored characters as matching
2021-01-14 14:36:07 +01:00
Richard Kimberly Heck
fcea6c471c
Revert "Add move constructor and move assignment operator for FileName class"
...
For now, since it's causing problems on OSX particularly.
This reverts commit 854c9de8fa
.
2021-01-14 03:08:12 -05:00
Juergen Spitzmueller
81af5ac742
Fix comment
2021-01-14 08:57:15 +01:00
Juergen Spitzmueller
c5b7d871e0
Strip % characters from nomenclWidest()
...
This character now (oddly) serves as escape char in newer nomencl versions
but it still comments out in all other contexts.
See #10634
2021-01-14 08:55:15 +01:00
Richard Kimberly Heck
0903d26f50
Whitespace
2021-01-14 01:28:42 -05:00
Richard Kimberly Heck
1582a2afe1
Fix bug #12068
2021-01-14 01:15:19 -05:00
Richard Kimberly Heck
9504ec84c5
Simplify and polish
2021-01-13 14:42:26 -05:00
Richard Kimberly Heck
d41ec3368d
Fix bug #10635
2021-01-13 14:38:48 -05:00
Jean-Marc Lasgouttes
86191314cb
Record undo properly when inserting math script
...
The current code did not always record undo at the right level.
Fixes bug #10843 .
2021-01-13 11:41:29 +01:00
Juergen Spitzmueller
22efd5a5ef
Simple Search: find isChar() insets ( #11462 )
2021-01-13 08:19:54 +01:00
Kornel Benko
8ca508d004
FindAdv: Refactoring some routines which was hard to understand
...
Most of the previous code is only commented out, will remove them completely later.
(Debugging this code was extremely exhausting)
2021-01-12 19:33:29 +01:00
Juergen Spitzmueller
c049527941
Consider inset strings in simple find/replaceAll ( #12049 )
2021-01-12 16:45:32 +01:00
Juergen Spitzmueller
1b2a56e2d2
Ignore tracked deletions in simple replace ( #11194 )
2021-01-12 16:13:47 +01:00
Juergen Spitzmueller
d87511308b
Ignore tracked deletions in simple find ( #11051 )
2021-01-12 16:11:58 +01:00
Kornel Benko
2318baec7b
FindAdv: Allow regex searches at start of paragraph
...
For example regex '^\w+' finds now only the first word in any paragraph
even if searching without 'ignore format' is set.
2021-01-11 14:50:03 +01:00
Kornel Benko
29b9dd8b2f
FindAdv: Search for 'whole words' with help of modified regex.
2021-01-10 23:02:55 +01:00
Stephan Witt
2844a4ec06
drop unintented static declaration from local temporary variable (formerly a global static constant)
2021-01-10 22:03:19 +01:00
Kornel Benko
31c3bddd6e
FindAdv: Converting patterns without regex to use regex instead
...
Makes the code with less exceptions
(no need to differentiate beteen use_regex and !use_regex)
Move the creation of regexes to own subroutine (Handles '#if QTSEARCH ... #endif')
Use cursor position differences instead of length of matched string. This is important for putSelectionAt()
2021-01-10 17:17:37 +01:00
Juergen Spitzmueller
c77ab339c1
Avoid \@ifundefined after user preamble
...
Users might have used \makeatother (#11163 ).
\ifdefined (of e-tex) can be considered available nowadays.
2021-01-10 09:55:45 +01:00
Richard Kimberly Heck
98bfbe9ddf
Fix bug #6128 .
2021-01-10 02:40:12 -05:00
Richard Kimberly Heck
2fcc764728
Fix problem with display of include insets with non-existent files.
2021-01-10 02:08:18 -05:00
Richard Kimberly Heck
3f3d769107
Count words in hyperlink
2021-01-10 01:54:40 -05:00
Richard Kimberly Heck
12bb380941
Fix bug #5972 : Count words in citations (approximately).
2021-01-10 01:43:34 -05:00
Richard Kimberly Heck
50b99f810f
Fix bug #3205 .
...
Allows external edit of non-existent files.
2021-01-10 00:43:01 -05:00
Richard Kimberly Heck
ed2d3e199f
Fix bug #4241 : Addition to Intro
2021-01-09 22:17:52 -05:00
Richard Kimberly Heck
9446aa3640
Fix bug #11030 .
...
Factor out the code that connects to a newly created dialog and then
use that also in GuiGraphics.
There must be many other dialogs that need this same treatment....
2021-01-09 20:33:23 -05:00
Richard Kimberly Heck
e438c0f90b
Fix bug #11010 .
...
Handle LFUN_PHANTOM_INSERT in math.
2021-01-09 19:17:47 -05:00
Richard Kimberly Heck
d908263908
nullptr
2021-01-09 19:02:19 -05:00
Richard Kimberly Heck
725bee17b1
Show plural and caps status for formatted references. Rest of #11073 .
...
Patch from Daniel, more or less.
2021-01-09 18:06:50 -05:00
Richard Kimberly Heck
b564fd01ef
Update buffer after changing reference options. Part of #11073 .
2021-01-09 17:59:07 -05:00
Kornel Benko
60980b0eda
FindAdv: Amend 474cb42e
, implement sub-match replace.
2021-01-09 17:03:30 +01:00
Yuriy Skalko
854c9de8fa
Add move constructor and move assignment operator for FileName class
2021-01-09 11:23:33 +02:00
Juergen Spitzmueller
73df32bec4
Disambiguate homographic inflections
...
These are not homographic in other languages
(e.g. German "Öffnen" vs. "Geöffnet")
2021-01-09 09:44:38 +01:00
Juergen Spitzmueller
b5f83881ab
Amend aaaae562db
2021-01-09 09:17:41 +01:00
Jean-Marc Lasgouttes
9e1db65932
Move handling of LFUN_COPY to BufferView
...
It turns out that the code is the same in texted ans mathed and that
whatever is done in InsetTabular is not useful.
This means that we do not need to deal Text::dispatch idiosyncrasies
(in particular forcing the cursor to be visible).
Fix bug #11225 .
2021-01-08 19:31:42 +01:00
Kornel Benko
c3cda5ffd4
FindAdv: Save sub-matches in MatchStringAdv class
...
Prepare for use while replacing:
(backslashed numbers in the replace buffer should be replaced with the relevant
sub-matched strings.)
2021-01-08 12:05:51 +01:00
Juergen Spitzmueller
79ef5694d1
Use nomath font also if other font package is selected ( #11733 )
2021-01-08 11:18:18 +01:00
Richard Kimberly Heck
81413e77ee
Amend cf07d4825
2021-01-07 15:56:55 -05:00
Kornel Benko
f2e49938f3
FindAdv: Save found matches (e.g. \0, \1, \2, ...)
...
Only while debugging for now. Later we may use the saved values in replace string
2021-01-07 17:04:27 +01:00
Juergen Spitzmueller
e947cdab3e
Properly disable Apply/OK in InsetParamsDialog ( #11440 )
2021-01-07 13:28:10 +01:00
Juergen Spitzmueller
7a992bb699
GuiParagraph: apply pending changes when setting "immediate apply" ( #11592 )
2021-01-07 13:06:15 +01:00
Jean-Marc Lasgouttes
c10aa3064f
typo
2021-01-07 12:36:36 +01:00
Juergen Spitzmueller
6430931e27
Hint to deleted included file in ct output ( #11809 )
2021-01-07 12:08:59 +01:00
Juergen Spitzmueller
aaaae562db
Fix nesting issue in environment-split ( #11971 )
2021-01-07 11:53:35 +01:00
Enrico Forestieri
fece5d4f37
Correctly terminate a user math macro in certain circumstances
...
If a macro has only optionals and none is specified and a [ immediately
follows, we have to terminate the macro with {}, otherwise what follows
is taken to be an optional argument.
Fixes #11665 .
2021-01-07 00:57:36 +01:00
Jean-Marc Lasgouttes
99e636ae7b
Display bookmarks in the workarea.
...
The bookmarks are added as virtual elements in display Rows. Bookmarks
are shown with circled numbers. A new color "bookmarks" has been
added. Currently bookmark 0 (the return position) is not displayed
because it is very disturbing in practice.
To make this work, a new method BookmarksSection::bookmarksInPar
retuns the list of bookmarks in a paragraph along with their position.
Force redraw when using bookmark-save and bookmark-clear.
Fixes bug #2496 .
2021-01-06 20:20:03 +01:00
Jean-Marc Lasgouttes
b64b1aa85e
Fix use of BookmarkSection::size()
...
The value was 9 instead of 10, which forced its users to use unusual code.
2021-01-06 19:33:20 +01:00
Jean-Marc Lasgouttes
e1261817d2
fix Row::findElement when there is a Virtual element
2021-01-06 18:49:41 +01:00
Jean-Marc Lasgouttes
51b37cd4d8
Remove some useless Row:: prefixes
2021-01-06 18:15:19 +01:00
Jean-Marc Lasgouttes
9c37cb4759
Style cleanup to bookmark code
2021-01-06 18:15:19 +01:00
Kornel Benko
54a0b95a2b
Amend 6211469b
: FindAdv: Fine tuning
...
Handle gracefully multiple '\\'
2021-01-06 14:22:26 +01:00
Thibaut Cuvelier
3fdd05a7fa
When previewing a document, use the right kind of comment.
...
This avoids generating % for HTML or DocBook: % indicates a comment in TeX, but not in XML, it's just a character. The snippet that is shown is therefore not valid.
2021-01-06 14:08:00 +01:00
Thibaut Cuvelier
e3c1fc2ad5
Implement \case for AASTeX.
2021-01-06 14:08:00 +01:00
Jean-Marc Lasgouttes
28bca59dec
Fix unused paramaters warnings
2021-01-06 11:57:22 +01:00
Jean-Marc Lasgouttes
baae41bd05
Remove extra spaces
2021-01-06 11:10:11 +01:00
Richard Kimberly Heck
40603a7552
Fix bug #3964 .
...
As suggested there, we attach ourselves to the newly created inset,
if we in fact just created an inset. (This will only matter if Apply
was clicked, so the dialog is still open, but I did the calcuation
anyway, as it seems cheap enough.) This allows the user to modify
that inset (e.g., change the format) and also prevents another click
on Apply, or OK, from creating another dialog.
I've also removed the override of disconnectOnApply(). It does not
work, anyway, I think because it only works with GuiDialog, not with
DialogView-based dialogs.
2021-01-06 03:50:47 -05:00
Richard Kimberly Heck
be34206b0c
Update tex2lyx tests
2021-01-06 01:58:30 -05:00
Kornel Benko
6211469b5f
FindAdv: A try to handle backslashes in text
...
Otherwise we are unable to distinguish text from latex commands.
For instance '\color{blue}' in text-part is normal text, while othervise
it defines following characters as being blue colored)
2021-01-06 02:20:15 +01:00
Enrico Forestieri
d85710d32e
Make paste in ensuremath work as in simple math hulls
...
The ensuremath math inset derives from InsetMathNest, so that only the
first cell of a grid gets pasted. This patch makes it a fixed 1x1 grid
inset so that pasting works as in normal simple math hulls, i.e., all
cells are pasted, one after the other.
Fixes #11617 .
2021-01-06 02:07:25 +01:00
Richard Kimberly Heck
59096c9265
Move assignment where needed
2021-01-05 18:22:09 -05:00
Richard Kimberly Heck
cf07d4825f
Fix bug #11104 . Activate refstyle support for InsetMathRef.
...
At the moment, there is no support for plurals and capitalization.
A long comment explains why. Support could be added for that without
a format change.
2021-01-05 18:17:53 -05:00
Richard Kimberly Heck
79a21be5c3
Micro optimization and constness
2021-01-05 17:45:50 -05:00
Richard Kimberly Heck
14c2f5d954
Fix comment
2021-01-05 17:45:50 -05:00
Jean-Marc Lasgouttes
bea482877e
Re-implement display of MARGIN_RIGHT_ADDRESS_BOX
...
The correct way of implementing this is at paragraph level. Once this
is clear, the implementation is straightforward.
Note that RtL is not handled correctly by the \lyxrightaddress macro.
Fixes bug #11918 and #8152 .
2021-01-05 17:58:21 +01:00
Jean-Marc Lasgouttes
824d1c993a
Fixup 294e4884
: center correctly Abstract label when paragraph is empty
...
When a paragraph is empty, it was not possible to query what the left
margin would be for an hypothetical second row.
Modify TextMetrics::leftMargin so that it does not test
whether position is after the last position of the paragraph.
Cosmetics: set the size of label to "small" for Abstract layout in
standard classes and reduce the spacing between label and text.
Fixes remainder of #11939 .
2021-01-05 15:21:04 +01:00
Jean-Marc Lasgouttes
b8188e54dd
Revert "Center correctly centered top labels (e.g. abstract)"
...
This reverts commit 6c1855313c
.
2021-01-05 15:14:41 +01:00
Jean-Marc Lasgouttes
6c1855313c
Center correctly centered top labels (e.g. abstract)
...
Since the first row may be indented, it is necessary to find out what
the left margin would be on the next row (even if this next row does
not exst.
To this end, modify TextMetrics::leftMargin so that it does not test
whether position is after the last position of the paragraph.
Cosmetics: set the size of label to "small" for Abstract layout in
standard classes and reduce the spacing between label and text.
Fixes remainder of #11939 .
2021-01-05 14:53:15 +01:00
Enrico Forestieri
2099dca5d3
Do not replace nonexistent environment variables
...
References to environment variables embedded in a filename are expanded
and replaced by their value. However, if a variable does not exist, its
reference is simply erased from the filename, causing havoc (see #7801 ).
This has been like that since ever and cannot be changed, both for
backward compatibility and because this feature is currently used in
the Windows installer.
A possible backward compatible strategy is leaving as is the reference
to the environment variable (introduced by a $ sign) in the filename
if it does not exist. This is done in this patch, which also assumes
that an escape character is never used in a filename (inserting a $ in
the filename is easy, but I don't think one is able to easily insert
an escape character).
2021-01-04 23:00:42 +01:00
Richard Kimberly Heck
bbffbf92ac
Remove elipses from "Open" buttons in About LyX dialog. Fixes #12019 .
2021-01-04 14:53:41 -05:00
Richard Kimberly Heck
9ffba4b72d
nullptr
2021-01-04 13:47:17 -05:00
Kornel Benko
ac6b27040a
FindAdv: Small refactoring
2021-01-04 16:57:56 +01:00
Yuriy Skalko
e8099942c7
Show caught exception message in findAdv
2021-01-04 15:45:26 +02:00
Yuriy Skalko
a0b65e9bf8
Define keyboard codes for Cyrillic letters, enable shortcuts using them
2021-01-04 12:00:50 +02:00
Richard Kimberly Heck
84e8ce4ce5
Simplify
2021-01-04 01:40:22 -05:00
Kornel Benko
6750724717
Amend(2) 8c67cb8c
: (FindAdv: Try to make regex search with format enabled somehow faster)
...
Use innermost nesting to start searches.
Some fine tuning to determine correct match.
(If the regex contains '(\S)\1' at the end, then this regex would match '}}',
but this is often the case at and of examined string. We have to disable this invalid match.
)
2021-01-04 07:25:29 +01:00
Richard Kimberly Heck
db36ec1ccf
Pop a message if the search fails. Fixes #11441
2021-01-04 01:06:33 -05:00
Richard Kimberly Heck
fc80eba370
https
...
Fixes the last of #10945 .
2021-01-03 23:22:31 -05:00
Richard Kimberly Heck
d4757eace0
Fix bug #11568 .
...
We can't rely on allow_async to tell us whether to put_in_tmpdir.
2021-01-03 22:56:05 -05:00
Richard Kimberly Heck
4cee3478f7
nullptr
2021-01-03 22:36:04 -05:00
Richard Kimberly Heck
e31eadfd37
We don't need to reload a dirty file. Fixes #11788 .
2021-01-03 19:58:19 -05:00
Richard Kimberly Heck
0786b80828
Fix MathML delimiters again.
...
Patch from lynx.
2021-01-03 19:29:04 -05:00
Richard Kimberly Heck
68d9ea4930
Fix #11992 : Disable modification of captions in subfloats.
...
Patch from Daniel.
2021-01-03 14:41:38 -05:00
Richard Kimberly Heck
33f9cfb796
Capitalize labels of floats, etc. Fixes #11993 .
...
Patch from Daniel.
2021-01-03 14:38:52 -05:00
Thibaut Cuvelier
649755f481
Rename WriteStream to TeXMathStream.
2021-01-02 19:52:23 +01:00
Thibaut Cuvelier
ecafea8227
Rename MathStream to MathMLStream.
2021-01-02 19:52:23 +01:00
Kornel Benko
8c67cb8c3a
Amend f500a287
(FindAdv: Try to make regex search with format enabled somehow faster)
...
Remove 1 out of range access,
Estimate the search result of regular expression for further processing
2021-01-02 18:44:40 +01:00
Thibaut Cuvelier
adf62c3184
Fix compilation with MSVC 19.
2021-01-02 17:27:56 +01:00
Kornel Benko
f500a287d4
FindAdv: Try to make regex search with format enabled somehow faster
2021-01-01 21:53:07 +01:00
Scott Kostyshak
eaebe404ae
Fix a comparison of arrays to compare *contents*
...
The previous code was mistakenly comparing addresses of the arrays.
This issue was caught by a warning when compiling with Clang in
C++20 mode, since comparing array addresses in this way is
deprecated.
This commit should prevent some unnecessary dispatches of
LFUN_SCREEN_FONT_UPDATE.
2020-12-31 14:02:40 -05:00
Kornel Benko
4e9dc856e4
FindAdv: Added handling for \w' in regex using non-ascii chars
...
Also fix some 'out of range accesses' (causing crash in debug-glibc-mode)
2020-12-31 17:00:49 +01:00
Kornel Benko
f7772849b9
FindAdv: Let lyx use QRegularExpression if available
...
This regex handling is part of QT5. For lyx which uses QT4
findafv will still work, but is not good for caseinsensitive matchings
in handling non ASCII characters
2020-12-30 13:00:03 +01:00
Yuriy Skalko
cafa1d4ae4
Fix C++20 compilation on systems where char_type is wchar_t
2020-12-30 09:42:50 +02:00
Yuriy Skalko
d3ca28b468
Amend 3971b1b35e
, also fix warnings for older compilers
2020-12-29 16:30:16 +02:00
Stephan Witt
e29896d93d
Amend 18f7dce3d9
- avoid uninialized local variable atlastpos
2020-12-29 11:41:24 +01:00
Kornel Benko
5a192d28f0
FindAdv: fix converting unicode-point to utf-8
...
I misinterpreted the unicode creation 'u8"\uF00xx"'.
The C++-compiler saw 'u8"\uF00x" "x"', but this was not intended.
The routine which mimicked is doing the right job now.
2020-12-29 09:59:44 +01:00
Yuriy Skalko
3971b1b35e
Fix C++20 warning on implicit capture of this via [=]
2020-12-28 23:26:14 +02:00
Yuriy Skalko
197ea63631
Use crc32 calculation from zlib instead of boost
2020-12-28 21:32:56 +02:00
Kornel Benko
ab7ac800dc
FindAdv: Allow compilation with c++20
2020-12-28 16:45:02 +01:00
Yuriy Skalko
d927e9343c
Suppress unneeded git log output
2020-12-28 15:44:39 +02:00
Juergen Spitzmueller
2af8e661a3
Re-enable input of non-LyX files (e.g., tex, pgf) ( #12056 )
...
This amends [a385b7dc2b58/lyxgit]
2020-12-28 09:58:30 +01:00
Juergen Spitzmueller
4886c0370b
inset-split: consider that freeSpacing() doesn't DEPM
2020-12-27 14:28:03 +01:00
Juergen Spitzmueller
11740f6fc0
Amend dc174db6c1973d1/lyxgit ( #12057 )
2020-12-27 14:00:30 +01:00
Kornel Benko
c7bc46d707
Amend 3736bee4
: Forgot to set the cassensitivity flag in regex statement
2020-12-27 12:16:37 +01:00
Kornel Benko
3736bee4b7
FindAdv: Use stdregex to handle case-insensitivity (if regex is used)
...
For search we used to lowercase for everything, but sonce the regex itself
should be left unchanged, this change was needed.
Works nice with ASCII, but fails miserably on on other UTF8 points (like Cyrillic chars)
2020-12-27 12:01:23 +01:00
Juergen Spitzmueller
18f7dce3d9
Implement inset-split (only for text insets for now) ( #10260 )
2020-12-24 10:48:52 +01:00
Juergen Spitzmueller
f47ea0dd5e
Add missing header include
2020-12-20 12:42:04 +01:00
Thibaut Cuvelier
372b32c0a6
Fix MathML output of InsetMathDelim
...
Patch by lynx (https://www.lyx.org/trac/ticket/12050 ).
2020-12-20 00:21:10 +01:00
Yuriy Skalko
d9e455b61a
Move Trackable class to Server.h
2020-12-19 22:52:57 +02:00
Yuriy Skalko
4f0981e7bb
Merge namespace signals2 into namespace lyx
2020-12-19 22:52:51 +02:00
Yuriy Skalko
cbd1b3a2d4
Remove useless declaration
2020-12-19 21:33:33 +02:00
Pavel Sanda
db52066d6a
Typo
2020-12-19 18:29:10 +01:00
Jean-Marc Lasgouttes
405b5c04a7
Fixup 005f69de
: code cleanup.
...
Since we are not sure of where the cursor ends up after invoking
Cursor::handleNest it is safer to reset the cursor at each cell,
rather than reuse the same one over and over.
Related to bug #12035 .
2020-12-19 17:12:28 +01:00
Richard Kimberly Heck
8c805db9d3
Typo
2020-12-18 17:35:58 -05:00
Richard Kimberly Heck
49f019e129
Remove unnecessary change.
2020-12-18 17:11:05 -05:00
Richard Kimberly Heck
03897206bb
Minor code simplification
2020-12-18 16:59:57 -05:00
Richard Kimberly Heck
7e5c42593e
Simplify checking whether files are controlled by SVN and GIT.
2020-12-18 16:43:52 -05:00
Richard Kimberly Heck
05551a7cfb
Remove unused return values and useless member assignment.
...
The master_ variable holds a FileName that points to the meta-data
for this file, e.g., CVS/Entries. There is no such thing in SVN or GIT.
So we remove that variable from those classes.
2020-12-18 16:27:57 -05:00
Richard Kimberly Heck
a4c9a5010e
typo
2020-12-18 16:19:28 -05:00
Richard Kimberly Heck
49506153c1
Comments
2020-12-18 16:19:05 -05:00
Richard Kimberly Heck
77cdef1fe0
Allow registration of files with svn when parents directory is not yet registered.
2020-12-18 16:01:43 -05:00
Richard Kimberly Heck
750af39139
Comment
2020-12-18 15:53:45 -05:00
Richard Kimberly Heck
fdbbddecb7
Fix bug with registering files for VC when they are in repo subdirs.
2020-12-18 15:48:51 -05:00
Richard Kimberly Heck
2405788d84
Style
2020-12-18 14:56:18 -05:00
Richard Kimberly Heck
73e7cfb26a
Const
2020-12-18 14:55:58 -05:00
Richard Kimberly Heck
68e60f95d3
Remove unused file output
2020-12-18 14:51:56 -05:00
Richard Kimberly Heck
fd4d546d5b
Comment
2020-12-18 14:50:13 -05:00
Richard Kimberly Heck
bd306ae118
Style
2020-12-18 14:37:58 -05:00
Richard Kimberly Heck
81be2e8a9b
Use right style for private member
2020-12-18 14:30:21 -05:00
Jean-Marc Lasgouttes
005f69de23
Fix crash after b0937fb9
.
...
Now the cursor is not left inside color inset, so it is not needed to
pop_back.
Fix bug #12035 .
2020-12-17 22:04:46 +01:00
Juergen Spitzmueller
f661469734
Implement sane UI for switching tristate toolbars ( #6364 )
...
Also fix toolbar toggling with AllowAuto which was broken since
a long time.
2020-12-17 10:15:18 +01:00
Juergen Spitzmueller
7e11cb2b37
Whitespace
2020-12-17 10:10:56 +01:00
Kornel Benko
b3d4271e78
Adv-Find: Try to use some more unicode chars (instead of latex macros)
2020-12-15 18:08:02 +01:00
Jean-Marc Lasgouttes
3950f05497
Take label width into account for SubLabel insets
...
The drawing of the label should not go further than inset width.
Fixes bug #12046 .
2020-12-15 15:25:07 +01:00
Jean-Marc Lasgouttes
209a3ce618
Dialog.h and DialogFactory.h are not moc-able
2020-12-15 11:53:06 +01:00
Juergen Spitzmueller
9bf3a5a778
Add some documentation
2020-12-15 09:52:52 +01:00
Juergen Spitzmueller
1a0b842e66
Do not close spellchecker after "Replace All" ( #11310 )
...
Wrong use of wrapAround here
2020-12-15 09:46:32 +01:00
Juergen Spitzmueller
34c166f45f
One more nullptr
2020-12-15 08:53:41 +01:00
Juergen Spitzmueller
ece5b8818d
More readable latex color (on button and workarea) in dark mode
2020-12-15 08:53:06 +01:00
Juergen Spitzmueller
47de618de8
Fix nullptr warning
2020-12-15 08:36:17 +01:00
Richard Kimberly Heck
5e6c5f407a
Fix thinko
2020-12-14 23:40:28 -05:00
Kornel Benko
d384136ff9
Find-Adv: A try to handle cyrillic chars also in regexp-mode
2020-12-14 20:43:39 +01:00
Juergen Spitzmueller
2d553ec5b9
Amend 24b71d30d5
( #12048 )
2020-12-14 14:19:08 +01:00
Pavel Sanda
2db26ff522
Compile on older gcc.
2020-12-14 00:01:05 +01:00
Yuriy Skalko
bda4570400
Use new signal library nod
instead of boost::signals2
...
Thanks Enrico for updating autotools files.
2020-12-13 23:11:19 +02:00
Juergen Spitzmueller
148748b0c2
Make InsetInfo math/IPA icons visible in dark mode
...
This does not show the real colors, but the icons are at least readable.
2020-12-13 09:51:32 +01:00
Juergen Spitzmueller
e6e30caca5
Do not forceLTR in InsetHyperlink ( #12044 )
...
This can also be RTL text
2020-12-13 05:54:48 +01:00
Juergen Spitzmueller
39a28b4b27
Whitespace
2020-12-13 05:08:11 +01:00
Juergen Spitzmueller
33fb7ed258
Ditch deprecation warning
2020-12-12 14:16:34 +01:00
Juergen Spitzmueller
882f06121b
Use semantic latex and math colors for dark theme icon overlay
2020-12-12 10:56:51 +01:00
Juergen Spitzmueller
704331fdcd
Add dark theme colors to semantic colors ( #8325 )
2020-12-12 10:56:05 +01:00
Stephan Witt
7b41faabae
amend 99b1488f0e
- on Mac the include is needed
2020-12-11 18:42:04 +01:00
Juergen Spitzmueller
91026711ae
Introduce semantic label colors
...
This allows customization e.g. in dark mode and is a prerequisite
for color theming
Part of #8325
2020-12-11 11:44:45 +01:00
Juergen Spitzmueller
a06cdfa073
Adapt math and IPA panels to dark theme ( #5636 )
2020-12-11 09:08:41 +01:00
Juergen Spitzmueller
b2ab394832
Remove unused function
2020-12-11 09:08:10 +01:00
Yuriy Skalko
9348c5c635
Use to_string
instead of boost::lexical_cast
2020-12-10 20:14:40 +02:00
Yuriy Skalko
5999dd96e6
Remove unnecessary c_str
2020-12-10 20:14:31 +02:00
Jean-Marc Lasgouttes
69c46c56fe
Preserve paragraph depth when dissolving.
...
It turns out that makeSameLayout() does more than we want.
Fixes bug #11981 .
2020-12-10 18:34:07 +01:00
Kornel Benko
2d2e2f1c6d
Adv-Search: Use some free unicodes as replacement for searched spaces
...
Without this, it is difficult to find backslashed macros if in regexp-mode.
2020-12-10 11:36:09 +01:00
Juergen Spitzmueller
f9b817676a
Search ipa image dir befor top dir
...
Else the unknown icon is found before the proper icon.
This unbreaks IPA panel top icons
2020-12-10 07:08:04 +01:00
Jean-Marc Lasgouttes
d9c39232ac
Reduce the amount of needed boost headers
...
boost/signals2.hpp is a convenience header, it seems that
boost/signals2/signal.hpp is enough for our needs.
This allows to get rid of 6MiB of header files in 3rdparty/boost (and
probably to speed-up compilation).
2020-12-09 14:50:18 +01:00
Jean-Marc Lasgouttes
99fb1c7003
Overhaul (no)limits support
...
- Add limits support to InsetMathScript
- Add limits support to InsetMathClass
- Fix bug where limits changing is disabled in inline math
Now the MathData objects remember whether they are in diaply mode.
Fixes bug #12045 .
2020-12-09 14:10:17 +01:00
Pavel Sanda
a222a2eab6
Hint message when .lyx dir can not be created.
...
Useful for scripts running without standard homedir environments,
cf https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=816173
2020-12-08 09:53:38 +01:00
Jean-Marc Lasgouttes
1dcb08104c
Make spellchecker work in read-only document
...
Mistakes are visible but word replacement is disabled. Disable relevant
widgets depending on the situation.
Move updateView code to SpellcheckerWidget::Private.
2020-12-07 18:33:45 +01:00
Yuriy Skalko
ccbfd22f56
Move implementation details to constructors. Amend 78f457796c
2020-12-06 20:51:11 +02:00
Pavel Sanda
2f3d0653b3
Fix compilation
2020-12-06 18:37:38 +01:00
Yuriy Skalko
3e7ccc367a
Use range-based for loops
2020-12-06 18:26:56 +02:00
Yuriy Skalko
e292dd70bf
More enums & includes refactoring
2020-12-06 18:26:41 +02:00
Juergen Spitzmueller
b57b4a3e12
Clarify documentation if "Keep change markup on paste" pref
2020-12-06 17:04:17 +01:00
Richard Kimberly Heck
842fd8a74d
Use LOCK in all cases
2020-12-06 10:57:20 -05:00
Yuriy Skalko
78f457796c
Implement proper Dialog factory instead of implicit link-time dependencies
2020-12-06 17:37:39 +02:00
Juergen Spitzmueller
22193601bf
Always mark pasted stuff as changed with ct on
...
independent of "Keep change tracking markup on copy and paste" pref.
Probably addresses #11973
2020-12-06 10:00:47 +01:00
Richard Kimberly Heck
c978137f99
Disable Edit Externally for read-only Buffers.
2020-12-06 00:14:23 -05:00
Richard Kimberly Heck
16834a32ad
Use LOCK symbol with Minimalistic decoration, too.
...
In that case, we force a button with just the lock.
2020-12-05 21:25:05 -05:00
Richard Kimberly Heck
877a46f7b0
Use a lock symbol to indicate when an inset is being edited externally.
...
Good idea from Scott.
2020-12-05 21:16:17 -05:00
Richard Kimberly Heck
ad887798c9
Renaming
2020-12-05 20:30:45 -05:00
Richard Kimberly Heck
742348262e
Fix bug #12033 .
...
Silly mistake: Only considered the parent, not grandparents, etc.
2020-12-05 20:30:45 -05:00
Richard Kimberly Heck
41216228c0
Change name in source files
2020-12-05 17:17:02 -05:00
Thibaut Cuvelier
0c5e10f36b
This should fix a few type-conversion warnings.
2020-12-05 22:52:41 +01:00
Richard Kimberly Heck
d31891c6bf
Use LaTeXName of counter in LaTeX output.
...
Fixes an oversight noticed by Scott.
2020-12-05 16:46:33 -05:00
Richard Kimberly Heck
ae2ce7a86a
LaTeXName tag for counters. Layout format change.
2020-12-05 16:46:33 -05:00
Jean-Marc Lasgouttes
4f8cfca117
Update handling of read-only for Thesaurus
...
Remove dummy calls to ButtonController::addReadOnly().
Properly disable stuff for read-only documents.
Streamline code.
2020-12-05 20:27:46 +01:00
Jean-Marc Lasgouttes
f02311241a
Make Merge Changes dialog work in read only.
...
Make LFUN_CHANGES_MERGE active in read-only documents.
Remove dummy call to ButtonController::addReadonly and replace with
proper code.
2020-12-05 19:53:30 +01:00
Jean-Marc Lasgouttes
e561358be9
Move stuff
2020-12-05 19:45:09 +01:00
Pavel Sanda
b670990bc1
Improve VCS error message when RCS is not installed.
...
User's report that it takes time to realize what package
is 'ci' part of, so we can give a hint for the initial
file registration.
2020-12-04 18:16:44 +01:00
Jean-Marc Lasgouttes
c30b0aac4b
Disable some Adv F&R widgets for read-only documents
2020-12-03 18:04:23 +01:00
Jean-Marc Lasgouttes
24b71d30d5
Fix disabling of widgets for (simple) Search dialog
...
This allows to remove the calls to ButtonController::addReadonly,
which are placebo since 78ade7e6
.
2020-12-03 15:44:55 +01:00
Juergen Spitzmueller
e3f7f18440
amend a204dbe934
2020-12-03 14:51:05 +01:00
Juergen Spitzmueller
a04d30a650
tex2lyx: prevent \; \: and \! to be converted in tipa and algorithm
...
These commands have special meanings there.
2020-12-03 14:49:01 +01:00
Juergen Spitzmueller
a204dbe934
Escape backslash in comments
2020-12-03 14:47:34 +01:00
Juergen Spitzmueller
c93d5d76fa
tex2lyx: support all space type in texted
2020-12-03 11:12:55 +01:00
Juergen Spitzmueller
de2be5bdaa
Recent LaTeX includes all math and text spaces
...
amsmath no longer required here.
2020-12-03 10:49:18 +01:00
Juergen Spitzmueller
7b6bb23b87
Move dummy bool a bit closer to context
2020-12-03 08:50:43 +01:00
Juergen Spitzmueller
4a13a29042
Add empty line after last \bibitem in bibliography ( #12041 )
2020-12-03 07:46:39 +01:00
Yuriy Skalko
9cb98136ce
Cleanup headers
2020-12-03 00:38:27 +02:00
Yuriy Skalko
efaffb897d
Simplify InsetMathGrid structs
2020-12-03 00:38:18 +02:00
Yuriy Skalko
1dd676bed1
Simplify FuncRequest constructors
2020-12-03 00:38:12 +02:00
Yuriy Skalko
e0f553b941
Fix warnings and use range-based loop
2020-12-03 00:38:05 +02:00
Juergen Spitzmueller
0424f297b8
Update tex2lyx tests
2020-12-02 17:01:21 +01:00
Juergen Spitzmueller
e9cbd69f6e
Implement Hungarian quotation marks style ( #12040 )
...
File format change
2020-12-02 17:00:40 +01:00
Juergen Spitzmueller
b2ca2d1e3a
Fix listpreamble breakage by 6f643e52d4
2020-12-02 15:25:14 +01:00
Juergen Spitzmueller
fedd9bf4d0
Do not reset font in preview inset
2020-12-02 15:03:21 +01:00
Juergen Spitzmueller
560d2df70c
Capitalization fixes
2020-12-02 14:52:51 +01:00
Juergen Spitzmueller
098c16f153
Assure \par is output when needed with fontswitch
2020-12-02 14:32:05 +01:00
Juergen Spitzmueller
95fed10131
Exclude insets without output from fontswitch_insets
2020-12-02 14:31:26 +01:00
Jean-Marc Lasgouttes
f41ca959fd
Reduce top/bottom margin for Adv F&R workareas
2020-12-01 12:01:20 +01:00
Jean-Marc Lasgouttes
26135330bc
Simplify GuiWorkarea::Private constructor
...
Also use the newly introduced platformName() for Qt4.
2020-12-01 11:26:01 +01:00
Yuriy Skalko
c0a5987181
Better naming for enums
2020-12-01 00:46:21 +02:00
Yuriy Skalko
890ca6df7b
Refactor KernelDocType enum
2020-12-01 00:46:16 +02:00
Yuriy Skalko
6354ad60b4
Refactor InsetQuotes.h enums
2020-12-01 00:46:09 +02:00
Yuriy Skalko
66403b4449
Remove useless breaks
2020-12-01 00:46:02 +02:00
Pavel Sanda
2ab39fe121
Fix compilation on older gccs.
2020-11-30 12:21:56 +01:00
Yuriy Skalko
ec5c7b905b
Move Inset.h include from .h to .cpp
2020-11-30 13:05:08 +02:00
Yuriy Skalko
ecf62a8f21
Refactor OutputParams
...
Now all Inset hierarchy uses OutputParams.h included in Inset.h.
Forward declare some enums to reduce header dependencies.
2020-11-30 13:05:03 +02:00
Yuriy Skalko
19f5aa58aa
Simplify DocIterator
2020-11-30 13:04:58 +02:00
Yuriy Skalko
99b1488f0e
Cleanup included headers
2020-11-30 13:04:54 +02:00
Enrico Forestieri
0d204c4e87
Fix compilation on cygwin
2020-11-30 11:32:35 +01:00
Kornel Benko
a171c651a6
Revert "Amend 3093789e
for cmake build"
...
This reverts commit b3d43404f4
.
2020-11-30 10:19:22 +01:00
Yuriy Skalko
89d05890bf
Simplify KeyModifier
2020-11-30 10:44:28 +02:00
Thibaut Cuvelier
877806f208
DocBook: implement SciPoster.
2020-11-29 22:54:03 +01:00
Thibaut Cuvelier
59acb375d1
DocBook: add layout parameters to control the special case and argument positioning.
...
Only for flex insets.
Also add similar checks in InsetText to avoid bibliographies in paragraphs.
2020-11-29 22:54:03 +01:00
Thibaut Cuvelier
a8de4d3296
DocBook: clean the special-case code.
2020-11-29 22:54:02 +01:00
Yuriy Skalko
7779316e6c
Include standard <regex>
2020-11-29 15:27:28 +02:00
Kornel Benko
b3d43404f4
Amend 3093789e
for cmake build
2020-11-29 10:04:54 +01:00
Yuriy Skalko
075ae38ec9
Use correct std header
2020-11-29 10:49:59 +02:00
Yuriy Skalko
00d07d6732
Remove unused Counters::copy
2020-11-29 00:25:27 +02:00
Yuriy Skalko
9b0cd3c970
Fix buffer over-read on last Unicode code points
2020-11-29 00:25:24 +02:00
Yuriy Skalko
ad7c5568cd
Make InsetIterator compatible with range-based loops
2020-11-29 00:25:19 +02:00
Yuriy Skalko
813eb0f9f7
Cleanup included headers
2020-11-29 00:25:14 +02:00
Yuriy Skalko
e97daf9e13
Use range-based loops
2020-11-29 00:25:09 +02:00
Jean-Marc Lasgouttes
3093789e8d
remove most traces of boost::regex
...
1/ remove boost regex code from 3rdparty/boost. Only the cmake stuff remains.
2/ remove traces of BOOST_LIB since there is no need anymore to
compile boost stuff.
3/ remove traces of boost regexp in config/lyxinclude.m4 and INSTALL
4/ require gcc 4.9 as minimal version in autoconf.
Unfortunately, the net gain is only 10% of included boost size (now 21M).
2020-11-28 19:59:17 +01:00
Thibaut Cuvelier
a6cc62f6ee
DocBook: ignore fonts in ERT.
...
Also, mark a Slides test as passing, because it is valid DocBook (but not really useful).
2020-11-28 05:15:34 +01:00
Thibaut Cuvelier
633a617841
DocBook: implement Copernicus.
...
Includes a fix when wrappers are used with empty paragraphs. The logic is probably wrong if two legit wrapped paragraphs have one empty paragraph in the middle. This is only for slightly convoluted cases... Wrapping decisions should rather be taken for a series of paragraphs at once, but it would be more complex to implement and would only solve very peculiar cases like these ones.
2020-11-28 04:56:19 +01:00
Thibaut Cuvelier
14cfcf00cb
DocBook: implement AEA and APA.
2020-11-28 00:51:35 +01:00
Thibaut Cuvelier
7437a6ce3c
DocBook: fix regression in floats.
...
Also implement a valid filler for tables.
2020-11-27 23:44:48 +01:00
Thibaut Cuvelier
dfb1ad85fa
amend bd9dce3749
...
Fix warning, add a comment while I'm there
2020-11-27 17:59:35 +01:00
Yuriy Skalko
f3ec89cfa1
Always use std::regex
...
Since now minimum supported GCC is 4.9.
2020-11-27 12:39:59 +02:00
Yuriy Skalko
fdefff1108
Fix signed integer overflow on x = 0, detected by GCC sanitizer
2020-11-27 12:17:22 +02:00
Yuriy Skalko
8793c2eed9
Replace ;;
2020-11-27 12:16:54 +02:00
Yuriy Skalko
59e2becdd8
Use iround function, amend c0ce79452f
2020-11-27 12:16:50 +02:00
Yuriy Skalko
8cb728c2d7
Constify
2020-11-27 12:16:45 +02:00
Yuriy Skalko
816512879d
Use to_string function
2020-11-27 12:16:41 +02:00
Yuriy Skalko
6a21ec854b
Move several common types to support/types.h
2020-11-27 12:16:22 +02:00
Jean-Marc Lasgouttes
4b15d64f51
Remove deprecated enum value with Qt5
2020-11-27 10:23:49 +01:00
Thibaut Cuvelier
bd9dce3749
DocBook: bug fixes for JASA.
...
Includes more consistent behaviour for bibliographies in appendix (do the same as LyX shows the user, i.e. bibliography in appendix).
2020-11-27 05:53:46 +01:00
Thibaut Cuvelier
3f07ae9083
DocBook: for empty figures, output a message.
...
This ensures that this part of the DocBook file is valid.
2020-11-27 05:19:27 +01:00
Thibaut Cuvelier
6201158e5d
DocBook: fix appendices.
2020-11-27 02:50:03 +01:00
Thibaut Cuvelier
587f1f5571
DocBook: implement Mathematical Monthly.
2020-11-27 01:54:00 +01:00
Thibaut Cuvelier
46d90b3415
amend dae0640436
...
Fix a warning in the code.
2020-11-26 23:33:03 +01:00
Scott Kostyshak
9649e80c44
Fix Clang warning about struct/class mismatch
...
CaretGeometry is defined as a struct, but was forward-declared as a
class. Now we forward-declare as a struct. This addresses the
following Clang warning (that does not appear with GCC):
src/frontends/CaretGeometry.h:27:1: warning: 'CaretGeometry' defined
as a struct here but previously declared as a class; this is valid,
but may result in linker errors under the Microsoft C++ ABI
[-Wmismatched-tags]
2020-11-26 13:51:12 -05:00
Jean-Marc Lasgouttes
c68be9a9be
Improve some debug messages
...
The current code did not give much information.
I am not sure why the <<FontInfo operator is not defined in
FontInfo.h, but I figured that it was not necessary to understand that
now.
2020-11-26 11:09:17 +01:00
Thibaut Cuvelier
eaf9460909
DocBook: make empty bibliographies empty.
...
Even though this means that there is no output tag.
2020-11-26 06:55:49 +01:00
Thibaut Cuvelier
ed6fbdd249
DocBook: implement Kluwer.
...
Includes an assertion fix that only occurred with this example.
2020-11-26 06:41:13 +01:00
Thibaut Cuvelier
dae0640436
DocBook: implement REVTeX.
...
Improvements to abstract detection: it can now contain lists or anything with a higher depth.
Implement video floats.
2020-11-26 06:22:27 +01:00
Yuriy Skalko
11434df35d
Fix warnings regarding switches on enum values
2020-11-25 23:16:56 +02:00
Yuriy Skalko
0a8d3c9887
Fix loop variable, amend d8e8a93a58
2020-11-25 23:16:51 +02:00
Yuriy Skalko
43477730a4
Better PNG detection in guessFormatFromContents
2020-11-25 23:16:45 +02:00
Scott Kostyshak
c81bb47e49
Catch exception if LaTeX fails for child preview
...
The exception is raised when an included file fails to export
because e.g. it is from a newer version of LyX or because an
intermediate command such as knitr fails.
The exception was introduced at 1a374a93
so that the export of a
document exits with error if an included document exports with
error.
This commit catches the exception when the LaTeX is asked for in
order to generate a preview of the included file.
2020-11-25 15:34:58 -05:00
Yuriy Skalko
8e60182f58
Simplify InsetQuotes constructors
2020-11-25 02:43:43 +02:00
Yuriy Skalko
fe0ea7bff7
Add default TransformID enum value
2020-11-25 02:43:35 +02:00
Yuriy Skalko
b3be47765b
Fix memory leak
2020-11-25 02:43:26 +02:00
Yuriy Skalko
43b16548b4
Cleanup headers
2020-11-25 02:43:16 +02:00
Richard Kimberly Heck
2ae77d5091
Only set buffer if it is not null.
...
Yuriy found these specific problems. They do not cause a crash, but
they are not good.
2020-11-24 17:07:16 -05:00
Richard Kimberly Heck
5691b89858
nullptr
2020-11-24 17:07:16 -05:00
Jean-Marc Lasgouttes
8673c5ac28
Forgot this.
2020-11-24 21:20:25 +01:00
Jean-Marc Lasgouttes
1b3ffa6627
Rewrite (again!) the code for caret drawing
...
The caret geometry is now computed in BufferView as a list of shapes
(caret, horizontal l-shape if needed, completion triangle if needed)
kept in a variable of type CaretGeometry.
The code in WorkArea.cpp only has to draw these shapes. The
CaretWidget (which never was a widget) in GuiWorkArea.cpp is gone
now.
As a consequence, the bounding box for the cursor is known precisely
and therefore rows should be repainted correctly now. This avoids
caret droppings.
Fixes bug #12024 .
2020-11-24 20:12:42 +01:00
Juergen Spitzmueller
4487af367c
Do not \cprotect \textcolor
...
Fixes #12034
2020-11-24 15:19:56 +01:00
Kornel Benko
be50eb507f
Adv-Find: Add handling for \cdot (at least if using format-search
2020-11-23 21:55:13 +01:00
Jean-Marc Lasgouttes
7a28258d32
(almost) Proper fix for caret droppings
...
Try to find the most inner row that is overwritten by the caret. This
allows to replace the hack in TextMetrics::draw, which did not really
work.
Note that there are still issues with emphasized caret at the
beginning of inset, which will require some code reorganisation.
Fixes current recipe of bug #12024 .
2020-11-21 20:00:26 +01:00
Jean-Marc Lasgouttes
d53b44273c
Compilation fix
2020-11-21 19:54:43 +01:00
Jean-Marc Lasgouttes
ba8ca0e384
Correct caret position from the start
2020-11-21 19:39:48 +01:00
Yuriy Skalko
8dfe07b5b5
Use std::any
when compiler supports C++17 or later
2020-11-21 20:32:51 +02:00
Yuriy Skalko
cbad214cdd
Refactor checksum calculation
2020-11-21 20:32:43 +02:00
Yuriy Skalko
0b1e0b8610
Remove unused headers
2020-11-21 20:32:30 +02:00
Yuriy Skalko
7ca2f2b58d
Use range-based loops
2020-11-21 20:32:16 +02:00
Jean-Marc Lasgouttes
2d27d033a6
Typo and reformatting
2020-11-21 19:13:29 +01:00
Pavel Sanda
4eb791ff18
Erase white frame in fullscreen mode.
...
Since Qt 5.9.4 one can't set negative margins unless explicitely
allowed by a new flag. This brought back the white frame in
fullscreen mode.
https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg214002.html
2020-11-21 16:02:54 +01:00
Yuriy Skalko
916ceeba12
Simplify Length
2020-11-21 00:32:47 +02:00
Yuriy Skalko
2941bc0198
Add more override
specifiers
2020-11-21 00:32:40 +02:00
Yuriy Skalko
09eba40418
Remove unused header
2020-11-21 00:32:35 +02:00
Thibaut Cuvelier
2bbfc726c4
amend 2c6537ff
for C++11 compatibility
2020-11-20 21:59:22 +01:00
Thibaut Cuvelier
1176fab1d4
DocBook: make InsetText respect tag types.
2020-11-20 18:41:03 +01:00
Thibaut Cuvelier
3a02251bfa
XML: move higher-level tag-opening and closing functions to xml namespace.
2020-11-20 18:41:03 +01:00
Thibaut Cuvelier
0fe3d05344
XML: add tag-type information in XML tags. It is not yet used.
2020-11-20 18:41:03 +01:00
Thibaut Cuvelier
f426e458c4
DocBook: InsetText supports items and wrappers.
2020-11-20 18:41:02 +01:00
Thibaut Cuvelier
2c6537ff66
DocBook: ensure that <info>-related insets in the abstract are not generated in the abstract.
...
This helps generate more conformant DocBook files.
Also implement wrapper tags for InsetText.
2020-11-20 18:41:02 +01:00
Kornel Benko
5474c3fb4b
Missing '{'
2020-11-20 16:32:51 +01:00
Jean-Marc Lasgouttes
d8e8a93a58
Use range-based loops in GuiView
2020-11-20 15:14:21 +01:00
Yuriy Skalko
b56a64a8ef
Typo
2020-11-20 15:57:34 +02:00
Yuriy Skalko
f953d88c88
Simplify constructors
2020-11-20 15:57:26 +02:00
Jean-Marc Lasgouttes
a877cdb196
Do not set language from keyboard in passthru setting
2020-11-20 13:49:26 +01:00
Jean-Marc Lasgouttes
875b1def4f
Take right margin into account for text inset width
...
This is particularly important for contents in RtL languages, where
the right margin may contain the paragraph indentation, or
itemize/enumeration symbols.
Fixes bug #12030 .
2020-11-17 17:51:43 +01:00
Thibaut Cuvelier
c6fe1fbe5f
DocBook: implement svglobal.
2020-11-16 20:15:34 +01:00
Yuriy Skalko
888ff9c114
Amend 9b1dc338b2
. Fix compilation in GCC 4.9
2020-11-15 22:41:38 +02:00
Thibaut Cuvelier
dc94abf039
DocBook: specific fix for Localization_Test.lyx.
...
In one paragraph, there was both a float and a list of floats in a paragraph: the list of floats has no DocBook output, so that there should be no surrounding <para>.
2020-11-15 19:04:21 +01:00
Thibaut Cuvelier
0ed820fa0b
DocBook: fix for nomenclature xml:id and glossary paragraphs.
...
Previously, the xml:id's were not consistent among <glossterm> in the text and <glossentry> in the glossary.
2020-11-15 18:43:58 +01:00
Sam Crawley
f457a32a13
Fix issue in running compare from the command line
...
Because Compare uses threads, we need to make sure it is finished when a
compare is executed from the command line. This was a problem for command
sequences, because the next command would start running before the compare
was done, and the buffer with differences was available.
So this commit adds the "run-blocking" parameter when using
LFUN_DIALOG_SHOW to run a Compare. When calling Compare with run-sync, the
LFUN will wait for the compare worker thread to finish before returning and
possibly running the next command.
2020-11-15 10:35:28 +01:00
Thibaut Cuvelier
46cbd6d234
DocBook: refactor code about retrieving captions and labels.
...
There was already an existing method in InsetCaptionable for captions, but not yet for labels. It was at least already useful at two places, that's why I moved it to InsetCaptionable.
2020-11-15 04:03:04 +01:00
Thibaut Cuvelier
c4bbff8ecb
DocBook: fix handling of listings with titles.
...
Also implement a code path for inline listings.
2020-11-15 04:03:04 +01:00
Thibaut Cuvelier
46daa3865b
DocBook: missing support for customisation of layouts in inset arguments.
2020-11-15 04:03:04 +01:00
Thibaut Cuvelier
6bc04367cf
DocBook: add support for IGNORE tags.
...
These paragraphs will simply have no output (no enclosing DocBook tag, no content). This change is as backward-compatible as possible: without this commit, the paragraphs will be output, but in an <IGNORE> tag (not much more can be achieved without this). It is mostly made for metadata and formatting instructions. (As opposed to NONE, which corresponds to outputting the paragraph without enclosing DocBook tag.)
2020-11-15 04:03:04 +01:00
Jean-Marc Lasgouttes
222a317dd2
Store correctly the window position with Wayland
...
To do this, hard-coded test for xcb had to be replaced with a call to
platformName(). Since this method does not exist in Qt4, we emulate
it.
Note that Qt5 uses xcb bindings for X11 system, while Qt4 relies on
older X11 bindings. We return platorm == "qt4x11" in this case.
Fixes bug #11746 .
2020-11-14 17:55:59 +01:00
Yuriy Skalko
9b1dc338b2
Simplify Changers
2020-11-12 14:22:00 +02:00
Thibaut Cuvelier
14887dda1c
DocBook: implement achemso.
2020-11-12 03:18:03 +01:00
Richard Kimberly Heck
fdd0a6f849
Revert "Improve structure of updateMacros"
...
The problem here is that the check against TEXT_CODE only
catches InsetText, and not its subclasses. Same for the check
against MATH_HULL_CODE. So there is reason not to check codes
here.
This reverts commit 5a54ccfa87
.
2020-11-11 11:26:11 -05:00
Jean-Marc Lasgouttes
63300c3ba8
Fixup aeb51be9
: set current font correctly when editing inset
...
When using InsetText::edit(), invoke Cursor::setCurrentFont (note that
editXY does it already). It is a good idea in general, especially
after commit 411333fa95
, which sets languagecorrectly in ERT.
This allows to comment out (again!) the trick added to fix ticket #9042 .
2020-11-10 15:43:48 +01:00
Jean-Marc Lasgouttes
411333fa95
Make sure that Cursor::setCurrentFont sets LaTeX language in ERT&friends
...
Fix issue when language is set to document language instead of
latex_language in ERT and pass thru layouts.
To trigger the issue
1/ select all in a ERT inset
2/ type "abc"
3/ look at code in code preview pane
==> result: the "a" is in document language, the "bc" in LaTeX language
(as should be)
2020-11-10 14:09:31 +01:00
Yuriy Skalko
437fef65aa
Simplify operator== for ParConstIterator
...
Comment out it while it is unused.
2020-11-08 23:29:20 +02:00
Yuriy Skalko
589e780e15
Whitespace & renaming
2020-11-06 21:34:02 +02:00
Yuriy Skalko
01e673635b
MacroData refactoring
2020-11-06 21:33:56 +02:00
Yuriy Skalko
5a54ccfa87
Improve structure of updateMacros
2020-11-06 21:33:41 +02:00
Richard Kimberly Heck
97ecf71016
Remove dead comment
2020-11-06 11:30:07 -05:00
Richard Kimberly Heck
5bd498c56d
Move trivial constructors into header. Remove unimplemented one.
2020-11-06 11:30:07 -05:00
Thibaut Cuvelier
1766bff806
DocBook: remove special options from InsetGraphics.cpp
...
This was not really a useful attribute for DocBook, or it must be parsed beforehand.
2020-11-05 05:35:34 +01:00
Thibaut Cuvelier
85a8664ba5
MathML: make InsetMathXArrow generate valid XML entities when required.
...
Before this, it only supported HTML entities.
2020-11-05 02:18:47 +01:00
Thibaut Cuvelier
7f8d0fd7b7
DocBook: ensure that tables do not get wrapped in a paragraph.
2020-11-05 02:03:34 +01:00
Thibaut Cuvelier
307aefef89
DocBook: don't consider bridgeheads for abstracts.
2020-11-05 00:02:59 +01:00
Jean-Marc Lasgouttes
4094afaf2e
Indentation
2020-11-03 15:12:20 +01:00
Richard Kimberly Heck
060c3de2f0
StepMasterCounter --> StepParentCounter
2020-11-02 17:36:58 -05:00
Richard Kimberly Heck
fba1c434e5
Revert "Fix a number of signedness warnings"
...
This reverts commit e8a28c33c5
.
I was not aware that we used negative numbers for author IDs!
2020-11-02 17:09:59 -05:00
Richard Kimberly Heck
39f997048e
Remove 'slave' terminology from Counters.cpp.
...
And with it, 'master'. That is less problematic by itself (so I'm not
worried about 'master document'), but here it doesn't make a lot of
sense without 'slave'.
2020-11-02 17:09:59 -05:00
Yuriy Skalko
8a25741ccd
Use default member initialization in OutputParams
2020-11-02 20:30:01 +02:00
Richard Kimberly Heck
e8a28c33c5
Fix a number of signedness warnings
2020-11-02 12:03:37 -05:00
Richard Kimberly Heck
cfd19d86be
whitespace and style
2020-11-02 11:45:09 -05:00
Richard Kimberly Heck
2945bc356e
whitespace
2020-11-02 11:38:52 -05:00
Yuriy Skalko
c7d0ba0f26
Simplify bformat
2020-11-02 11:54:40 +02:00
Thibaut Cuvelier
ebfdac4fa3
DocBook: implement svmult.
...
More generally, ensures that paragraphs in abstracts do not have something else configured.
A major problem in making the layout more useful is that article titles are not supposed to be in TOC.
2020-11-02 04:30:39 +01:00
Richard Kimberly Heck
679ce23ddc
Some constness, following Yuriy
2020-11-01 17:37:28 -05:00
Yuriy Skalko
1fdcd7bf14
Constify LaTeXFont
2020-11-01 22:25:08 +02:00
Yuriy Skalko
81a5e7927b
Use default member initialization
2020-11-01 22:25:03 +02:00
Yuriy Skalko
6f514da5fd
Use bool literals
2020-11-01 22:24:48 +02:00
Yuriy Skalko
9c47e736f8
Constify InsetQuotesParams
2020-11-01 22:24:31 +02:00
Yuriy Skalko
d38eddb397
Match header/source function argument naming
2020-11-01 22:23:44 +02:00
Yuriy Skalko
5061db891c
Use const references
2020-11-01 22:23:26 +02:00
Yuriy Skalko
6e65967e15
Use default member initialization in InsetLayout
2020-11-01 22:22:50 +02:00
Yuriy Skalko
dbe35af542
Simplify with std::map::insert
2020-11-01 22:22:27 +02:00
Richard Kimberly Heck
ca3077b40b
Change the logic of the indentation setting.
...
The option here is to NOT indent the paragraph, so make that clear.
As it was, we would set "Indent" to false in the case of paragraphs
that do not permit indentation and then write that, uselessly, to the
LyX file if we wrote any other option (and then keep writing it, even
if other options were removed). Now, we will write it only if it's been
explicitly set.
2020-10-30 13:34:36 -04:00
Richard Kimberly Heck
3b4b047576
Fix warning
2020-10-30 13:26:48 -04:00
Thibaut Cuvelier
df0ea858ed
DocBook: use the same normalisation for biblio IDs and their references.
2020-10-30 01:59:34 +01:00
Thibaut Cuvelier
da6e999fc6
DocBook: more robust list implementation.
2020-10-30 01:59:34 +01:00
Thibaut Cuvelier
6843bc5a38
DocBook: ensure to have paragraphs in <sidebar>.
2020-10-30 01:59:34 +01:00
Thibaut Cuvelier
30572880ba
DocBook: fix an issue where parts of list in abstract were duplicated.
...
Excerpt from export/latex/lyxbugs-resolved/9633-languagenesting_enumerate_and_lyxcode.
2020-10-30 01:59:34 +01:00
Thibaut Cuvelier
661c5d256b
DocBook: support for <info> tags in inner sections.
...
Previously, this code only worked correctly for the root tag.
2020-10-30 01:59:34 +01:00
Thibaut Cuvelier
4405f0164a
DocBook: implement algorithm floats.
...
Now that https://github.com/docbook/docbook/pull/185 has been merged into DocBook 5.2.
2020-10-30 01:59:34 +01:00
Thibaut Cuvelier
f2b7f8a089
DocBook: generate chapter metadata in <info>, for Springer mono.
2020-10-30 01:59:34 +01:00
Thibaut Cuvelier
b816cb0f3c
DocBook: don't consider sectioning items that shouldn't be in TOC for anything section-related.
2020-10-30 01:59:34 +01:00
Thibaut Cuvelier
149e1ccc02
DocBook: add DocBookSection parameter for styles that define new sections and implement argument parameters; improve Springer support.
...
For elements that should behave like sections (for now, mostly prefaces).
A second paragraph of PartBacktext can only wreak havok: it should start a section, and nothing else (otherwise, it's a real nightmare to implement).
2020-10-30 01:59:34 +01:00
Richard Kimberly Heck
cc1d3b78c9
Const
2020-10-29 18:25:33 -04:00
Yuriy Skalko
b8737e898c
Simplify DispatchResult ctors
2020-10-29 15:52:38 +02:00
Yuriy Skalko
d8ead7debf
Use nullptr
2020-10-29 15:52:33 +02:00
Yuriy Skalko
524073d09f
Move HullType functions declared in InsetMath.h into InsetMath.cpp
2020-10-29 15:52:28 +02:00
Yuriy Skalko
f1926251c0
Move Windows-specific stuff into os_win32.h
2020-10-25 19:59:03 +02:00
Yuriy Skalko
10272e4747
Move include of own header to the top. Fix dependencies
2020-10-25 19:58:57 +02:00
Yuriy Skalko
4ece87c324
Fix obsoleted Qt values
...
All new values exist in Qt 4.8.7.
2020-10-25 09:28:46 +02:00
Yuriy Skalko
1b508fff03
Small refactorings
2020-10-25 09:28:41 +02:00
Yuriy Skalko
a7018252b7
Constify
2020-10-25 09:28:34 +02:00
Jean-Marc Lasgouttes
21422dd652
Replace QFontMetrics::width() by horizontalAdvance() in Qt>=5.11
...
The method horizontalAdvance() replaces width() starting with Qt 5.11.
To handle this, all direct calls to QFontMetrics::width() are replaced
by calls to GuiFontMetrics::width(), and the code for
GuiFontMetrics::width(QChar) uses horizontalAdvance on newer Qt
versions.
2020-10-24 19:52:18 +02:00
Yuriy Skalko
69f838bbf3
Fix isSpace for docstring
2020-10-24 18:55:05 +03:00
Pavel Sanda
8af747c9d9
Revert da8b5de97
because of MSVC 2017.
...
In GCC `min` is defined via including <vector>.
2020-10-24 12:06:54 +02:00
Enrico Forestieri
d2d33a6a1f
Fix compilation on cygwin
2020-10-23 15:00:23 +02:00
Yuriy Skalko
c928714b0b
Unify naming of menu items
2020-10-23 10:23:01 +03:00
Jean-Marc Lasgouttes
2395522aa7
Revert "Do not set language from keyboard in passthru setting"
...
This reverts commit d94bd07264
.
2020-10-21 18:50:31 +02:00
Jean-Marc Lasgouttes
526b4b0d79
Revert "Fix compilation mess in d94bd0726"
...
This reverts commit abaf2e9bda
.
2020-10-21 18:50:10 +02:00
Jean-Marc Lasgouttes
abaf2e9bda
Fix compilation mess in d94bd0726
2020-10-21 18:37:22 +02:00
Jean-Marc Lasgouttes
d94bd07264
Do not set language from keyboard in passthru setting
2020-10-21 18:09:31 +02:00
Pavel Sanda
5d0b1b640b
Make master compilable again with older gcc.
2020-10-21 00:01:03 +02:00
Yuriy Skalko
196d9caeb0
Clean includes using the output of iwyu tool
2020-10-20 11:38:55 +03:00
Thibaut Cuvelier
d1b9af3b1d
DocBook: fix file inclusion.
...
Previously, nothing was output. Special care was needed for when new paragraphs should be open (this work is probably not finished yet).
2020-10-20 02:34:02 +02:00
Yuriy Skalko
af29f02dd8
Reduce includes in header files (2)
2020-10-19 18:01:17 +03:00
Yuriy Skalko
d25c10ed81
Remove duplicate and unused header includes in .cpp files
2020-10-19 18:01:11 +03:00
Yuriy Skalko
fa6ac23e1c
Reduce includes in header files
2020-10-19 17:33:51 +03:00
Yuriy Skalko
65c88f0a0a
Remove redundant const &
for primitive types
2020-10-19 12:50:07 +03:00
Thibaut Cuvelier
7be7026386
DocBook: generalise detection of "special cases" to check all insets of a paragraph.
...
This will catch cases where there are multiple listings in a single paragraph, for instance.
The new code is also less brittle (checks on lyxCode instead of generated LaTeX or names).
2020-10-18 08:23:37 +02:00
Thibaut Cuvelier
739735ab73
DocBook: output inline equations in their own paragraph if they are the only inset of the paragraph.
...
It's invalid to have an <inlineequation> outside a paragraph. Another solution would have been to change InsetMathHull::docbook to generate an <informalequation>, but that function would have required more knowledge about its context than now.
Need more tests to determine if <inlineequation> should only be output for hullSimple or in more cases like:
const static std::set<HullType> inlineHulls = {
hullUnknown,
hullNone,
hullSimple,
hullEquation,
hullMultline,
hullGather,
hullRegexp
};
2020-10-18 08:23:36 +02:00
Jean-Marc Lasgouttes
c286cad565
Reset caret size when inserting text over a selection
2020-10-17 20:29:16 +02:00
Scott Kostyshak
1e3ef3c6e2
Update tex2lyx tests after the format change
...
The diff consists of only the format number, which is expected since
there is no instance of "\nopagebreak" in the .tex files.
2020-10-16 23:06:15 -04:00
Yuriy Skalko
b5cb23a92a
Remove unused headers in output_xhtml.h
2020-10-16 23:05:54 +03:00
Yuriy Skalko
a3eeb8a4b5
Clean math headers
2020-10-16 23:05:46 +03:00
Thibaut Cuvelier
0ba9b7c0c8
DocBook: fix an assertion/crash.
2020-10-16 17:02:24 +02:00
Yuriy Skalko
84365fc946
Move Author.h, Format.h from BufferParams.h
2020-10-16 08:02:51 +03:00
Yuriy Skalko
4c8d262996
Const refactor
2020-10-16 08:02:51 +03:00
Yuriy Skalko
ce0e192689
Move Cursor.h from TocWidget.h
2020-10-16 08:02:51 +03:00
Yuriy Skalko
fbefdb10a5
Move Cursor.h from Clipboard.h
2020-10-16 08:02:51 +03:00
Yuriy Skalko
7f40bb2b2d
Clean output_latex
2020-10-16 08:02:51 +03:00
Yuriy Skalko
65db7b31ad
Clean Cursor and CursorSlice
2020-10-16 08:02:51 +03:00
Yuriy Skalko
61bc850c27
Remove CutAndPaste.h from Trans.cpp
2020-10-16 08:02:51 +03:00
Yuriy Skalko
bea9d2f3f7
Clean includes in TextMetrics.cpp
2020-10-16 08:02:51 +03:00
Yuriy Skalko
da56091c2a
Clean includes in buffer_funcs.cpp
2020-10-16 08:02:51 +03:00
Thibaut Cuvelier
170866986c
Amend 82ea3d6
...
Test was done on the wrong data structure: the title is almost the only element ending up in shouldBeInInfo, it is never inmustBeInInfo.
2020-10-16 04:30:41 +02:00
Yuriy Skalko
36c8e06cf1
Move Dimension.h from InsetIPA.h
2020-10-15 19:26:16 +03:00
Yuriy Skalko
5ac65d1532
Move BufferParams.h from Language.h
2020-10-15 19:25:37 +03:00
Yuriy Skalko
87d19e1068
Remove BufferParams.h from BiblioInfo.h
2020-10-15 19:25:19 +03:00
Daniel Ramoeller
d5fe3337c6
Cleanup CutAndPaste.cpp
2020-10-15 10:24:00 +02:00
Richard Kimberly Heck
1f22a2520a
Fix linking problem by adding convert from string to unsigned long long.
2020-10-14 22:28:10 -04:00
Pavel Sanda
c0f9309300
Move <fstream> from support/gzstream.h
2020-10-14 15:12:48 +02:00
Pavel Sanda
644c1d3453
Move docstream.h from output_xhtml.h
2020-10-14 15:06:12 +02:00
Pavel Sanda
560ff6d40d
Move MetricsInfo.h from InsetMathSize.h
2020-10-14 14:58:18 +02:00
Pavel Sanda
2b02b73f4a
Move <QTimer> from TocWidget.h
2020-10-14 14:48:41 +02:00
Pavel Sanda
bd33601512
Move <QTimer> from GuiViewSource.h
2020-10-14 14:37:38 +02:00
Pavel Sanda
85eec10e4b
Move <QKeyEvent> from DockView.h
2020-10-14 14:35:29 +02:00
Pavel Sanda
61824e057e
Move GuiView.h from DockView.h
2020-10-14 14:28:47 +02:00
Pavel Sanda
57703d51c6
<QCloseEvent> DialogView.h -> DialogView.cpp
2020-10-14 13:57:30 +02:00
Pavel Sanda
f1b147cc97
include "GuiView.h": DialogView.h -> DialogView.cpp
2020-10-14 13:53:40 +02:00
Pavel Sanda
10fafd3bfe
<map> ParagraphMetrics.h -> TextMetrics.h
2020-10-14 13:14:58 +02:00
Pavel Sanda
da8b5de973
Move <algorithm> from DocIterator.h
2020-10-14 13:01:30 +02:00
Richard Kimberly Heck
b7f632ca1c
Fix bug #12002 .
...
Patch from Daniel.
2020-10-13 19:51:27 -04:00
Richard Kimberly Heck
1ff2de387d
Whitespace
2020-10-13 18:26:13 -04:00
Richard Kimberly Heck
28ae543a2a
Fix signed-ness warnings
2020-10-13 18:24:03 -04:00
Pavel Sanda
0ea9df7467
Add inset for \nopagebreak.
...
https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg213388.html
2020-10-13 19:13:59 +02:00
Jean-Marc Lasgouttes
c516c86d19
Make cursor width depend on current font
...
This makes the cursor more visible wrt current font.
Moreover make the cursor width scalable by default.
2020-10-13 17:27:52 +02:00
Jean-Marc Lasgouttes
310c94c48c
Fix display of caret completion indicator
...
The zooming algorithm based on caret width was deeply flawed. It is
not replaced with a formula based on caret height.
Fixes bug #12000 .
2020-10-13 17:09:33 +02:00
Yuriy Skalko
2a594d3e90
Remove unused forward declarations
2020-10-13 09:57:36 +03:00
Thibaut Cuvelier
769578eac6
Fix typos in filetools.cpp.
2020-10-13 00:33:05 +02:00
Thibaut Cuvelier
82ea3d67ec
DocBook: documents must have a title.
2020-10-12 19:26:37 +02:00
Thibaut Cuvelier
92b9c82dea
Fix compilation on Visual C++.
...
Without this patch, there would be errors like these (warnings turned into errors):
D:\LyX\lyx-unstable\src\frontends\qt\GuiView.cpp(2413): error C4101: 'e': unreferenced local variable
D:\LyX\lyx-unstable\src\frontends\qt\GuiView.cpp(4879): error C4101: 'ex': unreferenced local variable
2020-10-12 19:21:58 +02:00
Yuriy Skalko
cb52dd2e42
Add override
in VCBackend
2020-10-12 15:14:55 +02:00
Yuriy Skalko
238fd9ac50
Right exception rethrowing
2020-10-12 15:14:55 +02:00
Yuriy Skalko
919a06718a
Constify
2020-10-12 15:06:16 +02:00
Richard Kimberly Heck
2dc4277452
Const
2020-10-10 17:12:50 -04:00
Richard Kimberly Heck
b28bd27932
Fix warning
2020-10-10 17:12:50 -04:00
Yuriy Skalko
7d38a4d126
Loop refactoring
2020-10-09 09:04:20 +03:00
Richard Kimberly Heck
b511d8d93e
Use 'delete' for unimplemented constructors.
...
Thanks Yuriy!
2020-10-07 11:05:54 -04:00
Thibaut Cuvelier
0bd2978ac9
DocBook: add DocBookInnerTag and family.
...
This allows old DocBook documents to be valid when output.
2020-10-07 06:05:22 +02:00
Thibaut Cuvelier
6a0e93f162
Amend 249d899
...
Non-ASCII characters make std::isspace crash, but not lyx::isSpace.
2020-10-07 04:49:20 +02:00
Richard Kimberly Heck
3d46cc302b
Use explicit default syntax (C++11).
...
Thanks to Jos'e for noticing this option.
2020-10-06 20:31:11 -04:00
Richard Kimberly Heck
0f417f2a06
Fix some warnings
2020-10-06 12:27:28 -04:00
Richard Kimberly Heck
bff97ba76d
Explicit InsetTableCell copy constructor
2020-10-06 12:20:31 -04:00
Pavel Sanda
ffbcac3dde
Add few examples for lineno options.
...
It's actually pretty hard to get that from the manual.
2020-10-06 15:05:11 +02:00
Thibaut Cuvelier
249d899298
DocBook: clean output when fonts span over text that ends with a space
2020-10-05 16:22:58 +02:00
Jean-Marc Lasgouttes
c46f3b8f31
remove unused variable
2020-10-05 15:11:51 +02:00
Yuriy Skalko
c5ae08f0b8
Amend efc0877f
...
Add the last `override`s.
2020-10-05 15:03:13 +02:00
Yuriy Skalko
fe85162a29
Refactoring
2020-10-05 14:55:00 +02:00
Yuriy Skalko
d82adc625b
Amend efc0877f
...
Add more `override` specifiers. Replace `throw()` to `noexcept`.
2020-10-05 09:37:15 +02:00
Yuriy Skalko
14b0da28c2
Amend efc0877f
2020-10-03 21:17:17 +02:00
Yuriy Skalko
715b8cda54
Refactoring based on cppcheck suggestions
2020-10-03 13:39:51 +02:00
Kornel Benko
a43d8501a2
Do not use runparams.nice == true while exporting to docbook5
...
The setting implies that the variable external_in_tmpdir is set to false.
If a lyx-file includes external material for spreadsheet,
the conversion results are in tmpdir.
The routine doSubstitution() (insets/ExternalSupport.cpp:188) therefore
does nothing for the entry $$Contents because it uses wrong path.
2020-10-03 13:28:26 +02:00
Yuriy Skalko
efc0877f8f
Add override
specifiers to improve code maintainability
2020-10-03 12:43:48 +02:00
Juergen Spitzmueller
2330b4ce9c
Never mark references in inactive insets broken
...
This is the sledgehammer (and the only) way to omit broken refs if the
target is in an (or the same) inactive inset as well.
2020-10-03 08:54:06 +02:00
Richard Kimberly Heck
2afc68ede2
Whitespace
2020-10-02 13:11:28 -04:00
Jean-Marc Lasgouttes
dd65a97b55
Pass parameters as const references when possible
...
Fixes some cppcheck warnings.
2020-10-02 18:56:01 +02:00
Jean-Marc Lasgouttes
4d9a2c2e59
Fixup f96b99dc
: do not initialize cache too late
2020-10-02 12:17:57 +02:00
Jean-Marc Lasgouttes
a97b384b07
Fixup f96b99dc
: thinko
...
Setting the res value and returning from the function at the same time
does not make sense. After reflection, it is the "return" that shall
go.
No idea what effect it had.
2020-10-02 12:06:32 +02:00
Juergen Spitzmueller
8b155ce957
Refactoring
2020-10-02 08:30:31 +02:00
Juergen Spitzmueller
720179947e
tex2lyx: properly set textclass if no class is given
...
(snippets without \documentclass and no forced class)
2020-10-02 08:17:45 +02:00
Jean-Marc Lasgouttes
e16b9e8d22
Remove non-const version of ParagraphMetrics::getRow
...
Constify a bit TextMetrics::isRTLBoundary().
2020-10-01 14:58:18 +02:00
Jean-Marc Lasgouttes
a2b754b10b
Fixup 7d965319
: reset cursor font at a finer level
2020-10-01 14:19:09 +02:00
Jean-Marc Lasgouttes
7f1b1729b4
Cleanup the caret geometry code
...
Intended changes:
* code is shorter and cleaner
* caret scales better with zoom when cursor_width=0: completion
indicator, l-shaped cursor...
Details:
* Rename BufferView::getPosAndHeight to getPosAndDim because ascent is
needed too and width could in the future be set depending on font.
* Get rid of rect_ in CaretWidget and record a Dimension (and y value) instead.
Remove also caret_width_ and slant_, replace rtl_ with dir.
* Make CaretWidget members public and lose the trailing _.
* change CaretWidget::update to read its parameters from current bufferview.
2020-10-01 13:17:01 +02:00
Jean-Marc Lasgouttes
7d96531909
Fix bug where cursor size is not reset correctly.
...
A couple of calls to setCurrentFont fix the issue, but there has to be
more cases to catch. I am not sure why it used to work.
2020-10-01 12:44:38 +02:00
Jean-Marc Lasgouttes
f9aadae290
Get rid of helper Text::previousWord(), used only once
2020-09-29 10:15:31 +02:00
Richard Kimberly Heck
a41bcb3701
Error message
2020-09-28 22:45:44 -04:00
Richard Kimberly Heck
003a267764
We really do not want id to change
2020-09-28 22:20:22 -04:00
Richard Kimberly Heck
594401912b
Fix minor annoyance with previous commit.
...
When validating local layout, in particular, we create a dummy text TextClass
and so are not necessarily modifying previously declared material. Hence, we
get a spurious (but harmless) "Incomplete argument definition!" warning. This
suppresses it, but to do that we need to propogate the ReadType.
2020-09-28 22:07:08 -04:00
Richard Kimberly Heck
6f643e52d4
Allow argument definitions in layout files to modify existing ones.
...
This is what layout re-definitions do in all other cases.
2020-09-28 22:06:11 -04:00
Richard Kimberly Heck
54a72663ae
Move defaults into struct definition
2020-09-28 21:30:40 -04:00
Pavel Sanda
ad475adfd3
amend 6d6fc761be
2020-09-28 16:44:12 +02:00
Pavel Sanda
6d6fc761be
Qt4 compilable again
2020-09-28 16:34:42 +02:00
Yuriy Skalko
e47092044b
Use real italic slope for slanted caret
2020-09-28 14:30:05 +02:00
Juergen Spitzmueller
b38500353c
Amend 448e5efab4
...
Only set langClosed to true if it really has been closed.
2020-09-26 12:12:09 +02:00
Enrico Forestieri
f0807a604c
Use correct bounding box when exporting from command line
...
Without GUI an image is not available even if it is actually cached.
In this case we load the image for obtaining its dimensions in order
to correct the clipping bounding box.
This amends 380f34a1
.
2020-09-25 20:58:40 +02:00
Enrico Forestieri
a8572c1358
Correct comment
2020-09-25 12:11:10 +02:00
Enrico Forestieri
9b1763cd42
Do not correct clipping bounding box for vector formats
...
This amends 380f34a1
that only took into account the postscript format.
2020-09-25 12:01:57 +02:00
Jean-Marc Lasgouttes
967f4d661e
Remove default parameter of UndoGroupHelper constructor
...
This can lead to mistakes. If no buffer is required at the beginning,
it is better to pass 'nullptr' explicitly.
Fix a case of missing parameter in GuiCompleter (introduced at
f3656600
). This avoids some spurious "There is no group open (creating
one)" messages.
2020-09-23 17:33:17 +02:00
Jean-Marc Lasgouttes
32b688225d
Do not use a fake row to compute completion dimension
...
The code in TextMetrics::completionPosAndDim is needlessly complicated.
1/ It is easier to rely directly on Text::getWord() rather than on the
helper previousWord().
2/ Using a fake row to compute completion height is overkill. A
simpler solution is proposed here.
No intended effect. These changes prepare the fix to ticket #11818 .
2020-09-22 15:11:08 +02:00
Juergen Spitzmueller
b814c4fda7
Fix unnecessary cprotect
2020-09-20 08:45:42 +02:00
Thibaut Cuvelier
da67bde61a
Revert "XHTML: remove DOCTYPE, as the document is then understood as HTML4/XHTML1, and not XHTML5."
...
This reverts commit c8e2c17a
: this makes some browsers unable to understand basic HTML entities.
2020-09-20 01:35:14 +02:00
Thibaut Cuvelier
44a7d2bc88
DocBook: adapt code for older GCC.
2020-09-19 23:55:07 +02:00
Thibaut Cuvelier
b5adcec28a
XHTML: fix for encodings in attributes (patch by Kornel)
2020-09-19 20:43:42 +02:00
Thibaut Cuvelier
c83fd0eb06
XHTML sections: saner code to close the section.
...
It only caused troubles in corner cases...
2020-09-19 20:43:42 +02:00
Thibaut Cuvelier
a85b4b88ed
XHTML sections: only filter out things that are not Sectioning, not based on the level.
2020-09-19 20:43:42 +02:00
Thibaut Cuvelier
0dfa240209
XHTML: restore sections.
2020-09-19 20:43:41 +02:00
Thibaut Cuvelier
15dbc2b9ab
Revert "XHTML: remove <section> support."
...
This reverts commit 52216b73
2020-09-19 20:43:41 +02:00
Thibaut Cuvelier
c8e2c17a58
XHTML: remove DOCTYPE, as the document is then understood as HTML4/XHTML1, and not XHTML5.
2020-09-19 20:43:41 +02:00
Thibaut Cuvelier
92ad86dacc
XHTML: remove <section> support.
2020-09-19 20:43:41 +02:00
Thibaut Cuvelier
bfeb3b66b1
DocBook: slight code simplification.
2020-09-19 20:43:41 +02:00
Thibaut Cuvelier
6c51cabd35
DocBook: fix output in Layout::write.
2020-09-19 20:43:41 +02:00
Thibaut Cuvelier
50f011e062
DocBook: implement InsetBox titles.
2020-09-19 20:43:41 +02:00
Thibaut Cuvelier
3711a38b9c
DocBook: fix a crash in bibliography paragraphs.
2020-09-19 20:43:41 +02:00
Thibaut Cuvelier
1b818c448d
DocBook: work for more subfigure cases.
...
EmbeddedObjects hid quite a few gems :).
2020-09-19 20:43:41 +02:00
Thibaut Cuvelier
8758000641
DocBook: ensure xml:id is not output too many times.
...
This is mostly important for subfigures, but debugging this issue showed that InsetCaption could be slightly simplified and InsetLabel should be made a tad more robust.
2020-09-19 20:43:41 +02:00
Thibaut Cuvelier
d0a5ba4859
DocBook: handle other cases of subfigures.
2020-09-19 20:43:41 +02:00
Thibaut Cuvelier
9a48c8d22b
DocBook: fix handling of new lines and fonts.
...
Only the font variable was restored to the right state, not fs.
2020-09-19 20:43:40 +02:00
Thibaut Cuvelier
5f0720e947
XHTML: fix generation of many useless </section>.
2020-09-19 20:43:40 +02:00
Thibaut Cuvelier
faec783822
XML: bad fix for a crash that only happened in XHTML.
...
As an error is output, I suppose that this behaviour is OK.
2020-09-19 20:43:40 +02:00
Scott Kostyshak
a632a9ae3c
DocBook: remove useless functions.
2020-09-19 20:43:40 +02:00
Thibaut Cuvelier
1a76fb9658
DocBook: avoid using isspace in StartTag::writeTag.
...
This is the cause of crashes (on both Windows and Linux).
2020-09-19 20:43:40 +02:00
Thibaut Cuvelier
2cd7a94f8b
DocBook: introduce Floating::docbookFloatType.
...
This ensures that all comparisons for DocBook are made on the same normalised version of the float type. This cased a strange bug where <table> was output within <informaltable> for Linguistics Tableaux.
2020-09-19 20:43:40 +02:00
Thibaut Cuvelier
8ed8d36595
Fix two warnings in BufferView.
2020-09-19 20:43:40 +02:00
Thibaut Cuvelier
40f4da3c9f
DocBook: floats can no more override DocBookTag.
...
This lead to a quite subtle bug. The major problem is that float tags
depend on whether the LyX float has a title (formal) or nor (informal).
This information cannot be encoded in the layout format as easily as a
simple DocBookTag.
2020-09-19 20:43:40 +02:00
Thibaut Cuvelier
08a58242c1
DocBook: better output with the Linguistics module.
...
One issue left: <table> output within an <informaltable>, that does not make sense... I'm debugging it.
2020-09-19 20:43:40 +02:00
Thibaut Cuvelier
abed1f3e6e
DocBook: fix crash with Linguistics example.
...
This was due to Floating::docbookTag not returning anything with the floattype_ tableau. Another issue that happened with that document is that the standard library's isspace crashed for some characters. I therefore implemented a more efficient version of the part that required it, and inlined the definition of isspace (even though that part becomes irrespective of locale, but was that feature ever used?).
2020-09-19 20:43:40 +02:00
Thibaut Cuvelier
594a4763b7
Fix a few warnings.
2020-09-19 20:43:40 +02:00
Thibaut Cuvelier
e3da8b65f6
DocBook: several missing features for Additional.lyx.
...
Includes: semantic markup (sorry about noun: Additional.lyx uses it to mark menus; there is something better in DocBook, but it looks like the LaTeX equivalent is really for person names), boxes, info layouts.
2020-09-19 20:43:40 +02:00
Thibaut Cuvelier
19734ea454
DocBook: implement LyX-Code.
...
This is quite ugly.
2020-09-19 20:43:40 +02:00
Thibaut Cuvelier
bc9d3ec262
DocBook: <person> is not valid per se, rather use <personname>.
...
The cleanest solution would still be <person><personname>, but this ought to be enough. Otherwise, that would imply having two tags for some fonts...
2020-09-19 20:43:40 +02:00
Thibaut Cuvelier
8f3d0fd88f
DocBook: new-line behaviour in bibliographies.
2020-09-19 20:43:39 +02:00
Thibaut Cuvelier
6d246bba69
DocBook: fix margin notes.
...
They were nested twice in <sidebar>. Also fixes a new line issue.
2020-09-19 20:43:39 +02:00
Thibaut Cuvelier
91982ee105
DocBook: new lines around formulae.
2020-09-19 20:43:39 +02:00
Thibaut Cuvelier
e995414917
DocBook: avoid generating fonts for "special cases" like equations.
2020-09-19 20:43:39 +02:00
Thibaut Cuvelier
654559feb8
DocBook: fix line issues around programlisting.
2020-09-19 20:43:39 +02:00
Thibaut Cuvelier
9d3a717ef1
DocBook: fix font issues when a paragraph has an InsetNewline.
2020-09-19 20:43:39 +02:00
Thibaut Cuvelier
7a1b82a16a
DocBook: fix issue with fonts.
2020-09-19 20:43:39 +02:00
Thibaut Cuvelier
c3aa843da8
DocBook: fixes in bibliography (missing new line at the end).
2020-09-19 20:43:39 +02:00
Thibaut Cuvelier
6688b076cc
DocBook: fixes in lists.
...
Actually output something when list item is empty. XMLStream discarded the sequence StartTag/EndTag (nothing in between).
New-line behaviour around term in description lists.
2020-09-19 20:43:39 +02:00
Thibaut Cuvelier
5b01c80635
DocBook: fix titles in KOMA Script.
2020-09-19 20:43:39 +02:00
Thibaut Cuvelier
976bd91fc2
DocBook: bug fixing with wrapper merging.
2020-09-19 20:43:39 +02:00
Thibaut Cuvelier
ec0f4885a7
DocBook: fix bibliographies (end of <bibliography> and sections).
2020-09-19 20:43:39 +02:00
Thibaut Cuvelier
642b18aad0
DocBook: generate <partintro> when required.
2020-09-19 20:43:38 +02:00
Thibaut Cuvelier
17b06f5336
DocBook: streamline code to handle sections.
2020-09-19 20:43:38 +02:00
Thibaut Cuvelier
f219fe1cd7
DocBook: streamline code to handle abstracts.
2020-09-19 20:43:38 +02:00
Thibaut Cuvelier
a8da31e5e0
DocBook: fix handling of index end-of-range.
2020-09-19 20:43:38 +02:00
Thibaut Cuvelier
78a361778f
DocBook: fix float tags (was unduly overridden).
...
The output was not valid for floats without title.
2020-09-19 20:43:38 +02:00
Thibaut Cuvelier
39ad6e84f0
DocBook: improve equation formatting (new lines for block equations).
2020-09-19 20:43:38 +02:00
Thibaut Cuvelier
fc2c36289b
DocBook: rewrite makeListEnvironment.
2020-09-19 20:43:38 +02:00
Thibaut Cuvelier
8656fbd520
DocBook: start splitting environment handling in two, to have proper things for lists.
2020-09-19 20:43:38 +02:00
Thibaut Cuvelier
1bd49f9c39
DocBook: make all make* functions have the same argument order.
2020-09-19 20:43:38 +02:00
Thibaut Cuvelier
fc0999a422
DocBook: partially remove use of bpit/epit in docbookParagraphs and docbookSimpleAllParagraphs.
...
This will help with the next refactoring to be much cleaner (only work with iterators, don't maintain twice the same information).
2020-09-19 20:43:38 +02:00
Thibaut Cuvelier
bfc67c59b4
XML: use the new mechanisms for CR detection with errors.
...
This helps tracking down line problems even in the presence of errors.
2020-09-19 20:43:38 +02:00
Thibaut Cuvelier
52b2d3f683
DocBook: make Paragraph::simpleDocBookOnePar return a list of paragraphs.
...
Before, it directly wrote to the XMLStream, but it made implementation of new lines tricky. Now, it returns the XML for each sub-paragraph (delimited by new lines) as a string, so that the caller can adopt a more precise behaviour (such as in lists).
2020-09-19 20:43:38 +02:00
Thibaut Cuvelier
faaf780bed
DocBook: fix compilation issues.
2020-09-19 20:43:38 +02:00
Thibaut Cuvelier
3d348818e0
DocBook: Coverity potential problem for precooked bibliographies.
2020-09-19 20:43:38 +02:00
Thibaut Cuvelier
ac46456b28
DocBook: simplify precooked bibliography code.
2020-09-19 20:43:38 +02:00
Thibaut Cuvelier
6a4d3dbef7
DocBook: remove useless includes.
2020-09-19 20:43:38 +02:00
Thibaut Cuvelier
d8651cc60b
More functions in anonymous namespace.
2020-09-19 20:43:37 +02:00
Thibaut Cuvelier
25f72d392c
DocBook: fine tuning of new lines.
2020-09-19 20:43:37 +02:00
Thibaut Cuvelier
bdea21a87e
DocBook: improve comments.
2020-09-19 20:43:37 +02:00
Thibaut Cuvelier
9393ca74ba
DocBook: new logic to handle the new lines, only used in output_docbook for now.
2020-09-19 20:43:37 +02:00
Thibaut Cuvelier
27a44f8e48
XML: memorise if the last thing that is getting output is a line feed.
2020-09-19 20:43:37 +02:00
Thibaut Cuvelier
6998e76495
DocBook: define new arguments in layouts to configure new-line behaviour.
2020-09-19 20:43:37 +02:00
Thibaut Cuvelier
87dae26e4a
Simplify code to generate only one paragraph at a time.
2020-09-19 20:43:37 +02:00
Thibaut Cuvelier
9184ae14f0
A few more constants to avoid copies
2020-09-19 20:43:37 +02:00
Thibaut Cuvelier
dab71087cf
DocBook: add a layout tag to tell whether an item is the abstract or not.
2020-09-19 20:43:37 +02:00
Thibaut Cuvelier
7b0f9d9524
DocBook: simplify code to handle abstracts.
2020-09-19 20:43:37 +02:00
Thibaut Cuvelier
0f145c3ef0
DocBook: use DocBookWrapperMergeWithPrevious in the code.
2020-09-19 20:43:37 +02:00
Thibaut Cuvelier
c92e0bc5e7
DocBook: fix for ordering.
2020-09-19 20:43:37 +02:00
Thibaut Cuvelier
72c304a629
DocBook: make openParTag/closeTag use paragraphs instead of layouts.
...
Not useful per se, but will be next with checking whether the wrapper tags should be opened/closed.
2020-09-19 20:43:37 +02:00
Thibaut Cuvelier
c417253d0b
DocBook: use DocBookItemTag within paragraphs.
...
This is at least helpful for AAS, even though it slightly resembles a repurposition of that parameter.
2020-09-19 20:43:37 +02:00
Thibaut Cuvelier
1a09086ec2
Merge findLastParagraph and findLastBibliographyParagraph to lower code duplication.
...
Maybe these functions should move to ParagraphList.h/cpp?
2020-09-19 20:43:37 +02:00
Thibaut Cuvelier
4d78fe5957
Slight code-consistency improvements.
2020-09-19 20:43:36 +02:00
Thibaut Cuvelier
ad18c19492
DocBook: add new layout parameter DocBookWrapperMergeWithPrevious.
2020-09-19 20:43:36 +02:00
Thibaut Cuvelier
a852706bf0
DocBook: allow empty paragraphs before the <info> section.
2020-09-19 20:43:36 +02:00
Daniel Ramoeller
9a1f732664
Show slanted caret (cursor) when text style emphasis/italics/slanted.
...
Fixes for bug #11428 . Emphasis is used regularly and it is helpful to
see whether the next text will be written emphasized directly from the
cursor.
This is also implemented in MS Word and Google docs but not in
LibreWriter.
Also fixes the caret for RTL languages whose width was previously
extended into the wrong direction.
2020-09-18 13:27:06 +02:00
Yuriy Skalko
cd933534bd
Increment preferences format to 34: rename Cyrillic *.kmap files
2020-09-17 15:05:31 +02:00
Jean-Marc Lasgouttes
b96b876403
Revert "Show toolbar context menu only when clicking on the toolbar"
...
Something is wrong.
This reverts commit f25253f89a
.
2020-09-16 16:54:33 +02:00
Daniel Ramoeller
f25253f89a
Show toolbar context menu only when clicking on the toolbar
...
Previsouly it was on the whole application window, except on disabled toolbar
buttons.
Fix for bug #11949
2020-09-16 11:18:57 +02:00
Jean-Marc Lasgouttes
ae37caacdd
Add method FontMetrics::italic()
...
This can be useful for ticket #11428 .
2020-09-14 16:26:19 +02:00
Yuriy Skalko
b0db575dc1
Show custom text styles in status bar
...
Fixes bug #11951 .
2020-09-14 11:38:29 +02:00
Scott Kostyshak
670da1817e
Fix documentation for LFUN_LAYOUT
...
The argument 'ignorenests' was renamed to 'ignoreautonests' at
d6fb2abb
.
2020-09-12 19:31:42 -04:00
Stephan Witt
320b6b6656
#6401 correct cursor movement for word forward/backward with enabled Mac style (mac_like_cursor_movement)
...
The change includes a rewrite of the cursor movement when „mac style“ is enabled and don’t change anything otherwise.
The new code for mac uses the document iterator to go forward or backward. The traversal stops at word boundaries.
If going forward the position increments until a word is reached (if not already inside) and stops at the end of the word.
If going backward it does the same in opposite direction. The cursor jumps over non-editable insets and math.
Editable (open) insets are entered and the cursor move detects word boundaries inside them.
2020-09-12 14:34:56 +02:00
Yuriy Skalko
fb7b7e5223
Refactor runCommand
2020-09-11 16:13:23 +02:00
Jean-Marc Lasgouttes
c1f8c6c26d
Fixup 5202d44e
: make caret geometry update lazy
...
Instead of working around crashes in update of caret geometry, only
request it as needed. The actual computation will take place just
before painting the caret.
It might be that this is overkill and that caret geometry should be
updated unconditionally. One would have to to some timing while idle to
ascertain that.
Fixes bug #11912 .
2020-09-11 11:48:12 +02:00
Eugene Chornyi
46da0d9d4d
Workaround Qtbug regarding the QAbstractScrollArea::mouseMoveEvent(...) ( 06969f9d
) is only needed until Qt 5.15.1 as it was fixed there.
2020-09-10 20:40:48 +02:00
Daniel Ramöller
69841003a3
Let Ctrl-Click on a reference jump to the corresponding label.
...
Fix some warnings while we're at it. (That part by RKH.)
2020-09-10 12:38:41 -04:00
Daniel Ramöller
35aaa1c528
Show child documents in outline with their paths.
2020-09-10 12:30:12 -04:00
Richard Kimberly Heck
a8de13632a
Add FIXME
2020-09-10 12:24:52 -04:00
Jean-Marc Lasgouttes
bf25e8568d
Fixup ad954a32
: make space insets easier to see.
...
The previous code left one extra pixel on each side of the visible space, and
spaces became too small to be readable.
2020-09-09 11:28:21 +02:00
Jean-Marc Lasgouttes
eda3219662
Remove unneeded space for \nolimits
2020-09-09 10:35:35 +02:00
Enrico Forestieri
fcd14df230
Avoid spurious requirements
...
The macros defined in the symbols file are only used for on-screen
representation, so that their definition should not require the use
on any latex package. Their definition should be taken into account
only when they are overridden by user macros with same name.
2020-09-09 01:32:51 +02:00
Enrico Forestieri
0762b52334
Try to use the right width for math symbols
...
The rules for typesetting math differ from the rules for typesetting
text. For example, two italic 'f' chars have to be typeset more closely
than two 'o' chars in text mode, but not in math mode. Qt provides a
method that returns the distance appropriate for drawing a subsequent
character in text mode, but nothing for math mode. Typically, the
distance appropriate for drawing the next character in math mode is
the actual width span by the character, corrected by the rules of
an appendix in the TeXbook. Recently, those rules are followed more
closely in LyX but not exactly, and we have to find a way to adapt to them.
Some symbols may need more spacing around them than the width they span.
So, we use the distance suggested by Qt, unless it is less than the
width of the rectangle bounding the symbol. Before Qt 5.11 the used method
was QFontMetrics::width(), but since then it has been declared obsolete
in favor of QFontMetrics::horizontalAdvance(), whose name conveys better
its meaning.
2020-09-08 22:30:02 +02:00
Jean-Marc Lasgouttes
b744c3e28a
Revert "Fixup 5202d44e
: make caret geometry update lazy"
...
Something is wrong with the cursor.
This reverts commit dc35f1ddf4
.
2020-09-07 16:02:50 +02:00
Jean-Marc Lasgouttes
dc35f1ddf4
Fixup 5202d44e
: make caret geometry update lazy
...
Instead of working around crashes in update of caret geometry, only
request it as needed. The actual computaiton will take place just
before painting the caret.
It might be that this is overkill and that caret geometry should be
updated unconditionally. One would have to to some timing while idle to
ascertain that.
Fixes bug #11912 .
2020-09-07 15:52:43 +02:00
Jean-Marc Lasgouttes
9b18a9b609
Fixup e1be71da5
: avoid duplication of layout
...
If the containing paragraph has kept its layout, reset the layout of
the first paragraph of the newly inserted inset.
2020-09-07 14:16:47 +02:00
Jean-Marc Lasgouttes
a58bcf1d27
Fixup f96b99dcb3
: read correctly \limits after macros
...
Move InsetMacro::limits_ to InsetMacro::Private, where it should have
been from the start. This means that limits_ is now copied when the
macro is cloned.
2020-09-07 12:13:42 +02:00
Enrico Forestieri
062d94c5da
Fix on-screen display of special math fonts
...
Make sure that the on-screen representation of the special math fonts
mathbb, mathds, mathfrak, mathcal, and mathscr matches the latex output.
2020-09-06 18:16:04 +02:00
Juergen Spitzmueller
61739e5aef
Add some hspacers
2020-09-05 08:23:56 +02:00
Juergen Spitzmueller
199fb4b934
set defaults for float_placement and float_alignment
2020-09-05 08:09:02 +02:00
Stephan Witt
45e8ea4acc
#11756 Respect system preferences for tabbing on Mac
2020-09-04 23:28:27 +02:00
Enrico Forestieri
a9afdbb73c
Personalize fonts
...
When the fonts distributed with texlive with same family name
as ours are also managed by fontconfig, Qt is not able to
discriminate ours by the style only. In order to be sure Qt
will load our fonts, we change the foundry name from 'PfEd'
to 'LyEd' and augment the font family name with this foundry
name. This only works on *nix, because adding a foundry name
seemingly breaks things on Windows. However, this is a *nix
only problem, seemingly.
2020-09-03 17:46:30 +02:00
Jean-Marc Lasgouttes
efc8d44d09
Fixup 2e784b2f
: consider default layout too.
...
And simplify the test at the same time.
2020-09-03 12:56:33 +02:00
Juergen Spitzmueller
5c83c5c410
Foward-port tooltip addition from stable ( 3a7560dcb0
)
2020-09-03 08:55:46 +02:00
Richard Kimberly Heck
5606e934ac
Accelerators
2020-09-02 10:22:26 -04:00
Enrico Forestieri
8039b34802
Adjust debug output for fonts
...
This restores the debug output as it was intended before the
introduction of the LYXERR macro that was unconditionally outputing
an end of line. This is how this output was appearing until lyx 1.5:
Looking for font family cmr10 ... got: cmr10
got it normal!
instead of as it was since lyx 1.6 and until now:
Looking for font family cmr10 ...
got: cmr10
got it
normal!
2020-09-01 12:12:55 +02:00
Richard Kimberly Heck
1ba785f2c6
Localization
2020-09-01 01:41:10 -04:00
Richard Kimberly Heck
3c25899eab
Improved fix for edit button
2020-08-31 11:20:49 -04:00
Richard Kimberly Heck
cf7e32ee8f
Fix problem with edit button.
...
The previous implementation relied upon the cursor being immediately
in front of the inset. A bad idea.
2020-08-31 10:50:59 -04:00
Richard Kimberly Heck
a385b7dc2b
Fix bug 4475.
...
Add ability to create child from the include dialog.
2020-08-31 10:20:52 -04:00
Jean-Marc Lasgouttes
d68f6f7f40
Add FIXME: do we need to update scrollbar at each draw()?
...
Related to ticket #11947 .
2020-08-30 19:16:38 +02:00
Stephan Witt
292799a4bd
#11756 cleanup the view menu on Mac
...
Using US english desktop language LyX's Mac OS adds some items to the view menu:
1. Show/Hide Tab Bar and
2. Enter Full Screen
These items won't work properly and it's better to hide them.
2020-08-30 15:35:02 +02:00
Stephan Witt
1c5a2fc0ec
#11756 hide additional menu items in edit menu on Mac
...
Mac OS adds two extra menu entries to the edit menu.
These menu items are:
1. Start Dictation...
2. Emoji & Symbols
Both menu items don't work with LyX.
Therefore they shouldn't be present and the new code hides them.
2020-08-30 11:24:59 +02:00
Stephan Witt
784139da50
Remove unused leftover from Makefile.
2020-08-30 11:24:59 +02:00
Enrico Forestieri
80f94a9398
Use correct width for \fint
...
Both QTextLine::naturalTextWidth() and QTextLine::horizontalAdvance()
return the same value for \fint. However, examining esint10.ttf with
fontforge does not reveal any issue with the metrics. The fact that
\fint seems to be the only affected symbol might be due to its code
point, which corresponds to a space, so that maybe Qt makes some
assumptions on the metrics.
As QTextLine::naturalTextWidth() returns the width of the line that is
occupied by text, in the case of a single symbol we can obtain the
same value by using the width of the rectangle bounding the symbol.
2020-08-29 20:10:26 +02:00
Juergen Spitzmueller
6f476b960e
Localize format prettyName in some more places ( #11954 )
2020-08-29 11:50:43 +02:00
Juergen Spitzmueller
3fc095e3bc
Do not \protect label in subfloat caption ( #11950 )
2020-08-28 07:32:29 +02:00
Yuriy Skalko
3bd358a2f6
Prevent permanent disabling of comboboxes in Vertical/Horizontal space dialogs
2020-08-28 07:07:44 +02:00
Juergen Spitzmueller
4fdcf0e929
address deprecation warning
2020-08-27 14:43:23 +02:00
Pavel Sanda
28dd0e1f21
Fix Qt4 compilation.
2020-08-27 14:05:22 +02:00
Juergen Spitzmueller
bc76026da5
Disable citationSearchLE with citationSearchCB
2020-08-27 12:53:41 +02:00
Juergen Spitzmueller
39caa70100
Clear info_ cache if format changes
2020-08-27 12:41:40 +02:00
Juergen Spitzmueller
d44929ff81
Properly report back if showDirectory() doesn't succeed
2020-08-27 11:58:37 +02:00
Juergen Spitzmueller
ff14d0bd00
Report back if citation target could not be opened
2020-08-27 11:52:52 +02:00
Juergen Spitzmueller
5cc191ddee
Fix string subst
2020-08-27 11:52:23 +02:00
Juergen Spitzmueller
b4ca3e4fa4
Assure bibinfo is correctly processed
2020-08-27 11:42:03 +02:00
Juergen Spitzmueller
c5c3323f32
Properly disable function
2020-08-27 10:59:15 +02:00
Juergen Spitzmueller
8365eabd6f
Make paper search function accessible and customizable
2020-08-27 08:48:55 +02:00
Juergen Spitzmueller
d436a51024
About: Fix cutting of icon ( #11946 )
2020-08-26 10:01:53 +02:00
Jean-Marc Lasgouttes
cc349fd031
Add space before display math that starts a paragraph
...
This extra spacing was missing and is important for detecting extra
par breaks before equations (which are most of the times not wanted).
To do that, add a new member vmode to MetricsInfo which is equivalent
to LaTeX's \ifvmode (start of paragraph).
If in vmode, add the equivalent of an empty line before a display math inset.
At the same time, tweak value of \(above|below)displayskip, which was
12pt, whereas LaTeX uses 10pt in 10pt size (our reference).
Fixes bug #11891 .
2020-08-25 13:20:37 +02:00
Stephan Witt
3c1b4a5d7e
#6401 avoid use of lyxCode()
2020-08-25 10:54:49 +02:00
Jean-Marc Lasgouttes
294e4884ee
Center correctly top labels like Abstract.
...
They used to take the paragraph indentation into account.
Fixes bug #11939 .
2020-08-25 10:30:34 +02:00
Jean-Marc Lasgouttes
ee3a711316
Forgotten break in switch found by coverity scan.
2020-08-24 17:21:04 +02:00
Jean-Marc Lasgouttes
2a6f1d2b58
Fixup 907f0207
: another place where pm.ascent() is wrong
...
Fix bug where selecting in first paragraph gave an end of selection on
wrong row.
Since pm.ascent() may contain the top margin, it makes sense in
setCursorFromCoordinates() to use the ascent of the front row instead,
like was none in907f0207 for getPitAndRowNearY().
2020-08-24 17:14:08 +02:00
Pavel Sanda
44ede7ef4b
Do not hardcode launching of lyxpaperview script.
2020-08-24 15:11:53 +02:00
Yuriy Skalko
c160e21c48
Split some UI strings for translations
2020-08-24 07:23:40 +02:00
Pavel Sanda
894ad70eba
Enable Open Citation menu item iff citation contain locator information or external search script is available.
...
Per Juergen's request.
2020-08-23 22:19:34 +02:00
Juergen Spitzmueller
0fa93fe55a
Amend 76cdca6422
...
Use auto pointer in all loops over UsedLanguages_
2020-08-23 13:49:56 +02:00
Richard Kimberly Heck
17f9d6b192
Fix warnings
2020-08-23 05:48:15 -04:00
Juergen Spitzmueller
76cdca6422
range-based loops
2020-08-23 10:07:49 +02:00
Juergen Spitzmueller
c3cac2048b
Sort secondary babel languages alphabetically
2020-08-23 10:04:56 +02:00
Juergen Spitzmueller
448e5efab4
Do not attempt to close language twice
2020-08-21 11:07:22 +02:00
Scott Kostyshak
4c0073cd03
Whitespace
2020-08-20 21:51:29 -04:00
Juergen Spitzmueller
c71551fd9d
GuiAbout: some more polishment
2020-08-20 16:08:10 +02:00
Juergen Spitzmueller
1f92214d78
GuiAbout: use unformatted version info via Copy button
2020-08-20 15:50:31 +02:00
Pavel Sanda
e648202e7e
Allow LyX to find pdfs and urls of citation references and follow them from context menu.
...
Currently tested:
- url & doi fields for bibtex.
- all documented eprinttypes of biblatex
- absolute paths of first entry of 'file' field for jabref and kbibtex
- external script searching for author + year pdf
Additional polishing will follow.
https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg212505.html
2020-08-20 09:12:54 +02:00
Yuriy Skalko
679c418b03
Fix UI string
2020-08-19 10:15:45 +02:00
Juergen Spitzmueller
55f7b337cc
Simplification
2020-08-17 13:29:55 +02:00
Juergen Spitzmueller
3aefd7477c
Fix font and encoding switch problem with directionality change at inset
...
Also fixes #10110
2020-08-17 13:25:02 +02:00
Juergen Spitzmueller
4d1d07ea10
Amend 92f6e4806e
...
This was too general
2020-08-17 13:11:46 +02:00
Stephan Witt
c88f331a06
Avoid a type mismatch warning resp. error for signed vs unsigned typed values comparison
2020-08-17 12:25:35 +02:00
Juergen Spitzmueller
957b615b1f
Fix another crash with Grid pasting (follow-up to #11906 )
2020-08-16 17:24:13 +02:00
Stephan Witt
2dae4ab4f3
Improved character count statistics for letter based insets (e.g. the LyX logo).
2020-08-16 17:07:04 +02:00
Stephan Witt
7ec0bdbf28
#6401 For correct document traversal special logo chars should be treated like letters
2020-08-16 17:05:44 +02:00
Stephan Witt
ba21c946a1
#6401 improve doc iterator to allow easy backward navigation
2020-08-16 16:54:03 +02:00
Juergen Spitzmueller
d9f1f7e348
Remove now redundant string
2020-08-16 11:31:56 +02:00
Juergen Spitzmueller
812ff7de75
Take out inheritFont() condition
2020-08-16 11:18:49 +02:00
Juergen Spitzmueller
92f6e4806e
Fix language closing before inset
2020-08-16 10:47:46 +02:00
Juergen Spitzmueller
24af4ffcb3
Redo "Move some tests upstream, since we'll need it there" properly
2020-08-16 10:47:08 +02:00
Juergen Spitzmueller
6876a306b9
Consider encoding when re-setting language
2020-08-15 19:21:20 +02:00
Juergen Spitzmueller
3c5c41ddc2
Only exclude ERT from language switch doing
2020-08-15 16:46:18 +02:00
Juergen Spitzmueller
5490e7545b
Polish About dialog
...
(this might need adaptation with HiDPI)
2020-08-15 16:07:12 +02:00
Juergen Spitzmueller
cba24bb642
Fix deprecation warning
2020-08-15 16:06:56 +02:00
Juergen Spitzmueller
1c3ccc0ac2
Revert "Move some tests upstream, since we'll need it there"
...
This reverts commit 0a44c1687e
.
2020-08-15 15:32:15 +02:00
Juergen Spitzmueller
fb2077df11
Revert "Fix a lang edgecase"
...
This reverts commit dc4b11b0e9
.
2020-08-15 15:21:19 +02:00
Juergen Spitzmueller
6fd566fbec
Flag placeholder string nontranslatable
...
This is just wasted efforts for the translators, as this string never
appears in the GUI.
2020-08-15 13:18:19 +02:00
Juergen Spitzmueller
dc4b11b0e9
Fix a lang edgecase
2020-08-15 12:29:55 +02:00
Juergen Spitzmueller
0a2fce358d
Do not attempt to use switches around PassThur insets.
...
This is bound to break with ERT snippets f. ex.
2020-08-15 12:29:55 +02:00
Juergen Spitzmueller
0a44c1687e
Move some tests upstream, since we'll need it there
2020-08-15 12:29:55 +02:00
Juergen Spitzmueller
469bc1bbe4
Revert apparent accident introduced in fed71fa8c2
2020-08-15 09:26:51 +02:00
Juergen Spitzmueller
ea122aa8fa
Amend 89d9334e03
...
This needs to be default layout, not plain layout
2020-08-15 08:35:26 +02:00
Juergen Spitzmueller
89d9334e03
Maintain plain layout for separating paragraphs when switching layouts ( #11936 )
2020-08-15 08:14:17 +02:00
Yuriy Skalko
1cf86348dd
Enable search in "LaTeX Log" dialog by pressing Enter
2020-08-15 07:52:55 +02:00
Juergen Spitzmueller
04ba887e2c
Correctly re-set font before and after non-multipar inset
2020-08-15 07:06:20 +02:00
Stephan Witt
012c0f6bac
#6401 avoid unnecessary inset to string conversions in Paragraph::find while skipping invisible letters
2020-08-14 21:32:24 +02:00
Stephan Witt
5bce66b1a3
#6401 more robust processing on special char code insets when looking for spell checker ranges
2020-08-14 21:28:24 +02:00
Pavel Sanda
48b1e8a0ac
New attempt on #9906 : allow following hyperlinks via context menu.
...
Now safer version with the help of Qt.
2020-08-14 19:48:47 +02:00
Enrico Forestieri
836300cd33
Revert "Correctly set font decorations for multipar insets"
...
This reverts commit 5791b8bff8
.
2020-08-14 18:01:26 +02:00
Kornel Benko
9b7db11901
docbook exports: Omit crashing export on some files
...
Committed since Thibaut apparently has no time to react, and the crash is
really distracting.
2020-08-14 12:31:25 +02:00
Enrico Forestieri
5791b8bff8
Correctly set font decorations for multipar insets
...
Font decorations such as underline cannot be set for a whole inset
that allows paragraph breaks. This commit allows to still set the
font main properties for the whole inset but decorations are applied
to each paragraph inside the inset.
2020-08-14 12:04:23 +02:00
Yuriy Skalko
4c3139314b
Correct Right Arrow key processing in Modules list
2020-08-14 10:12:13 +02:00
Yuriy Skalko
e1dd91e10e
Disable editing of math package names in Document Settings
2020-08-14 10:05:11 +02:00
Juergen Spitzmueller
70eb8c37cb
Do not close language before PassThru insets
2020-08-14 09:50:40 +02:00
Juergen Spitzmueller
ef11fdc77d
Assure language is properly closed before non-inheriting inset.
2020-08-14 09:08:46 +02:00
Juergen Spitzmueller
8bc76ad9bb
\foreignlanguage does not play with \cprotect.
2020-08-14 09:00:48 +02:00
Daniel Ramoeller
c9bf179016
#10346 Amend change 01b2893f8b
switch directory buttons
2020-08-13 21:43:23 +02:00
Stephan Witt
63fcb7b8e1
#10346 Amend change 01b2893f8b
to make Qt4 compilable - again
2020-08-13 10:26:44 +02:00
Stephan Witt
4ddff8fe28
#10346 Amend change 01b2893f8b
to make Qt4 compilable
2020-08-13 08:12:56 +02:00
Daniel Ramoeller
01b2893f8b
Fix bug #10346 .
...
Allow to open user and library directories from About LyX.
2020-08-12 14:25:36 -04:00
Juergen Spitzmueller
13b928d534
No need for catcode change here
2020-08-12 18:08:49 +02:00
Juergen Spitzmueller
24c46cbd19
Remove obsolete FIXME
2020-08-12 17:38:57 +02:00
Juergen Spitzmueller
e3a72156f9
Fix too general application of \cprotect
2020-08-12 17:38:20 +02:00
Enrico Forestieri
001f5a4786
Fix bug #10263
2020-08-12 16:35:12 +02:00
Enrico Forestieri
f5672a4843
Switch font for multipar insets
...
Use font switches for insets that allow paragraph breaks rather
than insets that do not inherit outer font settings. No change of
behavior is intended with respect to the current status, but this
will allow a simple and effective fix for #10263 .
2020-08-12 16:25:35 +02:00
Juergen Spitzmueller
49e8e3567c
Font switches in \cprotect'ed context need to be \cprotect'ed themselves
2020-08-12 15:26:23 +02:00
Juergen Spitzmueller
008766fe4e
Pass proper font
2020-08-12 14:05:22 +02:00
Juergen Spitzmueller
88506f886b
update tex2lyx tests
2020-08-12 13:13:56 +02:00
Juergen Spitzmueller
1af67974ff
Properly close and reopen font before insets with inheritFont() false
2020-08-12 11:04:17 +02:00
Juergen Spitzmueller
075d220d6e
GuiLyXFiles: Fix crash and disabling with header selection
...
Fixes #11929
2020-08-11 19:26:23 +02:00
Juergen Spitzmueller
b57166f656
Nothing to translate here.
2020-08-10 10:03:42 +02:00
Richard Kimberly Heck
c9bb699457
Fix #10328 .
...
Change title of LyX's windows to conform to the usual pattern.
2020-08-09 13:00:41 -04:00
Daniel Ramoeller
d3a04c089b
Fix for bug #11926
...
Change comobox signal to user interaction only to avoid problems with "Apply changes immediately" aka "Immediate Apply". (See https://doc.qt.io/qt-5/qcombobox.html#currentIndexChanged and https://doc.qt.io/qt-5/qcombobox.html#activated .)
2020-08-09 12:51:45 +02:00
Juergen Spitzmueller
e417597597
Consider nesting when checking whether an inset is in a title
...
Amends 0bddf448ef
2020-08-09 12:01:49 +02:00
Yuriy Skalko
af7ffc7dfa
Correct UI strings
2020-08-08 16:12:50 +02:00
Stephan Witt
a436171b2c
#9376 prepare use of Length in lyxrc - amend commit 0fa4b7e736
- catch wrong include of Length.h
2020-08-07 22:53:19 +02:00
Stephan Witt
d0ca7a383d
Amend commit 3af8ff39fc
- make it work with Qt 4.x - don't activate it there
2020-08-07 12:27:27 +02:00
Stephan Witt
3af8ff39fc
Force a uniform style for group boxes, on Mac non-flat works better, on Linux flat is standard
2020-08-07 10:54:12 +02:00
Stephan Witt
0fa4b7e736
#9376 prepare use of Length in lyxrc - move the class Length to support
2020-08-07 09:24:31 +02:00
Enrico Forestieri
582296d79a
Correctly compute metrics for single-char non-math fonts
...
As evidenced by the comment, this corrects a thinko.
2020-08-06 15:34:54 +02:00
Juergen Spitzmueller
7250aad280
Revert [9370135c3e/lyxgit] and fix #8499 properly
...
Fixes #11920
2020-08-04 16:52:58 +02:00
Stephan Witt
6dcd4ca4f1
#10571 improved handling of WM's signal when switching from or to full-screen window
2020-08-04 15:24:09 +02:00
Pavel Sanda
bd5f6097fc
Does not compile on older gcc.
2020-08-04 14:55:22 +02:00
Thibaut Cuvelier
348297520f
Revert "DocBook: allow empty paragraphs before the <info> section."
...
This reverts commit c6937cece9
.
2020-08-03 22:58:15 +02:00
Thibaut Cuvelier
fa38ae3fc0
Revert "DocBook: add new layout parameter DocBookWrapperMergeWithPrevious."
...
This reverts commit 59b0f88d2b
.
2020-08-03 22:57:49 +02:00
Thibaut Cuvelier
ab4f22beb9
Revert "Slight code-consistency improvements."
...
This reverts commit 6bcc0155b6
.
2020-08-03 22:57:41 +02:00
Thibaut Cuvelier
dedeb885f8
Revert "Merge findLastParagraph and findLastBibliographyParagraph to lower code duplication."
...
This reverts commit 20d65b9d97
.
2020-08-03 22:57:22 +02:00
Thibaut Cuvelier
fe8aff31fd
Revert "DocBook: use DocBookItemTag within paragraphs."
...
This reverts commit 49b998f99b
.
2020-08-03 22:57:11 +02:00
Thibaut Cuvelier
21c92c8a12
Revert "DocBook: make openParTag/closeTag use paragraphs instead of layouts."
...
This reverts commit 3d7c802c22
.
2020-08-03 22:56:55 +02:00
Thibaut Cuvelier
347d3557b2
Revert "DocBook: fix for ordering."
...
This reverts commit 7852582d9c
.
2020-08-03 22:56:44 +02:00
Thibaut Cuvelier
4c01ab9ecf
Revert "DocBook: use DocBookWrapperMergeWithPrevious in the code."
...
This reverts commit 62c9f4332d
.
2020-08-03 22:56:25 +02:00
Thibaut Cuvelier
c2be69187c
Revert "DocBook: eat a bit of that spaghetti code."
...
This reverts commit 25bcbe7666
.
2020-08-03 22:56:16 +02:00
Thibaut Cuvelier
42eca3d8d6
Revert "DocBook: simplify code to handle abstracts."
...
This reverts commit 0199e048ff
.
2020-08-03 22:56:06 +02:00
Thibaut Cuvelier
f025538c95
Revert "DocBook: add a layout tag to tell whether an item is the abstract or not."
...
This reverts commit 5ccd63eff6
.
2020-08-03 22:55:52 +02:00
Thibaut Cuvelier
5ccd63eff6
DocBook: add a layout tag to tell whether an item is the abstract or not.
2020-08-03 16:04:58 +02:00
Thibaut Cuvelier
0199e048ff
DocBook: simplify code to handle abstracts.
2020-08-03 16:04:58 +02:00
Thibaut Cuvelier
25bcbe7666
DocBook: eat a bit of that spaghetti code.
2020-08-03 16:04:58 +02:00
Thibaut Cuvelier
62c9f4332d
DocBook: use DocBookWrapperMergeWithPrevious in the code.
2020-08-03 16:04:58 +02:00
Thibaut Cuvelier
7852582d9c
DocBook: fix for ordering.
2020-08-03 16:04:58 +02:00
Thibaut Cuvelier
3d7c802c22
DocBook: make openParTag/closeTag use paragraphs instead of layouts.
...
Not useful per se, but will be next with checking whether the wrapper tags should be opened/closed.
2020-08-03 16:04:58 +02:00
Thibaut Cuvelier
49b998f99b
DocBook: use DocBookItemTag within paragraphs.
...
This is at least helpful for AAS, even though it slightly resembles a repurposition of that parameter.
2020-08-03 16:04:58 +02:00
Thibaut Cuvelier
20d65b9d97
Merge findLastParagraph and findLastBibliographyParagraph to lower code duplication.
...
Maybe these functions should move to ParagraphList.h/cpp?
2020-08-03 16:04:58 +02:00
Thibaut Cuvelier
6bcc0155b6
Slight code-consistency improvements.
2020-08-03 16:04:57 +02:00
Thibaut Cuvelier
59b0f88d2b
DocBook: add new layout parameter DocBookWrapperMergeWithPrevious.
2020-08-03 16:04:57 +02:00
Thibaut Cuvelier
c6937cece9
DocBook: allow empty paragraphs before the <info> section.
2020-08-03 16:04:57 +02:00
Juergen Spitzmueller
8415041b1f
Use hexnames only for x11 colors
...
This prevents wrong color allocation with ambiguous names.
Fixes #11828
Patch by D. Ramöller with extensions by me.
2020-08-03 14:10:46 +02:00
Richard Kimberly Heck
6834321a50
Allow backspace, etc, to merge paragraphs even if they have different styles.
...
Patch from Daniel.
This is bug #11917 . Master only.
2020-08-02 23:24:22 -04:00
Enrico Forestieri
7441172d4d
Assure correct spacing of colored items in mathed
...
When coloring a non-ordinary math atom, explicitly apply its
math class, so that to leave unchanged the spacing around it.
Fixes #11827 .
2020-08-02 18:58:40 +02:00
Juergen Spitzmueller
aba8c81290
Next attempt at correctly setting fonts in insets depending on inheritFont()
2020-08-02 10:12:19 +02:00
Thibaut Cuvelier
875f7d42e2
DocBook: avoid generating empty paragraphs instead of new pages.
...
As this required to first generate the paragraph before outputting it if necessary, tests like XMLStream::isTagOpen no more worked properly. This also refactors table handling to get rid of that case (and make code easier to read).
2020-08-02 04:03:39 +02:00
Thibaut Cuvelier
8d115413c1
DocBook: fix delimitation of bibliographies.
2020-08-02 04:03:39 +02:00
Pavel Sanda
801d7dc9f4
typo
2020-08-01 22:54:01 +02:00
Thibaut Cuvelier
c1ec3394c6
DocBook: improve new lines around maths.
2020-08-01 22:45:56 +02:00
Thibaut Cuvelier
d3e1f2a6d4
DocBook: fix bug about fonts (tag not closed at the right place).
...
Yes, this was just a reference issue! Also includes support for XOUT text, and some styling consistency.
2020-08-01 22:45:56 +02:00
Pavel Sanda
eef0c8e8ed
xHTML export: change filenames of exported images.
...
This patch aims at:
1. replacing absolute paths by their hashes (do not leak directory structures)
2. not using counters anymore so that changing figures order in the document
does not lead to large number of obsolete images in export directory.
Other changes than in xHTML export of images are unintended.
2020-08-01 22:16:04 +02:00
Richard Kimberly Heck
4ce9e784b4
Fix warnings
2020-08-01 02:01:01 -04:00
Richard Kimberly Heck
219773dd55
Move META_INSET declaration to header file
2020-08-01 01:53:36 -04:00
Thibaut Cuvelier
fed71fa8c2
DocBook: bug fixing with several bibliographic references at once.
2020-08-01 03:51:14 +02:00
Thibaut Cuvelier
5324566013
DocBook: use the right key when generating bibiomixed.
2020-08-01 03:39:53 +02:00
Thibaut Cuvelier
0c0613327c
Get rid of xmlize, bringing no advantage over escapeString.
2020-08-01 03:20:28 +02:00
Thibaut Cuvelier
0be32e3b98
Amend 85946aae
: should compile also with g++.
2020-08-01 00:41:58 +02:00
Thibaut Cuvelier
85946aae2b
DocBook: fix XML in comments (-- forbidden for some historical reason).
2020-08-01 00:02:36 +02:00
Thibaut Cuvelier
f2e69c165e
More consistent style.
2020-07-31 23:35:08 +02:00
Thibaut Cuvelier
ad08373ae2
DocBook: actually include files that are not properly understood (with automatic escaping), in comments.
2020-07-31 20:17:38 +02:00
Thibaut Cuvelier
44ef3fadee
DocBook: fix encoding issues with complex ERT.
2020-07-31 20:17:38 +02:00
Juergen Spitzmueller
53e872455a
Revert "Fix #11827 "
...
This reverts commit b521d36bfb
.
Not ready yet
2020-07-31 09:18:37 +02:00
Thibaut Cuvelier
06675b853b
Fix CI…
2020-07-31 02:23:22 +02:00
Thibaut Cuvelier
acdead0487
DocBook: better condition for abstracts.
2020-07-31 01:20:08 +02:00
Thibaut Cuvelier
6434b666bf
DocBook: don't output abstract if it would have no content.
...
Restore a change from e709a662
(reverted by d75ff993
) that was mixed into another commit.
Also, add a TODO for InsetIndex.
2020-07-31 00:55:00 +02:00
Thibaut Cuvelier
e153477bca
DocBook: Kornel's patch to get rid of many assertions
2020-07-30 23:22:41 +02:00
Thibaut Cuvelier
37b2115d2e
DocBook: refactor font handling.
...
This only hides a lot of complexity behind a function. It is a good candidate for future refactoring (code highly similar to the XHTML code path).
2020-07-30 23:18:31 +02:00
Daniel Ramoeller
b521d36bfb
Fix #11827
...
Keep spacing of math intact.
2020-07-30 16:24:17 +02:00
Juergen Spitzmueller
50b2120438
Use switches where possible around non-inheriting insets
...
Fixes rest of #8384
2020-07-29 16:25:19 +02:00
Juergen Spitzmueller
065c09537b
Amend 261625f412
2020-07-29 12:23:10 +02:00
Juergen Spitzmueller
d2a162ce3d
Instatiate right font
2020-07-29 11:44:33 +02:00
Thibaut Cuvelier
d75ff9931d
Revert "Support the mathbbm font."
...
This reverts commit e709a6626e
.
2020-07-28 18:01:38 +02:00
Thibaut Cuvelier
e709a6626e
Support the mathbbm font.
...
Should just be able to read formulae, not add it from the GUI, as it's mostly redundant with mathds and mathbb.
2020-07-27 03:15:00 +02:00
Thibaut Cuvelier
8dd2e7e681
DocBook: solve issue with formulae within font tags.
...
This is not valid DocBook either!
2020-07-26 23:23:02 +02:00
Thibaut Cuvelier
a874173660
DocBook: can finally generate "Developing LyX" without validation errors.
...
This also removes many warnings when generating this document.
2020-07-26 04:59:30 +02:00
Thibaut Cuvelier
e0b8bac36e
DocBook: fix issues with nested labeling lists.
2020-07-26 04:44:04 +02:00
Thibaut Cuvelier
88e00a0b7b
DocBook: fix issues with nested description lists.
2020-07-25 23:51:32 +02:00
Pavel Sanda
618f3a0359
Kill warning about unused parameter.
2020-07-25 22:29:07 +02:00
Thibaut Cuvelier
459c17fb14
DocBook: use xml:id instead of just id.
...
Amend 62af830f
.
2020-07-25 19:00:56 +02:00
Thibaut Cuvelier
5de60e3c77
DocBook: implementation of LATEX_BIB_ENVIRONMENT.
...
Fixes endless loops when such environments were used.
Add Kornel's test case that triggers an infinite loop when generating as DocBook 5
2020-07-25 17:37:13 +02:00
Enrico Forestieri
0b3e69167c
Fix placement of limits with integral signs
...
Since be836909c5
the positioning of super- and subscripts
for symbol fonts has been broken because the metrics of the
font of the environment (rather than those of the symbol itself)
were used.
2020-07-24 12:32:24 +02:00
Kornel Benko
9e977932c5
Enable display of docbook5 output in the Code Preview Plane
2020-07-23 14:11:13 +02:00
Thibaut Cuvelier
ca01edf59f
DocBook: escape IDs for InsetRef.
2020-07-21 02:45:04 +02:00
Jean-Marc Lasgouttes
f96b99dcb3
Implement properly \limits and \nolimits
...
These are now properties of insets that can be operators :
InsetMathSymbols, InsetMathDecoration (for over/underbrace) and
InsetMathMacro (for its contents).
Each of these has a limit_ member that allows to remember a limit
forcing and a member defaultLimits() that indicates what to do in the
absence of such forcing. Moreover the write() method calls
writeLimits().
This allows to simplify the definitions of integrals in lib/symbols by
defining the integrals as macros of their "op" version, as it is done in
the style files.
Also, many hardcoded assumptions can now be removed.
The handling of LFUN_MATH_LIMITS is now done in InsetNest, which tries
successively to apply the limit change to (1) the character after
cursor, (2) the character before cursor and (3) the character at the
end of the inset (useful for script insets?)
The new code allows to define
\newcommand\int{\intop\limits}
but not
\newcommand\makelimits#1{#1\limits}
It is also possible to type explicitly \limits or \nolimits to modify
a symbol.
2020-07-20 23:20:26 +02:00
Thibaut Cuvelier
e0a4dfa7d3
DocBook: avoid skipping paragraphs in <info>.
2020-07-20 03:41:44 +02:00
Richard Kimberly Heck
e09445b3cf
Style
2020-07-19 21:21:01 -04:00
Thibaut Cuvelier
6aaf118bc7
Stop adding points at the end of xml:id without reason
2020-07-20 03:04:02 +02:00
Thibaut Cuvelier
d0748cd69c
DocBook: properly escape PI in InsetMarginal.
2020-07-20 03:01:41 +02:00
Thibaut Cuvelier
fb45f7b8c9
DocBook: don't update counters when generating, as they are not used in DocBook.
...
This also removes a warning in the console in some cases where counters are updated when they don't exist...
2020-07-20 03:01:41 +02:00
Thibaut Cuvelier
51939801f5
DocBook: better handling of paragraphs containing notes in the abstract.
2020-07-20 03:01:41 +02:00
Thibaut Cuvelier
be3e79c2a0
DocBook: clean citation keys everywhere in the same way.
2020-07-20 02:29:40 +02:00
Thibaut Cuvelier
d6ec3d686b
amend 467d57bc
: typo
2020-07-19 21:36:34 +02:00
Thibaut Cuvelier
6b701f945e
DocBook fonts: fix issue 1732
2020-07-19 21:00:25 +02:00
Thibaut Cuvelier
467d57bca1
Fix use of std::regex_match
2020-07-19 19:34:02 +02:00
Jean-Marc Lasgouttes
e8ee0100fc
Implement variable size bigops
...
The goal is to reproduce the change of size of operators like \sum wen they
are in display style.
The syntax of the symbols file has been extended to allow for two code
points (like 80|88 for \sum). In this case, the second one will be
used in display style.
Update the symbols file to handle all bigops from cmex, esint, wasy and
stmaryrd.
Let the code for math symbol inset handle symbols which can change size,
using the information from the symbols file.
2020-07-17 22:25:18 +02:00
Jean-Marc Lasgouttes
8d54457dbf
Improve metrics for \limits in display mode
2020-07-17 22:18:43 +02:00
Thibaut Cuvelier
e302757476
Add support for CALS tables in DocBook.
2020-07-16 00:40:16 +02:00
Thibaut Cuvelier
3b740d0c8f
DocBook: add support for LYX_ALIGN_BLOCK and LYX_ALIGN_DECIMAL in tables
2020-07-15 16:17:16 +02:00
Juergen Spitzmueller
3b6fec3835
Do not terminate size switches in front of insets with InheritFont() false
...
and inherit the size.
This reduces formatting clutter (#8384 ) in table and fixes some wrongly
set sizes (#9923 , #9285 ) in tables.
2020-07-15 09:11:05 +02:00
Jean-Marc Lasgouttes
bce21e8975
Take the height of label into account when painting rows
...
Handle the case where, in beamer's Frame, for example, where the label
string uses a taller font then the paragraph itself.
Fixes bug #11890 .
2020-07-14 20:53:32 +02:00
Juergen Spitzmueller
097383f657
Fix comment
2020-07-14 15:52:20 +02:00
Juergen Spitzmueller
b8969d2e9c
Reset CategorizedCombo filter when switching between non-TeX and TeX fonts
2020-07-14 15:49:15 +02:00
Juergen Spitzmueller
61cf165521
Consider single-cell insets when pasting multiple cells ( #11906 )
2020-07-14 10:39:49 +02:00
Jean-Marc Lasgouttes
501f4e848f
Cleanup: BufferView should not need to be friend of TextMetrics
...
It did access par_metrics_[] directly because there was no non-const
parMetrics().
This patch adds one and unfriends BufferView. The code is equivalent
since in all these cases, the metrics have just been computed with
redoParagraph().
2020-07-14 00:08:07 +02:00
Jean-Marc Lasgouttes
2e8c9cfc83
Fix paragraph position in TextMetrics::singleParUpdate()
...
When running redoParagraph, it may happen that the ascent of the first
row changes. Since the ParagraphMetrics position is actually the
baseline of its first row, it may be necessary to update it.
Fixes bug #11601 .
2020-07-13 23:43:09 +02:00
Juergen Spitzmueller
4884476eb6
Do not blindly disable inset-modify in MathNest
...
Fixes #11784
2020-07-13 16:50:11 +02:00
Juergen Spitzmueller
60741c3d49
InsetFloat: pass back inset-modify that is addressed to other inset
...
Fixes #9994
2020-07-13 16:46:43 +02:00
Juergen Spitzmueller
f6d9e4170d
InsetInfo: Pass back inset-modify that do not target this inset
...
Fixes #9214 .
2020-07-13 16:15:42 +02:00
Jean-Marc Lasgouttes
907f020724
Improve handling of top and bottom margin
...
The 20px space on top and bottom of document have traditionally been
obtained by adding them to the ascent/descent of the first/last row.
This leads to annoyances like selections that are drawn in these
margins and issues with the nesting marker.
The change is to add the value to the ParagraphMetrics ascent/descent
only and to correct one place where the ascent of the first row may be
different from the ascent of the ParagraphMetrcs object. There may be
other places where this should be done.
Fixes bug #9545 .
2020-07-13 02:42:39 +02:00
Jean-Marc Lasgouttes
32f06d01ec
Revert "Improve handling of top and bottom margin"
...
It turns out this is not ready at all.
This reverts commit ff7cdf1b74
.
2020-07-13 00:00:36 +02:00
Jean-Marc Lasgouttes
ff7cdf1b74
Improve handling of top and bottom margin
...
The 20px space on top and bottom of document have traditionally been
obtained by adding the to the ascent/descent of the first/last row.
This reads to annoyances like selections that are drawn in these
margins and issues with the nesting marker.
The change is to add the values to a separate member of the Row
object, and to add new Row::total(Ascent|Descent) methods that add the
effect of this padding.
Moreover, some methods are added to TextMetrics to simplify the
BufferView code.
Fixes bug #9545 .
2020-07-12 20:32:04 +02:00
Thibaut Cuvelier
b7c73f387a
Add sections to HTML output.
2020-07-12 18:01:33 +02:00
Jean-Marc Lasgouttes
1c956cdc16
Improve drawing of macro template frame
...
Use Inset::xxxOffset as offsets and draw the frame in the middle of
the empty space.
Fixes bug #9657 .
2020-07-12 15:39:37 +02:00
Jean-Marc Lasgouttes
77036f5434
Fix and simplify computation of painter monochrome mode
...
The old code in GuiPainter::filterColor did not work. Tricks with
colors should take place in HSV space, not RGB IMO.
Replace the code with a simpler one which maps the grayscale value
of the original color on the blend color. It works nin the case where
original color is red, but might not work as well when blend color is
not black. Time will tell.
Fixes bug #11904 .
2020-07-12 00:01:46 +02:00
Jean-Marc Lasgouttes
2a80b0ac01
Set desktop name for Wayland
...
Fixes bug 11847.
2020-07-11 20:40:30 +02:00
Juergen Spitzmueller
289cb58f52
Remove unneeded header
2020-07-11 16:41:34 +02:00
Enrico Forestieri
da336cedf3
Fix compilation on platforms where sizeof(wchar_t) == 2.
...
Use "set" instead of "unordered_set" as some facets are missing when
using gcc on cygwin, mingw and, possibly, FreeBSD.
2020-07-11 16:19:21 +02:00