mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-21 23:09:40 +00:00
distribute content sof tex-strings.cpp to their respective unique places of usage
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18130 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
47c5485a67
commit
40e4ab9bf3
@ -31,7 +31,6 @@
|
||||
#include "LyXRC.h"
|
||||
#include "TextClassList.h"
|
||||
#include "OutputParams.h"
|
||||
#include "tex-strings.h"
|
||||
#include "Spacing.h"
|
||||
#include "TexRow.h"
|
||||
#include "VSpace.h"
|
||||
@ -46,13 +45,6 @@
|
||||
|
||||
#include <sstream>
|
||||
|
||||
|
||||
namespace lyx {
|
||||
|
||||
using support::bformat;
|
||||
using support::rtrim;
|
||||
using support::tokenPos;
|
||||
|
||||
using std::endl;
|
||||
using std::string;
|
||||
using std::istringstream;
|
||||
@ -60,9 +52,45 @@ using std::ostream;
|
||||
using std::ostringstream;
|
||||
using std::pair;
|
||||
|
||||
namespace Alert = lyx::frontend::Alert;
|
||||
using lyx::support::bformat;
|
||||
using lyx::support::rtrim;
|
||||
using lyx::support::tokenPos;
|
||||
|
||||
|
||||
static char const * const string_paragraph_separation[] = {
|
||||
"indent", "skip", ""
|
||||
};
|
||||
|
||||
|
||||
static char const * const string_quotes_language[] = {
|
||||
"english", "swedish", "german", "polish", "french", "danish", ""
|
||||
};
|
||||
|
||||
|
||||
static char const * const string_papersize[] = {
|
||||
"default", "custom", "letterpaper", "executivepaper", "legalpaper",
|
||||
"a3paper", "a4paper", "a5paper", "b3paper", "b4paper", "b5paper", ""
|
||||
};
|
||||
|
||||
|
||||
static char const * const string_orientation[] = {
|
||||
"portrait", "landscape", ""
|
||||
};
|
||||
|
||||
|
||||
static char const * const string_footnotekinds[] = {
|
||||
"footnote", "margin", "fig", "tab", "alg", "wide-fig", "wide-tab", ""
|
||||
};
|
||||
|
||||
|
||||
static char const * const tex_graphics[] = {
|
||||
"default", "dvips", "dvitops", "emtex",
|
||||
"ln", "oztex", "textures", "none", ""
|
||||
};
|
||||
|
||||
|
||||
namespace lyx {
|
||||
|
||||
// Local translators
|
||||
namespace {
|
||||
|
||||
@ -441,7 +469,7 @@ string const BufferParams::readToken(Lexer & lex, string const & token)
|
||||
"class or style file required by it is not\n"
|
||||
"available. See the Customization documentation\n"
|
||||
"for more information.\n"), from_utf8(classname));
|
||||
Alert::warning(_("Document class not available"),
|
||||
frontend::Alert::warning(_("Document class not available"),
|
||||
msg + _("LyX will not be able to produce output."));
|
||||
}
|
||||
} else if (token == "\\begin_preamble") {
|
||||
|
@ -244,8 +244,6 @@ lyx_SOURCES = \
|
||||
TextClass.h \
|
||||
TextClassList.cpp \
|
||||
TextClassList.h \
|
||||
tex-strings.cpp \
|
||||
tex-strings.h \
|
||||
TextMetrics.cpp \
|
||||
TextMetrics.h \
|
||||
Thesaurus.cpp \
|
||||
|
@ -22,15 +22,12 @@
|
||||
#include "Lexer.h"
|
||||
#include "Text.h"
|
||||
#include "Paragraph.h"
|
||||
#include "tex-strings.h"
|
||||
|
||||
#include "support/lstrings.h"
|
||||
|
||||
#include <sstream>
|
||||
|
||||
namespace lyx {
|
||||
|
||||
using support::rtrim;
|
||||
using lyx::support::rtrim;
|
||||
|
||||
using std::istringstream;
|
||||
using std::ostream;
|
||||
@ -38,6 +35,13 @@ using std::ostringstream;
|
||||
using std::string;
|
||||
|
||||
|
||||
namespace lyx {
|
||||
|
||||
static char const * const string_align[] = {
|
||||
"block", "left", "right", "center", ""
|
||||
};
|
||||
|
||||
|
||||
static int findToken(char const * const str[], string const & search_token)
|
||||
{
|
||||
return search_token == "default" ?
|
||||
|
@ -25,7 +25,6 @@
|
||||
#include "Color.h"
|
||||
#include "OutputParams.h"
|
||||
#include "TextClassList.h"
|
||||
#include "tex-strings.h"
|
||||
|
||||
// FIXME: those two headers are needed because of the
|
||||
// WorkArea::redraw() call below.
|
||||
|
@ -34,7 +34,6 @@
|
||||
#include "Language.h"
|
||||
#include "LyXRC.h" // defaultUnit
|
||||
#include "TextClassList.h"
|
||||
#include "tex-strings.h" // tex_graphics
|
||||
#include "Spacing.h"
|
||||
|
||||
#include "controllers/ControlDocument.h"
|
||||
@ -54,6 +53,42 @@ using std::vector;
|
||||
using std::string;
|
||||
|
||||
|
||||
char const * const tex_graphics[] = {"default", "dvips", "dvitops", "emtex",
|
||||
"ln", "oztex", "textures", "none", ""
|
||||
};
|
||||
|
||||
|
||||
char const * const tex_fonts_roman[] = {"default", "cmr", "lmodern", "ae", "times", "palatino",
|
||||
"charter", "newcent", "bookman", "utopia", "beraserif", "ccfonts", "chancery", ""
|
||||
};
|
||||
|
||||
|
||||
char const * tex_fonts_roman_gui[] = { N_("Default"), N_("Computer Modern Roman"), N_("Latin Modern Roman"),
|
||||
N_("AE (Almost European)"), N_("Times Roman"), N_("Palatino"), N_("Bitstream Charter"),
|
||||
N_("New Century Schoolbook"), N_("Bookman"), N_("Utopia"), N_("Bera Serif"),
|
||||
N_("Concrete Roman"), N_("Zapf Chancery"), ""
|
||||
};
|
||||
|
||||
|
||||
char const * const tex_fonts_sans[] = {"default", "cmss", "lmss", "helvet", "avant", "berasans", "cmbr", ""
|
||||
};
|
||||
|
||||
|
||||
char const * tex_fonts_sans_gui[] = { N_("Default"), N_("Computer Modern Sans"), N_("Latin Modern Sans"),
|
||||
N_("Helvetica"), N_("Avant Garde"), N_("Bera Sans"), N_("CM Bright"), ""
|
||||
};
|
||||
|
||||
|
||||
char const * const tex_fonts_monospaced[] = {"default", "cmtt", "lmtt", "courier", "beramono",
|
||||
"luximono", "cmtl", ""
|
||||
};
|
||||
|
||||
|
||||
char const * tex_fonts_monospaced_gui[] = { N_("Default"), N_("Computer Modern Typewriter"),
|
||||
N_("Latin Modern Typewriter"), N_("Courier"), N_("Bera Mono"), N_("LuxiMono"),
|
||||
N_("CM Typewriter Light"), ""
|
||||
};
|
||||
|
||||
namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
|
@ -1,95 +0,0 @@
|
||||
/**
|
||||
* \file tex-strings.cpp
|
||||
* 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 <config.h>
|
||||
|
||||
#include "tex-strings.h"
|
||||
#include "gettext.h"
|
||||
|
||||
|
||||
namespace lyx {
|
||||
|
||||
|
||||
// this file should perhaps be split into even smaller parts
|
||||
|
||||
char const * const string_paragraph_separation[] = {
|
||||
"indent", "skip", ""
|
||||
};
|
||||
|
||||
|
||||
char const * const string_quotes_language[] = {
|
||||
"english", "swedish", "german", "polish", "french", "danish", ""
|
||||
};
|
||||
|
||||
|
||||
char const * const string_papersize[] = {
|
||||
"default", "custom", "letterpaper", "executivepaper", "legalpaper",
|
||||
"a3paper", "a4paper", "a5paper", "b3paper", "b4paper", "b5paper", ""
|
||||
};
|
||||
|
||||
|
||||
char const * const string_orientation[] = {
|
||||
"portrait", "landscape", ""
|
||||
};
|
||||
|
||||
|
||||
char const * const string_footnotekinds[] = {
|
||||
"footnote", "margin", "fig", "tab", "alg", "wide-fig", "wide-tab", ""
|
||||
};
|
||||
|
||||
|
||||
char const * const string_align[] = {
|
||||
"block", "left", "right", "center", ""
|
||||
};
|
||||
|
||||
|
||||
// The following was moved from tex-defs.h to here, because tex-defs.h is
|
||||
// used all over. As it happens, that meant that these strings were included
|
||||
// 27 times in the object file. (Asger)
|
||||
|
||||
char const * const tex_graphics[] = {"default", "dvips", "dvitops", "emtex",
|
||||
"ln", "oztex", "textures", "none", ""
|
||||
};
|
||||
|
||||
|
||||
char const * const tex_fonts_roman[] = {"default", "cmr", "lmodern", "ae", "times", "palatino",
|
||||
"charter", "newcent", "bookman", "utopia", "beraserif", "ccfonts", "chancery", ""
|
||||
};
|
||||
|
||||
|
||||
char const * tex_fonts_roman_gui[] = { N_("Default"), N_("Computer Modern Roman"), N_("Latin Modern Roman"),
|
||||
N_("AE (Almost European)"), N_("Times Roman"), N_("Palatino"), N_("Bitstream Charter"),
|
||||
N_("New Century Schoolbook"), N_("Bookman"), N_("Utopia"), N_("Bera Serif"),
|
||||
N_("Concrete Roman"), N_("Zapf Chancery"), ""
|
||||
};
|
||||
|
||||
|
||||
char const * const tex_fonts_sans[] = {"default", "cmss", "lmss", "helvet", "avant", "berasans", "cmbr", ""
|
||||
};
|
||||
|
||||
|
||||
char const * tex_fonts_sans_gui[] = { N_("Default"), N_("Computer Modern Sans"), N_("Latin Modern Sans"),
|
||||
N_("Helvetica"), N_("Avant Garde"), N_("Bera Sans"), N_("CM Bright"), ""
|
||||
};
|
||||
|
||||
|
||||
char const * const tex_fonts_monospaced[] = {"default", "cmtt", "lmtt", "courier", "beramono",
|
||||
"luximono", "cmtl", ""
|
||||
};
|
||||
|
||||
|
||||
char const * tex_fonts_monospaced_gui[] = { N_("Default"), N_("Computer Modern Typewriter"),
|
||||
N_("Latin Modern Typewriter"), N_("Courier"), N_("Bera Mono"), N_("LuxiMono"),
|
||||
N_("CM Typewriter Light"), ""
|
||||
};
|
||||
|
||||
|
||||
} // namespace lyx
|
@ -1,54 +0,0 @@
|
||||
// -*- C++ -*-
|
||||
/**
|
||||
* \file tex-strings.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 TEX_STRINGS
|
||||
#define TEX_STRINGS
|
||||
|
||||
namespace lyx {
|
||||
|
||||
///
|
||||
extern char const * const string_paragraph_separation[];
|
||||
///
|
||||
extern char const * const string_quotes_language[];
|
||||
///
|
||||
extern char const * const string_papersize[];
|
||||
///
|
||||
extern char const * const string_orientation[];
|
||||
///
|
||||
extern char const * const string_footnotekinds[];
|
||||
///
|
||||
extern char const * const string_align[];
|
||||
|
||||
// The following was moved from tex-defs.h to here, because tex-defs.h is
|
||||
// used all over. As it happens, that meant that these strings were included
|
||||
// 27 times in the object file. (Asger)
|
||||
|
||||
///
|
||||
extern char const * const tex_graphics[];
|
||||
|
||||
///
|
||||
extern char const * const tex_fonts_roman[];
|
||||
///
|
||||
extern char const * tex_fonts_roman_gui[];
|
||||
///
|
||||
extern char const * const tex_fonts_sans[];
|
||||
///
|
||||
extern char const * tex_fonts_sans_gui[];
|
||||
///
|
||||
extern char const * const tex_fonts_monospaced[];
|
||||
///
|
||||
extern char const * tex_fonts_monospaced_gui[];
|
||||
|
||||
|
||||
} // namespace lyx
|
||||
|
||||
#endif
|
Loading…
x
Reference in New Issue
Block a user