]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetoptarg.C
* BufferParams:
[lyx.git] / src / insets / insetoptarg.C
index 9c5db9df4ce8c016536a3f574f8242e972912a4e..d1ee34b50d29b102c861f840846e2e343dffe30d 100644 (file)
@@ -19,6 +19,9 @@
 
 #include <sstream>
 
+
+namespace lyx {
+
 using std::string;
 using std::auto_ptr;
 using std::ostream;
@@ -31,8 +34,7 @@ InsetOptArg::InsetOptArg(BufferParams const & ins)
        LyXFont font(LyXFont::ALL_SANE);
        font.setColor(LColor::collapsable);
        setLabelFont(font);
-       // FIXME UNICODE
-       setLabel(lyx::to_utf8(_("opt")));
+       setLabel(_("opt"));
 }
 
 
@@ -42,8 +44,7 @@ InsetOptArg::InsetOptArg(InsetOptArg const & in)
        LyXFont font(LyXFont::ALL_SANE);
        font.setColor(LColor::collapsable);
        setLabelFont(font);
-       // FIXME UNICODE
-       setLabel(lyx::to_utf8(_("opt")));
+       setLabel(_("opt"));
 }
 
 
@@ -53,10 +54,9 @@ auto_ptr<InsetBase> InsetOptArg::doClone() const
 }
 
 
-string const InsetOptArg::editMessage() const
+docstring const InsetOptArg::editMessage() const
 {
-       // FIXME UNICODE
-       return lyx::to_utf8(_("Opened Optional Argument Inset"));
+       return _("Opened Optional Argument Inset");
 }
 
 
@@ -67,34 +67,38 @@ void InsetOptArg::write(Buffer const & buf, ostream & os) const
 }
 
 
-int InsetOptArg::latex(Buffer const &, ostream &,
-                      OutputParams const &) const
+int InsetOptArg::latex(Buffer const &, odocstream &,
+                       OutputParams const &) const
 {
        return 0;
 }
 
-int InsetOptArg::docbook(Buffer const &, ostream &,
-                      OutputParams const &) const
+
+int InsetOptArg::plaintext(Buffer const &, odocstream &,
+                           OutputParams const &) const
 {
-       return 0;
+       return 0; // do not output optional arguments
 }
 
 
-int InsetOptArg::plaintext(Buffer const &, ostream &,
-                      OutputParams const &) const
+int InsetOptArg::docbook(Buffer const &, odocstream &,
+                         OutputParams const &) const
 {
        return 0;
 }
 
 
-int InsetOptArg::latexOptional(Buffer const & buf, ostream & os,
+int InsetOptArg::latexOptional(Buffer const & buf, odocstream & os,
                               OutputParams const & runparams) const
 {
-       ostringstream ss;
+       odocstringstream ss;
        int ret = InsetText::latex(buf, ss, runparams);
-       string str = ss.str();
-       if (str.find(']') != string::npos)
+       docstring str = ss.str();
+       if (str.find(']') != docstring::npos)
                str = '{' + str + '}';
        os << '[' << str << ']';
        return ret;
 }
+
+
+} // namespace lyx