]> git.lyx.org Git - lyx.git/blobdiff - src/tex2lyx/dummy_impl.cpp
Make undo action no-ops when the buffer is read-only
[lyx.git] / src / tex2lyx / dummy_impl.cpp
index 7807a7d2d8a3b965a6be678099d4235550c5b714..62436af5e67f112c158cb632742b82b7628db6cc 100644 (file)
 
 #include <config.h>
 
-#include "Format.h"
 #include "LaTeXFeatures.h"
 #include "LyXRC.h"
 #include "output_xhtml.h"
+#include "xml.h"
 
 #include "support/Messages.h"
 
@@ -38,42 +38,21 @@ namespace lyx {
 
 namespace frontend {
 namespace Alert {
-       void warning(docstring const & title, docstring const & message,
-                                bool const &)
+       void warning(docstring const & title, docstring const & message, bool)
        {
                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)
@@ -93,18 +72,6 @@ Messages const & getGuiMessages()
 }
 
 
-//
-// Dummy formats support (needed by Lexer)
-//
-
-Formats formats;
-
-bool Formats::isZippedFile(support::FileName const&) const
-{
-       return false;
-}
-
-
 //
 // Dummy features support (needed by ModuleList)
 //
@@ -121,22 +88,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 +96,11 @@ frontend::FontMetrics const & theFontMetrics(FontInfo const &) {
 void lyx_exit(int)
 {}
 
+namespace xml {
+docstring StartTag::writeTag() const { return docstring(); }
+docstring StartTag::writeEndTag() const { return docstring(); }
+bool StartTag::operator==(FontTag const & rhs) const { return rhs == *this; }
+bool FontTag::operator==(StartTag const & tag) const { FontTag const * const ftag = tag.asFontTag(); if (!ftag) return false; return (font_type_ == ftag->font_type_); }
 }
+
+} // namespace lyx