Commit Graph

1178 Commits

Author SHA1 Message Date
Juergen Spitzmueller
e26a60edef Regenerate previews after zoom (#11919) 2022-11-20 18:18:59 +01:00
Jean-Marc Lasgouttes
2c53f0315e Fix another use of unqualified std::move 2022-11-04 21:36:43 +01:00
Jean-Marc Lasgouttes
6c2d4f9392 constify 2022-10-28 18:03:50 +02:00
Enrico Forestieri
90551a03ac Amend f426470a
The synctex option can also be specified by a single dash and
any value different from zero will do.
2022-09-14 20:10:01 +02:00
Stephan Witt
f426470a54 Improved synctex support
- Add check for converter with active synctex support to check for synchronized output for activate forward search.
2022-08-13 14:20:03 +02:00
Jean-Marc Lasgouttes
96e7fcd4e0 When pasting as LaTeX, honor textclass and modules
There are several small parts that are needed here:

* Implement LayoutModuleList::asString() that returns a comma-separated
  list of modules.

* in Converter::convert(), handle the new tokens $$c for the current
  textclass and $$m for the list of modules.

* in Buffer::importFile(), pass the current buffer as parameter instead
  of nullptr.

* in pasteClipboardText(), copy the parameters of the current buffer to
  the internal one used for importation, so that the textclass and
  modules information is available to convert().

* finally, modify configure.py to pass "-c $$c -m $$m" to tex2lyx for
  the latexclipoard->lyx converter.

Fixes bug #11312.
2022-07-19 00:28:28 +02:00
Jean-Marc Lasgouttes
d15a96d93d updateBuffer needs an undo group
Otherwise warning messages appear when loading a file that contains
missing modules, for example (which may require to adjust depths in
document).
2022-03-08 16:16:50 +01:00
Juergen Spitzmueller
1c2628b5de Do not try to access user_defined_bullet with nesting > 3
We only have 4 nesting labels available.

In the workarea, display a fallback label with deeper nesting.
2022-03-06 17:27:28 +01:00
Juergen Spitzmueller
c02fe70797 Use a more transparent lexic for bullet label functions 2022-03-05 09:00:47 +01:00
Thibaut Cuvelier
997f0621c5 Rename LATEX debug level to OUTFILE and use it for DocBook, HTML, and XML messages. 2022-03-01 16:05:42 +01:00
Juergen Spitzmueller
6c530e1215 Still more indentation fixes. 2022-02-28 08:04:55 +01:00
Daniel Ramöller
df59649a18 Properly show labels from broken references in Cross-references dialog
Fix for bug #12456.

The labels are transmitted from Buffer to GuiRef by reference of refs_
in the getLabelList function. Previously, only one string was
transmitted. But I needed both the formatted string, e.g. "x enu:test"
or "Missing: enu:test", as well as the plain label, e.g. "enu:test".
The former is for the list of labels to choose from in GuiRef and the
latter for the label as shown in the line edit that contains the plain
label in order to create a new reference from it. Transmitting both is
what the pair achieves.
2022-02-19 18:14:47 +01:00
Daniel Ramoeller
122b452b20 Display manually set itemize symbols
Display manually set itemize symbols and their size in the work area.

Fix for bug #2277.

Also fixes a problem with document settings changed() not correctly emitted.
2022-02-06 17:58:50 +01:00
Pavel Sanda
33c68d7750 Revert 65b674ba4e.
We do not for what crash was this fix intended, but we know
that the fix introduced freeze in xhtml exports (e.g. merged manual).

https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg216835.html
2022-01-28 18:12:45 +01:00
Juergen Spitzmueller
e366dba9bf Factor out Buffer::requestSpellcheck() function 2021-11-25 17:04:17 +01:00
Thibaut Cuvelier
b5533a24f4 Typos and comment improvements. 2021-10-13 19:26:49 +02:00
Yuriy Skalko
d3c335a5d5 Remove useless casts reported by GCC with -Wuseless-cast option 2021-09-30 10:37:24 +03: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
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
Richard Kimberly Heck
eb2e8e1579 Polish 2021-04-03 17:58:46 -04: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
Juergen Spitzmueller
07396ab244 Meet per-document spelling dictionaries (fixes #86 [sic!])
Now who can beat that? ;-)
2021-03-06 16:53:33 +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
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
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
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
911b01a3ca Fixup f3a0e8ff: Reset needUpdate after buffer update 2021-01-29 14:31:10 +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
6775d7c3a2 Prevent more local colors from leaking (#6626) 2021-01-22 10:34:41 +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
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
81c19502c1 Consider darkmode when inserting new branch 2021-01-19 13:28:21 +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
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
Richard Kimberly Heck
1582a2afe1 Fix bug #12068 2021-01-14 01:15:19 -05:00
Richard Kimberly Heck
12bb380941 Fix bug #5972: Count words in citations (approximately). 2021-01-10 01:43:34 -05: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
Richard Kimberly Heck
fc80eba370 https
Fixes the last of #10945.
2021-01-03 23:22:31 -05:00
Yuriy Skalko
cafa1d4ae4 Fix C++20 compilation on systems where char_type is wchar_t 2020-12-30 09:42:50 +02: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
Jean-Marc Lasgouttes
c30b0aac4b Disable some Adv F&R widgets for read-only documents 2020-12-03 18:04:23 +01:00
Yuriy Skalko
9cb98136ce Cleanup headers 2020-12-03 00:38:27 +02:00
Yuriy Skalko
c0a5987181 Better naming for enums 2020-12-01 00:46:21 +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
ad7c5568cd Make InsetIterator compatible with range-based loops 2020-11-29 00:25:19 +02:00
Yuriy Skalko
6a21ec854b Move several common types to support/types.h 2020-11-27 12:16:22 +02: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