X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FBuffer.cpp;h=77ef949a5325715b8c5ee93cd5e683d04f951c68;hb=07dcb1c525435c6f22de4314ba31150c53502429;hp=bcefe52513f324fb372754ac6f2321811b7a5c4e;hpb=d8aab4af9e6e72c835f78ba54a46687b870c25fa;p=lyx.git diff --git a/src/Buffer.cpp b/src/Buffer.cpp index bcefe52513..77ef949a53 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -2152,7 +2152,7 @@ void Buffer::writeLyXHTMLSource(odocstream & os, if (output_body) { bool const output_body_tag = (output != IncludedFile); if (output_body_tag) - os << "\n"; + os << "\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);