From: Richard Heck Date: Fri, 5 Jun 2009 18:57:53 +0000 (+0000) Subject: Get InsetCollapsable working, at least to some extent. X-Git-Tag: 2.0.0~6393 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=6ef03cc4aceaf030397748d09eae57dfa7b6e518;p=features.git Get InsetCollapsable working, at least to some extent. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29963 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/insets/InsetCollapsable.cpp b/src/insets/InsetCollapsable.cpp index ac1bc3a8e9..5eec355c68 100644 --- a/src/insets/InsetCollapsable.cpp +++ b/src/insets/InsetCollapsable.cpp @@ -28,6 +28,7 @@ #include "LaTeXFeatures.h" #include "Lexer.h" #include "MetricsInfo.h" +#include "output_xhtml.h" #include "paragraph_funcs.h" #include "ParagraphParameters.h" #include "sgml.h" @@ -871,6 +872,19 @@ int InsetCollapsable::docbook(odocstream & os, OutputParams const & runparams) c } +int InsetCollapsable::xhtml(odocstream & os, OutputParams const & runparams) const +{ + InsetLayout const & il = getLayout(); + bool opened = false; + if (!undefined()) + opened = html::openTag(os, il.htmltag(), il.htmlattr()); + InsetText::xhtml(os, runparams); + if (opened && !undefined()) + html::closeTag(os, il.htmltag()); + return 0; +} + + void InsetCollapsable::validate(LaTeXFeatures & features) const { features.useInsetLayout(getLayout()); diff --git a/src/insets/InsetCollapsable.h b/src/insets/InsetCollapsable.h index 73fde24e8c..4e69f893c3 100644 --- a/src/insets/InsetCollapsable.h +++ b/src/insets/InsetCollapsable.h @@ -144,6 +144,8 @@ public: /// int docbook(odocstream &, OutputParams const &) const; /// + int xhtml(odocstream &, OutputParams const &) const; + /// void validate(LaTeXFeatures &) const; /// InsetCode lyxCode() const { return COLLAPSABLE_CODE; }