mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 21:40:19 +00:00
Do not change bibliography processor to default if it is not found
Rather than that, keep it with a warning that it is not available.
Fallback procedure (which maintains security measures) is done in
the conversion step.
This prevents document properties being silently changed on sharing.
(cherry picked from commit 3543626182
)
This commit is contained in:
parent
c7d29be153
commit
c276c3e7b1
@ -3533,17 +3533,17 @@ void GuiDocument::paramsToDialog()
|
||||
string options =
|
||||
split(bp_.bibtex_command, command, ' ');
|
||||
|
||||
int const bpos = biblioModule->bibtexCO->findData(toqstr(command));
|
||||
if (bpos != -1) {
|
||||
biblioModule->bibtexCO->setCurrentIndex(bpos);
|
||||
biblioModule->bibtexOptionsLE->setText(toqstr(options).trimmed());
|
||||
} else {
|
||||
// We reset to default if we do not know the specified compiler
|
||||
// This is for security reasons
|
||||
biblioModule->bibtexCO->setCurrentIndex(
|
||||
biblioModule->bibtexCO->findData(toqstr("default")));
|
||||
biblioModule->bibtexOptionsLE->clear();
|
||||
int bpos = biblioModule->bibtexCO->findData(toqstr(command));
|
||||
if (bpos == -1) {
|
||||
// We add and set the unknown compiler, indicating that it is unavailable
|
||||
// to assure document compilation and for security reasons, a fallback
|
||||
// will be used on document processing stage
|
||||
biblioModule->bibtexCO->addItem(toqstr(bformat(_("%1$s (not available)"),
|
||||
from_utf8(command))), toqstr(command));
|
||||
bpos = biblioModule->bibtexCO->findData(toqstr(command));
|
||||
}
|
||||
biblioModule->bibtexCO->setCurrentIndex(bpos);
|
||||
biblioModule->bibtexOptionsLE->setText(toqstr(options).trimmed());
|
||||
biblioModule->bibtexOptionsLE->setEnabled(
|
||||
biblioModule->bibtexCO->currentIndex() != 0);
|
||||
|
||||
|
@ -27,6 +27,10 @@ What's new
|
||||
|
||||
* USER INTERFACE
|
||||
|
||||
- If the bibliography processor requested by a document is not available, do not
|
||||
silently fall back to default. Rather than that, warn the user, keep the requested
|
||||
processor and only fall back to an alternative at processing stage.
|
||||
|
||||
- Backspace at the very start of a cell part of eqnarray or align environments
|
||||
does not move the cursor out of the whole equation anymore and is now
|
||||
equivalent to hitting the left arrow key (bug 11678).
|
||||
|
Loading…
Reference in New Issue
Block a user