On Wed, Apr 04, 2007 at 04:37:08PM -0400, Richard Heck wrote:
> Index: lyxfunc.C
> ===================================================================
> --- lyxfunc.C (revision 17717)
> +++ lyxfunc.C (working copy)
> @@ -1373,16 +1373,17 @@
> // this should be enhanced to also support
> text_after
> // and citation style
> string arg = argument;
> - string opt1;
> + string opt1 = "";
That's not needed. The result is identical except for possibly wasting a few
cycles in the second case.
> if (contains(argument, "|")) {
> arg = token(argument, '|', 0);
> - opt1 = '[' + token(argument, '|', 1) +
> ']';
> + opt1 = token(argument, '|', 1);
> }
> - std::ostringstream os;
> - os << "citation LatexCommand\n"
> - << "\\cite" << opt1 << "{" << arg << "}\n"
> - << "\\end_inset";
> - FuncRequest fr(LFUN_INSET_INSERT, os.str());
> + InsetCommandParams icp("cite");
> + icp["key"] = from_local8bit(arg);
> + if (opt1 != "")
if (!opt1.empty())
Andre'