From d74498be25d620d7874002aff6ea65595b6afaf4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Lars=20Gullik=20Bj=C3=B8nnes?= Date: Mon, 12 Feb 2001 16:41:27 +0000 Subject: [PATCH] remove some commented code git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1491 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/ChangeLog | 4 + src/tabular.C | 322 +------------------------------------------------- 2 files changed, 5 insertions(+), 321 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index f7eed40965..6b8a1aad4e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2001-02-12 Lars Gullik Bjønnes + + * tabular.C: remove some commented code. + 2001-02-12 John Levon * BufferView_pimpl.C: call hideSplash() diff --git a/src/tabular.C b/src/tabular.C index f38c41a0cc..7f98e397f6 100644 --- a/src/tabular.C +++ b/src/tabular.C @@ -943,65 +943,6 @@ string const write_attribute(string const & name, bool value) #endif -// #if 0 -// static inline -// string const type2string(LyXAlignment num) -// { -// switch(num) { -// case LYX_ALIGN_NONE: -// return "none"; -// case LYX_ALIGN_BLOCK: -// return "block"; -// case LYX_ALIGN_LEFT: -// return "left"; -// case LYX_ALIGN_CENTER: -// return "center"; -// case LYX_ALIGN_RIGHT: -// return "right"; -// case LYX_ALIGN_LAYOUT: -// return "layout"; -// case LYX_ALIGN_SPECIAL: -// return "special"; -// } -// return string(); -// } - - -// static inline -// string const type2string(LyXTabular::VAlignment num) -// { -// switch(num) { -// case LyXTabular::LYX_VALIGN_TOP: -// return "top"; -// case LyXTabular::LYX_VALIGN_CENTER: -// return "center"; -// case LyXTabular::LYX_VALIGN_BOTTOM: -// return "bottom"; -// } -// return string(); -// } - - -// static inline -// string const type2string(LyXTabular::BoxType num) -// { -// switch(num) { -// case LyXTabular::BOX_NONE: -// return "none"; -// case LyXTabular::BOX_PARBOX: -// return "parbox"; -// case LyXTabular::BOX_MINIPAGE: -// return "minipage"; -// } -// return string(); -// } - -// static inline -// string const type2string(bool flag) -// { -// return (flag ? "true" : "false"); -// } -// #else template<> inline string const tostr(LyXAlignment const & num) @@ -1057,17 +998,6 @@ string const tostr(LyXTabular::BoxType const & num) return string(); } -// We already have a function like this in lstring.h (Lgb) -//string const type2string(bool flag) -//{ -// return (flag ? "true" : "false"); -//} - - -//#endif - - - void LyXTabular::Write(Buffer const * buf, ostream & os) const { @@ -1079,13 +1009,8 @@ void LyXTabular::Write(Buffer const * buf, ostream & os) const << ">\n"; // global longtable options os << "\n"; for (int j = 0; j < columns_; ++j) { os << "\n"; for (int j = 0; j < columns_; ++j) { #if 0 if (!i) { os << "\n"; @@ -1272,9 +1165,6 @@ bool getTokenValue(string const & str, const char * token, string & ret) } -//#define USE_OLD_READFORMAT - -//#ifndef USE_OLD_READFORMAT static bool getTokenValue(string const & str, const char * token, int & num) { @@ -1327,90 +1217,6 @@ bool getTokenValue(string const & str, const char * token, bool & flag) return string2type(tmp, flag); } -//#else - -// static -// bool getTokenValue(string const & str, const char * token, int & num) -// { -// string::size_type pos = str.find(token); -// char ch = str[pos + strlen(token)]; - -// if ((pos == string::npos) || (ch != '=')) -// return false; -// string ret; -// pos += strlen(token) + 1; -// ch = str[pos]; -// if ((ch != '"') && (ch != '\'')) { // only read till next space -// if (!isdigit(ch)) -// return false; -// ret += ch; -// } -// ++pos; -// while((pos < str.length() - 1) && isdigit(str[pos])) -// ret += str[pos++]; - -// num = strToInt(ret); -// return true; -// } - - -// static -// bool getTokenValue(string const & str, const char * token, LyXAlignment & num) -// { -// int tmp; -// bool const ret = getTokenValue(str, token, tmp); -// num = static_cast(tmp); -// return ret; -// } - - -// static -// bool getTokenValue(string const & str, const char * token, -// LyXTabular::VAlignment & num) -// { -// int tmp; -// bool const ret = getTokenValue(str, token, tmp); -// num = static_cast(tmp); -// return ret; -// } - - -// static -// bool getTokenValue(string const & str, const char * token, -// LyXTabular::BoxType & num) -// { -// int tmp; -// bool ret = getTokenValue(str, token, tmp); -// num = static_cast(tmp); -// return ret; -// } - - -// static -// bool getTokenValue(string const & str, const char * token, bool & flag) -// { -// string::size_type pos = str.find(token); -// char ch = str[pos + strlen(token)]; - -// if ((pos == string::npos) || (ch != '=')) -// return false; -// string ret; -// pos += strlen(token) + 1; -// ch = str[pos]; -// if ((ch != '"') && (ch != '\'')) { // only read till next space -// if (!isdigit(ch)) -// return false; -// ret += ch; -// } -// ++pos; -// while((pos < str.length() - 1) && isdigit(str[pos])) -// ret += str[pos++]; - -// flag = strToInt(ret); -// return true; -// } - -// #endif static inline void l_getline(istream & is, string & str) @@ -1421,8 +1227,6 @@ void l_getline(istream & is, string & str) } -//#ifndef USE_OLD_READFORMAT - void LyXTabular::Read(Buffer const * buf, LyXLex & lex) { string line; @@ -1445,27 +1249,10 @@ void LyXTabular::Read(Buffer const * buf, LyXLex & lex) } -//#if 0 -//void LyXTabular::ReadNew(Buffer const * buf, LyXLex & lex) -//{ -// string line; -// istream & is = lex.getStream(); -// -// l_getline(is, line); -// if (!prefixIs(line, " got" << -// line << ")" << endl; -// return; -// } -// getTokenValue(line, "islongtable", is_long_tabular); -// getTokenValue(line, "endhead", endhead); -// getTokenValue(line, "endfirsthead", endfirsthead); -// getTokenValue(line, "endfoot", endfoot); -// getTokenValue(line, "endlastfoot", endlastfoot); - -// for (int i = 0; i < rows_; ++i) { -// l_getline(is, line); -// if (!prefixIs(line, " got" << -// line << ")" << endl; -// return; -// } -// getTokenValue(line, "topline", row_info[i].top_line); -// getTokenValue(line, "bottomline", row_info[i].bottom_line); -// getTokenValue(line, "newpage", row_info[i].newpage); -// for (int j = 0; j < columns_; ++j) { -// l_getline(is,line); -// if (!prefixIs(line," got" << -// line << ")" << endl; -// return; -// } -// if (!i) { -// getTokenValue(line, "alignment", column_info[j].alignment); -// getTokenValue(line, "valignment", column_info[j].valignment); -// getTokenValue(line, "leftline", column_info[j].left_line); -// getTokenValue(line, "rightline", column_info[j].right_line); -// getTokenValue(line, "width", column_info[j].p_width); -// getTokenValue(line, "special", column_info[j].align_special); -// } -// l_getline(is, line); -// if (!prefixIs(line, " got" << -// line << ")" << endl; -// return; -// } -// getTokenValue(line, "multicolumn", cell_info[i][j].multicolumn); -// getTokenValue(line, "alignment", cell_info[i][j].alignment); -// getTokenValue(line, "valignment", cell_info[i][j].valignment); -// getTokenValue(line, "topline", cell_info[i][j].top_line); -// getTokenValue(line, "bottomline", cell_info[i][j].bottom_line); -// getTokenValue(line, "leftline", cell_info[i][j].left_line); -// getTokenValue(line, "rightline", cell_info[i][j].right_line); -// getTokenValue(line, "rotate", cell_info[i][j].rotate); -// getTokenValue(line, "usebox", cell_info[i][j].usebox); -// getTokenValue(line, "width", cell_info[i][j].p_width); -// getTokenValue(line, "special", cell_info[i][j].align_special); -// l_getline(is, line); -// if (prefixIs(line, "\\begin_inset")) { -// cell_info[i][j].inset.Read(buf, lex); -// l_getline(is, line); -// } -// if (line != "") { -// lyxerr << "Wrong tabular format (expected got" << -// line << ")" << endl; -// return; -// } -// l_getline(is, line); -// if (line != "") { -// lyxerr << "Wrong tabular format (expected got" << -// line << ")" << endl; -// return; -// } -// } -// l_getline(is, line); -// if (line != "") { -// lyxerr << "Wrong tabular format (expected got" << -// line << ")" << endl; -// return; -// } -// } -// while (line != "") { -// l_getline(is, line); -// } -// set_row_column_number_info(); -// } -// #endif void LyXTabular::OldFormatRead(LyXLex & lex, string const & fl) { @@ -2606,7 +2286,6 @@ int LyXTabular::Latex(Buffer const * buf, //+ the single row and columns (cells) + //+--------------------------------------------------------------------- - //int bret; for (int i = 0; i < rows_; ++i) { ret += TeXTopHLine(os, i); int bret = ret; @@ -2934,6 +2613,7 @@ int LyXTabular::AsciiPrintCell(Buffer const * buf, ostream & os, else os << " "; +#warning What is this supposed to do? (Lgb) return ret * 0; // eh? (Lgb) } -- 2.39.2