From cdcf309911102485b5b9964384f6538b5e4f9c44 Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Fri, 5 Jun 2009 17:39:00 +0000 Subject: [PATCH] Routines to retrieve HTML style information. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29949 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/LaTeXFeatures.cpp | 25 +++++++++++++++++++++++++ src/LaTeXFeatures.h | 2 ++ 2 files changed, 27 insertions(+) diff --git a/src/LaTeXFeatures.cpp b/src/LaTeXFeatures.cpp index e64eb85cf1..fd0a863573 100644 --- a/src/LaTeXFeatures.cpp +++ b/src/LaTeXFeatures.cpp @@ -931,6 +931,31 @@ docstring const LaTeXFeatures::getTClassPreamble() const } +docstring const LaTeXFeatures::getTClassHTMLPreamble() const { + DocumentClass const & tclass = params_.documentClass(); + odocstringstream tcpreamble; + + tcpreamble << tclass.htmlpreamble(); + + list::const_iterator cit = usedLayouts_.begin(); + list::const_iterator end = usedLayouts_.end(); + for (; cit != end; ++cit) + tcpreamble << tclass[*cit].htmlstyle(); + + cit = usedInsetLayouts_.begin(); + end = usedInsetLayouts_.end(); + TextClass::InsetLayouts const & ils = tclass.insetLayouts(); + for (; cit != end; ++cit) { + TextClass::InsetLayouts::const_iterator it = ils.find(*cit); + if (it == ils.end()) + continue; + tcpreamble << it->second.htmlstyle(); + } + + return tcpreamble.str(); +} + + docstring const LaTeXFeatures::getTClassI18nPreamble(bool use_babel) const { DocumentClass const & tclass = params_.documentClass(); diff --git a/src/LaTeXFeatures.h b/src/LaTeXFeatures.h index 5fbadb4c76..bdb497e09f 100644 --- a/src/LaTeXFeatures.h +++ b/src/LaTeXFeatures.h @@ -59,6 +59,8 @@ public: docstring const getTClassPreamble() const; /// The language dependent definitions needed by the document's textclass docstring const getTClassI18nPreamble(bool use_babel) const; + /// + docstring const getTClassHTMLPreamble() const; /// The sgml definitions needed by the document (docbook) docstring const getLyXSGMLEntities() const; /// The SGML Required to include the files added with includeFile(); -- 2.39.5