as they will be truncated anyway.
Fixes performance issues with long author lists in bib files.
(cherry picked from commit 7d2d26132b6bb285e96d65da5ca8269061af8d6c)
The regex is expensive which is especially noticeable with very long
author lists.
This introduces a case-insensitive subst() variant which is much faster.
(cherry picked from commit 8ba74fe9589fca3b00134e4d4f1fc130ad960c69)
This is potentially slow. It also should be unnecessary after
some of JMarc's recent commits. See bug #13050.
(cherry picked from commit 66cfc6af3c764b6923aae6c134c43c2155317c6a)
Make sure that math insets have a proper buffer. To this end, make the
Buffer* parameter of InsetMath mandatory and fix the compilation
errors that ensue.
(cherry picked from commit c013799887eb5c330f3cff4d51542028683fe1bb)
In order to ensure that MathData objects have a valid buffer, the
default MathData() constructor is deleted. This means that a buffer
shall be specified for each MathData object created.
This is fairly mechanical, actually. In particular, in most
InsetMathXxx cases, in MathData and in MathParser, the available
buffer_ member is used.
More specific cases:
- lyxfind.cpp takes the buffer from the Cursor
- calls to vector<MathData>::resize take an additional
MathData(buffer_) parameter. There are cases where resize actually
remove cells, and in this case clear() or even erase() have been
used.
- in InsetMathMacroTemplate, the optional parameters of the
constructors cannot be allowed anymore (a default value cannot
depend on another parameter). Therefore there a now two constructors
instead.
- in MathAutoCorrect.cpp, the MathData objects are not bound to a
buffer, so that std::nullptr is used instead.
- in MathExtern, use a buffer when one is specified, std::nulptr
instead.
(cherry picked from commit 57d713065545ac53a62a641d12a8b8c2c62c22fc)
Recent versions of qmake complain loudly when the locale
does not explicitly specify the utf8 codeset. Specifically,
the configure script exports LC_ALL=C and that implies the
ascii codeset. Previously, this was silently changed to utf8,
whereas now we get a warning for each qmake invocation.
So, explicitly set utf8 before calling qmake.
(this function can be called repeatedly while the work area doesn't
change any further)
(cherry picked from commit fd78a25a7c0b307da32c7cd805ce9f101160610a)
tabBarClicked() should really only reset focus if a click in a different
TabBarGroup happened. And no need to issue workAreaChanged() again.
This has lead to extra and erroneous focus changes (see #12954)
(cherry picked from commit 026c4bd726f36623772dc152740f709ce9972415)
This is one of the places where a dialog is shown (indicating that
some bibtems have been renamed) while the metrics are not up to date.
Then a draw operation can be triggered too early and a crash can ensue.
Use ad-hoc solution for this case and use Buffer::setBusy(). The
Alert::warning helper cannot really do that since it doe snot know the
current buffer.
(cherry picked from commit c84c59eaecf19b1eb8227f9aadc7f5be187b3856)
\cprotect'ed insets do not need forced local font switch; in fact files
with this break in compilation. E.g. a caption with an URL containing
the char '#' and caption text set to a secondary language.
(cherry picked from commit 8659924abd7026aa97a36bd99efeb11705ff7190)