Commit Graph

1161 Commits

Author SHA1 Message Date
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
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
060c3de2f0 StepMasterCounter --> StepParentCounter 2020-11-02 17:36:58 -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
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
dbe35af542 Simplify with std::map::insert 2020-11-01 22:22:27 +02:00
Yuriy Skalko
a7018252b7 Constify 2020-10-25 09:28:34 +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
7d38a4d126 Loop refactoring 2020-10-09 09:04:20 +03:00
Yuriy Skalko
fe85162a29 Refactoring 2020-10-05 14:55:00 +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
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
c8e2c17a58 XHTML: remove DOCTYPE, as the document is then understood as HTML4/XHTML1, and not XHTML5. 2020-09-19 20:43:41 +02:00