mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-03 08:28:25 +00:00
* insets/insetfloatlist.C:
* insets/insettoc.C: * TocBackend.C: * TocBackend.h: rename 'asciiTocList()' to '.writePlaintextTocList' * insets/insettext.C: * output_plaintext.C: * output_plaintext.h: rename 'asciiParagraph' to 'writePlaintextParagraph' * output_plaintext.C: * exporter.C: * output_plaintext.h: rename 'writeFileAscii' to 'writePlaintextFile' * lyxrc.C: change lyxrc section title (ASCII => PLAIN TEXT) git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16756 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
25079a83c2
commit
c5df681fe8
@ -224,7 +224,7 @@ TocIterator const TocBackend::item(
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void TocBackend::asciiTocList(string const & type, odocstream & os) const
|
void TocBackend::writePlaintextTocList(string const & type, odocstream & os) const
|
||||||
{
|
{
|
||||||
TocList::const_iterator cit = tocs_.find(type);
|
TocList::const_iterator cit = tocs_.find(type);
|
||||||
if (cit != tocs_.end()) {
|
if (cit != tocs_.end()) {
|
||||||
|
@ -110,7 +110,7 @@ public:
|
|||||||
/// Return the first Toc Item before the cursor
|
/// Return the first Toc Item before the cursor
|
||||||
TocIterator const item(std::string const & type, ParConstIterator const &) const;
|
TocIterator const item(std::string const & type, ParConstIterator const &) const;
|
||||||
|
|
||||||
void asciiTocList(std::string const & type, odocstream & os) const;
|
void writePlaintextTocList(std::string const & type, odocstream & os) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
///
|
///
|
||||||
|
@ -191,9 +191,9 @@ bool Exporter::Export(Buffer * buffer, string const & format,
|
|||||||
filename = changeExtension(filename,
|
filename = changeExtension(filename,
|
||||||
formats.extension(backend_format));
|
formats.extension(backend_format));
|
||||||
|
|
||||||
// Ascii backend
|
// Plain text backend
|
||||||
if (backend_format == "text")
|
if (backend_format == "text")
|
||||||
writeFileAscii(*buffer, FileName(filename), runparams);
|
writePlaintextFile(*buffer, FileName(filename), runparams);
|
||||||
// no backend
|
// no backend
|
||||||
else if (backend_format == "lyx")
|
else if (backend_format == "lyx")
|
||||||
buffer->writeFile(FileName(filename));
|
buffer->writeFile(FileName(filename));
|
||||||
|
@ -133,7 +133,7 @@ int InsetFloatList::plaintext(Buffer const & buffer, odocstream & os,
|
|||||||
{
|
{
|
||||||
os << getScreenLabel(buffer) << "\n\n";
|
os << getScreenLabel(buffer) << "\n\n";
|
||||||
|
|
||||||
buffer.tocBackend().asciiTocList(to_ascii(getParam("type")), os);
|
buffer.tocBackend().writePlaintextTocList(to_ascii(getParam("type")), os);
|
||||||
|
|
||||||
os << "\n";
|
os << "\n";
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -319,7 +319,7 @@ int InsetText::plaintext(Buffer const & buf, odocstream & os,
|
|||||||
bool ref_printed = false;
|
bool ref_printed = false;
|
||||||
odocstringstream oss;
|
odocstringstream oss;
|
||||||
for (; it != end; ++it)
|
for (; it != end; ++it)
|
||||||
asciiParagraph(buf, *it, oss, runparams, ref_printed);
|
writePlaintextParagraph(buf, *it, oss, runparams, ref_printed);
|
||||||
|
|
||||||
docstring const str = oss.str();
|
docstring const str = oss.str();
|
||||||
os << str;
|
os << str;
|
||||||
|
@ -60,7 +60,7 @@ int InsetTOC::plaintext(Buffer const & buffer, odocstream & os,
|
|||||||
{
|
{
|
||||||
os << getScreenLabel(buffer) << "\n\n";
|
os << getScreenLabel(buffer) << "\n\n";
|
||||||
|
|
||||||
buffer.tocBackend().asciiTocList(getCmdName(), os);
|
buffer.tocBackend().writePlaintextTocList(getCmdName(), os);
|
||||||
|
|
||||||
os << "\n";
|
os << "\n";
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -1874,7 +1874,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
os << "\n#\n"
|
os << "\n#\n"
|
||||||
<< "# ASCII EXPORT SECTION ##############################\n"
|
<< "# PLAIN TEXT EXPORT SECTION ##############################\n"
|
||||||
<< "#\n\n";
|
<< "#\n\n";
|
||||||
|
|
||||||
case RC_PLAINTEXT_ROFF_COMMAND:
|
case RC_PLAINTEXT_ROFF_COMMAND:
|
||||||
|
@ -39,17 +39,17 @@ using std::pair;
|
|||||||
using std::string;
|
using std::string;
|
||||||
|
|
||||||
|
|
||||||
void writeFileAscii(Buffer const & buf, FileName const & fname,
|
void writePlaintextFile(Buffer const & buf, FileName const & fname,
|
||||||
OutputParams const & runparams)
|
OutputParams const & runparams)
|
||||||
{
|
{
|
||||||
odocfstream ofs;
|
odocfstream ofs;
|
||||||
if (!openFileWrite(ofs, fname))
|
if (!openFileWrite(ofs, fname))
|
||||||
return;
|
return;
|
||||||
writeFileAscii(buf, ofs, runparams);
|
writePlaintextFile(buf, ofs, runparams);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void writeFileAscii(Buffer const & buf, odocstream & os,
|
void writePlaintextFile(Buffer const & buf, odocstream & os,
|
||||||
OutputParams const & runparams)
|
OutputParams const & runparams)
|
||||||
{
|
{
|
||||||
bool ref_printed = false;
|
bool ref_printed = false;
|
||||||
@ -58,7 +58,7 @@ void writeFileAscii(Buffer const & buf, odocstream & os,
|
|||||||
ParagraphList::const_iterator end = par.end();
|
ParagraphList::const_iterator end = par.end();
|
||||||
ParagraphList::const_iterator it = beg;
|
ParagraphList::const_iterator it = beg;
|
||||||
for (; it != end; ++it) {
|
for (; it != end; ++it) {
|
||||||
asciiParagraph(buf, *it, os, runparams, ref_printed);
|
writePlaintextParagraph(buf, *it, os, runparams, ref_printed);
|
||||||
}
|
}
|
||||||
os << "\n";
|
os << "\n";
|
||||||
}
|
}
|
||||||
@ -77,7 +77,7 @@ pair<int, docstring> const addDepth(int depth, int ldepth)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void asciiParagraph(Buffer const & buf,
|
void writePlaintextParagraph(Buffer const & buf,
|
||||||
Paragraph const & par,
|
Paragraph const & par,
|
||||||
odocstream & os,
|
odocstream & os,
|
||||||
OutputParams const & runparams,
|
OutputParams const & runparams,
|
||||||
@ -228,7 +228,7 @@ void asciiParagraph(Buffer const & buf,
|
|||||||
|
|
||||||
case '\0':
|
case '\0':
|
||||||
lyxerr[Debug::INFO] <<
|
lyxerr[Debug::INFO] <<
|
||||||
"writeAsciiFile: NULL char in structure." << endl;
|
"writePlaintextFile: NULL char in structure." << endl;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -25,14 +25,14 @@ class Paragraph;
|
|||||||
|
|
||||||
|
|
||||||
///
|
///
|
||||||
void writeFileAscii(Buffer const & buf, support::FileName const &,
|
void writePlaintextFile(Buffer const & buf, support::FileName const &,
|
||||||
OutputParams const &);
|
OutputParams const &);
|
||||||
|
|
||||||
///
|
///
|
||||||
void writeFileAscii(Buffer const & buf, odocstream &, OutputParams const &);
|
void writePlaintextFile(Buffer const & buf, odocstream &, OutputParams const &);
|
||||||
|
|
||||||
///
|
///
|
||||||
void asciiParagraph(Buffer const & buf,
|
void writePlaintextParagraph(Buffer const & buf,
|
||||||
Paragraph const & paragraphs,
|
Paragraph const & paragraphs,
|
||||||
odocstream & ofs,
|
odocstream & ofs,
|
||||||
OutputParams const &,
|
OutputParams const &,
|
||||||
|
Loading…
Reference in New Issue
Block a user