Commit Graph

27620 Commits

Author SHA1 Message Date
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