Kornel Benko
54a0b95a2b
Amend 6211469b
: FindAdv: Fine tuning
...
Handle gracefully multiple '\\'
2021-01-06 14:22:26 +01: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
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
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
Thibaut Cuvelier
649755f481
Rename WriteStream to TeXMathStream.
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
Kornel Benko
f500a287d4
FindAdv: Try to make regex search with format enabled somehow faster
2021-01-01 21:53:07 +01: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
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
Kornel Benko
ab7ac800dc
FindAdv: Allow compilation with c++20
2020-12-28 16:45:02 +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
Kornel Benko
b3d4271e78
Adv-Find: Try to use some more unicode chars (instead of latex macros)
2020-12-15 18:08:02 +01:00
Kornel Benko
d384136ff9
Find-Adv: A try to handle cyrillic chars also in regexp-mode
2020-12-14 20:43:39 +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
c0a5987181
Better naming for enums
2020-12-01 00:46:21 +02:00
Yuriy Skalko
ecf62a8f21
Refactor OutputParams
...
Now all Inset hierarchy uses OutputParams.h included in Inset.h.
Forward declare some enums to reduce header dependencies.
2020-11-30 13:05:03 +02:00
Yuriy Skalko
7779316e6c
Include standard <regex>
2020-11-29 15:27:28 +02:00
Yuriy Skalko
8cb728c2d7
Constify
2020-11-27 12:16:45 +02:00
Kornel Benko
be50eb507f
Adv-Find: Add handling for \cdot (at least if using format-search
2020-11-23 21:55:13 +01:00
Yuriy Skalko
81a5e7927b
Use default member initialization
2020-11-01 22:25:03 +02:00
Yuriy Skalko
196d9caeb0
Clean includes using the output of iwyu tool
2020-10-20 11:38:55 +03:00
Yuriy Skalko
d25c10ed81
Remove duplicate and unused header includes in .cpp files
2020-10-19 18:01:11 +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
Yuriy Skalko
fe85162a29
Refactoring
2020-10-05 14:55:00 +02:00
Yuriy Skalko
715b8cda54
Refactoring based on cppcheck suggestions
2020-10-03 13:39:51 +02:00
Richard Kimberly Heck
17f9d6b192
Fix warnings
2020-08-23 05:48:15 -04:00
Kornel Benko
9da4390a9b
FindAdv: Correct next test (keytest/findadv-16)
...
Provided that the LASSERT in src/mathed/InsetMathGrid.cpp:1824
is removed.
2020-05-29 20:04:57 +02:00
Kornel Benko
8028dce129
FindAdv: Correct some testcases
2020-05-29 14:22:34 +02:00
Kornel Benko
03ad03320e
Findadv: Convert some messages from LYXERR0(...) to LYXERR(Debug::INFO, ...)
...
Due to a hint from Scott:
> I don't think it should be printed to LYXERR0. That goes to the terminal
> for the user. Even our lyx2lyx tests fail if they detect any information
> printed to the terminal (although we escape some warnings). If "find" is
> not a good debug level for it, maybe we can put it in "info" (the first
> debug level)?
2020-05-29 08:44:56 +02:00
Kornel Benko
b7cac34d96
Findadv: 2 more possible out of range access cases corrected
2020-05-26 18:49:50 +02:00
Kornel Benko
8dd2ac7171
Findadv: Do not use out of range index into a string
...
Thanks Scott. Crashing if using _GLIBCXX_DEBUG preprocessor setting
2020-05-26 15:58:23 +02:00
Richard Kimberly Heck
c506f304bc
Fix a number of issues that were stopping compilation with MSVC 19.
...
Patch from Thibaut Cuvelier, modified slightly by me (mostly for style).
2020-05-04 19:45:58 -04:00
Kornel Benko
80cd116805
Fix indentation
2020-04-07 11:47:08 +02:00
Stephan Witt
225de7830e
Remove useless assignment to a local variables never read later.
2020-02-18 08:55:00 +01:00
Kornel Benko
ae7a7fa882
Adv search: fix handling of multiple params of a latex command
...
Fix the case of possibly nested parentheses
2020-01-03 13:11:47 +01:00
Kornel Benko
49aaf95894
Fix handling of doRemove in advanced search
...
Amend 11c47ddf
2020-01-01 14:03:21 +01:00
Kornel Benko
48c7d9b028
Do not search in deleted text in change tracking mode
2019-12-29 17:42:18 +01:00
Jean-Marc Lasgouttes
c73d397d32
Do not use same name for members and arguments
...
Spotted by cppcheck.
2019-10-27 00:06:54 +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
Kornel Benko
8acbcebf11
Findadv: Add some missing accents.
...
They are defined in lib/unicodesymols, but were not handled yet.
2019-07-30 15:21:56 +02:00
Kornel Benko
ebc7105c36
FindAdv: Cosmetics
...
Remove parentheses from return statements,
add '_' to private members
2019-03-21 12:58:16 +01:00
Kornel Benko
e55244ccd8
FindAdv: Added remaining accents(2) dgrave, textdoublegrave, rcap, textroundcap
2019-03-20 23:22:29 +01:00
Jean-Marc Lasgouttes
1c755fefa5
Initialize hasTitle in Intervall constructor
...
I also moved around some things while I was at it.
Spotted by coverity scan.
2019-03-20 17:26:56 +01:00
Kornel Benko
d7354a1a09
FindAdv: Polishing
...
1.) Use vector for borders, because any value may be too small
if there are plenty of accented characters in a paragraph
2.) use '[\S]' instead of '.' in regex for 'accre'. The regex would
otherwise find also patterns like '\ {some text}'
2019-03-18 18:28:49 +01:00
Kornel Benko
9e825d5035
FindAdv: Added remaining accents cedilla, subring, subhat subtilde
2019-03-18 12:59:40 +01:00
Kornel Benko
13b3808aa0
FindAdv: Casting to satisfy Windows compiler
...
Thanks to Jean-Marc Lasgouttes
2019-03-18 09:38:34 +01:00