]> git.lyx.org Git - lyx.git/blobdiff - src/tex2lyx/dummy_impl.cpp
FindAdv: Comments
[lyx.git] / src / tex2lyx / dummy_impl.cpp
index 6c8d13c3677cafa80014f6cb20e82a5a85b52a8b..79278f40a379f59312f4cf0d2a1f240ac921bad7 100644 (file)
@@ -42,8 +42,8 @@ namespace Alert {
        {
                cerr << to_utf8(title) << "\n" << to_utf8(message) << endl;
        }
-}
-}
+} // namespace Alert
+} // namespace frontend
 
 
 //
@@ -83,7 +83,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 +112,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 +120,4 @@ frontend::FontMetrics const & theFontMetrics(FontInfo const &) {
 void lyx_exit(int)
 {}
 
-}
+} // namespace lyx