2000-05-31 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
+ * src/lyxfunc.C (doImportHelper): do not create the file before
+ doing the actual import.
+ (doImportASCIIasLines): create a new file before doing the insert.
+ (doImportASCIIasParagraphs): ditto.
+
* lib/lyxrc.example: remove mention of non-existing commands
* lyx.man: remove mention of color-related switches.
// notify user of import ahead
string displaypath = MakeDisplayPath(filename);
- owner->view()->buffer(bufferlist.newFile(lyxfile, string()));
owner->getMiniBuffer()->Set(_("Importing"), displaypath, "...");
// call real importer
static
bool doImportASCIIasLines(BufferView * view, string const & filename)
{
+ view->buffer(bufferlist.newFile(filename, string()));
InsertAsciiFile(view, filename, false);
return true;
}
static
bool doImportASCIIasParagraphs(BufferView * view, string const & filename)
{
+ view->buffer(bufferlist.newFile(filename, string()));
InsertAsciiFile(view, filename, true);
return true;
}
static
-bool doImportLaTeX(BufferView *, string const & filename)
+bool doImportLaTeX(BufferView * view, string const & filename)
{
ImportLaTeX myImport(filename);
Buffer * openbuf = myImport.run();
- return openbuf != NULL;
+ if (openbuf) {
+ view->buffer(openbuf);
+ return true;
+ }
+ else
+ return false;
}
static
-bool doImportNoweb(BufferView *, string const & filename)
+bool doImportNoweb(BufferView * view, string const & filename)
{
ImportNoweb myImport(filename);
Buffer * openbuf = myImport.run();
- return openbuf != NULL;
+ if (openbuf) {
+ view->buffer(openbuf);
+ return true;
+ }
+ else
+ return false;
}
static