]> git.lyx.org Git - lyx.git/blobdiff - src/Buffer.cpp
Add 'dir="auto"' to the body tag for XHTML export. This should take
[lyx.git] / src / Buffer.cpp
index bcefe52513f324fb372754ac6f2321811b7a5c4e..77ef949a5325715b8c5ee93cd5e683d04f951c68 100644 (file)
@@ -2152,7 +2152,7 @@ void Buffer::writeLyXHTMLSource(odocstream & os,
        if (output_body) {
                bool const output_body_tag = (output != IncludedFile);
                if (output_body_tag)
-                       os << "<body>\n";
+                       os << "<body dir=\"auto\">\n";
                XHTMLStream xs(os);
                if (output != IncludedFile)
                        // if we're an included file, the counters are in the master.
@@ -4322,12 +4322,11 @@ Buffer::ExportStatus Buffer::preview(string const & format, bool includeall) con
 
        if (status != ExportSuccess)
                return status;
-       if (previewFile.exists()) {
-               if (!formats.view(*this, previewFile, format))
-                       return PreviewError;
-               else
-                       return PreviewSuccess;
-       } 
+
+       if (previewFile.exists())
+               return formats.view(*this, previewFile, format) ?
+                       PreviewSuccess : PreviewError;
+
        // Successful export but no output file?
        // Probably a bug in error detection.
        LATTEST(status != ExportSuccess);