]> git.lyx.org Git - lyx.git/blob - src/tex2lyx/dummy_impl.cpp
Fix text direction issue for InsetInfo in RTL context
[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 "output_xhtml.h"
24
25 #include "support/Messages.h"
26
27 #include <iostream>
28
29 using namespace std;
30
31 namespace lyx {
32
33 //
34 // Dummy Alert support (needed by TextClass)
35 //
36
37
38 namespace frontend {
39 namespace Alert {
40         void warning(docstring const & title, docstring const & message,
41                                  bool const &)
42         {
43                 cerr << to_utf8(title) << "\n" << to_utf8(message) << endl;
44         }
45 } // namespace Alert
46 } // namespace frontend
47
48
49 //
50 // Dummy verbose support
51 //
52
53 bool verbose = false;
54
55
56 //
57 // Dummy LyXRC support
58 //
59
60
61 class LyXRC {} lyxrc;
62
63
64 //
65 // Dummy translation support (needed at many places)
66 //
67
68
69 Messages messages_;
70 Messages const & getMessages(string const &)
71 {
72         return messages_;
73 }
74
75
76 Messages const & getGuiMessages()
77 {
78         return messages_;
79 }
80
81
82 //
83 // Dummy formats support (needed by Lexer)
84 //
85
86
87 Formats & theFormats()
88 {
89         static Formats dummy_formats;
90         return dummy_formats;
91 }
92
93 bool Formats::isZippedFile(support::FileName const&) const
94 {
95         return false;
96 }
97
98
99 //
100 // Dummy features support (needed by ModuleList)
101 //
102
103
104 bool LaTeXFeatures::isAvailable(string const &)
105 {
106         return true;
107 }
108
109
110 string alignmentToCSS(LyXAlignment)
111 {
112         return string();
113 }
114
115
116 //
117 // Keep the linker happy on Windows
118 //
119
120 void lyx_exit(int)
121 {}
122
123 } // namespace lyx