mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-26 14:15:32 +00:00
fix off-by-one-error with paperpackage selection
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8824 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
a5bf3f142f
commit
1cd14974e1
@ -1,3 +1,12 @@
|
||||
2004-06-27 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
|
||||
|
||||
* tex-strings.C: add "none" to string_paperpackages[], fixes
|
||||
off-by-one-error in the paperpackage selection.
|
||||
|
||||
* lyxlex.[Ch]:
|
||||
* tex-strings.[Ch]: char const * string[n]
|
||||
-> char const * const string[]
|
||||
|
||||
2004-06-10 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
|
||||
|
||||
* lyxfunc.C (getStatus): if lyx_gui::getStatus disables the
|
||||
|
@ -557,7 +557,7 @@ void BufferParams::writeFile(ostream & os) const
|
||||
cite_engine_str = "jurabib";
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
os << "\\papersize " << string_papersize[papersize2]
|
||||
<< "\n\\paperpackage " << string_paperpackages[paperpackage]
|
||||
<< "\n\\use_geometry " << use_geometry
|
||||
|
@ -231,7 +231,7 @@ void LyXLex::pushToken(string const & pt)
|
||||
}
|
||||
|
||||
|
||||
int LyXLex::findToken(char const * str[])
|
||||
int LyXLex::findToken(char const * const str[])
|
||||
{
|
||||
if (!next()) {
|
||||
pimpl_->printError("file ended while scanning string token");
|
||||
|
@ -112,7 +112,7 @@ public:
|
||||
///
|
||||
bool eatLine();
|
||||
///
|
||||
int findToken(char const * str[]);
|
||||
int findToken(char const * const str[]);
|
||||
|
||||
/// Pushes a token list on a stack and replaces it with a new one.
|
||||
void pushTable(keyword_item *, int);
|
||||
|
@ -16,38 +16,38 @@
|
||||
|
||||
// this file should perhaps be split into even smaller parts
|
||||
|
||||
char const * string_paragraph_separation[3] = {
|
||||
char const * const string_paragraph_separation[] = {
|
||||
"indent", "skip", ""
|
||||
};
|
||||
|
||||
|
||||
char const * string_quotes_language[7] = {
|
||||
char const * const string_quotes_language[] = {
|
||||
"english", "swedish", "german", "polish", "french", "danish", ""
|
||||
};
|
||||
|
||||
|
||||
char const * string_papersize[12] = {
|
||||
char const * const string_papersize[] = {
|
||||
"Default", "Custom", "letterpaper", "executivepaper", "legalpaper",
|
||||
"a3paper", "a4paper", "a5paper", "b3paper", "b4paper", "b5paper", ""
|
||||
};
|
||||
|
||||
|
||||
char const * string_paperpackages[4] = {
|
||||
"a4", "a4wide", "widemarginsa4", ""
|
||||
char const * const string_paperpackages[] = {
|
||||
"none", "a4", "a4wide", "widemarginsa4", ""
|
||||
};
|
||||
|
||||
|
||||
char const * string_orientation[3] = {
|
||||
char const * const string_orientation[] = {
|
||||
"portrait", "landscape", ""
|
||||
};
|
||||
|
||||
|
||||
char const * string_footnotekinds[8] = {
|
||||
char const * const string_footnotekinds[] = {
|
||||
"footnote", "margin", "fig", "tab", "alg", "wide-fig", "wide-tab", ""
|
||||
};
|
||||
|
||||
|
||||
char const * string_align[5] = {
|
||||
char const * const string_align[] = {
|
||||
"block", "left", "right", "center", ""
|
||||
};
|
||||
|
||||
@ -56,9 +56,9 @@ char const * string_align[5] = {
|
||||
// used all over. As it happens, that meant that these strings were included
|
||||
// 27 times in the object file. (Asger)
|
||||
|
||||
char const * tex_graphics[] = {"default", "dvips", "dvitops", "emtex",
|
||||
char const * const tex_graphics[] = {"default", "dvips", "dvitops", "emtex",
|
||||
"ln", "oztex", "textures", "none", ""};
|
||||
|
||||
|
||||
char const * tex_fonts[] = {"default", "ae", "pslatex", "times", "palatino",
|
||||
char const * const tex_fonts[] = {"default", "ae", "pslatex", "times", "palatino",
|
||||
"helvet", "avant", "newcent", "bookman", ""};
|
||||
|
@ -16,28 +16,28 @@
|
||||
// this file should perhaps be split into even smaler parts
|
||||
|
||||
///
|
||||
extern char const * string_paragraph_separation[];
|
||||
extern char const * const string_paragraph_separation[];
|
||||
///
|
||||
extern char const * string_quotes_language[];
|
||||
extern char const * const string_quotes_language[];
|
||||
///
|
||||
extern char const * string_papersize[];
|
||||
extern char const * const string_papersize[];
|
||||
///
|
||||
extern char const * string_paperpackages[];
|
||||
extern char const * const string_paperpackages[];
|
||||
///
|
||||
extern char const * string_orientation[];
|
||||
extern char const * const string_orientation[];
|
||||
///
|
||||
extern char const * string_footnotekinds[];
|
||||
extern char const * const string_footnotekinds[];
|
||||
///
|
||||
extern char const * string_align[];
|
||||
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 * tex_graphics[];
|
||||
extern char const * const tex_graphics[];
|
||||
|
||||
///
|
||||
extern char const * tex_fonts[];
|
||||
extern char const * const tex_fonts[];
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user