2013-08-21 10:20:20 +00:00
|
|
|
/**
|
|
|
|
* \file dummy_impl.cpp
|
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
|
|
|
*
|
|
|
|
* \author Jean-Marc Lasgouttes
|
|
|
|
*
|
|
|
|
* Full author contact details are available in file CREDITS.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* This file contains dummy implementation of some methods that are
|
|
|
|
* needed byclasses used by tex2lyx. This allows to reduce the number
|
|
|
|
* of classes we have to link against.
|
|
|
|
*/
|
|
|
|
|
|
|
|
// {[(
|
|
|
|
|
|
|
|
#include <config.h>
|
|
|
|
|
|
|
|
#include "Format.h"
|
|
|
|
#include "LaTeXFeatures.h"
|
2013-08-21 10:45:00 +00:00
|
|
|
#include "output_xhtml.h"
|
2013-08-21 10:20:20 +00:00
|
|
|
|
|
|
|
#include "support/Messages.h"
|
|
|
|
|
|
|
|
#include <iostream>
|
|
|
|
|
|
|
|
using namespace std;
|
|
|
|
|
|
|
|
namespace lyx {
|
|
|
|
|
|
|
|
//
|
|
|
|
// Dummy Alert support (needed by TextClass)
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
|
|
namespace frontend {
|
|
|
|
namespace Alert {
|
|
|
|
void warning(docstring const & title, docstring const & message,
|
|
|
|
bool const &)
|
|
|
|
{
|
|
|
|
cerr << to_utf8(title) << "\n" << to_utf8(message) << endl;
|
|
|
|
}
|
2017-07-23 11:11:54 +00:00
|
|
|
} // namespace Alert
|
|
|
|
} // namespace frontend
|
2013-08-21 10:20:20 +00:00
|
|
|
|
|
|
|
|
2016-08-17 20:32:14 +00:00
|
|
|
//
|
|
|
|
// Dummy verbose support
|
|
|
|
//
|
|
|
|
|
|
|
|
bool verbose = false;
|
|
|
|
|
|
|
|
|
2013-08-21 10:20:20 +00:00
|
|
|
//
|
|
|
|
// Dummy LyXRC support
|
|
|
|
//
|
|
|
|
|
|
|
|
|
2017-03-08 15:30:22 +00:00
|
|
|
class LyXRC {} lyxrc;
|
2013-08-21 10:20:20 +00:00
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
// Dummy translation support (needed at many places)
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
|
|
Messages messages_;
|
|
|
|
Messages const & getMessages(string const &)
|
|
|
|
{
|
|
|
|
return messages_;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Messages const & getGuiMessages()
|
|
|
|
{
|
|
|
|
return messages_;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
// Dummy formats support (needed by Lexer)
|
|
|
|
//
|
|
|
|
|
2017-03-14 03:33:40 +00:00
|
|
|
|
2017-03-14 13:26:26 +00:00
|
|
|
Formats & theFormats()
|
2017-03-14 03:33:40 +00:00
|
|
|
{
|
|
|
|
static Formats dummy_formats;
|
|
|
|
return dummy_formats;
|
|
|
|
}
|
2013-08-21 10:20:20 +00:00
|
|
|
|
|
|
|
bool Formats::isZippedFile(support::FileName const&) const
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
// Dummy features support (needed by ModuleList)
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
|
|
bool LaTeXFeatures::isAvailable(string const &)
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2013-08-21 10:45:00 +00:00
|
|
|
string alignmentToCSS(LyXAlignment)
|
|
|
|
{
|
|
|
|
return string();
|
|
|
|
}
|
|
|
|
|
2015-03-26 15:55:19 +00:00
|
|
|
//
|
|
|
|
// Dummy FontMetrics (needed by Length)
|
|
|
|
//
|
|
|
|
|
2015-04-08 20:04:13 +00:00
|
|
|
namespace frontend {
|
2015-03-26 15:55:19 +00:00
|
|
|
class FontMetrics {
|
|
|
|
int em() const { return 0; };
|
|
|
|
};
|
2017-07-23 11:11:54 +00:00
|
|
|
} // namespace frontend
|
2015-03-26 15:55:19 +00:00
|
|
|
|
|
|
|
class FontInfo;
|
|
|
|
|
2015-04-08 20:04:13 +00:00
|
|
|
frontend::FontMetrics const & theFontMetrics(FontInfo const &) {
|
|
|
|
static frontend::FontMetrics dummy;
|
2015-03-26 15:55:19 +00:00
|
|
|
return dummy;
|
|
|
|
}
|
|
|
|
|
2013-08-21 10:20:20 +00:00
|
|
|
//
|
|
|
|
// Keep the linker happy on Windows
|
|
|
|
//
|
|
|
|
|
|
|
|
void lyx_exit(int)
|
|
|
|
{}
|
|
|
|
|
2017-07-23 11:11:54 +00:00
|
|
|
} // namespace lyx
|