Commit Graph

5334 Commits

Author SHA1 Message Date
Juergen Spitzmueller
b5856628f1 Set changed status for changed column/row cells in updateIndexes() 2020-01-14 10:39:42 +01:00
Juergen Spitzmueller
2a48fbbf7f Some polishment. 2020-01-14 09:55:16 +01:00
Juergen Spitzmueller
33133733ae Record change author and time for tracked columns/rows
This now uses a real change object
2020-01-14 09:28:36 +01:00
Juergen Spitzmueller
194298045c Color lines of added/deleted rows/columns 2020-01-13 19:02:48 +01:00
Jean-Marc Lasgouttes
93794d6fea Implement isChanged for tabular inset. 2020-01-13 16:35:15 +01:00
Jean-Marc Lasgouttes
b0371714a0 Only show pencil change mark when inset is collapsed 2020-01-13 16:35:15 +01:00
Jean-Marc Lasgouttes
e340f46476 Fixup bf7f4d71: Let changeRefsIfUnique handle undo
This allows for a much lower memory consumption than a plain
recordUnfoFullBuffer.

Related to bug 6494.
2020-01-12 22:18:36 +01:00
Jean-Marc Lasgouttes
4a4ded2297 Reimplement computation of change tracking status
This is a reimplementation of 6d4e6aad that is both simpler and more
complete.

This uses the updateBuffer mechanism to implement a fully working
version of Inset::isChanged(). Now the function returns true for an
inset that contains an inset that contains a change, for example.

Moverover Buffer::areChangesPresent() is merely a proxy for
Buffer::inset().isChanged().
2020-01-12 20:26:35 +01:00
Jean-Marc Lasgouttes
ce950f1ea5 Fixup b321bb1a: set changebar when inset contains changes
Add Paragraph::isChanged() and InetText::isCgchanged() which indicate
the presence of a change in the relevant object.

Sets Row::needsChangebar() when adding an inset that contains changes.

Related to bug #8645.
2020-01-12 20:26:35 +01:00
Juergen Spitzmueller
bbc6ea4a5f Implement change tracking of column/row addition/deletion
Fixes #8469

File format change
2020-01-11 16:17:04 +01:00
Juergen Spitzmueller
c77999a5f3 Add buffer param to opt-out fragile content movement
Fixes #11714

File format change
2020-01-10 10:21:09 +01:00
Juergen Spitzmueller
79674c7632 Track changes in InsetCommands 2019-12-31 15:46:03 +01:00
Juergen Spitzmueller
affc006bae Honor change tracking when automatically renaming refs to labels
Fixes rest of #11556
2019-12-31 12:29:53 +01:00
Juergen Spitzmueller
a5db5d4c90 whitespace 2019-12-30 16:28:15 +01:00
Juergen Spitzmueller
8a17cc01e0 Implement (basic) ct for tabular-feature delete-row and delete-column
Fixes part of #8469

For a proper fix that works with change-reject as well as with hide
changes in output, we need to implement
ct information in tabular's row and column.
2019-12-29 14:09:52 +01:00
Juergen Spitzmueller
b37b39365f Remove obsolete FIXMEs 2019-12-29 12:07:55 +01:00
Juergen Spitzmueller
e65fdc6a51 Track change of label name
Fixes #11556
2019-12-29 11:01:18 +01:00
Juergen Spitzmueller
b321bb1aed Indicate change of content in label of collapsed collapsible
Fixes #8645
2019-12-29 09:46:18 +01:00
Juergen Spitzmueller
89b5607e0a Centralize code to markup deleted complex objects (with tikz) in output
This fixes #9293
2019-12-28 13:43:17 +01:00
Juergen Spitzmueller
da5ad1736a Handle change-accept and change-reject in multi-cell selection
Fixes #8426
2019-12-27 12:05:56 +01:00
Juergen Spitzmueller
7c63896c60 CT: Mark deleted floats in output
Fixes #11175
2019-12-27 09:50:11 +01:00
Jean-Marc Lasgouttes
aeed6fb8fa Do not check again and again for non existing files
If the file of an InsetInclude does not exist, loadIfNeeded will try
again and again to look for it. This is very bad for files with many
include insets, especially on windows.

Fixes bug #11656.
2019-12-26 16:45:40 +01:00
Juergen Spitzmueller
e5a9d09870 Mark deleted graphics in output
Fixes #11687
2019-12-26 07:15:37 +01:00
Scott Kostyshak
79787c2274 Correct typo in method name getDescendants()
When used as an adjective, both variants "descendent" and
"descendant" are acceptable, but when used as a noun only
"descendant" should be used.

For a reference, see here:

https://en.wiktionary.org/wiki/descendent#Noun
2019-12-15 23:36:17 -05:00
Scott Kostyshak
989a49f377 Remove execute permission from two source files 2019-12-15 23:32:29 -05:00
Scott Kostyshak
f1accdebf3 Refresh previews on branch toggle
We only referesh previews if the branch that is toggled exists in a
descendant. This code could be further optimized, as noted in the
comments.

For relevant discussion, see the following ML thread:

https://www.mail-archive.com/search?l=mid&q=20191209022030.d6gyy3abdectr3yz%40tallinn
2019-12-11 11:48:56 -05:00
Scott Kostyshak
c61472303e Fix crash due to encoding issues with child doc
This crash occurred starting with 553bebc3, and can be triggered
when preview is enabled both in preferences and in a child document
inset. For a minimal example, see the following ML thread:

  https://www.mail-archive.com/search?l=mid&q=20191209002609.6fao3dljtf3ohl25%40tallinn

This fix restores behavior to before that commit for the case when
oldEnc is 0.
2019-12-10 09:17:49 -05:00
Jean-Marc Lasgouttes
5ac3b88007 Disable inset-dissolve in table cells
This is better than making sure that the inset has exactly one cell.

In the future, inset-dissolve could be extended to dissolve all the
cells contents in the enclosing text.

Note that this check does not appear in mathed, and using dissolve in
e.g. fraction inset may lead to data loss (only current cell contents
is preserved).
2019-12-06 09:54:43 +01:00
Pavel Sanda
88ff1686bc typo 2019-11-21 17:13:47 +01:00
Pavel Sanda
ae16abf57a Reduce number of strings (the same one in buffer). 2019-11-21 17:11:09 +01:00
Juergen Spitzmueller
1a1adbc821 Handle paragraph direction switch in captions (with polyglossia/bidi) 2019-11-19 13:45:35 +01:00
Juergen Spitzmueller
967158c054 Always use local font switches in table cells. 2019-11-17 11:07:18 +01:00
Juergen Spitzmueller
3c0e0f8a29 Polish warning 2019-10-26 09:10:40 +02:00
Juergen Spitzmueller
1c0572f1ab Validate if graphics path is encodable
Fixes #11688
2019-10-26 08:33:51 +02:00
Jean-Marc Lasgouttes
912704511b Make some constructors explicit
Spotted by cppcheck.
2019-09-17 23:15:09 +02:00
Jean-Marc Lasgouttes
3fffa6eb83 Fix cut-n-paste error
Spotted by cppcheck.
2019-09-16 00:47:47 +02:00
Jean-Marc Lasgouttes
3aba81cf6a Many small code cleanups suggested by cppcheck 2019-09-16 00:45:20 +02:00
Jean-Marc Lasgouttes
7c1891e0b4 Remove unused private members.
Spotted by cppcheck.
2019-09-16 00:17:08 +02:00
Jean-Marc Lasgouttes
714113655a Follow some of the performance advice from cppcheck
Most of that is changing string to string const &.
2019-09-13 16:23:49 +02:00
Richard Kimberly Heck
e71280221f Fix nullptr warnings 2019-09-11 22:13:25 -04:00
Richard Kimberly Heck
05a446b77c Fix bug #11636.
Directories are created when files are copied, so we do not need
to do it prospectively here.
2019-09-11 20:54:42 -04:00
Richard Kimberly Heck
a20f3a0d52 Revert last two commits, which we pushed accidentally. 2019-09-11 20:47:07 -04:00
Richard Kimberly Heck
1fb308cd02 Whoops, forgot this part 2019-09-11 20:30:31 -04:00
Richard Kimberly Heck
26813996e2 Constify, largely for debugging purposes 2019-09-11 20:29:58 -04:00
Jean-Marc Lasgouttes
7c1c50d737 Enable dissolve in undefined Flex inset context menu
This is a hackish special case, so I had to add a hack...

Fixes bug #8650.
2019-09-11 15:49:50 +02:00
Juergen Spitzmueller
cc3e227cba Properly terminate command 2019-08-19 07:30:06 +02:00
Juergen Spitzmueller
7ca267e1fe Fix coloured boxes in RTL with [pdf]latex (#8642) 2019-08-15 16:21:13 +02:00
Juergen Spitzmueller
4e74dd0d42 Fix greyedout note in RTL (#8647)
More complicated than I wished for, but color handling in RTL is
particularly tricky.

The three versions are needed due to the differences between [pdf]latex,
xetex, luatex/luabidi and luatex/babel.
2019-08-15 15:15:59 +02:00
Juergen Spitzmueller
2746fdf7dd Correct ^ catcode for \cprotect 2019-08-14 18:32:34 +02:00
Juergen Spitzmueller
4b0069860c InsetGraphics: use totalheight for height output
Graphics "height" is only the height above the baseline and thus not
what most people will expect. Also, using height can result in a
division by zero with rotation.

Use totalheight now since this means "height of the figure" (independent
of the baseline).

The custom options field can be used if height is really desired.
We handle this in conversion/reversion, respectively, so document
output will not change.

Hence, file format change.

Fixes: #9676
2019-08-14 16:55:43 +02:00
Juergen Spitzmueller
1929caf4b7 Re-fix #2005
Loading keyval does not work any longer. Fix it properly by de-activating
the equal character locally if graphics options use it.
2019-08-14 14:49:38 +02:00
Juergen Spitzmueller
f995fba310 Fix cprotect with Slovak
babel-slovak makes ^ active, though cprotect relies on it being
catcode 9 ("ignored"). Thus we locally change the catcode with Slovak.
2019-08-14 14:00:29 +02:00
Juergen Spitzmueller
ce447e1760 Deactivate active - in tables with \cline or \cmidrule
This introduces a new languages tag ActiveChar which also can be used
for similar cases.
2019-08-14 13:10:42 +02:00
Juergen Spitzmueller
28b126b100 Fix cline/cmidrule calculation once more 2019-08-14 11:25:31 +02:00
Juergen Spitzmueller
5621c12135 fix midrule calculation 2019-08-13 19:29:39 +02:00
Juergen Spitzmueller
b4e871e9ca Fix comment 2019-08-11 08:21:33 +02:00
Juergen Spitzmueller
cce9adc185 Force LTR for numeric citations
Fixes: #3005
2019-08-11 08:15:57 +02:00
Juergen Spitzmueller
1386a3d8fd Allow for multiple use of same key in qualified citation lists
File format change

Fixes: #11618, #11632
2019-08-07 13:00:29 +02:00
Juergen Spitzmueller
231b36d950 Fix text direction of references with XeTeX/bidi
Fixes: #11626
2019-08-05 16:30:01 +02:00
Pavel Sanda
a6634f5bb3 git VCS: add support for short hashes in inset info ("Abbreviated revision").
Fixes bug #11620.

Patch from Joel Kulesza.
2019-07-28 22:01:17 +02:00
Juergen Spitzmueller
b852df91bc Localize the default decimal separator
Do not blindly use (English) "." as default, but the locale default of
the current context language.

Fixes: #7204
2019-07-22 08:05:28 +02:00
Jean-Marc Lasgouttes
c293be56bd Rename frontend qt4 to qt
In particular, the directory frontends/qt4 is renamed to frontends/qt.

Many configurations file have to be updated. All mentions of qt4 in
the source have been audited, and changed to qt if necessary.

The only part that has not been updated is the CMake build system.
2019-07-20 23:39:40 +02:00
Juergen Spitzmueller
2b432ecb3a Revert "Fix bug #11616"
This reverts commit 2890b99a76.

A real fix follows in a minute
2019-07-18 17:04:18 +02:00
Enrico Forestieri
2890b99a76 Fix bug #11616
Do not care about branches when no package language is used.
2019-07-17 21:30:24 +02:00
Richard Kimberly Heck
6960bab65c Fix bug #11612.
Register verbatim includes with the outliner.
2019-07-11 16:21:38 -04:00
Richard Kimberly Heck
83afe8aa19 Shorten labels. 2019-07-11 16:21:38 -04:00
Juergen Spitzmueller
04bd57a86a Factor out test for bidi package (= XeTeX + polyglossia) 2019-07-11 10:31:10 +02:00
Juergen Spitzmueller
6f8db58778 LuaTeX (luabidi) does not swap table columns
This amends [21b347a2f8485/lyxgit].
2019-07-10 22:57:34 +02:00
Juergen Spitzmueller
623f7b4795 Truncate long citation label in the middle rather than the end.
Fixes: #10769
2019-07-09 14:48:11 +02:00
Juergen Spitzmueller
13b6632228 Add TextClass option BibInToc
Fixes #1889
2019-07-08 15:40:17 +02:00
Jean-Marc Lasgouttes
2b1515a936 Rename LM_ST_* to *_STYLE and FONT_SIZE_* to *_SIZE
This makes code more uniform. This is typically something that is done
at end of cycle to limit backport issues later.
2019-06-14 17:05:49 +02:00
Juergen Spitzmueller
c7efb677f8 New InsetLayout tag ParbreakIgnored
This effectively allow paragraph breaks in insets only for cosmetic
reasons (e.g., to align contents on different lines).

This is the last change necessary for an enhanced covington gloss support
(which uses the new covington gloss ui)
2019-06-02 18:16:30 +02:00
Juergen Spitzmueller
9e6d22ea9c Add InsertOnNewline argument tag
This adds a paragraph break before auto-inserting arguments in flex
insets.

Useful for specific arguments (particularly ling glosses)
2019-06-02 18:07:10 +02:00
Juergen Spitzmueller
9f04eeae03 Support FreeSpacing in InsetArgument 2019-06-02 16:33:06 +02:00
Kornel Benko
58804aa399 Omit floating point exception 2019-05-31 12:55:12 +02:00
Juergen Spitzmueller
fe589d5622 Fix toprule with booktabs/longtable and captions 2019-05-31 10:48:00 +02:00
Juergen Spitzmueller
957e8669c7 Add hint to warning. 2019-05-21 13:26:57 +02:00
Juergen Spitzmueller
c77be6146b Fix warning message 2019-05-21 13:06:37 +02:00
Juergen Spitzmueller
ebc2b1295a Check character encodability with pass-thru in command insets
Fixes: #11584
2019-05-21 12:59:18 +02:00
Jean-Marc Lasgouttes
4cbf8c2f9d add unicode descriptions to InsetSpecialChar code 2019-05-10 14:29:24 +02:00
Jean-Marc Lasgouttes
3a7346b0cb Fixup 12fcaf86: use correct font for metrics of logos 2019-05-10 12:29:23 +02:00
Enrico Forestieri
56a14c3fde Refined fix for #9633
A branch inset modifies the layout of the internal structures in
which the text is organized. When a branch is active, it is as if it
was not there, but its only presence makes a paragraph which would not
be the last one to actually be the last one, or the check for the
language of the previous paragraph to fail because there is no
previous paragraph before the first one in a branch inset.
Oney way I found to tackle it, is tracking whether the typesetted
paragraphs are actually part of an active branch inset and acting
accordingly.
2019-05-10 08:09:26 +02:00
Jean-Marc Lasgouttes
12fcaf8652 Compute metrics of *TeX* logos using draw and a null painter
Instead of writing a metrics() method that mimics what draw() does,
re-use the draw code with a null painter.

This has the additional benefit of fixing InsetSpecialChar logo width
with EB Garamond. I have to admit that I do not know why it was too
large with the old code, but the new code is shorter/better anyway.

This code removes logowidth(). metrics() is moved to a different
place, but only the logo cases are touched.
2019-05-07 10:53:02 +02:00
Richard Kimberly Heck
c286228315 Make Ctrl-Mouse open an included file for editing.
It might be nice to do this also for other insets that allow editing.
To do that properly, we'd want to standardize how such insets call an
external (or internal) program, which I guess would mean a virtual
method corresponding to editIncluded. When it exists (i.e., isn't null),
then we could call it, and we'd only need one centralized method to do
that. But at the moment, we have editGraphics, etc.
2019-04-26 22:05:42 -04:00
Richard Kimberly Heck
276ffc262c Simplify a bit.
Also, I always worry that "file" will conflict with something....
2019-04-26 22:05:42 -04:00
Juergen Spitzmueller
89f6de9835 Append rows and columns if necessary when pasting into table 2019-04-23 08:34:53 +02:00
Juergen Spitzmueller
302796ade1 Amend cf1c506d64
Get direct copying fro LibreOffice working
2019-04-22 11:10:07 +02:00
Juergen Spitzmueller
cf1c506d64 Handle plain text/html rows/columns in tabular LFUN_PASTE
Fixes: #7932
2019-04-22 10:56:00 +02:00
Juergen Spitzmueller
c9432ccbbc \cprotect some content in captions
Fixes: #6243
2019-04-21 16:44:29 +02:00
Juergen Spitzmueller
faefee3dc6 Fix renaming of citation refs after changing bibitem key
Fixes: #6494
2019-04-21 09:55:17 +02:00
Juergen Spitzmueller
c0f734bcef Fix some listings/minted incompatibilities
The basic problem here is that rather than using an abstract syntax,
backend-specific param strings are produced in the listings dialog,
depending on whether listings or minted is used.

Of course this breaks if a user switches backends inbetween (s/he would
have to open and re-apply each and every listings inset!)

Do at least the most basic translations in InsetListings::latex().
A sane solution would imply the use of only one param syntax with
respective interpretation for each backend. But this would be a file
format change.
2019-04-19 19:03:29 +02:00
Juergen Spitzmueller
3e516a6219 Use proper listings font styles with polyglossia and RTL
Fixes: #11554

Also load color with minted and polyglossia/RTL, as minted loads it
too late.
2019-04-19 17:18:18 +02:00
Juergen Spitzmueller
e97546c9a8 More formalia
(this are just things QtCreator nags about, and I address them in passing)
2019-04-19 09:34:12 +02:00
Juergen Spitzmueller
8ee2ffaa52 Amend 3615a6a75b
Natbib provides separation of abbreviated and full author list also
beyond BibTeX
2019-04-18 16:27:22 +02:00
Günter Milde
6dd505c67a Don't force encoding switch for Japanese "listings" auto-strings.
listings copes with variable-width encodings under platex.
2019-04-18 15:27:24 +02:00
Juergen Spitzmueller
3615a6a75b Make usage of natbib without BibTeX more obvious
Fixes: #5549
2019-04-18 14:48:01 +02:00
Juergen Spitzmueller
70b3d3adcc Add NewlineCmd InsetLayout and Argument option
This allows to specific an alternative macro for newlines

Fixes: #10407
2019-04-18 11:35:03 +02:00
Juergen Spitzmueller
ed44bbddee Add MenuString to InsetLayout
Fixes: #8818
2019-04-18 10:27:19 +02:00
Günter Milde
27ba6f282d Rename legacy input encoding settings.
Format incremented to 573
2019-04-16 20:17:32 +02:00
Juergen Spitzmueller
7ec81c651e Listings: language updates
Patch by Sergei Winitzki
2019-04-15 11:55:46 +02:00