+docstring InsetCommandParams::prepareCommand(OutputParams const & runparams,
+ docstring const & command,
+ ParamInfo::ParamHandling handling) const
+{
+ docstring result;
+ switch (handling) {
+ case ParamInfo::HANDLING_LATEXIFY: {
+ pair<docstring, docstring> command_latexed =
+ runparams.encoding->latexString(command, runparams.dryrun);
+ result = command_latexed.first;
+ if (!command_latexed.second.empty()) {
+ // issue a warning about omitted characters
+ // FIXME: should be passed to the error dialog
+ frontend::Alert::warning(_("Uncodable characters"),
+ bformat(_("The following characters that are used in the inset %1$s are not\n"
+ "representable in the current encoding and therefore have been omitted:\n%2$s."),
+ from_utf8(insetType()), command_latexed.second));
+ }
+ break;
+ }
+ case ParamInfo::HANDLING_ESCAPE:
+ result = escape(command);
+ break;
+ case ParamInfo::HANDLING_NONE:
+ result = command;
+ break;
+ } // switch
+
+ return result;
+}
+
+
+docstring InsetCommandParams::getCommand(OutputParams const & runparams) const