+ // returned "embed" is composed of "true" or "false", which needs to be adjusted
+ string tmp;
+ string emb;
+
+ string newBibfiles;
+ string newEmbedStatus;
+
+ string bibfiles = to_utf8(p["bibfiles"]);
+ string embedStatus = to_utf8(p["embed"]);
+
+ bibfiles = split(bibfiles, tmp, ',');
+ embedStatus = split(embedStatus, emb, ',');
+ while (!tmp.empty()) {
+ EmbeddedFile file(changeExtension(tmp, "bib"), buffer().filePath());
+ if (!newBibfiles.empty())
+ newBibfiles += ",";
+ newBibfiles += tmp;
+ if (!newEmbedStatus.empty())
+ newEmbedStatus += ",";
+ if (emb == "true")
+ newEmbedStatus += file.inzipName();
+ // Get next file name
+ bibfiles = split(bibfiles, tmp, ',');
+ embedStatus = split(embedStatus, emb, ',');
+ }
+ LYXERR(Debug::FILES, "Update parameters from " << p["bibfiles"]
+ << " " << p["embed"] << " to " << newBibfiles << " "
+ << newEmbedStatus);
+ p["bibfiles"] = from_utf8(newBibfiles);
+ p["embed"] = from_utf8(newEmbedStatus);
+