]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetlabel.C
* src/LyXAction.C: mark goto-clear-bookmark as working without buffer
[lyx.git] / src / insets / insetlabel.C
index 6a7db8d5c96b0838e3221cb13a0f82fb3afdba95..3d995c3ea0085da9053c82672d54dbf8df5de48e 100644 (file)
 #include "support/lyxalgo.h"
 #include "support/std_ostream.h"
 
-using lyx::docstring;
-using lyx::odocstream;
-using lyx::support::escape;
+
+namespace lyx {
+
+using support::escape;
 
 using std::string;
 using std::ostream;
@@ -64,15 +65,15 @@ void InsetLabel::doDispatch(LCursor & cur, FuncRequest & cmd)
 
        case LFUN_INSET_MODIFY: {
                InsetCommandParams p("label");
-               InsetCommandMailer::string2params("label", lyx::to_utf8(cmd.argument()), p);
+               // FIXME UNICODE
+               InsetCommandMailer::string2params("label", to_utf8(cmd.argument()), p);
                if (p.getCmdName().empty()) {
                        cur.noUpdate();
                        break;
                }
                if (p["name"] != params()["name"])
-                       // FIXME UNICODE
-                       cur.bv().buffer()->changeRefsIfUnique(lyx::to_utf8(params()["name"]),
-                                                      lyx::to_utf8(p["name"]), InsetBase::REF_CODE);
+                       cur.bv().buffer()->changeRefsIfUnique(params()["name"],
+                                       p["name"], InsetBase::REF_CODE);
                setParams(p);
                break;
        }
@@ -103,9 +104,11 @@ int InsetLabel::plaintext(Buffer const &, odocstream & os,
 int InsetLabel::docbook(Buffer const & buf, odocstream & os,
                        OutputParams const & runparams) const
 {
-        // FIXME UNICODE
        os << "<!-- anchor id=\""
-           << lyx::from_ascii(sgml::cleanID(buf, runparams, lyx::to_ascii(getParam("name"))))
+           << sgml::cleanID(buf, runparams, getParam("name"))
            << "\" -->";
        return 0;
 }
+
+
+} // namespace lyx