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
We used to need a hack to set the size of the layout combo, but
the code was changed in Qt 4.5 or so. Hence the appearance of this
bug in 2009. We can now just remove this hack, and all seems to
work correctly.
The filters for the layout combo and document class combo share a
problem: If you type "beam", e.g, in the latter case, then we will
show any document class that contains those letters, in that order,
but not necessarily consecutively. This is extremely confusing and,
as José put it, just weird. So let's fix it.
I'd call this a bug so would be happy to see this in stable, too.
Further normalize the latex input in case of enabled format search.
It was not enough to split the latex input on \foreignlanguage and \textcolor
macros only.
Instead also macros like \textt, or \noun etc had to be accounted for.
This patch uses therefore a different algorithm.
In the latexified text:
* Check and handle contained regex properly
* Discard superfluos '{' preventing our search engine
to match with the search pattern
Our findadv expects something like
prefix + 'search'
so that the regex (which is latexified too)
can work on 'search'
(In the source, the prefix is denoted by lead_as_string)
The latex output contains structs like
\foreignlaguage(abc}{xx\textbf{boldxx\textcolor{blue}{blue 1 blue 2} XX}}
which would never match the simple prefix.
Now the above is converted to
\foreignlaguage(abc}{xx}\\
\foreignlaguage(abc}{\textbf{boldxx}}
\foreignlaguage(abc}{\textbf{\textcolor{blue}{blue 1 blue 2}}}\\
\foreignlaguage(abc}{\textbf{ XX}}
Of course, more than one language or color in an inset can be searched for now.
Add the "hyperref-driver=dvips" option to the extra flags of the
latex->dvi converter so that the breakurl package is automatically
loaded when needed.
This code has issues and there is no evidence that it improves performance.
Remove LyXRC variable \use_pixmap_cache and update rc format to 29.
Now the global pixmap cache is only used by GuiCompleter. Therefore
there is no need to reset it when fonts change.
Modified language handling
Still, there are problems, because sometimes the search pattern
does not contain the the requested info. So the 'find' often fails
for strings inside a list environment.
The change is significant if the search format is not disabled.
We try to analyze the pattern string first to get needed features
for the search.
We try to analyse the searched string and if it does not
contain all expected featers (color, language, char style, char decoration)
Still some problems though
If we were not ready to paint the screen, this does not mean that we
should give up on repainting, just potpone it.
I thought that it was bad to call update() in the paint event, but I
cannot find reference to this anymore and everything seems to work as
intended.
Make MathData::setBuffer set the buffer of insets that it contains.
Remove corresponding code from InsetMathNest.
update the buffer() property in the following tabular-feature
actions : copy-row, add-row, copy-col, add-col.
* Added textsl, texttt, uline, uuline, sout, xout to the list of possible
leading strings.
* Account for correct number of open braces in regex.
Now the search works for enbled format too.
This is hopefully the last amend