From: Juergen Spitzmueller Date: Tue, 4 Dec 2012 16:06:52 +0000 (+0100) Subject: Fix InsetCaption::getArgument (subfigure problems reported by Kornel, but also listin... X-Git-Tag: 2.1.0beta1~1149 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=1f720826d6a12665145a15d06962ac9add7d80c9;p=lyx.git Fix InsetCaption::getArgument (subfigure problems reported by Kornel, but also listings caption) --- diff --git a/src/insets/InsetCaption.cpp b/src/insets/InsetCaption.cpp index 22548a4b77..67bb3600af 100644 --- a/src/insets/InsetCaption.cpp +++ b/src/insets/InsetCaption.cpp @@ -272,7 +272,25 @@ docstring InsetCaption::xhtml(XHTMLStream & xs, OutputParams const & rp) const void InsetCaption::getArgument(otexstream & os, OutputParams const & runparams) const { - InsetText::latex(os, runparams); + InsetLayout const & il = getLayout(); + + if (!il.leftdelim().empty()) + os << il.leftdelim(); + + OutputParams rp = runparams; + if (isPassThru()) + rp.pass_thru = true; + if (il.isNeedProtect()) + rp.moving_arg = true; + rp.par_begin = 0; + rp.par_end = paragraphs().size(); + + // Output the contents of the inset + latexParagraphs(buffer(), text(), os, rp); + runparams.encoding = rp.encoding; + + if (!il.rightdelim().empty()) + os << il.rightdelim(); }