mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-25 05:55:34 +00:00
some source cleanup from John
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1654 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
b429849306
commit
bf6b9d1e18
@ -1,3 +1,7 @@
|
||||
2001-03-01 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
|
||||
|
||||
* templates/g-brief-de.lyx: fix typo.
|
||||
|
||||
2001-02-16 John Levon <moz@compsoc.man.ac.uk>
|
||||
|
||||
* reLyX/Makefile.am: fix uninstall
|
||||
|
@ -103,7 +103,7 @@ today
|
||||
Sehr geehrter Herr Beispiel,
|
||||
\layout Gruss
|
||||
|
||||
Mit freunlichen Grüßen,
|
||||
Mit freundlichen Grüßen,
|
||||
\layout Brieftext
|
||||
|
||||
seit der siebten Mieterhöhung im laufenden Jahr konnte ich keinen Zahlungseingan
|
||||
|
@ -1,5 +1,24 @@
|
||||
2001-02-23 John Levon <moz@compsoc.man.ac.uk>
|
||||
|
||||
* lyx_main.C: add ISO_Left_Tab as bind synonym for Tab
|
||||
|
||||
* stl_string_fwd.h: add comment
|
||||
|
||||
* lyx_gui_misc.C: killed ALWAYS_CLOSE_MATH_PANELS
|
||||
|
||||
* tabular.h:
|
||||
* tabular.C: remove unused DocBook methods
|
||||
|
||||
* intl.C:
|
||||
* language.C:
|
||||
* paragraph.C:
|
||||
* buffer.C:
|
||||
killed DO_USE_DEFAULT_LANGUAGE
|
||||
|
||||
2001-03-01 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
|
||||
|
||||
* lyx_gui.C: do not include language.h.
|
||||
|
||||
* bufferview_funcs.C (ToggleAndShow): do not provide optional
|
||||
arguments in function implementation.
|
||||
|
||||
|
12
src/buffer.C
12
src/buffer.C
@ -1678,9 +1678,6 @@ void Buffer::makeLaTeXFile(string const & fname,
|
||||
features.UsedLanguages.insert(default_language);
|
||||
|
||||
if (lyxrc.language_use_babel ||
|
||||
#ifdef DO_USE_DEFAULT_LANGUAGE
|
||||
params.language->lang() != "default" ||
|
||||
#endif
|
||||
params.language->lang() != lyxrc.default_language ||
|
||||
!features.UsedLanguages.empty()) {
|
||||
use_babel = true;
|
||||
@ -2001,11 +1998,8 @@ void Buffer::makeLaTeXFile(string const & fname,
|
||||
texrow.newline();
|
||||
} // only_body
|
||||
lyxerr.debug() << "preamble finished, now the body." << endl;
|
||||
#ifdef DO_USE_DEFAULT_LANGUAGE
|
||||
if (!lyxrc.language_auto_begin && params.language->lang() != "default") {
|
||||
#else
|
||||
|
||||
if (!lyxrc.language_auto_begin) {
|
||||
#endif
|
||||
ofs << subst(lyxrc.language_command_begin, "$$lang",
|
||||
params.language->babel())
|
||||
<< endl;
|
||||
@ -2018,11 +2012,7 @@ void Buffer::makeLaTeXFile(string const & fname,
|
||||
ofs << endl;
|
||||
texrow.newline();
|
||||
|
||||
#ifdef DO_USE_DEFAULT_LANGUAGE
|
||||
if (!lyxrc.language_auto_end && params.language->lang() != "default") {
|
||||
#else
|
||||
if (!lyxrc.language_auto_end) {
|
||||
#endif
|
||||
ofs << subst(lyxrc.language_command_end, "$$lang",
|
||||
params.language->babel())
|
||||
<< endl;
|
||||
|
@ -289,12 +289,7 @@ void Intl::InitKeyMapper(bool on)
|
||||
fl_end_form();
|
||||
|
||||
int n = 0;
|
||||
// Default is not in the language map
|
||||
#ifdef DO_USE_DEFAULT_LANGUAGE
|
||||
Language->addto("default");
|
||||
Language2->addto("default");
|
||||
++n;
|
||||
#endif
|
||||
|
||||
for (Languages::const_iterator cit = languages.begin();
|
||||
cit != languages.end(); ++cit) {
|
||||
Language->addto((*cit).second.lang());
|
||||
|
@ -76,11 +76,6 @@ void Languages::read(string const & filename)
|
||||
encoding, code, latex_options);
|
||||
}
|
||||
|
||||
#ifdef DO_USE_DEFAULT_LANGUAGE
|
||||
languagelist["default"] = Language("default", "default",
|
||||
N_("Document wide language"),
|
||||
false, &iso8859_1, "");
|
||||
#endif
|
||||
default_language = getLanguage(lyxrc.default_language);
|
||||
if (!default_language) {
|
||||
lyxerr << "Default language \"" << lyxrc.default_language
|
||||
|
@ -38,7 +38,6 @@
|
||||
#include "lyxlookup.h"
|
||||
#endif
|
||||
#include "bufferlist.h"
|
||||
#include "language.h"
|
||||
#include "ColorHandler.h"
|
||||
#include "frontends/Dialogs.h"
|
||||
#include "frontends/GUIRunTime.h"
|
||||
|
@ -151,7 +151,6 @@ void updateAllVisibleBufferRelatedDialogs(bool)
|
||||
{
|
||||
if (current_view->buffer() && current_view->buffer()->isReadonly()) {
|
||||
// a little crude perhaps but it works. ARRae
|
||||
#ifndef ALWAYS_CLOSE_MATH_PANELS
|
||||
// The math popups should be closed only if we switch
|
||||
// to a readonly buffer
|
||||
if (fd_panel) {
|
||||
@ -179,40 +178,7 @@ void updateAllVisibleBufferRelatedDialogs(bool)
|
||||
fl_hide_form(fd_matrix->matrix);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// We have either changed buffers or changed the readonly status
|
||||
// so the safest thing to do is hide all inset popups that
|
||||
// are editting insets from the previous buffer or aren't
|
||||
// allowed in readonly docs.
|
||||
#ifdef ALWAYS_CLOSE_MATH_PANELS
|
||||
if (fd_panel) {
|
||||
if (fd_panel->panel->visible) {
|
||||
fl_hide_form(fd_panel->panel);
|
||||
}
|
||||
}
|
||||
if (fd_delim) {
|
||||
if (fd_delim->delim->visible) {
|
||||
fl_hide_form(fd_delim->delim);
|
||||
}
|
||||
}
|
||||
if (fd_deco) {
|
||||
if (fd_deco->deco->visible) {
|
||||
fl_hide_form(fd_deco->deco);
|
||||
}
|
||||
}
|
||||
if (fd_space) {
|
||||
if (fd_space->space->visible) {
|
||||
fl_hide_form(fd_space->space);
|
||||
}
|
||||
}
|
||||
if (fd_matrix) {
|
||||
if (fd_matrix->matrix->visible) {
|
||||
fl_hide_form(fd_matrix->matrix);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
HideFiguresPopups();
|
||||
}
|
||||
|
||||
|
@ -467,6 +467,7 @@ void LyX::defaultKeyBindings(kb_keymap * kbmap)
|
||||
kbmap->bind("Down", LFUN_DOWN);
|
||||
|
||||
kbmap->bind("Tab", LFUN_TAB);
|
||||
kbmap->bind("ISO_Left_Tab", LFUN_TAB); // jbl 2001-23-02
|
||||
|
||||
kbmap->bind("Home", LFUN_HOME);
|
||||
kbmap->bind("End", LFUN_END);
|
||||
@ -505,6 +506,7 @@ void LyX::defaultKeyBindings(kb_keymap * kbmap)
|
||||
|
||||
kbmap->bind("C-Tab", LFUN_TABINSERT); // ale970515
|
||||
kbmap->bind("S-Tab", LFUN_SHIFT_TAB); // jug20000522
|
||||
kbmap->bind("S-ISO_Left_Tab", LFUN_SHIFT_TAB); // jbl 2001-23-02
|
||||
}
|
||||
|
||||
|
||||
|
@ -3923,17 +3923,9 @@ LyXParagraph::getParLanguage(BufferParams const & bparams) const
|
||||
return FirstPhysicalPar()->getParLanguage(bparams);
|
||||
else
|
||||
#endif
|
||||
if (size() > 0) {
|
||||
#ifdef DO_USE_DEFAULT_LANGUAGE
|
||||
Language const * lang = GetFirstFontSettings().language();
|
||||
|
||||
if (lang->lang() == "default")
|
||||
return bparams.language;
|
||||
return lang;
|
||||
#else
|
||||
if (size() > 0)
|
||||
return GetFirstFontSettings().language();
|
||||
#endif
|
||||
} else if (previous)
|
||||
else if (previous)
|
||||
return previous->getParLanguage(bparams);
|
||||
else
|
||||
return bparams.language;
|
||||
|
@ -12,6 +12,10 @@
|
||||
#ifndef LYX_STL_STRING_FWD_H
|
||||
#define LYX_STL_STRING_FWD_H
|
||||
|
||||
/*
|
||||
* This file exists to appease STLPort when using included lyxstring.
|
||||
* It won't be around forever ...
|
||||
*/
|
||||
|
||||
#ifndef USE_INCLUDED_STRING
|
||||
// include the real stl_string_fwd.h
|
||||
|
161
src/tabular.C
161
src/tabular.C
@ -1566,167 +1566,6 @@ void LyXTabular::OldFormatRead(LyXLex & lex, string const & fl)
|
||||
}
|
||||
|
||||
|
||||
string const LyXTabular::GetDocBookAlign(int cell, bool isColumn) const
|
||||
{
|
||||
int const i = isColumn ? cell : column_of_cell(cell);
|
||||
|
||||
if (!isColumn && IsMultiColumn(cell)) {
|
||||
if (!cellinfo_of_cell(cell)->align_special.empty()) {
|
||||
return cellinfo_of_cell(cell)->align_special;
|
||||
} else {
|
||||
switch (GetAlignment(cell)) {
|
||||
case LYX_ALIGN_LEFT:
|
||||
return "left";
|
||||
case LYX_ALIGN_RIGHT:
|
||||
return "right";
|
||||
default:
|
||||
return "center";
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (!column_info[i].align_special.empty()) {
|
||||
return column_info[i].align_special;
|
||||
}
|
||||
#ifdef IGNORE_THIS_FOR_NOW
|
||||
else if (!column_info[i].p_width.empty()) {
|
||||
file += "p{";
|
||||
file += column_info[i].p_width;
|
||||
file += '}';
|
||||
}
|
||||
#endif
|
||||
else {
|
||||
switch (column_info[i].alignment) {
|
||||
case LYX_ALIGN_LEFT:
|
||||
return "left";
|
||||
case LYX_ALIGN_RIGHT:
|
||||
return "right";
|
||||
default:
|
||||
return "center";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// cell <0 will tex the preamble
|
||||
// returns the number of printed newlines
|
||||
int LyXTabular::DocBookEndOfCell(ostream & os, int cell, int & depth) const
|
||||
{
|
||||
int ret = 0;
|
||||
if (IsLastCell(cell)) {
|
||||
os << newlineAndDepth(--depth)
|
||||
<< "</ENTRY>"
|
||||
<< newlineAndDepth(--depth)
|
||||
<< "</ROW>"
|
||||
<< newlineAndDepth(--depth)
|
||||
<< "</TBODY>"
|
||||
<< newlineAndDepth(--depth);
|
||||
if (is_long_tabular)
|
||||
os << "</TGROUP>";
|
||||
else
|
||||
os << "</TGROUP>"
|
||||
<< newlineAndDepth(--depth);
|
||||
ret += 4;
|
||||
} else {
|
||||
if (cell < 0) {
|
||||
// preamble
|
||||
if (is_long_tabular)
|
||||
os << "<TGROUP ";
|
||||
else
|
||||
os << "<TGROUP ";
|
||||
os << "COLS='"
|
||||
<< columns_
|
||||
<< "' COLSEP='1' ROWSEP='1'>"
|
||||
<< newlineAndDepth(++depth);
|
||||
++ret;
|
||||
for (int i = 0; i < columns_; ++i) {
|
||||
os << "<COLSPEC ALIGN='"
|
||||
<< GetDocBookAlign(i, true)
|
||||
<< "' COLNAME='col"
|
||||
<< i + 1
|
||||
<< "' COLNUM='"
|
||||
<< i + 1
|
||||
<< "' COLSEP='";
|
||||
if (i == (columns_-1)) {
|
||||
os << '1';
|
||||
} else {
|
||||
if (column_info[i].right_line ||
|
||||
column_info[i+1].left_line)
|
||||
os << '1';
|
||||
else
|
||||
os << '0';
|
||||
}
|
||||
os << "'>"
|
||||
<< newlineAndDepth(depth);
|
||||
++ret;
|
||||
#ifdef NOT_HANDLED_YET_AS_I_DONT_KNOW_HOW
|
||||
if (column_info[i].left_line)
|
||||
os << '|';
|
||||
#endif
|
||||
}
|
||||
os << "<TBODY>"
|
||||
<< newlineAndDepth(++depth)
|
||||
<< "<ROW>"
|
||||
<< newlineAndDepth(++depth)
|
||||
<< "<ENTRY ALIGN='"
|
||||
<< GetDocBookAlign(0)
|
||||
<< "'";
|
||||
if (IsMultiColumn(0)) {
|
||||
os << " NAMEST='col1' NAMEEND='col"
|
||||
<< cells_in_multicolumn(0)
|
||||
<< "'";
|
||||
}
|
||||
os << ">"
|
||||
<< newlineAndDepth(++depth);
|
||||
ret += 3;
|
||||
} else {
|
||||
if (IsLastCellInRow(cell)) {
|
||||
os << newlineAndDepth(--depth)
|
||||
<< "</ENTRY>"
|
||||
<< newlineAndDepth(--depth)
|
||||
<< "</ROW>"
|
||||
<< newlineAndDepth(depth)
|
||||
<< "<ROW>"
|
||||
<< newlineAndDepth(++depth)
|
||||
<< "<ENTRY ALIGN='"
|
||||
<< GetDocBookAlign(cell + 1)
|
||||
<< "' VALIGN='middle'";
|
||||
if (IsMultiColumn(cell + 1)) {
|
||||
os << " NAMEST='col"
|
||||
<< column_of_cell(cell + 1) + 1
|
||||
<< "' NAMEEND='col"
|
||||
<< column_of_cell(cell + 1) +
|
||||
cells_in_multicolumn(cell + 1)
|
||||
<< "'";
|
||||
}
|
||||
os << ">"
|
||||
<< newlineAndDepth(++depth);
|
||||
ret += 4;
|
||||
} else {
|
||||
os << newlineAndDepth(--depth)
|
||||
<< "</ENTRY>"
|
||||
<< newlineAndDepth(depth)
|
||||
<< "<ENTRY ALIGN='"
|
||||
<< GetDocBookAlign(cell + 1)
|
||||
<< "' VALIGN='middle'";
|
||||
if (IsMultiColumn(cell + 1)) {
|
||||
os << " NAMEST='col"
|
||||
<< column_of_cell(cell + 1) + 1
|
||||
<< "' NAMEEND='col"
|
||||
<< column_of_cell(cell + 1) +
|
||||
cells_in_multicolumn(cell + 1)
|
||||
<< "'";
|
||||
}
|
||||
os << ">"
|
||||
<< newlineAndDepth(++depth);
|
||||
ret += 3;
|
||||
}
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
bool LyXTabular::IsMultiColumn(int cell, bool real) const
|
||||
{
|
||||
return ((!real || (column_of_cell(cell) != right_column_of_cell(cell))) &&
|
||||
|
@ -292,15 +292,6 @@ public:
|
||||
int column, std::vector<unsigned int> const &) const;
|
||||
///
|
||||
int Ascii(Buffer const *, std::ostream &) const;
|
||||
///
|
||||
int DocBookEndOfCell(std::ostream &, int cell, int & depth) const;
|
||||
#if 0
|
||||
///
|
||||
int RoffEndOfCell(std::ostream &, int cell);
|
||||
#endif
|
||||
///
|
||||
string const GetDocBookAlign(int cell, bool isColumn = false) const;
|
||||
|
||||
///
|
||||
bool IsMultiColumn(int cell, bool real = false) const;
|
||||
///
|
||||
|
Loading…
Reference in New Issue
Block a user