From: Angus Leeming Date: Sat, 26 Jul 2003 00:17:21 +0000 (+0000) Subject: Forgotten files ;-) X-Git-Tag: 1.6.10~16468 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=399e7da435f0b971f309975d1cdcf934aca01cd6;p=lyx.git Forgotten files ;-) git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7363 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/tex2lyx/Spacing.h b/src/tex2lyx/Spacing.h new file mode 100644 index 0000000000..6138139957 --- /dev/null +++ b/src/tex2lyx/Spacing.h @@ -0,0 +1,29 @@ +// -*- C++ -*- +/** + * \file Spacing.h + * This file is part of LyX, the document processor. + * Licence details can be found in the file COPYING. + * + * \author Angus Leeming + * + * Full author contact details are available in file CREDITS + */ + +#ifndef SPACING_H +#define SPACING_H + +class Spacing { +public: + /// + enum Space { + Single, + Onehalf, + Double, + Other, + Default + }; + + void set(Spacing::Space, float = 1.0) {} +}; + +#endif // NOT SPACING_H diff --git a/src/tex2lyx/gettext.C b/src/tex2lyx/gettext.C new file mode 100644 index 0000000000..22a98a9953 --- /dev/null +++ b/src/tex2lyx/gettext.C @@ -0,0 +1,23 @@ +/** + * \file gettext.C + * This file is part of LyX, the document processor. + * Licence details can be found in the file COPYING. + * + * \author Lars Gullik Bjønnes + * \author Jean-Marc Lasgouttes + * + * Full author contact details are available in file CREDITS + */ + +#include + +#include "gettext.h" + +string const _(string const & str) +{ + return str; +} + + +void locale_init() +{} diff --git a/src/tex2lyx/gettext.h b/src/tex2lyx/gettext.h new file mode 100644 index 0000000000..2b4b3513a4 --- /dev/null +++ b/src/tex2lyx/gettext.h @@ -0,0 +1,25 @@ +// -*- C++ -*- +/** + * \file gettext.h + * This file is part of LyX, the document processor. + * Licence details can be found in the file COPYING. + * + * \author Lars Gullik Bjønnes + * \author Jean-Marc Lasgouttes + * + * Full author contact details are available in file CREDITS + */ +#ifndef GETTEXT_H +#define GETTEXT_H + +#include "LString.h" + +/// +string const _(string const &); + +#define N_(str) (str) // for detecting static strings + +/// +void locale_init(); + +#endif diff --git a/src/tex2lyx/lyxfont.C b/src/tex2lyx/lyxfont.C new file mode 100644 index 0000000000..f58fe16f4f --- /dev/null +++ b/src/tex2lyx/lyxfont.C @@ -0,0 +1,50 @@ +/** + * \file lyxfont.C + * This file is part of LyX, the document processor. + * Licence details can be found in the file COPYING. + * + * \author Angus Leeming + * + * Full author contact details are available in file CREDITS + */ + +#include + +#include "lyxfont.h" +#include "lyxlex.h" +#include "support/lstrings.h" + +using namespace lyx::support; + + +LyXFont & LyXFont::lyxRead(LyXLex & lex) +{ + bool error = false; + bool finished = false; + while (!finished && lex.isOK() && !error) { + lex.next(); + string const tok = ascii_lowercase(lex.getString()); + + if (tok.empty()) { + continue; + } else if (tok == "endfont") { + finished = true; + } else if (tok == "family") { + lex.next(); + } else if (tok == "series") { + lex.next(); + } else if (tok == "shape") { + lex.next(); + } else if (tok == "size") { + lex.next(); + } else if (tok == "misc") { + lex.next(); + } else if (tok == "color") { + lex.next(); + } else { + lex.printError("Unknown tag `$$Token'"); + error = true; + } + } + return *this; +} diff --git a/src/tex2lyx/lyxfont.h b/src/tex2lyx/lyxfont.h new file mode 100644 index 0000000000..1f7bd5a413 --- /dev/null +++ b/src/tex2lyx/lyxfont.h @@ -0,0 +1,33 @@ +// -*- C++ -*- +/** + * \file lyxfont.h + * This file is part of LyX, the document processor. + * Licence details can be found in the file COPYING. + * + * \author Angus Leeming + * + * Full author contact details are available in file CREDITS + */ + +#ifndef LYXFONT_H +#define LYXFONT_H + +class LyXLex; + +class LyXFont { +public: + /// Trick to overload constructor and make it megafast + enum FONT_INIT1 { ALL_INHERIT }; + enum FONT_INIT3 { ALL_SANE }; + + LyXFont() {} + explicit LyXFont(LyXFont::FONT_INIT1) {} + explicit LyXFont(LyXFont::FONT_INIT3) {} + + LyXFont & lyxRead(LyXLex &); + + LyXFont & realize(LyXFont const &) { return *this; } + bool resolved() const { return true; } +}; + +#endif // NOT LYXFONT_H