X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ftex2lyx%2Fdummy_impl.cpp;h=15fbf8b3f36a0c13e46bbe59f287b904c3c8a6af;hb=639aa354448188f45e69d6bd1e0ef3dfcc938c5f;hp=9e9c3107292c563fc7286b4d3d2db4f9dc1aa10b;hpb=66fa801e74e1775b31008df548332436ce79e2e1;p=lyx.git diff --git a/src/tex2lyx/dummy_impl.cpp b/src/tex2lyx/dummy_impl.cpp index 9e9c310729..15fbf8b3f3 100644 --- a/src/tex2lyx/dummy_impl.cpp +++ b/src/tex2lyx/dummy_impl.cpp @@ -20,7 +20,6 @@ #include "Format.h" #include "LaTeXFeatures.h" -#include "LyXRC.h" #include "output_xhtml.h" #include "support/Messages.h" @@ -43,36 +42,23 @@ namespace Alert { { cerr << to_utf8(title) << "\n" << to_utf8(message) << endl; } -} -} +} // namespace Alert +} // namespace frontend // -// Dummy TexRow support (needed by docstream) +// Dummy verbose support // - -void TexRow::newline() -{} - - -void TexRow::newlines(int) -{} +bool verbose = false; // // Dummy LyXRC support // -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() -{} +class LyXRC {} lyxrc; // @@ -97,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 { @@ -125,15 +116,16 @@ string alignmentToCSS(LyXAlignment) // Dummy FontMetrics (needed by Length) // - +namespace frontend { class FontMetrics { int em() const { return 0; }; }; +} // namespace frontend class FontInfo; -FontMetrics const & theFontMetrics(FontInfo const &) { - static FontMetrics dummy; +frontend::FontMetrics const & theFontMetrics(FontInfo const &) { + static frontend::FontMetrics dummy; return dummy; } @@ -144,4 +136,4 @@ FontMetrics const & theFontMetrics(FontInfo const &) { void lyx_exit(int) {} -} +} // namespace lyx