]> git.lyx.org Git - lyx.git/log
lyx.git
5 years agoFix bug 11346
Enrico Forestieri [Tue, 18 Dec 2018 10:39:21 +0000 (11:39 +0100)]
Fix bug 11346

Enclose in braces an optional argument of a math macro when it
starts with an incomplete script inset or ends with a delimiter
size-modifier macro.

5 years agoFindAdv: to please cppcheck ...
Kornel Benko [Tue, 18 Dec 2018 05:53:58 +0000 (06:53 +0100)]
FindAdv: to please cppcheck ...

Initialize class elements
Removed unused method
Added 'explicit' keyword
Optimize handling for sizes ( \tiny, \small, etc)

5 years agode.po
Juergen Spitzmueller [Mon, 17 Dec 2018 14:39:07 +0000 (15:39 +0100)]
de.po

5 years agoFix embarrassing typo
Jean-Marc Lasgouttes [Mon, 17 Dec 2018 11:28:32 +0000 (12:28 +0100)]
Fix embarrassing typo

Not clear whether this caused any bug.

5 years agoUpdate sk.po
Kornel Benko [Mon, 17 Dec 2018 12:51:11 +0000 (13:51 +0100)]
Update sk.po

5 years agoAdd Qt-internal GUI string
Juergen Spitzmueller [Mon, 17 Dec 2018 12:39:45 +0000 (13:39 +0100)]
Add Qt-internal GUI string

5 years agoGuiCharacter: Add "Reset" and "Restore Defaults" buttons
Juergen Spitzmueller [Mon, 17 Dec 2018 11:59:40 +0000 (12:59 +0100)]
GuiCharacter: Add "Reset" and "Restore Defaults" buttons

Addresses #11415

5 years agoGuiCharacter: INHERIT is OFF for the tristate buttons.
Juergen Spitzmueller [Mon, 17 Dec 2018 09:37:14 +0000 (10:37 +0100)]
GuiCharacter: INHERIT is OFF for the tristate buttons.

5 years agoFindAdv: Amend 4276e1b0
Kornel Benko [Mon, 17 Dec 2018 09:32:22 +0000 (10:32 +0100)]
FindAdv: Amend 4276e1b0

5 years agoGuiCharacter: Consider default settings for underline, strikeout and language
Juergen Spitzmueller [Mon, 17 Dec 2018 09:12:02 +0000 (10:12 +0100)]
GuiCharacter: Consider default settings for underline, strikeout and language

5 years agoCheck for hidden dirty child on close
Juergen Spitzmueller [Mon, 17 Dec 2018 08:11:34 +0000 (09:11 +0100)]
Check for hidden dirty child on close

Fixes: #11405
5 years agoAmend 9705b88251
Juergen Spitzmueller [Mon, 17 Dec 2018 08:03:46 +0000 (09:03 +0100)]
Amend 9705b88251

5 years agoFindAdv: Handle also sizes of characters
Kornel Benko [Sun, 16 Dec 2018 13:50:38 +0000 (14:50 +0100)]
FindAdv: Handle also sizes of characters

5 years agoImprove comment.
Juergen Spitzmueller [Sun, 16 Dec 2018 11:30:48 +0000 (12:30 +0100)]
Improve comment.

5 years agoUse current_font, not real_current_font, in character dialog
Juergen Spitzmueller [Sun, 16 Dec 2018 11:29:15 +0000 (12:29 +0100)]
Use current_font, not real_current_font, in character dialog

The latter has the workarea font settings, which are not of interest
here.

Fixes: #11385
5 years agoFindAdv: Comments
Kornel Benko [Fri, 14 Dec 2018 15:02:33 +0000 (16:02 +0100)]
FindAdv: Comments

5 years agoComment.
Richard Kimberly Heck [Fri, 14 Dec 2018 15:58:13 +0000 (10:58 -0500)]
Comment.

5 years agoFix slowness problem on Windows reported on the list.
Richard Kimberly Heck [Fri, 14 Dec 2018 15:55:16 +0000 (10:55 -0500)]
Fix slowness problem on Windows reported on the list.

https://marc.info/?l=lyx-devel&m=154458979925296&w=2

This is related to the fix for #9158 and the caching of bibfile
information. On Windows, it is incredibly slow to run kpsewhich,
which we do to check where files actually are, so as to get info
about them (e.g., timestamps). So we have started to cache that
as a map. The map is supposed to be invalidated when various
things happen, but an oversight was causing it to be invalidated
on every cut operation. This is because cutting uses a temporary
Buffer, and the operations on it were affecting the *global* cache
of biblio file info. (It makes sense to have a global cache, since
these files are not document-specific.) Basically, we have to update
the list of bibfiles in that temporary Buffer---but that is one of
the things that invalidated the cache. The solution is only to
invalidate the cache if the list of bibfiles has actually changed
(a sensible idea anyway). The only time that will happen in the
temporary Buffer is when the copied information contains a BibTeX
inset. That should be fairly rare.

5 years agoFix bug #9622
Enrico Forestieri [Fri, 14 Dec 2018 10:41:16 +0000 (11:41 +0100)]
Fix bug #9622

The backslash is the escape character used in our parser. Hence,
when used as a path separator on Windows, it has to be itself
escaped or the path enclosed in either double or single quotes.
Windows users are maybe trained to quote paths containing spaces
but not paths with backslashes. So, we automatically escape the
backslashes when they are not already enclosed in quotes.

5 years agoFix display of single-char macro names
Enrico Forestieri [Thu, 13 Dec 2018 18:39:23 +0000 (19:39 +0100)]
Fix display of single-char macro names

Essentially, all characters are allowed in single-char macro names.

Part of #11158.

5 years agoFindAdv: Add handling spaces, dots, quotes ...
Kornel Benko [Thu, 13 Dec 2018 16:12:57 +0000 (17:12 +0100)]
FindAdv: Add handling spaces, dots, quotes ...

Treate spaces, dots and quotes as ordinary characters
Also discard length values for hspace,vspace and mspace

5 years agoSet buffer correctly when changing math space type.
Jean-Marc Lasgouttes [Thu, 13 Dec 2018 09:27:20 +0000 (10:27 +0100)]
Set buffer correctly when changing math space type.

Fixes bug #7747.

5 years agoFindAdv: Added code, href, url and footnote to handled search formats
Kornel Benko [Tue, 11 Dec 2018 16:27:50 +0000 (17:27 +0100)]
FindAdv: Added code, href, url and footnote to handled search formats

Remark: Inside code{} and footnote{} are the language settings ignored.

5 years agotypo
Pavel Sanda [Fri, 7 Dec 2018 23:04:04 +0000 (00:04 +0100)]
typo

5 years agoKeep permissions of the saved files intact.
Pavel Sanda [Fri, 7 Dec 2018 22:10:46 +0000 (23:10 +0100)]
Keep permissions of the saved files intact.

Previously the permission were destroyed by the newly created
temporary file -- which is later used as new saved file.
Tested on symlinks as well but only on Linux.

5 years agoFindAdv: Amend cd941804
Kornel Benko [Thu, 6 Dec 2018 13:18:24 +0000 (14:18 +0100)]
FindAdv: Amend cd941804

Revert changes in Paragraph.cpp

5 years agoAmend bd21aa9
Enrico Forestieri [Thu, 6 Dec 2018 09:30:58 +0000 (10:30 +0100)]
Amend bd21aa9

Check whether a line is actually blank rather than whether
we are at the beginning of a line.

5 years agoFindAdv: Simplify search for chars '&', '%', '#' and '_'
Kornel Benko [Wed, 5 Dec 2018 12:36:43 +0000 (13:36 +0100)]
FindAdv: Simplify search for chars '&', '%', '#' and '_'

This is not possible for '$', because of the latex-meaning to
start/end math inset.
Therefore, if not ignoring format, we still have to use
[\\][\$] in regex in order to find '$' in text.

5 years agoFix segfault after deleting monitor
Guillaume MM [Tue, 13 Nov 2018 22:10:35 +0000 (23:10 +0100)]
Fix segfault after deleting monitor

The boost signal was sent synchronously, and so made the Qt signal to be posted
in FileMonitor::changed after the boost signal returned, so after the sender was
possibly destroyed.

The solution is to make the boost signal asynchronous using the Qt event loop.

Thanks to Scott Kostyshak for the report and MWE.

5 years agoFix bug #11398
Enrico Forestieri [Sun, 2 Dec 2018 17:27:38 +0000 (18:27 +0100)]
Fix bug #11398

When deciding how to strike out deleted math in change-tracking
mode, differentiate only on begin-of-line or not, and not on
after-paragraph-break or not.

The assumption that a new paragraph is always started after a
float seems to be not true and was causing this bug.

5 years agoparalist.module description.
Pavel Sanda [Sun, 2 Dec 2018 02:14:54 +0000 (03:14 +0100)]
paralist.module description.

5 years agoUpdate after buffer-anonymize in branch.
Pavel Sanda [Sun, 2 Dec 2018 01:24:04 +0000 (02:24 +0100)]
Update after buffer-anonymize in branch.

This is not strictly necessary in master (compared to 2.3.x),
but JMarc wanted it anyway.

5 years agoTypo.
Richard Kimberly Heck [Thu, 29 Nov 2018 23:41:38 +0000 (18:41 -0500)]
Typo.

5 years agoFindAdv: Use plain text as value for \index{}
Kornel Benko [Thu, 29 Nov 2018 10:57:11 +0000 (11:57 +0100)]
FindAdv: Use plain text as value for \index{}

If we are in search mode, there is no need for
any special handling.

5 years agoFindAdv: Eliminate a corner case in the binary search
Kornel Benko [Tue, 27 Nov 2018 18:10:27 +0000 (19:10 +0100)]
FindAdv: Eliminate a corner case in the binary search

Given the regex 'r.*r\b' and a string
"abc regular something cursor currently"
we expect to find "regular something cursor".
But while searching we may be confronted with input
"regular something cursor curr"
and so the searched string would be seen longer.

5 years agofindadv tests: Adapt one test for the new greedy behaviour
Kornel Benko [Mon, 26 Nov 2018 15:00:27 +0000 (16:00 +0100)]
findadv tests: Adapt one test for the new greedy behaviour

5 years agoFindAdv: Avoid crash finding char at end of inset
Kornel Benko [Mon, 26 Nov 2018 11:37:18 +0000 (12:37 +0100)]
FindAdv: Avoid crash finding char at end of inset

Testcase without this patch:
1.) open de/Additional.lyx
2.) goto 6.1 Astronomy & Astrophysics
3.) open the index
4.) find advaced
a.) not ignoring format
b.) regex = .+
c.) language of regex: English
4.) search next
The seach finds the next break (which is outside of the index)
The following try to display the selection leads to crash

5 years agofind: This change was not intended, amend e96a9d63294b
Kornel Benko [Sun, 25 Nov 2018 17:25:14 +0000 (18:25 +0100)]
find: This change was not intended, amend e96a9d63294b

5 years agoFind: Use greedy behaviour
Kornel Benko [Sun, 25 Nov 2018 16:51:20 +0000 (17:51 +0100)]
Find: Use greedy behaviour

This change is valid for findadv too.
Patterns like '.*' now are greedy, like it is normal in regex
Searching for whole words is corrected, but can be slow.
One can speed up the search with adapted pattern.
So for instance searching for words starting and ending with 'r'
the normal pattern is 'r.*r'. The speed-up pattern could be
'\br[^\s]*r\b'. This halves the search time.

Search results are now different to that of lyx2.3, because the greedy
'.*' is now really greedy.
To achive the same results, we have to use '.*?' instead.

5 years agoFix compilation with msvc 2015
Jean-Marc Lasgouttes [Sat, 24 Nov 2018 18:17:31 +0000 (19:17 +0100)]
Fix compilation with msvc 2015

Without this, the compiler does not know whether 0 is a size_t or char
const *.

5 years agoFix undo after breaking a nested paragraph
Jean-Marc Lasgouttes [Fri, 23 Nov 2018 15:53:53 +0000 (16:53 +0100)]
Fix undo after breaking a nested paragraph

We have to take into account that Buffer::updateBuffer can modify the document.

Fix bug #11292.

5 years agoUpdate to boost 1.68
Jean-Marc Lasgouttes [Fri, 23 Nov 2018 15:14:23 +0000 (16:14 +0100)]
Update to boost 1.68

This avoids warnings from gcc 8

5 years agoShow cursor correctly whn loading file
Jean-Marc Lasgouttes [Wed, 21 Nov 2018 12:49:20 +0000 (13:49 +0100)]
Show cursor correctly whn loading file

This is a fixup to 8d8988de4. When a file is loaded and the cursor is
set, it is required to first compute metrics to be able to scroll the
screen correctly.

Fixes bug #11377.

5 years agoFindAdv: Optimization
Kornel Benko [Tue, 20 Nov 2018 13:36:11 +0000 (14:36 +0100)]
FindAdv: Optimization

A try to decrement the number of tests for a match.

Also a try to handle Hebrew documents. Unfortunatelly
the latex output is missing the language specification
(only the change of encoding is available there).
I failed to find a proper place to add the lang.
That means, searching for e.g. English text in Hebrew documents
is not satisfying.

5 years agoFindAdv: Enable search for different languages in Korean documents too
Kornel Benko [Sun, 18 Nov 2018 09:37:12 +0000 (10:37 +0100)]
FindAdv: Enable search for different languages in Korean documents too
The problem here was that for european languages only the encoding
was visible in latex output. Now also the language is provided.

5 years agoFix reloading of local layout file (bug #11120)
Enrico Forestieri [Fri, 16 Nov 2018 20:47:24 +0000 (21:47 +0100)]
Fix reloading of local layout file (bug #11120)

5 years agoFindAdv: Remove left over comment character
Kornel Benko [Fri, 16 Nov 2018 11:12:06 +0000 (12:12 +0100)]
FindAdv: Remove left over comment character

Sometimes language spec starts with "% ". This happens in Japaneese documents
containig English text at start of paragraph.

5 years agoFindAdv: Added lyx-function search-ignore
Kornel Benko [Thu, 15 Nov 2018 13:20:50 +0000 (14:20 +0100)]
FindAdv: Added lyx-function search-ignore

Enable/disable ignoring the specified type
language: e.g. british, slovak, latin, ...
color: blue, red, ...
sectioning: part, chapter, ..
font:
series: bold, ...
shape: upright, italic, slanted
family: serif, monospace ...
markup: enphasize, noun
underline:
strike:

Examples:
search-ignore language true
search-ignore shape true

5 years agoFindAdv: Significantly increase the search speed
Kornel Benko [Tue, 13 Nov 2018 11:11:33 +0000 (12:11 +0100)]
FindAdv: Significantly increase the search speed

The needed time to find a simple string dependes on the
paragraph length was O(n^2)
Now it is down to O(n).
Before:
To determine if the pattern matches we compared the
paragraph from current position to the its end.
Increment current position if no match
Now:
Check if the character at current position has at least
the needed features (text, color, language etc)
If not, Increment current position
else proceed as before

5 years agoFix cursor left/right navigation in overset, underset, and stackrel
Enrico Forestieri [Mon, 12 Nov 2018 18:05:09 +0000 (19:05 +0100)]
Fix cursor left/right navigation in overset, underset, and stackrel

Before this commit, navigating with the cursor was visiting either
the nucleus or the script depending on the direction (left or right)
of the cursor movement. Now the 2.3.x behavior of always going through
the nucleus is restored (at least for overset and underset, as stackrel
seems to behave oddly also in 2.3.x).

5 years agoFindAdv: Polishing search with regex containing '.'
Kornel Benko [Mon, 12 Nov 2018 11:17:16 +0000 (12:17 +0100)]
FindAdv: Polishing search with regex containing '.'

Also added missing math env alignat
Modified handling of longtable/tabular
Added a routine to count for valid chars. This is needed
for detection of word boundaries.

Due to detection conflicts
regex '.*' vs match of word-boundaries in MatchStringAdv::operator()
we need to use '\b' in regex explicitly. E.g. '\b.*\b'

The backward search works, but
1.) only in current paragraph (this is the same as before)
2.) only in the same language environment.

5 years agoTypo
Jean-Marc Lasgouttes [Mon, 12 Nov 2018 10:41:54 +0000 (11:41 +0100)]
Typo

5 years agoUpdate layout format number
Enrico Forestieri [Sat, 10 Nov 2018 15:07:07 +0000 (16:07 +0100)]
Update layout format number

5 years agoFix bug #11367
Enrico Forestieri [Sat, 10 Nov 2018 14:50:51 +0000 (15:50 +0100)]
Fix bug #11367

The overset, underset, and stackrel insets behave like the script
rather than the fraction inset.

5 years agoRestore correct left/right navigation in root inset
Enrico Forestieri [Sat, 10 Nov 2018 13:55:00 +0000 (14:55 +0100)]
Restore correct left/right navigation in root inset

Now all cells are correctly visited in sequence when moving with
cursor left/right.

5 years agoMake cell-forward/backward cycle in math
Jean-Marc Lasgouttes [Fri, 9 Nov 2018 15:21:55 +0000 (15:21 +0000)]
Make cell-forward/backward cycle in math

Make cell-backward put the cursor at the end of cell when using
mac-like cursor movement.

5 years agoimprove left/right navigation in root inset
Jean-Marc Lasgouttes [Fri, 9 Nov 2018 05:22:04 +0000 (21:22 -0800)]
improve left/right navigation in root inset

Now the cursor is correctly set when changing cell with xursor left/right.

5 years agoChange IgnoreFormats to a proper class
Jean-Marc Lasgouttes [Fri, 9 Nov 2018 05:07:17 +0000 (21:07 -0800)]
Change IgnoreFormats to a proper class

Instantiate a global variabble holding the formats and allow to modify
it using the helper function setIgnoreFormat.

5 years agoFindAdv: Polishing
Kornel Benko [Fri, 9 Nov 2018 12:36:47 +0000 (13:36 +0100)]
FindAdv: Polishing

1.) Added \textmd to be ignored (sometimes it is used and sometimes not)
2.) Typo: multiline --> multline. Searching in 'multline' caused a crash
because processing all of the '{' and '}' in the content of this math
exceeded the size of the interval field.

5 years agomissed this.
Juergen Spitzmueller [Fri, 9 Nov 2018 10:47:51 +0000 (11:47 +0100)]
missed this.

5 years agoFix thinko
Juergen Spitzmueller [Fri, 9 Nov 2018 10:28:38 +0000 (11:28 +0100)]
Fix thinko

Actually use the replaced path string :-/

5 years agoFindAdv: Polishing
Kornel Benko [Thu, 8 Nov 2018 08:59:51 +0000 (09:59 +0100)]
FindAdv: Polishing

1.) Handle some unclosed parentheses
Sometimes \shortcut is not correctly closed
2.) Added \ldots as known char
3.) Discard some shapes (circlepar, droppar, ...)
4.) Omit resulting empty string and use some value
which cannot be matched instead

5 years agoFixup 097da3a9: fix horizontal navigatiion in InsetMathRoot
Jean-Marc Lasgouttes [Wed, 7 Nov 2018 21:53:00 +0000 (11:53 -1000)]
Fixup 097da3a9: fix horizontal navigatiion in InsetMathRoot

Exchanging cells 0 and 1 requires to implement idxBackWard/Forward.

5 years agoFixup 097da3a9: update the math parser
Jean-Marc Lasgouttes [Wed, 7 Nov 2018 18:24:54 +0000 (08:24 -1000)]
Fixup 097da3a9: update the math parser

One has to account for the change in cell numbering.

5 years agoFindAdv: Optimize for long matches
Kornel Benko [Wed, 7 Nov 2018 12:14:50 +0000 (13:14 +0100)]
FindAdv: Optimize for long matches

Still, if the matched string is at a rear part of a very long
paragraph, the search is way too slow.

5 years agoWhen inserting math inset over selection, place cursor better
Jean-Marc Lasgouttes [Tue, 6 Nov 2018 07:29:22 +0000 (21:29 -1000)]
When inserting math inset over selection, place cursor better

This is a follow up to 503c7c16.

The new argument for placing cursor after insertion of inset is:
* if inset has no cell, do nothing
* otherwise, place inset in entry cell.
  + if entry cell is not empty (we pasted a selection), go to next cell
  + if this next cell does not exit, stay after the inset.

5 years agoChange cell numbers so that 0 is the main cell
Jean-Marc Lasgouttes [Tue, 6 Nov 2018 07:29:47 +0000 (21:29 -1000)]
Change cell numbers so that 0 is the main cell

This leads to code simplification in overset, root and underset.
Further simplification is possible.

5 years agoFindAdv: Discard table decorations
Kornel Benko [Wed, 7 Nov 2018 08:35:16 +0000 (09:35 +0100)]
FindAdv: Discard table decorations

That way we do not match the whole table but only the cell contents.
The problem I had was
1.) Document language Spanish
2.) Table (copied from English doc) => language English
3.) All cell contents Spanish

Now search for English text led to a selection of the whole
table, although there was no English content in any cell.

5 years agoFindadv: Initialize the position of first unprocessed open parentheses
Kornel Benko [Tue, 6 Nov 2018 14:28:43 +0000 (15:28 +0100)]
Findadv: Initialize the position of first unprocessed open parentheses

Not initializing caused some wrong matches.

5 years agoFindadv: Polishing
Kornel Benko [Mon, 5 Nov 2018 11:58:45 +0000 (12:58 +0100)]
Findadv: Polishing

1.) Do not remove '{}' unconditionally from \item parameter
2.) Do not output last empty entry

5 years agoAvoid extra space in tooltips
Jean-Marc Lasgouttes [Sun, 4 Nov 2018 23:53:36 +0000 (13:53 -1000)]
Avoid extra space in tooltips

When using QTextDocument to check the natutal size of a text, one has
to remove the text margin, which is not useful here.

Fixes bug #11353.

5 years agoFindadv: Some glitches found while searching for English text in fr/UserGuide.lyx
Kornel Benko [Sun, 4 Nov 2018 20:41:04 +0000 (21:41 +0100)]
Findadv: Some glitches found while searching for English text in fr/UserGuide.lyx

Ignore \index
Handle \og and \bg as characters
Remove space in empty list-item (description or labeling)

5 years agoFindadv: 'Optimized' detection of matched string
Kornel Benko [Sun, 4 Nov 2018 13:54:06 +0000 (14:54 +0100)]
Findadv: 'Optimized' detection of matched string

This is clearly a hack, because I don't understand why the
previous code did not work.

5 years agoFix selection of unmarked RtL text
Jean-Marc Lasgouttes [Sat, 3 Nov 2018 15:55:33 +0000 (15:55 +0000)]
Fix selection of unmarked RtL text

With Qt 5.11 at least, RtL text will be drawn RtL even when the
(undocumented) flag Qt::TextForceLeftToRight is applied to the
QTextLayout object. This creates selection issues for Hebrew text
marked as English.

The solution is to do the same as in breakAt_helper, that is prepend
the string with a direction override unicode character.

Doing this requires to introduce a TEXTLAYOUT_OFFSET constant that has
to be used wisely to account for this extra character.

Fixes bug #11284.

5 years agoRemove old workaround that is not needed anymore
Jean-Marc Lasgouttes [Sat, 3 Nov 2018 14:29:10 +0000 (14:29 +0000)]
Remove old workaround that is not needed anymore

This causes a compilation error with boost 1.69.

Fixes bug #11349.

5 years agofindadv: Output language chage in ANY case, if outputting for search
Kornel Benko [Sat, 3 Nov 2018 14:00:58 +0000 (15:00 +0100)]
findadv: Output language chage in ANY case, if outputting for search

Without this, the first \item entry in a list does not specify the language
in latex output. But we need it if we do not ignore language in search.

5 years agoMinor fixes
Richard Kimberly Heck [Sat, 3 Nov 2018 14:00:48 +0000 (10:00 -0400)]
Minor fixes

5 years agoSpeed up parenthesis conversion routine for Hebrew. Patch from Guy.
Richard Kimberly Heck [Sat, 3 Nov 2018 13:58:32 +0000 (09:58 -0400)]
Speed up parenthesis conversion routine for Hebrew. Patch from Guy.

5 years agofindadv tests: Remaining test passes now too
Kornel Benko [Sat, 3 Nov 2018 11:30:07 +0000 (12:30 +0100)]
findadv tests: Remaining test passes now too

5 years agoFindadv: Handle the problem with list environments
Kornel Benko [Sat, 3 Nov 2018 10:15:12 +0000 (11:15 +0100)]
Findadv: Handle the problem with list environments

The problem was, that the different list ennvironments
did not look different in tha latex output used for
search.
So the input of "\item ..." did not give information
if it is description, lyxlist, enumeration or labeling.

In search modus we use now "\item{enumeration}" etc.

5 years agoFindadv: Use '\n' as delimiter for end of data with same features
Kornel Benko [Fri, 2 Nov 2018 09:32:28 +0000 (10:32 +0100)]
Findadv: Use '\n' as delimiter for end of data with same features

This allows to use '.' in regex without matching also wrong data.

Also added modified patch from ajd (see #11241).

5 years agoAdded test findadv-22
Kornel Benko [Wed, 31 Oct 2018 10:19:47 +0000 (11:19 +0100)]
Added test findadv-22

Related to https://www.lyx.org/trac/ticket/11241
(Find and replace doesn't find a wedge of two things in a subscript.)

5 years agoFindadv: Allow multiple math statements in a line
Kornel Benko [Tue, 30 Oct 2018 19:52:29 +0000 (20:52 +0100)]
Findadv: Allow multiple math statements in a line

5 years agoDispay pre- and posttext widgets if non-empty also if unapplied
Juergen Spitzmueller [Tue, 30 Oct 2018 16:23:08 +0000 (17:23 +0100)]
Dispay pre- and posttext widgets if non-empty also if unapplied

Fixes: #11352
5 years agoFix parentheses with Hebrew
Juergen Spitzmueller [Tue, 30 Oct 2018 11:33:35 +0000 (12:33 +0100)]
Fix parentheses with Hebrew

Patch by Guy Rutenberg, with some changes of mine.

Fixes: #11191
5 years agoFindadv: Remaining findadv tests pass now
Kornel Benko [Mon, 29 Oct 2018 12:17:54 +0000 (13:17 +0100)]
Findadv: Remaining findadv tests pass now

Exception: findadv-21, but it is not a regression,
because this one never passed.
The problem here is, that we cannot differentiate
between enumeration, itemize, description and labeling
environment here.

5 years agoFindadv: Adapt search for special chars '[', ']', '%' and '#'
Kornel Benko [Mon, 29 Oct 2018 06:37:32 +0000 (07:37 +0100)]
Findadv: Adapt search for special chars '[', ']', '%' and '#'

5 years agoChanges to match math equations
Kornel Benko [Sun, 28 Oct 2018 18:40:14 +0000 (19:40 +0100)]
Changes to match math equations

Now tests findadv-01 ... findadv-20 pass too.

keytest.py: Expanded time for controll keys (like \[Return])
findadv*: expanded time for normal keys
lyxfind.cpp: Handle math equations

5 years agoRevert "Comment out unused functions to restore -Werror"
Scott Kostyshak [Sun, 28 Oct 2018 15:43:47 +0000 (11:43 -0400)]
Revert "Comment out unused functions to restore -Werror"

This reverts commit bceb2390b473db347b72f9fc16f63a60223daa9d.

For details, see:

https://www.mail-archive.com/search?l=mid&q=4724814.5HqUF52VLN%40amd64

5 years agoComment out unused functions to restore -Werror
Scott Kostyshak [Sun, 28 Oct 2018 00:46:54 +0000 (20:46 -0400)]
Comment out unused functions to restore -Werror

This commit restores compilation with -Werror and g++ version 7.3.0.

Consistent with 6dc450bc.

5 years agoAmend 23041f53: remove extra parenthesis
Scott Kostyshak [Sat, 27 Oct 2018 23:16:36 +0000 (19:16 -0400)]
Amend 23041f53: remove extra parenthesis

5 years agoAmend 4459603, MSVC versions >= 1915 allow std::regex
Kornel Benko [Sat, 27 Oct 2018 18:51:57 +0000 (20:51 +0200)]
Amend 4459603, MSVC versions >= 1915 allow std::regex

5 years agoAmend(4) 74c849d Advanced search with format
Kornel Benko [Sat, 27 Oct 2018 14:57:42 +0000 (16:57 +0200)]
Amend(4) 74c849d Advanced search with format

Prepare for use with func request. For instance to
ignore language while searching:
setIgnoreFormat("language", true);

5 years agoAdd dummy implementation for Messages::getIfFound (used when ENABLE_NLS is false)
Stephan Witt [Sat, 27 Oct 2018 14:12:02 +0000 (16:12 +0200)]
Add dummy implementation for Messages::getIfFound (used when ENABLE_NLS is false)

5 years agoAllow std::regex for MSVC10
Kornel Benko [Thu, 25 Oct 2018 08:14:49 +0000 (10:14 +0200)]
Allow std::regex for MSVC10

5 years agoAmend(3) 74c849d Advanced search with format
Kornel Benko [Wed, 24 Oct 2018 09:07:11 +0000 (11:07 +0200)]
Amend(3) 74c849d Advanced search with format

* Discard now unneeded code
* Remove macro '\uldepth=...'

5 years agoAmend(2) 74c849d Advanced search with format
Kornel Benko [Tue, 23 Oct 2018 19:12:22 +0000 (21:12 +0200)]
Amend(2) 74c849d Advanced search with format

Added missing handling for chapter/chapter*
Also added frontmatter (title, author etc), but disabled ATM

5 years agoAmend 74c849d, Advanced search with format
Kornel Benko [Tue, 23 Oct 2018 17:59:08 +0000 (19:59 +0200)]
Amend 74c849d, Advanced search with format

Remove macros like '\tiny ' or '\tiny{}' or '\tiny' followed by
any other non-alpha char correctly

5 years agoUse underline in (+ bold) for char match in layout
Scott Kostyshak [Tue, 23 Oct 2018 01:16:56 +0000 (21:16 -0400)]
Use underline in (+ bold) for char match in layout

When showing the match characters in, e.g., the layout box, we now
underline (in addition to bold) the matched characters. This makes
the matched characters stand out even more.

See 4b716dd6 and the following ML thread:

  https://www.mail-archive.com/search?l=mid&q=20181019155649.dqqk6u25wdcdimrj%40barna

5 years agoAdvanced search with format, preparing for selective searching
Kornel Benko [Mon, 22 Oct 2018 18:19:36 +0000 (20:19 +0200)]
Advanced search with format, preparing for selective searching

As it is now, searching with format needs ALL the features set
in order to match the pattern.
What needs to be done is a GUI specifying which of the features are
important.
1.) language
2.) font (series, shape)
3.) markup, underline, strikeout
4.) color
Having this info, the implementation is easy. Set
some variables and be done