Each token could be delimited by quotation marks or not. The previous
regexes only considered this for two tokens and hence produced wrong
matches for cases such as
\Format gnuplot "gp, gnuplot, plt" "Gnuplot" "" "" "" "vector" "text/plain"
where the extension list wasn't parsed as a single token.
There are several reasons to do it this way, among which is odd
behavior of the TOC filter if we put anything else there. This also
allows for filtering of the references themsevles in a natural way.
The change, I think, was really an unintended consequence of other
changes connected to showing formatted references in the work area.
The movement to the caption is now done in the LFUN function itself,
as we need the DocIterator in the caption
This greatly simplifies the code in the TocWidget and shifts all the
complexity to the LFUN itself
* par id actually can be 0
* properly move on in the buffer list if paragraph is not found
in the current buffer
* use dit to get label (as this might be in a different buffer)
This allows to insert a cross-reference to headings, figures or tables
by right-clicking on the outliner item.
If the item in question does not have a label yet, it is inserted.
This function checks whether a paragraph (specified by ID) has a label.
If so, it simply inserts a reference to this at cursor position, if
not it inserts a label to that paragraph (pos 0) and then inserts
a reference at cursor position.
Needed to implement #1624 (insert cross references to items that do not
have yet a label)
As with almost everything, this class bakes its own cake also with
multiple indexes. So we need to account for this to produce
compilable output.
Not very nice, but there you go!
Rely on the newly-introduced Buffer::id() to skip statistics
computation if the id is the same as last time. This will reduce the
annoyance of updates triggering at random times.
Take this occasion to clean code up:
- add 'skip' parameter (true by default) to Statistics::update to indicate
that the insets that do not produce output should be skipped.
- use a trailing underscrore for private members
Each buffer now has an id which is increased when it is marked dirty
(or when one of its relatives is marked dirty).
This can be a big win since updateMacros is very expensive.
The statistics code is known to be very slow, because it relies on
DocIterator to go through the buffer.
This commit introduces a new Statistics class that encapsulates the
main code, along a virtual method Inset::updateStatistics() that
allows to fine-tune how counting is done inset by inset.
This is a faithful bug-for-bug reimplementation.
The new code appears to be 3x faster than the old one.
See bug #12929 for a discussion about statistics update woes.