]> git.lyx.org Git - lyx.git/blobdiff - src/tex2lyx/dummy_impl.cpp
Format and reversion code for new counter inset.
[lyx.git] / src / tex2lyx / dummy_impl.cpp
index 6c8d13c3677cafa80014f6cb20e82a5a85b52a8b..c850cd97c113cfcf0b25b8f434378c4da82631bf 100644 (file)
@@ -20,6 +20,7 @@
 
 #include "Format.h"
 #include "LaTeXFeatures.h"
+#include "LyXRC.h"
 #include "output_xhtml.h"
 
 #include "support/Messages.h"
@@ -42,23 +43,16 @@ namespace Alert {
        {
                cerr << to_utf8(title) << "\n" << to_utf8(message) << endl;
        }
-}
-}
+} // namespace Alert
+} // namespace frontend
 
 
 //
-// Dummy verbose support
+// Required global variables
 //
 
 bool verbose = false;
-
-
-//
-// Dummy LyXRC support
-//
-
-
-class LyXRC {} lyxrc;
+LyXRC lyxrc;
 
 
 //
@@ -83,7 +77,12 @@ Messages const & getGuiMessages()
 // Dummy formats support (needed by Lexer)
 //
 
-Formats formats;
+
+Formats & theFormats()
+{
+       static Formats dummy_formats;
+       return dummy_formats;
+}
 
 bool Formats::isZippedFile(support::FileName const&) const
 {
@@ -107,22 +106,6 @@ string alignmentToCSS(LyXAlignment)
        return string();
 }
 
-//
-// Dummy FontMetrics (needed by Length)
-//
-
-namespace frontend {
-class FontMetrics {
-       int em() const { return 0; };
-};
-}
-
-class FontInfo;
-
-frontend::FontMetrics const & theFontMetrics(FontInfo const &) {
-       static frontend::FontMetrics dummy;
-       return dummy;
-}
 
 //
 // Keep the linker happy on Windows
@@ -131,4 +114,4 @@ frontend::FontMetrics const & theFontMetrics(FontInfo const &) {
 void lyx_exit(int)
 {}
 
-}
+} // namespace lyx