From 3910e6772a7eddfc883e8f9a82c772cf537bf94f Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Sat, 6 Jun 2009 04:20:57 +0000 Subject: [PATCH] Some real easy ones. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29985 a592a061-630c-0410-9148-cb99ea01b6c8 --- development/HTML/HTML.notes | 6 ++---- src/insets/InsetERT.cpp | 6 ++++++ src/insets/InsetERT.h | 2 ++ src/insets/InsetOptArg.cpp | 6 ++++++ src/insets/InsetOptArg.h | 2 ++ src/insets/InsetPhantom.cpp | 6 ++++++ src/insets/InsetPhantom.h | 2 ++ 7 files changed, 26 insertions(+), 4 deletions(-) diff --git a/development/HTML/HTML.notes b/development/HTML/HTML.notes index b3c16df17a..d44a5941fc 100644 --- a/development/HTML/HTML.notes +++ b/development/HTML/HTML.notes @@ -13,8 +13,8 @@ These insets are basically done, though there are probably issues here and there Branch, Collapsable, Footnote, Hyperlink, Label, Line, Note, Newline, Newpage, Quotes, Space, SpecialChar -These insets probably do nothing: - OptArg, Phantom +These insets do nothing for XHTML: + ERT, OptArg, Phantom These insets work but still need work: InsetBox: We need a Length::asHTML() method and the like, but it basically works. @@ -33,8 +33,6 @@ These do not yet work and need some attention: Maybe for the beginning, we should just do everything numerically, but even that will need a bit of work. Validation is our friend, presumably. InsetCommand: By default does nothing. That may be right? - InsetERT: It's not entirely clear what it's best to do here. Maybe output it - verbatim. Perhaps wrapped in some CSS. (What else would one expect?) InsetExternal: I don't understand these so am not sure what to do. InsetFloat: This will need some work, again because I do not really understand what these are meant to do. Presumably, we'll just use a div or something, but diff --git a/src/insets/InsetERT.cpp b/src/insets/InsetERT.cpp index bd59d14072..5376c71f4d 100644 --- a/src/insets/InsetERT.cpp +++ b/src/insets/InsetERT.cpp @@ -81,6 +81,12 @@ int InsetERT::plaintext(odocstream &, OutputParams const &) const } +int InsetERT::xhtml(odocstream &, OutputParams const &) const +{ + return 0; // do not output TeX code +} + + int InsetERT::docbook(odocstream & os, OutputParams const &) const { // FIXME can we do the same thing here as for LaTeX? diff --git a/src/insets/InsetERT.h b/src/insets/InsetERT.h index 1015e2f8ce..5e7d2f1438 100644 --- a/src/insets/InsetERT.h +++ b/src/insets/InsetERT.h @@ -57,6 +57,8 @@ private: /// int docbook(odocstream &, OutputParams const &) const; /// + int xhtml(odocstream &, OutputParams const &) const; + /// void validate(LaTeXFeatures &) const {} /// bool showInsetDialog(BufferView *) const; diff --git a/src/insets/InsetOptArg.cpp b/src/insets/InsetOptArg.cpp index d6a08f0bb3..879db43b68 100644 --- a/src/insets/InsetOptArg.cpp +++ b/src/insets/InsetOptArg.cpp @@ -57,6 +57,12 @@ int InsetOptArg::docbook(odocstream &, OutputParams const &) const } +int InsetOptArg::xhtml(odocstream &, OutputParams const &) const +{ + return 0; +} + + int InsetOptArg::latexOptional(odocstream & os, OutputParams const & runparams) const { diff --git a/src/insets/InsetOptArg.h b/src/insets/InsetOptArg.h index 740564c31c..3cbaf55f9a 100644 --- a/src/insets/InsetOptArg.h +++ b/src/insets/InsetOptArg.h @@ -47,6 +47,8 @@ private: int plaintext(odocstream &, OutputParams const &) const; /// Standard DocBook output -- short-circuited int docbook(odocstream &, OutputParams const &) const; + /// Standard XHTML output -- short-circuited + int xhtml(odocstream &, OutputParams const &) const; /// Write out to the .lyx file void write(std::ostream & os) const; /// should paragraph indendation be ommitted in any case? diff --git a/src/insets/InsetPhantom.cpp b/src/insets/InsetPhantom.cpp index c20217c1b4..abdc6c8de7 100644 --- a/src/insets/InsetPhantom.cpp +++ b/src/insets/InsetPhantom.cpp @@ -365,6 +365,12 @@ int InsetPhantom::docbook(odocstream & os, OutputParams const & runparams) const } +int InsetPhantom::xhtml(odocstream &, OutputParams const &) const +{ + return 0; // makes no sense for HTML +} + + docstring InsetPhantom::contextMenu(BufferView const &, int, int) const { return from_ascii("context-phantom"); diff --git a/src/insets/InsetPhantom.h b/src/insets/InsetPhantom.h index a6ccaa7a4f..9d95909209 100644 --- a/src/insets/InsetPhantom.h +++ b/src/insets/InsetPhantom.h @@ -83,6 +83,8 @@ private: int plaintext(odocstream &, OutputParams const &) const; /// int docbook(odocstream &, OutputParams const &) const; + /// Does nothing. + int xhtml(odocstream &, OutputParams const &) const; /// bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const; /// -- 2.39.2