// The clone needs its own DocumentClass, since running updateBuffer() will
// modify it, and we would otherwise be sharing it with the original Buffer.
- buffer_clone->params().makeDocumentClass();
+ buffer_clone->params().makeDocumentClass(true);
ErrorList el;
cap::switchBetweenClasses(
params().documentClassPtr(), buffer_clone->params().documentClassPtr(),
// The clone needs its own DocumentClass, since running updateBuffer() will
// modify it, and we would otherwise be sharing it with the original Buffer.
- buffer_clone->params().makeDocumentClass();
+ buffer_clone->params().makeDocumentClass(true);
ErrorList el;
cap::switchBetweenClasses(
params().documentClassPtr(), buffer_clone->params().documentClassPtr(),
TempFile const tempfile("Buffer_importStringXXXXXX." + fmt->extension());
FileName const name(tempfile.name());
ofdocstream os(name.toFilesystemEncoding().c_str());
- bool const success = (os << contents);
+ // Do not convert os implicitly to bool, since that is forbidden in C++11.
+ bool const success = !(os << contents).fail();
os.close();
bool converted = false;