#include "support/FileInfo.h"
#include "support/filetools.h"
-#include "support/gzstream.h"
+#ifdef USE_COMPRESSION
+# include "support/gzstream.h"
+#endif
#include "support/lyxlib.h"
#include "support/os.h"
#include "support/path.h"
#include <iomanip>
#include <stack>
#include <sstream>
+#include <fstream>
using lyx::pos_type;
namespace {
-int const LYX_FORMAT = 239;
+int const LYX_FORMAT = 240;
} // namespace anon
typedef std::map<string, bool> DepClean;
-struct Buffer::Impl
+class Buffer::Impl
{
+public:
Impl(Buffer & parent, string const & file, bool readonly);
limited_stack<Undo> undostack;
string unknown = params().readToken(lex, token);
if (!unknown.empty()) {
- if (unknown[0] != '\\' and token == "\\textclass") {
+ if (unknown[0] != '\\' && token == "\\textclass") {
unknownClass(unknown);
} else {
++unknown_tokens;
filename));
return false;
}
- string command = LibFileSearch("lyx2lyx", "lyx2lyx");
+ string command =
+ "python " + LibFileSearch("lyx2lyx", "lyx2lyx");
if (command.empty()) {
Alert::error(_("Conversion script not found"),
bformat(_("%1$s is from an earlier"
bool retval = false;
if (params().compressed) {
+#ifdef USE_COMPRESSION
gz::ogzstream ofs(fname.c_str());
if (!ofs)
return false;
retval = do_writeFile(ofs);
-
+#else
+ return false;
+#endif
} else {
ofstream ofs(fname.c_str());
if (!ofs)
{
LyXTextClass const & tclass = params().getLyXTextClass();
- if (params().tracking_changes) {
+ if (features.isAvailable("dvipost") && params().tracking_changes
+ && params().output_changes) {
features.require("dvipost");
features.require("color");
}
}
+#ifdef WITH_WARNINGS
#warning this function should be moved to buffer_pimpl.C
+#endif
void Buffer::markDirty()
{
if (pimpl_->lyx_clean) {