]> git.lyx.org Git - lyx.git/blobdiff - src/Buffer.cpp
Initialize nextraw_. The first character of the outputted html file was represented...
[lyx.git] / src / Buffer.cpp
index cf43bcaf3024941529215b7d620dc40501858ddf..4968d3cfc33f0367e91c76f40644eca403b0ceba 100644 (file)
@@ -1445,8 +1445,9 @@ void Buffer::writeLyXHTMLSource(odocstream & os,
                os << "</head>\n<body>\n";
        }
 
+       XHTMLStream xs(os);
        params().documentClass().counters().reset();
-       xhtmlParagraphs(text(), *this, os, runparams);
+       xhtmlParagraphs(text(), *this, xs, runparams);
        if (!only_body)
                os << "</body>\n</html>\n";
 }
@@ -1762,7 +1763,6 @@ void Buffer::dispatch(FuncRequest const & func, DispatchResult & dr)
                        lyx::dispatch(FuncRequest(LFUN_DIALOG_SHOW, "sendto"));
                        break;
                }
-               doExport(argument, false);
                bool success = doExport(argument, false);
                dr.setError(success);
                if (!success)
@@ -2964,6 +2964,15 @@ private:
 
 int AutoSaveBuffer::generateChild()
 {
+#if defined(__APPLE__)
+       /* FIXME fork() is not usable for autosave on Mac OS X 10.6 (snow leopard) 
+        *   We should use something else like threads.
+        *
+        * Since I do not know how to determine at run time what is the OS X
+        * version, I just disable forking altogether for now (JMarc)
+        */
+       pid_t const pid = -1;
+#else
        // tmp_ret will be located (usually) in /tmp
        // will that be a problem?
        // Note that this calls ForkedCalls::fork(), so it's
@@ -2973,6 +2982,7 @@ int AutoSaveBuffer::generateChild()
        // you should set pid to -1, and comment out the fork.
        if (pid != 0 && pid != -1)
                return pid;
+#endif
 
        // pid = -1 signifies that lyx was unable
        // to fork. But we will do the save