]> git.lyx.org Git - lyx.git/blob - src/tex2lyx/dummy_impl.cpp
Do not redefine a stripped-down LyXRC object.
[lyx.git] / src / tex2lyx / dummy_impl.cpp
1 /**
2  * \file dummy_impl.cpp
3  * This file is part of LyX, the document processor.
4  * Licence details can be found in the file COPYING.
5  *
6  * \author Jean-Marc Lasgouttes
7  *
8  * Full author contact details are available in file CREDITS.
9  */
10
11 /**
12  * This file contains dummy implementation of some methods that are
13  * needed byclasses used by tex2lyx. This allows to reduce the number
14  * of classes we have to link against.
15 */
16
17 // {[(
18
19 #include <config.h>
20
21 #include "Format.h"
22 #include "LaTeXFeatures.h"
23 #include "LyXRC.h"
24 #include "output_xhtml.h"
25
26 #include "support/Messages.h"
27
28 #include <iostream>
29
30 using namespace std;
31
32 namespace lyx {
33
34 //
35 // Dummy Alert support (needed by TextClass)
36 //
37
38
39 namespace frontend {
40 namespace Alert {
41         void warning(docstring const & title, docstring const & message,
42                                  bool const &)
43         {
44                 cerr << to_utf8(title) << "\n" << to_utf8(message) << endl;
45         }
46 } // namespace Alert
47 } // namespace frontend
48
49
50 //
51 // Dummy verbose support
52 //
53
54 bool verbose = false;
55
56
57 //
58 // Dummy LyXRC support
59 //
60
61
62 LyXRC::LyXRC() {}
63 LyXRC lyxrc;
64
65
66 //
67 // Dummy translation support (needed at many places)
68 //
69
70
71 Messages messages_;
72 Messages const & getMessages(string const &)
73 {
74         return messages_;
75 }
76
77
78 Messages const & getGuiMessages()
79 {
80         return messages_;
81 }
82
83
84 //
85 // Dummy formats support (needed by Lexer)
86 //
87
88
89 Formats & theFormats()
90 {
91         static Formats dummy_formats;
92         return dummy_formats;
93 }
94
95 bool Formats::isZippedFile(support::FileName const&) const
96 {
97         return false;
98 }
99
100
101 //
102 // Dummy features support (needed by ModuleList)
103 //
104
105
106 bool LaTeXFeatures::isAvailable(string const &)
107 {
108         return true;
109 }
110
111
112 string alignmentToCSS(LyXAlignment)
113 {
114         return string();
115 }
116
117
118 //
119 // Keep the linker happy on Windows
120 //
121
122 void lyx_exit(int)
123 {}
124
125 } // namespace lyx