Commit Graph

5686 Commits

Author SHA1 Message Date
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
Thibaut Cuvelier
5b9929c9d7 Amend 61657bd610
Restore indentation to be more consistent.
2021-02-21 13:15:10 +01:00
Thibaut Cuvelier
61657bd610 DocBook: convert a first ERT. 2021-02-20 20:29:34 +01: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
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
Thibaut Cuvelier
d18dff22b5 DocBook: add the DocBookNoFontInside layout configuration. 2021-02-13 05:09:59 +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
Richard Kimberly Heck
2874384414 Fix bug #10646. 2021-02-10 16:04:25 -05: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
Richard Kimberly Heck
080b5107c7 Do not show completion cursor if completion is inactive 2021-02-08 18:48:06 -05:00
Daniel Ramoeller
d008ca2539 Preserve multirow/-column content on deletion of subrows/columns (#11380) 2021-01-30 17:03:33 +01:00
Juergen Spitzmueller
897ee2ed88 Do not overwrite InsetLayout font/color 2021-01-30 15:16:12 +01:00
Juergen Spitzmueller
9dd71b9e4a Recent multirow finally allows multiple paragraphs 2021-01-30 09:15:14 +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
Juergen Spitzmueller
52196d6c48 Set proper multirow size in X table columns 2021-01-29 10:15:36 +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
82a8ed4d55 Allow to move multiple (selected) columns/rows (#9045) 2021-01-25 19:00:50 +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
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
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
Juergen Spitzmueller
6775d7c3a2 Prevent more local colors from leaking (#6626) 2021-01-22 10:34:41 +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
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
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
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
Jean-Marc Lasgouttes
4062cbd278 Remove RenderButton::button_box_, which is unused. 2021-01-19 11:27:54 +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
f24fa552de Fix crash (missing Buffer update) 2021-01-14 17:17:58 +01: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
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
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
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
Richard Kimberly Heck
81413e77ee Amend cf07d4825 2021-01-07 15:56:55 -05:00
Juergen Spitzmueller
6430931e27 Hint to deleted included file in ct output (#11809) 2021-01-07 12:08:59 +01: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
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
Yuriy Skalko
3971b1b35e Fix C++20 warning on implicit capture of this via [=] 2020-12-28 23:26:14 +02:00
Juergen Spitzmueller
18f7dce3d9 Implement inset-split (only for text insets for now) (#10260) 2020-12-24 10:48:52 +01:00
Yuriy Skalko
4f0981e7bb Merge namespace signals2 into namespace lyx 2020-12-19 22:52:51 +02: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
Richard Kimberly Heck
5e6c5f407a Fix thinko 2020-12-14 23:40:28 -05: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
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
Yuriy Skalko
e292dd70bf More enums & includes refactoring 2020-12-06 18:26:41 +02:00
Richard Kimberly Heck
842fd8a74d Use LOCK in all cases 2020-12-06 10:57:20 -05: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
41216228c0 Change name in source files 2020-12-05 17:17:02 -05: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
Juergen Spitzmueller
de2be5bdaa Recent LaTeX includes all math and text spaces
amsmath no longer required here.
2020-12-03 10:49:18 +01:00
Yuriy Skalko
9cb98136ce Cleanup headers 2020-12-03 00:38:27 +02:00
Juergen Spitzmueller
e9cbd69f6e Implement Hungarian quotation marks style (#12040)
File format change
2020-12-02 17:00:40 +01:00
Juergen Spitzmueller
fedd9bf4d0 Do not reset font in preview inset 2020-12-02 15:03:21 +01:00
Yuriy Skalko
c0a5987181 Better naming for enums 2020-12-01 00:46:21 +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
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
99b1488f0e Cleanup included headers 2020-11-30 13:04:54 +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
Yuriy Skalko
7779316e6c Include standard <regex> 2020-11-29 15:27:28 +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
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
7437a6ce3c DocBook: fix regression in floats.
Also implement a valid filler for tables.
2020-11-27 23:44:48 +01:00
Yuriy Skalko
8793c2eed9 Replace ;; 2020-11-27 12:16:54 +02:00
Yuriy Skalko
6a21ec854b Move several common types to support/types.h 2020-11-27 12:16:22 +02: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
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
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
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
43b16548b4 Cleanup headers 2020-11-25 02:43:16 +02:00
Yuriy Skalko
8dfe07b5b5 Use std::any when compiler supports C++17 or later 2020-11-21 20:32:51 +02:00
Yuriy Skalko
7ca2f2b58d Use range-based loops 2020-11-21 20:32:16 +02:00
Thibaut Cuvelier
1176fab1d4 DocBook: make InsetText respect tag types. 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
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
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
Yuriy Skalko
9b1dc338b2 Simplify Changers 2020-11-12 14:22:00 +02: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
Yuriy Skalko
589e780e15 Whitespace & renaming 2020-11-06 21:34:02 +02: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
Richard Kimberly Heck
cfd19d86be whitespace and style 2020-11-02 11:45:09 -05: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
Richard Kimberly Heck
3b4b047576 Fix warning 2020-10-30 13:26:48 -04:00
Thibaut Cuvelier
6843bc5a38 DocBook: ensure to have paragraphs in <sidebar>. 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
Yuriy Skalko
d8ead7debf Use nullptr 2020-10-29 15:52:33 +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
69f838bbf3 Fix isSpace for docstring 2020-10-24 18:55:05 +03: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
84365fc946 Move Author.h, Format.h from BufferParams.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
36c8e06cf1 Move Dimension.h from InsetIPA.h 2020-10-15 19:26:16 +03:00
Pavel Sanda
644c1d3453 Move docstream.h from output_xhtml.h 2020-10-14 15:06:12 +02:00
Richard Kimberly Heck
b7f632ca1c Fix bug #12002.
Patch from Daniel.
2020-10-13 19:51:27 -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
Yuriy Skalko
2a594d3e90 Remove unused forward declarations 2020-10-13 09:57:36 +03:00
Yuriy Skalko
919a06718a Constify 2020-10-12 15:06:16 +02: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
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
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
efc0877f8f Add override specifiers to improve code maintainability 2020-10-03 12:43:48 +02:00