X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2Finsetlabel.C;h=3d995c3ea0085da9053c82672d54dbf8df5de48e;hb=e28331ed63062dea10d0a21b9ec12034b4b17b9a;hp=d782c23590b45f5a5c182197c9d172b6f00f5784;hpb=0d449056ef9ace3ef737e4b9aba8d3994615dc18;p=lyx.git diff --git a/src/insets/insetlabel.C b/src/insets/insetlabel.C index d782c23590..3d995c3ea0 100644 --- a/src/insets/insetlabel.C +++ b/src/insets/insetlabel.C @@ -26,9 +26,10 @@ #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; @@ -48,15 +49,13 @@ std::auto_ptr InsetLabel::doClone() const void InsetLabel::getLabelList(Buffer const &, std::vector & list) const { - // FIXME UNICODE - list.push_back(lyx::from_utf8(getContents())); + list.push_back(getParam("name")); } docstring const InsetLabel::getScreenLabel(Buffer const &) const { - // FIXME UNICODE - return lyx::from_utf8(getContents()); + return getParam("name"); } @@ -66,14 +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.getContents() != params().getContents()) - cur.bv().buffer()->changeRefsIfUnique(params().getContents(), - p.getContents(), InsetBase::REF_CODE); + if (p["name"] != params()["name"]) + cur.bv().buffer()->changeRefsIfUnique(params()["name"], + p["name"], InsetBase::REF_CODE); setParams(p); break; } @@ -96,8 +96,7 @@ int InsetLabel::latex(Buffer const &, odocstream & os, int InsetLabel::plaintext(Buffer const &, odocstream & os, OutputParams const &) const { - // FIXME UNICODE - os << '<' << lyx::from_utf8(getContents()) << '>'; + os << '<' << getParam("name") << '>'; return 0; } @@ -105,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 << ""; return 0; } + + +} // namespace lyx