]> git.lyx.org Git - lyx.git/commitdiff
Remove dependency on TEX2LYX #define in Lexer.cpp
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 21 Aug 2013 09:31:55 +0000 (11:31 +0200)
committerVincent van Ravesteijn <vfr@lyx.org>
Sun, 29 Sep 2013 13:26:10 +0000 (15:26 +0200)
src/Lexer.cpp
src/tex2lyx/tex2lyx.cpp

index 06a3408f41e9591d77afabfbb3074d2f3b18d9de..df2ce6913100ef292cb1c5f8f22f16fe92acff33 100644 (file)
@@ -238,14 +238,8 @@ void Lexer::Pimpl::popTable()
 
 bool Lexer::Pimpl::setFile(FileName const & filename)
 {
-#ifdef TEX2LYX
-       // tex2lyx does not read lyxrc and therefore can't really check for
-       // zipped formats.
-       if (false) {
-#else
        // Check the format of the file.
        if (formats.isZippedFile(filename)) {
-#endif
                LYXERR(Debug::LYXLEX, "lyxlex: compressed");
                // The check only outputs a debug message, because it triggers
                // a bug in compaq cxx 6.2, where is_open() returns 'true' for
index 6167798a0b975caa71d387d50340154f3f7a6b99..1f5b14d96b4506c200e22aeccbd859c38a9f77ef 100644 (file)
@@ -17,6 +17,7 @@
 
 #include "Context.h"
 #include "Encoding.h"
+#include "Format.h"
 #include "Layout.h"
 #include "LayoutFile.h"
 #include "LayoutModuleList.h"
@@ -77,7 +78,7 @@ public:
 
 // Dummy translation support
 Messages messages_;
-Messages const & getMessages(std::string const &)
+Messages const & getMessages(string const &)
 {
        return messages_;
 }
@@ -89,6 +90,17 @@ Messages const & getGuiMessages()
 }
 
 
+// tex2lyx does not read lyxrc and therefore can't really check for
+// zipped formats (Used by lexer)
+
+Formats formats;
+
+bool Formats::isZippedFile(FileName const&) const
+{
+       return false;
+}
+
+
 // Keep the linker happy on Windows
 void lyx_exit(int)
 {}