]> git.lyx.org Git - lyx.git/blobdiff - src/tests/dummy_functions.cpp
Provide proper fallback if a bibliography processor is not found
[lyx.git] / src / tests / dummy_functions.cpp
index ce4261c00ae1eb98071c75a69db0f6da9fa239e1..a265ec0e8f41dbeb5d2d9956185626ebd40e0b87 100644 (file)
@@ -1,12 +1,19 @@
 #include <config.h>
 
-#include "../support/Messages.h"
+#include "Format.h"
+#include "LyXRC.h"
+
+#include "support/Messages.h"
 
 using namespace std;
 
 namespace lyx {
+       // Dummy verbose support
+       bool verbose = false;
+
        // Dummy LyXRC support
-       class LyXRC { string icon_set; } lyxrc;
+       LyXRC::LyXRC() {}
+       LyXRC lyxrc;
 
        // Dummy LyXAlignment support
        enum LyXAlignment {
@@ -30,9 +37,31 @@ namespace lyx {
                return lyx_messages;
        }
 
+       // Dummy formats support (needed by Lexer)
+       Formats & theFormats()
+       {
+               static Formats dummy_formats;
+               return dummy_formats;
+       }
+
        string alignmentToCSS(LyXAlignment)
        {
                return string();
        }
 
-}
+       //
+       // Dummy FontMetrics (needed by Length)
+       //
+       namespace frontend {
+       class FontMetrics {
+               int em() const { return 0; };
+       };
+       } // namespace frontend
+
+       class FontInfo;
+
+       frontend::FontMetrics const & theFontMetrics(FontInfo const &) {
+               static frontend::FontMetrics dummy;
+               return dummy;
+       }
+} // namespace lyx