#include "LyXRC.h"
#include "MetricsInfo.h"
#include "OutputParams.h"
+#include "output_xhtml.h"
#include "frontends/FontMetrics.h"
#include "frontends/Painter.h"
/* codes used to read/write quotes to LyX files
* e ``english''
- * s ''spanish''
+ * s ''swedish''
* g ,,german``
* p ,,polish''
* f <<french>>
} // 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));
}
}
-void InsetQuotes::xhtml(odocstream & os, OutputParams const & op) const
+docstring InsetQuotes::xhtml(XHTMLStream & xs, OutputParams const & op) const
{
- docbook(os, op);
+ docbook(xs.os(), op);
+ return docstring();
}