// Do not remove the comment below, so we get merge conflict in
// independent branches. Instead add your own.
-int const LYX_FORMAT = 410; // rgh: dummy format for list->labeling
+int const LYX_FORMAT = 412; // edwin: set tabular width
typedef map<string, bool> DepClean;
typedef map<docstring, pair<InsetLabel const *, Buffer::References> > RefCache;
backupName = FileName(addName(lyxrc.backupdir_path,
mangledName));
}
- // do not copy because of #6587
- if (fileName().moveTo(backupName)) {
- madeBackup = true;
- } else {
+
+ // Except file is symlink do not copy because of #6587.
+ // Hard links have bad luck.
+ if (fileName().isSymLink())
+ madeBackup = fileName().copyTo(backupName);
+ else
+ madeBackup = fileName().moveTo(backupName);
+
+ if (!madeBackup) {
Alert::error(_("Backup failure"),
bformat(_("Cannot create backup file %1$s.\n"
"Please check whether the directory exists and is writable."),
if (output_preamble) {
if (!runparams.nice) {
// code for usual, NOT nice-latex-file
- os << "\\batchmode\n"; // changed
- // from \nonstopmode
+ os << "\\batchmode\n"; // changed from \nonstopmode
d->texrow.newline();
}
if (!original_path.empty()) {
}
// the real stuff
- latexParagraphs(*this, text(), os, d->texrow, runparams);
+ otexstream ots(os);
+ latexParagraphs(*this, text(), ots, d->texrow, runparams);
// Restore the parenthood if needed
if (output_preamble)
else if (runparams.flavor == OutputParams::HTML) {
XHTMLStream xs(os);
xhtmlParagraphs(text(), *this, xs, runparams);
- } else
+ } else {
// latex or literate
- latexParagraphs(*this, text(), os, texrow, runparams);
+ otexstream ots(os);
+ latexParagraphs(*this, text(), ots, texrow, runparams);
+ }
}
}
if (!params().default_output_format.empty()
&& params().default_output_format != "default")
return params().default_output_format;
- typedef vector<Format const *> Formats;
- Formats formats = exportableFormats(true);
if (isDocBook()
- || isLiterate()
|| params().useNonTeXFonts
|| params().encoding().package() == Encoding::japanese) {
+ vector<Format const *> const formats = exportableFormats(true);
if (formats.empty())
return string();
// return the first we find