Without GUI an image is not available even if it is actually cached.
In this case we load the image for obtaining its dimensions in order
to correct the clipping bounding box.
This amends 380f34a1.
This can lead to mistakes. If no buffer is required at the beginning,
it is better to pass 'nullptr' explicitly.
Fix a case of missing parameter in GuiCompleter (introduced at
f3656600). This avoids some spurious "There is no group open (creating
one)" messages.
The code in TextMetrics::completionPosAndDim is needlessly complicated.
1/ It is easier to rely directly on Text::getWord() rather than on the
helper previousWord().
2/ Using a fake row to compute completion height is overkill. A
simpler solution is proposed here.
No intended effect. These changes prepare the fix to ticket #11818.
This is mostly important for subfigures, but debugging this issue showed that InsetCaption could be slightly simplified and InsetLabel should be made a tad more robust.
This ensures that all comparisons for DocBook are made on the same normalised version of the float type. This cased a strange bug where <table> was output within <informaltable> for Linguistics Tableaux.
This lead to a quite subtle bug. The major problem is that float tags
depend on whether the LyX float has a title (formal) or nor (informal).
This information cannot be encoded in the layout format as easily as a
simple DocBookTag.
This was due to Floating::docbookTag not returning anything with the floattype_ tableau. Another issue that happened with that document is that the standard library's isspace crashed for some characters. I therefore implemented a more efficient version of the part that required it, and inlined the definition of isspace (even though that part becomes irrespective of locale, but was that feature ever used?).
This is a minimal implementation, as DocBook lacks a serious way of encoding all of this. Maybe a <formalpara> could do the trick, but I'd need to find a way to shoehorn a title through the styles (i.e. a first complete tag):
Theorem: Bla bla
<formalpara>
<title>Theorem</title>
<para>Bla bla</para>
</formalpara>
This would also only be a solution for single-paragraph things, as formalpara only allows one paragraph. Or a sidebar, but it's semantically very remote.