#include <boost/bind.hpp>
-using lyx::docstring;
+
+namespace lyx {
using std::string;
using std::auto_ptr;
-namespace graphics = lyx::graphics;
-namespace support = lyx::support;
-
LyXRC_PreviewStatus RenderPreview::status()
{
}
-string const statusMessage(BufferView const * bv, string const & snippet)
+docstring const statusMessage(BufferView const * bv, string const & snippet)
{
BOOST_ASSERT(bv && bv->buffer());
break;
}
- // FIXME UNICODE
- return lyx::to_utf8(message);
+ return message;
}
} // namespace anon
LyXFont font(mi.base.font);
font.setFamily(LyXFont::SANS_FAMILY);
font.setSize(LyXFont::SIZE_FOOTNOTE);
- // FIXME UNICODE
- docstring const stat = lyx::from_utf8(statusMessage(mi.base.bv, snippet_));
+ docstring const stat = statusMessage(mi.base.bv, snippet_);
dim.wid = 15 + theFontMetrics(font).width(stat);
}
font.setFamily(LyXFont::SANS_FAMILY);
font.setSize(LyXFont::SIZE_FOOTNOTE);
- // FIXME UNICODE
- docstring const stat = lyx::from_utf8(statusMessage(pi.base.bv, snippet_));
+ docstring const stat = statusMessage(pi.base.bv, snippet_);
pi.pain.text(x + offset + 6,
y - theFontMetrics(font).maxAscent() - 4,
stat, font);
}
-void RenderPreview::addPreview(string const & latex_snippet,
+void RenderPreview::addPreview(docstring const & latex_snippet,
Buffer const & buffer)
{
if (status() == LyXRC::PREVIEW_OFF)
}
-void RenderPreview::addPreview(string const & latex_snippet,
+void RenderPreview::addPreview(docstring const & latex_snippet,
graphics::PreviewLoader & ploader)
{
if (status() == LyXRC::PREVIEW_OFF)
return;
- snippet_ = support::trim(latex_snippet);
+ // FIXME UNICODE
+ // We have to make sure that we call latex with the right encoding
+ snippet_ = support::trim(to_utf8(latex_snippet));
if (snippet_.empty())
return;
{
return monitor_.connect(slot);
}
+
+} // namespace lyx