From 1f7a1257f10704868b5e1c23fea575d833f30546 Mon Sep 17 00:00:00 2001 From: Michael Schmitt Date: Mon, 15 Jan 2007 22:49:14 +0000 Subject: [PATCH] * change LFUN file-insert-ascii to file-insert-plaintext * change LFUN file-insert-ascii-para to file-insert-plaintext-para * change LyXRC::RC_ASCIIROFF_COMMAND to LyXRC::RC_PLAINTEXT_ROFF_COMMAND * change LyXRC::RC_ASCII_LINELEN to LyXRC::RC_PLAINTEXT_LINELEN * replace "ascii" by "plaintext" in method names git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16697 a592a061-630c-0410-9148-cb99ea01b6c8 --- lib/bind/aqua.bind | 4 ++-- lib/configure.py | 6 +++--- lib/ui/classic.ui | 4 ++-- lib/ui/stdmenus.inc | 4 ++-- src/BufferView.C | 12 +++++------ src/LyXAction.C | 4 ++-- src/buffer.C | 2 +- src/exporter.C | 2 +- src/frontends/qt4/QPrefsDialog.C | 12 +++++------ src/frontends/qt4/ui/QPrefAsciiUi.ui | 12 +++++------ src/importer.C | 2 +- src/insets/insettabular.C | 14 ++++++------ src/insets/insettabular.h | 2 +- src/lfuns.h | 4 ++-- src/lyx_cb.C | 12 +++++------ src/lyx_cb.h | 4 ++-- src/lyxfunc.C | 4 ++-- src/lyxrc.C | 32 ++++++++++++++-------------- src/lyxrc.h | 8 +++---- src/paragraph.C | 2 +- src/paragraph_pimpl.C | 2 +- src/tabular.C | 12 +++++------ src/tabular.h | 18 ++++++++-------- 23 files changed, 89 insertions(+), 89 deletions(-) diff --git a/lib/bind/aqua.bind b/lib/bind/aqua.bind index 5966a090c7..893858c9a0 100644 --- a/lib/bind/aqua.bind +++ b/lib/bind/aqua.bind @@ -49,8 +49,8 @@ \bind "M-~S-i o b" "bibtex-insert" \bind "M-~S-i e x" "file-insert" -\bind "M-~S-i e l" "file-insert-ascii" -\bind "M-~S-i e p" "file-insert-ascii-para" +\bind "M-~S-i e l" "file-insert-plaintext" +\bind "M-~S-i e p" "file-insert-plaintext-para" \bind "M-~S-f p" "buffer-print" \bind "M-~S-f n" "buffer-new" diff --git a/lib/configure.py b/lib/configure.py index 4fa87da2ed..ccd572e852 100644 --- a/lib/configure.py +++ b/lib/configure.py @@ -496,9 +496,9 @@ def checkOtherEntries(): ''' entries other than Format and Converter ''' checkProg('a *roff formatter', ['groff', 'nroff'], rc_entry = [ - r'\ascii_roff_command "groff -t -Tlatin1 $$FName"', - r'\ascii_roff_command "tbl $$FName | nroff"', - r'\ascii_roff_command ""' ]) + r'\plaintext_roff_command "groff -t -Tlatin1 $$FName"', + r'\plaintext_roff_command "tbl $$FName | nroff"', + r'\plaintext_roff_command ""' ]) checkProg('ChkTeX', ['chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38'], rc_entry = [ r'\chktex_command "%%"' ]) checkProg('a spellchecker', ['ispell'], diff --git a/lib/ui/classic.ui b/lib/ui/classic.ui index badecdf2cd..392460da12 100644 --- a/lib/ui/classic.ui +++ b/lib/ui/classic.ui @@ -317,8 +317,8 @@ Menuset Menu "insert_file" Item "LyX Document...|X" "file-insert" - Item "Plain Text as Lines...|L" "file-insert-ascii" - Item "Plain Text as Paragraphs...|P" "file-insert-ascii-para" + Item "Plain Text as Lines...|L" "file-insert-plaintext" + Item "Plain Text as Paragraphs...|P" "file-insert-plaintext-para" End Menu "edit_change" diff --git a/lib/ui/stdmenus.inc b/lib/ui/stdmenus.inc index 025aec3d92..63f3a64824 100644 --- a/lib/ui/stdmenus.inc +++ b/lib/ui/stdmenus.inc @@ -377,8 +377,8 @@ Menuset Menu "insert_file" Item "LyX Document...|X" "file-insert" - Item "Plain Text as Lines...|L" "file-insert-ascii" - Item "Plain Text as Paragraphs...|P" "file-insert-ascii-para" + Item "Plain Text as Lines...|L" "file-insert-plaintext" + Item "Plain Text as Paragraphs...|P" "file-insert-plaintext-para" Separator Item "External Material...|M" "dialog-show-new-inset external" Item "Child Document...|d" "dialog-show-new-inset include" diff --git a/src/BufferView.C b/src/BufferView.C index 06bae06ca3..0355f33e16 100644 --- a/src/BufferView.C +++ b/src/BufferView.C @@ -610,8 +610,8 @@ FuncStatus BufferView::getStatus(FuncRequest const & cmd) flag.enabled(!buffer_->redostack().empty()); break; case LFUN_FILE_INSERT: - case LFUN_FILE_INSERT_ASCII_PARA: - case LFUN_FILE_INSERT_ASCII: + case LFUN_FILE_INSERT_PLAINTEXT_PARA: + case LFUN_FILE_INSERT_PLAINTEXT: case LFUN_BOOKMARK_SAVE: // FIXME: Actually, these LFUNS should be moved to LyXText flag.enabled(cursor_.inTexted()); @@ -727,14 +727,14 @@ bool BufferView::dispatch(FuncRequest const & cmd) menuInsertLyXFile(to_utf8(cmd.argument())); break; - case LFUN_FILE_INSERT_ASCII_PARA: + case LFUN_FILE_INSERT_PLAINTEXT_PARA: // FIXME UNICODE - insertAsciiFile(this, to_utf8(cmd.argument()), true); + insertPlaintextFile(this, to_utf8(cmd.argument()), true); break; - case LFUN_FILE_INSERT_ASCII: + case LFUN_FILE_INSERT_PLAINTEXT: // FIXME UNICODE - insertAsciiFile(this, to_utf8(cmd.argument()), false); + insertPlaintextFile(this, to_utf8(cmd.argument()), false); break; case LFUN_FONT_STATE: diff --git a/src/LyXAction.C b/src/LyXAction.C index 91dea14fd7..0e301fc455 100644 --- a/src/LyXAction.C +++ b/src/LyXAction.C @@ -158,8 +158,8 @@ void LyXAction::init() { LFUN_ERROR_NEXT, "error-next", ReadOnly }, { LFUN_ERT_INSERT, "ert-insert", Noop }, { LFUN_FILE_INSERT, "file-insert", Noop }, - { LFUN_FILE_INSERT_ASCII, "file-insert-ascii", Noop }, - { LFUN_FILE_INSERT_ASCII_PARA, "file-insert-ascii-para", Noop }, + { LFUN_FILE_INSERT_PLAINTEXT, "file-insert-plaintext", Noop }, + { LFUN_FILE_INSERT_PLAINTEXT_PARA, "file-insert-plaintext-para", Noop }, { LFUN_FILE_NEW, "file-new", NoBuffer }, { LFUN_FILE_OPEN, "file-open", NoBuffer }, { LFUN_FLOAT_INSERT, "float-insert", Noop }, diff --git a/src/buffer.C b/src/buffer.C index 3752becf3f..b6f6f67c1e 100644 --- a/src/buffer.C +++ b/src/buffer.C @@ -1672,7 +1672,7 @@ void Buffer::getSourceCode(odocstream & os, pit_type par_begin, OutputParams runparams; runparams.nice = true; runparams.flavor = OutputParams::LATEX; - runparams.linelen = lyxrc.ascii_linelen; + runparams.linelen = lyxrc.plaintext_linelen; // No side effect of file copying and image conversion runparams.dryrun = true; diff --git a/src/exporter.C b/src/exporter.C index 392e6acf7a..c45256208d 100644 --- a/src/exporter.C +++ b/src/exporter.C @@ -151,7 +151,7 @@ bool Exporter::Export(Buffer * buffer, string const & format, string backend_format; OutputParams runparams; runparams.flavor = OutputParams::LATEX; - runparams.linelen = lyxrc.ascii_linelen; + runparams.linelen = lyxrc.plaintext_linelen; vector backends = Backends(*buffer); // FIXME: Without this test export to lyx1[34] would be through // latex -> lyx -> lyx1[34], because the first backend below with a diff --git a/src/frontends/qt4/QPrefsDialog.C b/src/frontends/qt4/QPrefsDialog.C index bb3610740d..86735acee9 100644 --- a/src/frontends/qt4/QPrefsDialog.C +++ b/src/frontends/qt4/QPrefsDialog.C @@ -194,24 +194,24 @@ PrefAscii::PrefAscii(QWidget * parent) : PrefModule(_(Outputs), _("Plain text"), 0, parent) { setupUi(this); - connect(asciiLinelengthSB, SIGNAL(valueChanged(int)), + connect(plaintextLinelengthSB, SIGNAL(valueChanged(int)), this, SIGNAL(changed())); - connect(asciiRoffED, SIGNAL(textChanged(const QString&)), + connect(plaintextRoffED, SIGNAL(textChanged(const QString&)), this, SIGNAL(changed())); } void PrefAscii::apply(LyXRC & rc) const { - rc.ascii_linelen = asciiLinelengthSB->value(); - rc.ascii_roff_command = fromqstr(asciiRoffED->text()); + rc.plaintext_linelen = plaintextLinelengthSB->value(); + rc.plaintext_roff_command = fromqstr(plaintextRoffED->text()); } void PrefAscii::update(LyXRC const & rc) { - asciiLinelengthSB->setValue(rc.ascii_linelen); - asciiRoffED->setText(toqstr(rc.ascii_roff_command)); + plaintextLinelengthSB->setValue(rc.plaintext_linelen); + plaintextRoffED->setText(toqstr(rc.plaintext_roff_command)); } diff --git a/src/frontends/qt4/ui/QPrefAsciiUi.ui b/src/frontends/qt4/ui/QPrefAsciiUi.ui index 4755499c7b..828a72efb0 100644 --- a/src/frontends/qt4/ui/QPrefAsciiUi.ui +++ b/src/frontends/qt4/ui/QPrefAsciiUi.ui @@ -31,12 +31,12 @@ 6 - + &roff command: - asciiRoffED + plaintextRoffED @@ -49,7 +49,7 @@ 6 - + Max. line length of exported plain text/LaTeX/SGML files @@ -77,17 +77,17 @@ - + Output &line length: - asciiLinelengthSB + plaintextLinelengthSB - + External app for formating tables in plain text output diff --git a/src/importer.C b/src/importer.C index 20c46002ad..ae07b15a5b 100644 --- a/src/importer.C +++ b/src/importer.C @@ -87,7 +87,7 @@ bool Importer::Import(LyXView * lv, FileName const & filename, string filename2 = (loader_format == format) ? filename.absFilename() : changeExtension(filename.absFilename(), formats.extension(loader_format)); - insertAsciiFile(lv->view(), filename2, as_paragraphs); + insertPlaintextFile(lv->view(), filename2, as_paragraphs); lv->dispatch(FuncRequest(LFUN_MARK_OFF)); } diff --git a/src/insets/insettabular.C b/src/insets/insettabular.C index e0fd1c7fa0..c7c0980733 100644 --- a/src/insets/insettabular.C +++ b/src/insets/insettabular.C @@ -679,12 +679,12 @@ void InsetTabular::doDispatch(LCursor & cur, FuncRequest & cmd) break; // insert file functions - case LFUN_FILE_INSERT_ASCII_PARA: - case LFUN_FILE_INSERT_ASCII: { + case LFUN_FILE_INSERT_PLAINTEXT_PARA: + case LFUN_FILE_INSERT_PLAINTEXT: { // FIXME UNICODE - string const tmpstr = getContentsOfAsciiFile(&cur.bv(), to_utf8(cmd.argument()), false); + string const tmpstr = getContentsOfPlaintextFile(&cur.bv(), to_utf8(cmd.argument()), false); // FIXME: We don't know the encoding of the file - if (!tmpstr.empty() && !insertAsciiString(cur.bv(), from_utf8(tmpstr), false)) + if (!tmpstr.empty() && !insertPlaintextString(cur.bv(), from_utf8(tmpstr), false)) cur.undispatched(); break; } @@ -727,10 +727,10 @@ void InsetTabular::doDispatch(LCursor & cur, FuncRequest & cmd) theSelection().get(); if (clip.empty()) break; - // pass to InsertAsciiString, but + // pass to InsertPlaintextString, but // only if we have multi-cell content if (clip.find_first_of(from_ascii("\t\n")) != docstring::npos) { - if (insertAsciiString(cur.bv(), clip, false)) { + if (insertPlaintextString(cur.bv(), clip, false)) { // content has been replaced, // so cursor might be invalid cur.pos() = cur.lastpos(); @@ -1957,7 +1957,7 @@ bool InsetTabular::forceDefaultParagraphs(idx_type cell) const } -bool InsetTabular::insertAsciiString(BufferView & bv, docstring const & buf, +bool InsetTabular::insertPlaintextString(BufferView & bv, docstring const & buf, bool usePaste) { if (buf.length() <= 0) diff --git a/src/insets/insettabular.h b/src/insets/insettabular.h index d5b50b7ca3..21c7a728fa 100644 --- a/src/insets/insettabular.h +++ b/src/insets/insettabular.h @@ -188,7 +188,7 @@ private: void getSelection(LCursor & cur, row_type & rs, row_type & re, col_type & cs, col_type & ce) const; /// - bool insertAsciiString(BufferView &, docstring const & buf, bool usePaste); + bool insertPlaintextString(BufferView &, docstring const & buf, bool usePaste); /// are we operating on several cells? bool tablemode(LCursor & cur) const; diff --git a/src/lfuns.h b/src/lfuns.h index cbaa26f3f5..18272d5658 100644 --- a/src/lfuns.h +++ b/src/lfuns.h @@ -202,8 +202,8 @@ enum kb_action { // 140 LFUN_COMMAND_EXECUTE, LFUN_FILE_INSERT, - LFUN_FILE_INSERT_ASCII, // CFO-G 1997-11-19 - LFUN_FILE_INSERT_ASCII_PARA, // Levon 2001-02-14 + LFUN_FILE_INSERT_PLAINTEXT, // CFO-G 1997-11-19 + LFUN_FILE_INSERT_PLAINTEXT_PARA,// Levon 2001-02-14 LFUN_FILE_NEW, // for scripting purposes // 145 LFUN_FILE_OPEN, diff --git a/src/lyx_cb.C b/src/lyx_cb.C index a60882ba5e..d455f132ae 100644 --- a/src/lyx_cb.C +++ b/src/lyx_cb.C @@ -318,14 +318,14 @@ void newFile(BufferView * bv, string const & filename) } -// Insert ascii file (if filename is empty, prompt for one) -void insertAsciiFile(BufferView * bv, string const & f, bool asParagraph) +// Insert plain text file (if filename is empty, prompt for one) +void insertPlaintextFile(BufferView * bv, string const & f, bool asParagraph) { if (!bv->buffer()) return; // FIXME: We don't know the encoding of the file - docstring const tmpstr = from_utf8(getContentsOfAsciiFile(bv, f, asParagraph)); + docstring const tmpstr = from_utf8(getContentsOfPlaintextFile(bv, f, asParagraph)); if (tmpstr.empty()) return; @@ -341,14 +341,14 @@ void insertAsciiFile(BufferView * bv, string const & f, bool asParagraph) } -// Insert ascii file (if filename is empty, prompt for one) -string getContentsOfAsciiFile(BufferView * bv, string const & f, bool asParagraph) +// Insert plain text file (if filename is empty, prompt for one) +string getContentsOfPlaintextFile(BufferView * bv, string const & f, bool asParagraph) { FileName fname(f); if (fname.empty()) { FileDialog fileDlg(_("Select file to insert"), - (asParagraph) ? LFUN_FILE_INSERT_ASCII_PARA : LFUN_FILE_INSERT_ASCII); + (asParagraph) ? LFUN_FILE_INSERT_PLAINTEXT_PARA : LFUN_FILE_INSERT_PLAINTEXT); FileDialog::Result result = fileDlg.open(from_utf8(bv->buffer()->filePath()), diff --git a/src/lyx_cb.h b/src/lyx_cb.h index da520d82b1..03cecc4a70 100644 --- a/src/lyx_cb.h +++ b/src/lyx_cb.h @@ -32,9 +32,9 @@ void autoSave(BufferView * bv); /// void newFile(BufferView * bv, std::string const & filename); /// -void insertAsciiFile(BufferView * bv, std::string const & f, bool asParagraph); +void insertPlaintextFile(BufferView * bv, std::string const & f, bool asParagraph); /// -std::string getContentsOfAsciiFile(BufferView * bv, std::string const & f, bool asParagraph); +std::string getContentsOfPlaintextFile(BufferView * bv, std::string const & f, bool asParagraph); /// void reconfigure(LyXView & lv); diff --git a/src/lyxfunc.C b/src/lyxfunc.C index 3552d17a0f..6545b278c9 100644 --- a/src/lyxfunc.C +++ b/src/lyxfunc.C @@ -2112,8 +2112,8 @@ void actOnUpdatedPrefs(LyXRC const & lyxrc_orig, LyXRC const & lyxrc_new) switch (tag) { case LyXRC::RC_ACCEPT_COMPOUND: case LyXRC::RC_ALT_LANG: - case LyXRC::RC_ASCIIROFF_COMMAND: - case LyXRC::RC_ASCII_LINELEN: + case LyXRC::RC_PLAINTEXT_ROFF_COMMAND: + case LyXRC::RC_PLAINTEXT_LINELEN: case LyXRC::RC_AUTOREGIONDELETE: case LyXRC::RC_AUTORESET_OPTIONS: case LyXRC::RC_AUTOSAVE: diff --git a/src/lyxrc.C b/src/lyxrc.C index 955ba1ac6b..439317d9f1 100644 --- a/src/lyxrc.C +++ b/src/lyxrc.C @@ -68,8 +68,6 @@ namespace { keyword_item lyxrcTags[] = { { "\\accept_compound", LyXRC::RC_ACCEPT_COMPOUND }, { "\\alternate_language", LyXRC::RC_ALT_LANG }, - { "\\ascii_linelen", LyXRC::RC_ASCII_LINELEN }, - { "\\ascii_roff_command", LyXRC::RC_ASCIIROFF_COMMAND }, { "\\auto_number", LyXRC::RC_AUTO_NUMBER }, { "\\auto_region_delete", LyXRC::RC_AUTOREGIONDELETE }, { "\\auto_reset_options", LyXRC::RC_AUTORESET_OPTIONS }, @@ -114,6 +112,8 @@ keyword_item lyxrcTags[] = { { "\\num_lastfiles", LyXRC::RC_NUMLASTFILES }, { "\\path_prefix", LyXRC::RC_PATH_PREFIX }, { "\\personal_dictionary", LyXRC::RC_PERS_DICT }, + { "\\plaintext_linelen", LyXRC::RC_PLAINTEXT_LINELEN }, + { "\\plaintext_roff_command", LyXRC::RC_PLAINTEXT_ROFF_COMMAND }, { "\\popup_bold_font", LyXRC::RC_POPUP_BOLD_FONT }, { "\\popup_font_encoding", LyXRC::RC_POPUP_FONT_ENCODING }, { "\\popup_normal_font", LyXRC::RC_POPUP_NORMAL_FONT }, @@ -254,7 +254,7 @@ void LyXRC::setDefaults() { autosave = 300; auto_region_delete = true; auto_reset_options = false; - ascii_linelen = 65; + plaintext_linelen = 65; num_lastfiles = maxlastfiles; check_lastfiles = true; use_lastfilepos = true; @@ -892,14 +892,14 @@ int LyXRC::read(LyXLex & lexrc) } break; - case RC_ASCIIROFF_COMMAND: + case RC_PLAINTEXT_ROFF_COMMAND: if (lexrc.next()) { - ascii_roff_command = lexrc.getString(); + plaintext_roff_command = lexrc.getString(); } break; - case RC_ASCII_LINELEN: + case RC_PLAINTEXT_LINELEN: if (lexrc.next()) { - ascii_linelen = lexrc.getInteger(); + plaintext_linelen = lexrc.getInteger(); } break; // Spellchecker settings: @@ -1856,10 +1856,10 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc) const } case RC_USETEMPDIR: // Ignore it - case RC_ASCII_LINELEN: + case RC_PLAINTEXT_LINELEN: if (ignore_system_lyxrc || - ascii_linelen != system_lyxrc.ascii_linelen) { - os << "\\ascii_linelen " << ascii_linelen << '\n'; + plaintext_linelen != system_lyxrc.plaintext_linelen) { + os << "\\plaintext_linelen " << plaintext_linelen << '\n'; } case RC_MAKE_BACKUP: if (ignore_system_lyxrc || @@ -1877,10 +1877,10 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc) const << "# ASCII EXPORT SECTION ##############################\n" << "#\n\n"; - case RC_ASCIIROFF_COMMAND: + case RC_PLAINTEXT_ROFF_COMMAND: if (ignore_system_lyxrc || - ascii_roff_command != system_lyxrc.ascii_roff_command) { - os << "\\ascii_roff_command \"" << ascii_roff_command + plaintext_roff_command != system_lyxrc.plaintext_roff_command) { + os << "\\plaintext_roff_command \"" << plaintext_roff_command << "\"\n"; } @@ -2172,12 +2172,12 @@ string const LyXRC::getDescription(LyXRCTags tag) str = _("Specify an alternate language. The default is to use the language of the document."); break; - case RC_ASCIIROFF_COMMAND: + case RC_PLAINTEXT_ROFF_COMMAND: str = _("Use to define an external program to render tables in plain text output. E.g. \"groff -t -Tlatin1 $$FName\" where $$FName is the input file. If \"\" is specified, an internal routine is used."); break; - case RC_ASCII_LINELEN: - str = _("This is the maximum line length of an exported text file (LaTeX, SGML or plain text)."); + case RC_PLAINTEXT_LINELEN: + str = _("This is the maximum line length of an exported text file (LaTeX, SGML or plain text). If set to 0, paragraphs are output in a single line; if the line length is != 0, paragraphs are separated by a blank line."); break; case RC_AUTOREGIONDELETE: diff --git a/src/lyxrc.h b/src/lyxrc.h index 25d88edf98..ceed6f9369 100644 --- a/src/lyxrc.h +++ b/src/lyxrc.h @@ -40,8 +40,8 @@ public: enum LyXRCTags { RC_ACCEPT_COMPOUND = 1, RC_ALT_LANG, - RC_ASCIIROFF_COMMAND, - RC_ASCII_LINELEN, + RC_PLAINTEXT_ROFF_COMMAND, + RC_PLAINTEXT_LINELEN, RC_AUTOREGIONDELETE, RC_AUTORESET_OPTIONS, RC_AUTOSAVE, @@ -309,9 +309,9 @@ public: /// unsigned int autosave; /// - std::string ascii_roff_command; + std::string plaintext_roff_command; /// - unsigned int ascii_linelen; + unsigned int plaintext_linelen; /// use library instead of process bool use_spell_lib; /// Ispell command diff --git a/src/paragraph.C b/src/paragraph.C index 55af8cfc1f..5aed7d5899 100644 --- a/src/paragraph.C +++ b/src/paragraph.C @@ -1152,7 +1152,7 @@ void sgmlLineBreak(ostream & os, string::size_type & colcount, string::size_type newcol) { colcount += newcol; - if (colcount > lyxrc.ascii_linelen) { + if (colcount > lyxrc.plaintext_linelen) { os << "\n"; colcount = newcol; // assume write after this call } diff --git a/src/paragraph_pimpl.C b/src/paragraph_pimpl.C index 0a3b64715b..09feac9534 100644 --- a/src/paragraph_pimpl.C +++ b/src/paragraph_pimpl.C @@ -390,7 +390,7 @@ void Paragraph::Pimpl::simpleTeXBlanks(odocstream & os, TexRow & texrow, if (style.pass_thru) return; - if (column > lyxrc.ascii_linelen + if (column > lyxrc.plaintext_linelen && i && getChar(i - 1) != ' ' && (i < size() - 1) diff --git a/src/tabular.C b/src/tabular.C index 7d6f1aabb3..7d873348ee 100644 --- a/src/tabular.C +++ b/src/tabular.C @@ -2453,7 +2453,7 @@ int LyXTabular::docbook(Buffer const & buf, odocstream & os, } -int LyXTabular::asciiTopHLine(odocstream & os, row_type row, +int LyXTabular::plaintextTopHLine(odocstream & os, row_type row, vector const & clen) const { idx_type const fcell = getFirstCellInRow(row); @@ -2501,7 +2501,7 @@ int LyXTabular::asciiTopHLine(odocstream & os, row_type row, } -int LyXTabular::asciiBottomHLine(odocstream & os, row_type row, +int LyXTabular::plaintextBottomHLine(odocstream & os, row_type row, vector const & clen) const { idx_type const fcell = getFirstCellInRow(row); @@ -2549,7 +2549,7 @@ int LyXTabular::asciiBottomHLine(odocstream & os, row_type row, } -int LyXTabular::asciiPrintCell(Buffer const & buf, odocstream & os, +int LyXTabular::plaintextPrintCell(Buffer const & buf, odocstream & os, OutputParams const & runparams, idx_type cell, row_type row, col_type column, vector const & clen, @@ -2645,21 +2645,21 @@ int LyXTabular::plaintext(Buffer const & buf, odocstream & os, } idx_type cell = 0; for (row_type i = 0; i < rows_; ++i) { - if (!onlydata && asciiTopHLine(os, i, clen)) + if (!onlydata && plaintextTopHLine(os, i, clen)) os << docstring(depth * 2, ' '); for (col_type j = 0; j < columns_; ++j) { if (isPartOfMultiColumn(i, j)) continue; if (onlydata && j > 0) os << delim; - ret += asciiPrintCell(buf, os, runparams, + ret += plaintextPrintCell(buf, os, runparams, cell, i, j, clen, onlydata); ++cell; } os << endl; if (!onlydata) { os << docstring(depth * 2, ' '); - if (asciiBottomHLine(os, i, clen)) + if (plaintextBottomHLine(os, i, clen)) os << docstring(depth * 2, ' '); } } diff --git a/src/tabular.h b/src/tabular.h index add8f0aeec..163f33a2b7 100644 --- a/src/tabular.h +++ b/src/tabular.h @@ -604,18 +604,18 @@ public: int TeXRow(odocstream &, row_type const row, Buffer const & buf, OutputParams const &) const; /// - // helper function for ASCII returns number of newlines + // helper functions for plain text return number of newlines /// - int asciiTopHLine(odocstream &, row_type row, - std::vector const &) const; + int plaintextTopHLine(odocstream &, row_type row, + std::vector const &) const; /// - int asciiBottomHLine(odocstream &, row_type row, - std::vector const &) const; + int plaintextBottomHLine(odocstream &, row_type row, + std::vector const &) const; /// - int asciiPrintCell(Buffer const &, odocstream &, - OutputParams const &, - idx_type cell, row_type row, col_type column, - std::vector const &, + int plaintextPrintCell(Buffer const &, odocstream &, + OutputParams const &, + idx_type cell, row_type row, col_type column, + std::vector const &, bool onlydata) const; /// auxiliary function for docbook int docbookRow(Buffer const & buf, odocstream & os, row_type,