string const tmp_ret = lyx::tempName(string(), "lyxauto");
if (!tmp_ret.empty()) {
- bv->buffer()->writeFile(tmp_ret, 1);
+ bv->buffer()->writeFile(tmp_ret);
// assume successful write of tmp_ret
if (!lyx::rename(tmp_ret, fname)) {
failed = true;
if (failed) {
// failed to write/rename tmp_ret so try writing direct
- if (!bv->buffer()->writeFile(fname, 1)) {
+ if (!bv->buffer()->writeFile(fname)) {
// It is dangerous to do this in the child,
// but safe in the parent, so...
if (pid == -1)
// create new file with template
// SERVERCMD !
//
-Buffer * NewLyxFile(string const & filename)
+Buffer * NewFile(string const & filename)
{
// Split argument by :
string name;
void MenuInsertLabel(BufferView * bv, string const & arg)
{
- string label(arg);
+ string label = arg;
bv->owner()->prohibitInput();
if (label.empty()) {
Paragraph * par = bv->getLyXText()->cursor.par();
pair<bool, string> result =
Alert::askForText(_("Enter new label to insert:"), text);
if (result.first) {
- label = frontStrip(strip(result.second));
+ label = trim(result.second);
}
}
if (!label.empty()) {