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

This fixes InPreamble layouts in insets (#11557)

(cherry picked from commit 4f884fc92d)
This commit is contained in:
Juergen Spitzmueller 2019-04-20 17:51:06 +02:00
parent ccf93fc0d6
commit 6f8673bcee
2 changed files with 4 additions and 1 deletions

View File

@ -1440,7 +1440,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);

View File

@ -85,6 +85,8 @@ What's new
- Fix parsing of math-macro optional arguments after save-reopen (bug 11346).
- Fix handling of InPreamble styles in insets (bug 11557).
- Fix problem with wrongly inserted separator.
- Beamer: automatically nest column in columns.