]> git.lyx.org Git - features.git/commitdiff
Fix InsetCaption::getArgument (subfigure problems reported by Kornel, but also listin...
authorJuergen Spitzmueller <spitz@lyx.org>
Tue, 4 Dec 2012 16:06:52 +0000 (17:06 +0100)
committerJuergen Spitzmueller <spitz@lyx.org>
Tue, 4 Dec 2012 16:06:52 +0000 (17:06 +0100)
src/insets/InsetCaption.cpp

index 22548a4b7761bc8826cbd8a014107e9bf73a5478..67bb3600af630535980f42d84c74f75bf13a22c0 100644 (file)
@@ -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();
 }