X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ftex2lyx%2Fdummy_impl.cpp;h=c850cd97c113cfcf0b25b8f434378c4da82631bf;hb=9a1b26a156c913f484ca2293fb2ec1c4986d2a3e;hp=7807a7d2d8a3b965a6be678099d4235550c5b714;hpb=d4718b18b6b29a25aaa869c5f38b49eff20eafef;p=lyx.git diff --git a/src/tex2lyx/dummy_impl.cpp b/src/tex2lyx/dummy_impl.cpp index 7807a7d2d8..c850cd97c1 100644 --- a/src/tex2lyx/dummy_impl.cpp +++ b/src/tex2lyx/dummy_impl.cpp @@ -43,37 +43,17 @@ namespace Alert { { cerr << to_utf8(title) << "\n" << to_utf8(message) << endl; } -} -} - - -// -// Dummy TexRow support (needed by docstream) -// - - -void TexRow::newline() -{} - - -void TexRow::newlines(int) -{} +} // namespace Alert +} // namespace frontend // -// Dummy LyXRC support +// Required global variables // +bool verbose = false; LyXRC lyxrc; -/** Note that some variables are not initialized correctly. Hopefully - * they are not used in our code (currently valgrind does not complain). - * Linking against the full LyXRC.cpp forces us to pull too much - * stuff. - */ -LyXRC::LyXRC() -{} - // // Dummy translation support (needed at many places) @@ -97,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 { @@ -121,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 @@ -145,4 +114,4 @@ frontend::FontMetrics const & theFontMetrics(FontInfo const &) { void lyx_exit(int) {} -} +} // namespace lyx