]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetQuotes.cpp
Restore XHTML output for InsetListings.
[lyx.git] / src / insets / InsetQuotes.cpp
index 122266d8081beab35aa10312baff19cb92f1b1ed..0c265fcfe75479527a4dea5ff3e14501707d27bc 100644 (file)
@@ -22,6 +22,7 @@
 #include "LyXRC.h"
 #include "MetricsInfo.h"
 #include "OutputParams.h"
+#include "output_xhtml.h"
 
 #include "frontends/FontMetrics.h"
 #include "frontends/Painter.h"
@@ -40,7 +41,7 @@ namespace {
 
 /* codes used to read/write quotes to LyX files
  * e    ``english''
- * s    ''spanish''
+ * s    ''swedish''
  * g    ,,german``
  * p    ,,polish''
  * f    <<french>>
@@ -88,25 +89,27 @@ char const * const latex_quote_babel[2][5] = {
 } // namespace anon
 
 
-InsetQuotes::InsetQuotes(Buffer const & buf, string const & str)
+InsetQuotes::InsetQuotes(Buffer * buf, string const & str) : Inset(buf)
 {
        parseString(str);
-       setBuffer(const_cast<Buffer &>(buf));
 }
 
-InsetQuotes::InsetQuotes(Buffer const & buf, char_type c)
-       : language_(buf.params().quotes_language), times_(buf.params().quotes_times)
+InsetQuotes::InsetQuotes(Buffer * buf, char_type c) : Inset(buf)
 {
+       if (buf) {
+               language_ = buf->params().quotes_language;
+               times_ = buf->params().quotes_times;
+       }
        setSide(c);
-       setBuffer(const_cast<Buffer &>(buf));
 }
 
 
-InsetQuotes::InsetQuotes(Buffer const & buf, char_type c, QuoteTimes t)
-       : language_(buf.params().quotes_language), times_(t)
+InsetQuotes::InsetQuotes(Buffer * buf, char_type c, QuoteTimes t)
+       : Inset(buf), times_(t)
 {
+       if (buf)
+               language_ = buf->params().quotes_language;
        setSide(c);
-       setBuffer(const_cast<Buffer &>(buf));
 }
 
 
@@ -312,7 +315,14 @@ int InsetQuotes::docbook(odocstream & os, OutputParams const &) const
 }
 
 
-void InsetQuotes::textString(odocstream & os) const
+docstring InsetQuotes::xhtml(XHTMLStream & xs, OutputParams const & op) const
+{
+       docbook(xs.os(), op);
+       return docstring();
+}
+
+
+void InsetQuotes::tocString(odocstream & os) const
 {
        os << displayString();
 }