+ }
+ if (!uncodable.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()), uncodable));
+ }
+ 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
+{
+ docstring s = '\\' + from_ascii(cmdName_);
+ bool noparam = true;
+ ParamInfo::const_iterator it = info_.begin();
+ ParamInfo::const_iterator end = info_.end();
+ for (; it != end; ++it) {
+ std::string const & name = it->name();
+ switch (it->type()) {
+ case ParamInfo::LYX_INTERNAL:
+ break;
+
+ case ParamInfo::LATEX_REQUIRED: {
+ docstring const data =
+ prepareCommand(runparams, (*this)[name], it->handling());
+ s += '{' + data + '}';