From 9a19a312bab9ade2d28d884385a989fbede210a0 Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Mon, 26 Oct 2009 20:47:12 +0000 Subject: [PATCH] Rename one output param and add a new one. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31752 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/OutputParams.cpp | 3 ++- src/OutputParams.h | 6 ++++-- src/insets/InsetCaption.cpp | 2 +- src/insets/InsetListings.cpp | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/OutputParams.cpp b/src/OutputParams.cpp index 3528e5e98a..d746a6fb1d 100644 --- a/src/OutputParams.cpp +++ b/src/OutputParams.cpp @@ -28,7 +28,8 @@ OutputParams::OutputParams(Encoding const * enc) inIndexEntry(false), inDeletedInset(0), changeOfDeletedInset(Change::UNCHANGED), par_begin(0), par_end(0), isLastPar(false), - dryrun(false), verbatim(false), disable_captions(false) + dryrun(false), verbatim(false), + html_disable_captions(false), html_in_par(false) { // Note: in PreviewLoader::Impl::dumpPreamble // OutputParams runparams(0); diff --git a/src/OutputParams.h b/src/OutputParams.h index 534e972193..f2c3868bd9 100644 --- a/src/OutputParams.h +++ b/src/OutputParams.h @@ -209,8 +209,10 @@ public: bool dryrun; /// Should we output verbatim or escape LaTeX's special chars? bool verbatim; - /// Should we output captions? (Used in HTML output.) - bool disable_captions; + /// Should we output captions? + bool html_disable_captions; + /// Are we already in a paragraph? + bool html_in_par; }; diff --git a/src/insets/InsetCaption.cpp b/src/insets/InsetCaption.cpp index db95f060b9..6972021019 100644 --- a/src/insets/InsetCaption.cpp +++ b/src/insets/InsetCaption.cpp @@ -253,7 +253,7 @@ int InsetCaption::docbook(odocstream & os, docstring InsetCaption::xhtml(odocstream & os, OutputParams const & rp) const { - if (rp.disable_captions) + if (rp.html_disable_captions) return docstring(); os << "
\n"; docstring def = getCaptionAsHTML(os, rp); diff --git a/src/insets/InsetListings.cpp b/src/insets/InsetListings.cpp index 8c2898d354..26cc32de1c 100644 --- a/src/insets/InsetListings.cpp +++ b/src/insets/InsetListings.cpp @@ -283,7 +283,7 @@ docstring InsetListings::xhtml(odocstream & os, OutputParams const & rp) const out << "
\n";
 	OutputParams newrp = rp;
-	newrp.disable_captions = true;
+	newrp.html_disable_captions = true;
 	docstring def = InsetText::xhtml(out, newrp);
 	out << "\n
\n";