Pass proper text to TeXOnePar in Paragrapgh::Private::validate

This fixes InPreamble layouts in insets (#11557)
This commit is contained in:
Juergen Spitzmueller 2019-04-20 17:51:06 +02:00
parent e325c7cc6a
commit 4f884fc92d

View File

@ -1351,7 +1351,8 @@ void Paragraph::Private::validate(LaTeXFeatures & features) const
otexstringstream os;
os << layout_->preamble();
size_t const length = os.length();
TeXOnePar(buf, buf.text(), buf.getParFromID(owner_->id()).pit(), os,
TeXOnePar(buf, *inset_owner_->getText(int(buf.getParFromID(owner_->id()).idx())),
buf.getParFromID(owner_->id()).pit(), os,
features.runparams(), string(), 0, -1, true);
if (os.length() > length)
features.addPreambleSnippet(os.release(), true);