]> git.lyx.org Git - lyx.git/blob - src/tex2lyx/dummy_impl.cpp
Make BufferView::singeParUpdate more robust
[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 by classes 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 "tex2lyx.h"
22 #include "LaTeXFeatures.h"
23 #include "LyXRC.h"
24 #include "output_xhtml.h"
25 #include "xml.h"
26
27 #include "support/Messages.h"
28
29 #include <iostream>
30
31 using namespace std;
32
33 namespace lyx {
34
35 //
36 // Dummy Alert support (needed by TextClass)
37 //
38
39
40 namespace frontend {
41 namespace Alert {
42         void warning(docstring const & title, docstring const & message, bool)
43         {
44                 warning_message(to_utf8(title) + "\n" + to_utf8(message));
45         }
46 } // namespace Alert
47 } // namespace frontend
48
49
50 //
51 // Required global variables
52 //
53
54 bool verbose = false;
55 LyXRC lyxrc;
56
57
58 //
59 // Dummy translation support (needed at many places)
60 //
61
62
63 Messages messages_;
64 Messages const & getMessages(string const &)
65 {
66         return messages_;
67 }
68
69
70 Messages const & getGuiMessages()
71 {
72         return messages_;
73 }
74
75
76 //
77 // Dummy features support (needed by ModuleList)
78 //
79
80
81 bool LaTeXFeatures::isAvailable(string const &)
82 {
83         return true;
84 }
85
86
87 string alignmentToCSS(LyXAlignment)
88 {
89         return string();
90 }
91
92
93 //
94 // Keep the linker happy on Windows
95 //
96
97 void lyx_exit(int)
98 {}
99
100 namespace xml {
101 docstring StartTag::writeTag() const { return docstring(); }
102 docstring StartTag::writeEndTag() const { return docstring(); }
103 }
104
105 } // namespace lyx