Rename ascii to plaintext and LatexRunParams to OutputParams.

Create new files for each output format.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8046 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
José Matox 2003-11-05 12:06:20 +00:00
parent 267a040d10
commit cd424d7853
118 changed files with 1936 additions and 1538 deletions

View File

@ -1,3 +1,27 @@
2003-11-05 José Matos <jamatos@lyx.org>
* output_docbook.[Ch]:
* output_latex.[Ch]:
* output_linuxdoc.[Ch]:
* output_plaintext.[Ch]: New files for output formats.
* output.[Ch]: New file for helper functions.
* buffer.[Ch]:
* paragraph_funcs.[Ch]: output functions moved to new files.
* outputparams.h: rename of latexrunparams.h
* LaTeX.[Ch]:
* buffer.[Ch]:
* bufferlist.[Ch]:
* converter.[Ch]:
* exporter.C:
* paragraph.[Ch]:
* paragraph_funcs.[Ch]:
* paragraph_pimpl.[Ch]:
* tabular.[Ch]: rename ascii to plaintext
and LatexRunParams to OutputParams.
2003-11-05 Alfredo Braunstein <abraunst@libero.it>
* iterators.[Ch] (text): require bv argument

View File

@ -120,7 +120,7 @@ bool operator!=(Aux_Info const & a, Aux_Info const & o)
* CLASS LaTeX
*/
LaTeX::LaTeX(string const & latex, LatexRunParams const & rp,
LaTeX::LaTeX(string const & latex, OutputParams const & rp,
string const & f, string const & p)
: cmd(latex), file(f), path(p), runparams(rp)
{

View File

@ -14,7 +14,7 @@
#ifndef LATEX_H
#define LATEX_H
#include "latexrunparams.h"
#include "outputparams.h"
#include <boost/utility.hpp>
#include <boost/signals/signal1.hpp>
@ -132,7 +132,7 @@ public:
cmd = the latex command, file = name of the (temporary) latex file,
path = name of the files original path.
*/
LaTeX(std::string const & cmd, LatexRunParams const &,
LaTeX(std::string const & cmd, OutputParams const &,
std::string const & file, std::string const & path);
/// runs LaTeX several times
@ -192,7 +192,7 @@ private:
std::string output_file;
///
LatexRunParams runparams;
OutputParams runparams;
};
#endif

View File

@ -87,7 +87,6 @@ lyx_SOURCES = \
LaTeX.h \
LaTeXFeatures.C \
LaTeXFeatures.h \
latexrunparams.h \
LyXAction.C \
LyXAction.h \
MenuBackend.C \
@ -223,6 +222,17 @@ lyx_SOURCES = \
messages.h \
metricsinfo.C \
metricsinfo.h \
output.C \
output.h \
outputparams.h \
output_docbook.C \
output_docbook.h \
output_latex.C \
output_latex.h \
output_linuxdoc.C \
output_linuxdoc.h \
output_plaintext.C \
output_plaintext.h \
paper.h \
paragraph.C \
paragraph.h \

View File

@ -33,6 +33,10 @@
#include "lyxrc.h"
#include "lyxvc.h"
#include "messages.h"
#include "output.h"
#include "output_docbook.h"
#include "output_latex.h"
#include "output_linuxdoc.h"
#include "paragraph.h"
#include "paragraph_funcs.h"
#include "ParagraphParameters.h"
@ -128,19 +132,6 @@ namespace {
const int LYX_FORMAT = 225;
bool openFileWrite(ofstream & ofs, string const & fname)
{
ofs.open(fname.c_str());
if (!ofs) {
string const file = MakeDisplayPath(fname, 50);
string text = bformat(_("Could not open the specified "
"document\n%1$s."), file);
Alert::error(_("Could not open file"), text);
return false;
}
return true;
}
} // namespace anon
@ -884,36 +875,15 @@ bool Buffer::do_writeFile(ostream & ofs) const
}
void Buffer::writeFileAscii(string const & fname, LatexRunParams const & runparams)
{
ofstream ofs;
if (!::openFileWrite(ofs, fname))
return;
writeFileAscii(ofs, runparams);
}
void Buffer::writeFileAscii(ostream & os, LatexRunParams const & runparams)
{
ParagraphList::iterator beg = paragraphs().begin();
ParagraphList::iterator end = paragraphs().end();
ParagraphList::iterator it = beg;
for (; it != end; ++it) {
asciiParagraph(*this, *it, os, runparams, it == beg);
}
os << "\n";
}
void Buffer::makeLaTeXFile(string const & fname,
string const & original_path,
LatexRunParams const & runparams,
OutputParams const & runparams,
bool output_preamble, bool output_body)
{
lyxerr[Debug::LATEX] << "makeLaTeXFile..." << endl;
ofstream ofs;
if (!::openFileWrite(ofs, fname))
if (!openFileWrite(ofs, fname))
return;
makeLaTeXFile(ofs, original_path,
@ -928,10 +898,10 @@ void Buffer::makeLaTeXFile(string const & fname,
void Buffer::makeLaTeXFile(ostream & os,
string const & original_path,
LatexRunParams const & runparams_in,
OutputParams const & runparams_in,
bool output_preamble, bool output_body)
{
LatexRunParams runparams = runparams_in;
OutputParams runparams = runparams_in;
niceFile() = runparams.nice; // this will be used by Insetincludes.
// validate the buffer.
@ -1068,11 +1038,11 @@ bool Buffer::isSGML() const
void Buffer::makeLinuxDocFile(string const & fname,
LatexRunParams const & runparams,
OutputParams const & runparams,
bool body_only )
{
ofstream ofs;
if (!::openFileWrite(ofs, fname))
if (!openFileWrite(ofs, fname))
return;
niceFile() = runparams.nice; // this will be used by included files.
@ -1131,11 +1101,11 @@ void Buffer::makeLinuxDocFile(string const & fname,
void Buffer::makeDocBookFile(string const & fname,
LatexRunParams const & runparams,
OutputParams const & runparams,
bool only_body)
{
ofstream ofs;
if (!::openFileWrite(ofs, fname))
if (!openFileWrite(ofs, fname))
return;
niceFile() = runparams.nice; // this will be used by Insetincludes.
@ -1210,8 +1180,8 @@ int Buffer::runChktex()
message(_("Running chktex..."));
// Generate the LaTeX file if neccessary
LatexRunParams runparams;
runparams.flavor = LatexRunParams::LATEX;
OutputParams runparams;
runparams.flavor = OutputParams::LATEX;
runparams.nice = false;
makeLaTeXFile(name, org_path, runparams);

View File

@ -36,7 +36,7 @@ class LyXLex;
class LyXRC;
class LyXVC;
class LaTeXFeatures;
class LatexRunParams;
class OutputParams;
class Language;
class Messages;
class ParIterator;
@ -135,28 +135,28 @@ public:
bool writeFile(std::string const &) const;
///
void writeFileAscii(std::string const &, LatexRunParams const &);
void writeFileAscii(std::string const &, OutputParams const &);
///
void writeFileAscii(std::ostream &, LatexRunParams const &);
void writeFileAscii(std::ostream &, OutputParams const &);
/// Just a wrapper for the method below, first creating the ofstream.
void makeLaTeXFile(std::string const & filename,
std::string const & original_path,
LatexRunParams const &,
OutputParams const &,
bool output_preamble = true,
bool output_body = true);
///
void makeLaTeXFile(std::ostream & os,
std::string const & original_path,
LatexRunParams const &,
OutputParams const &,
bool output_preamble = true,
bool output_body = true);
///
void makeLinuxDocFile(std::string const & filename,
LatexRunParams const & runparams_in,
OutputParams const & runparams_in,
bool only_body = false);
///
void makeDocBookFile(std::string const & filename,
LatexRunParams const & runparams_in,
OutputParams const & runparams_in,
bool only_body = false);
/// returns the main language for the buffer (document)
Language const * getLanguage() const;

View File

@ -20,6 +20,7 @@
#include "lastfiles.h"
#include "lyx_cb.h"
#include "lyx_main.h"
#include "output_latex.h"
#include "paragraph.h"
#include "frontends/Alert.h"
@ -214,7 +215,7 @@ Buffer * BufferList::getBuffer(unsigned int choice)
void BufferList::updateIncludedTeXfiles(string const & mastertmpdir,
LatexRunParams const & runparams)
OutputParams const & runparams)
{
BufferStorage::iterator it = bstore.begin();
BufferStorage::iterator end = bstore.end();

View File

@ -18,7 +18,7 @@
#include <vector>
class Buffer;
class LatexRunParams;
class OutputParams;
/**
* The class holds all all open buffers, and handles construction
@ -44,7 +44,7 @@ public:
std::vector<std::string> const getFileNames() const;
/// FIXME
void updateIncludedTeXfiles(std::string const &, LatexRunParams const &);
void updateIncludedTeXfiles(std::string const &, OutputParams const &);
/// emergency save for all buffers
void emergencyWriteAll();

View File

@ -25,11 +25,11 @@
#include "gettext.h"
#include "language.h"
#include "LaTeXFeatures.h"
#include "latexrunparams.h"
#include "LColor.h"
#include "lyxlex.h"
#include "lyxrc.h"
#include "lyxtextclasslist.h"
#include "outputparams.h"
#include "tex-strings.h"
#include "Spacing.h"
#include "texrow.h"

View File

@ -283,9 +283,9 @@ bool Converters::convert(Buffer const * buffer,
if (edgepath.empty()) {
return false;
}
LatexRunParams runparams;
OutputParams runparams;
runparams.flavor = usePdflatex(edgepath) ?
LatexRunParams::PDFLATEX : LatexRunParams::LATEX;
OutputParams::PDFLATEX : OutputParams::LATEX;
string path = OnlyPath(from_file);
Path p(path);
@ -492,8 +492,8 @@ bool Converters::formatIsUsed(string const & format)
bool Converters::scanLog(Buffer const & buffer, string const & /*command*/,
string const & filename)
{
LatexRunParams runparams;
runparams.flavor = LatexRunParams::LATEX;
OutputParams runparams;
runparams.flavor = OutputParams::LATEX;
LaTeX latex("", runparams, filename, "");
TeXErrors terr;
int result = latex.scanLogFile(terr);
@ -521,7 +521,7 @@ private:
bool Converters::runLaTeX(Buffer const & buffer, string const & command,
LatexRunParams const & runparams)
OutputParams const & runparams)
{
buffer.busy(true);
buffer.message(_("Running LaTeX..."));

View File

@ -21,7 +21,7 @@
class Buffer;
class Format;
class Formats;
class LatexRunParams;
class OutputParams;
///
@ -132,7 +132,7 @@ private:
std::string const & filename);
///
bool runLaTeX(Buffer const & buffer, std::string const & command,
LatexRunParams const &);
OutputParams const &);
///
ConverterList converterlist_;
///

View File

@ -24,9 +24,9 @@
#include "converter.h"
#include "format.h"
#include "gettext.h"
#include "latexrunparams.h"
#include "lyxrc.h"
#include "output_plaintext.h"
#include "outputparams.h"
#include "frontends/Alert.h"
#include "support/filetools.h"
@ -60,8 +60,8 @@ bool Exporter::Export(Buffer * buffer, string const & format,
bool put_in_tempdir, string & result_file)
{
string backend_format;
LatexRunParams runparams;
runparams.flavor = LatexRunParams::LATEX;
OutputParams runparams;
runparams.flavor = OutputParams::LATEX;
runparams.linelen = lyxrc.ascii_linelen;
vector<string> backends = Backends(*buffer);
if (find(backends.begin(), backends.end(), format) == backends.end()) {
@ -71,7 +71,7 @@ bool Exporter::Export(Buffer * buffer, string const & format,
converters.getPath(*it, format);
if (!p.empty()) {
if (converters.usePdflatex(p))
runparams.flavor = LatexRunParams::PDFLATEX;
runparams.flavor = OutputParams::PDFLATEX;
backend_format = *it;
break;
}
@ -93,7 +93,7 @@ bool Exporter::Export(Buffer * buffer, string const & format,
// Ascii backend
if (backend_format == "text")
buffer->writeFileAscii(filename, runparams);
writeFileAscii(*buffer, filename, runparams);
// Linuxdoc backend
else if (buffer->isLinuxDoc()) {
runparams.nice = !put_in_tempdir;

View File

@ -1,3 +1,8 @@
2003-11-05 José Matos <jamatos@lyx.org>
* PreviewLoader.C (dumpPreamble): rename ascii to plaintext
and LatexRunParams to OutputParams.
2003-10-22 Angus Leeming <leeming@lyx.org>
* PreviewImage.C (statusChanged): always pass on the signal, not just

View File

@ -17,9 +17,9 @@
#include "converter.h"
#include "debug.h"
#include "format.h"
#include "latexrunparams.h"
#include "LColor.h"
#include "lyxrc.h"
#include "outputparams.h"
#include "frontends/lyx_gui.h" // hexname
@ -570,8 +570,8 @@ void PreviewLoader::Impl::dumpPreamble(ostream & os) const
// Why on earth is Buffer::makeLaTeXFile a non-const method?
Buffer & tmp = const_cast<Buffer &>(buffer_);
// Dump the preamble only.
LatexRunParams runparams;
runparams.flavor = LatexRunParams::LATEX;
OutputParams runparams;
runparams.flavor = OutputParams::LATEX;
runparams.nice = true;
runparams.moving_arg = true;
runparams.free_spacing = true;
@ -580,7 +580,7 @@ void PreviewLoader::Impl::dumpPreamble(ostream & os) const
// FIXME! This is a HACK! The proper fix is to control the 'true'
// passed to WriteStream below:
// int InsetFormula::latex(Buffer const &, ostream & os,
// LatexRunParams const & runparams) const
// OutputParams const & runparams) const
// {
// WriteStream wi(os, runparams.moving_arg, true);
// par_->write(wi);

View File

@ -1,3 +1,45 @@
2003-11-05 José Matos <jamatos@lyx.org>
* inset.h:
* insetbibtex.[Ch]:
* insetbox.[Ch]:
* insetbranch.[Ch]:
* insetcaption.[Ch]:
* insetcite.[Ch]:
* insetcollapsable.[Ch]:
* insetcommand.[Ch]:
* insetenv.[Ch]:
* insetert.[Ch]:
* insetexternal.[Ch]:
* insetfloat.[Ch]:
* insetfloatlist.[Ch]:
* insetfoot.[Ch]:
* insetgraphics.[Ch]:
* insethfill.[Ch]:
* insetinclude.[Ch]:
* insetindex.[Ch]:
* insetlabel.[Ch]:
* insetlatexaccent.[Ch]:
* insetline.[Ch]:
* insetlist.[Ch]:
* insetmarginal.[Ch]:
* insetminipage.[Ch]:
* insetnewline.[Ch]:
* insetnote.[Ch]:
* insetoptarg.[Ch]:
* insetpagebreak.[Ch]:
* insetquotes.[Ch]:
* insetref.[Ch]:
* insetspace.[Ch]:
* insetspecialchar.[Ch]:
* insettabular.[Ch]:
* insettext.[Ch]:
* insettheorem.[Ch]:
* insettoc.[Ch]:
* inseturl.[Ch]:
* insetwrap.[Ch]: rename ascii to plaintext
and LatexRunParams to OutputParams.
2003-11-05 Alfredo Braunstein <abraunst@libero.it>
* insetcollapsable.C (edit): add open() all

View File

@ -23,7 +23,7 @@
class Buffer;
class LColor_color;
class FuncRequest;
class LatexRunParams;
class OutputParams;
class LyXCursor;
class LyXFont;
class LyXLex;
@ -181,16 +181,16 @@ public:
virtual void read(Buffer const &, LyXLex & lex) = 0;
/// returns the number of rows (\n's) of generated tex code.
virtual int latex(Buffer const &, std::ostream &,
LatexRunParams const &) const = 0;
OutputParams const &) const = 0;
///
virtual int ascii(Buffer const &, std::ostream &,
LatexRunParams const &) const = 0;
virtual int plaintext(Buffer const &, std::ostream &,
OutputParams const &) const = 0;
///
virtual int linuxdoc(Buffer const &, std::ostream &,
LatexRunParams const &) const = 0;
OutputParams const &) const = 0;
///
virtual int docbook(Buffer const &, std::ostream &,
LatexRunParams const &) const = 0;
OutputParams const &) const = 0;
/// returns LyX code associated with the inset. Used for TOC, ...)
virtual InsetOld::Code lyxCode() const { return NO_CODE; }

View File

@ -18,8 +18,8 @@
#include "debug.h"
#include "funcrequest.h"
#include "gettext.h"
#include "latexrunparams.h"
#include "metricsinfo.h"
#include "outputparams.h"
#include "support/filetools.h"
#include "support/lstrings.h"
@ -133,7 +133,7 @@ string const InsetBibtex::getScreenLabel(Buffer const &) const
int InsetBibtex::latex(Buffer const & buffer, ostream & os,
LatexRunParams const & runparams) const
OutputParams const & runparams) const
{
// changing the sequence of the commands
// 1. \bibliographystyle{style}

View File

@ -40,7 +40,7 @@ public:
bool display() const { return true; }
///
int latex(Buffer const &, std::ostream &,
LatexRunParams const &) const;
OutputParams const &) const;
///
void fillWithBibKeys(Buffer const & buffer,
std::vector<std::pair<std::string,std::string> > & keys) const;

View File

@ -204,7 +204,7 @@ InsetBox::priv_dispatch(FuncRequest const & cmd,
int InsetBox::latex(Buffer const & buf, ostream & os,
LatexRunParams const & runparams) const
OutputParams const & runparams) const
{
BoxType btype = boxtranslator().find(params_.type);
@ -333,21 +333,21 @@ int InsetBox::latex(Buffer const & buf, ostream & os,
int InsetBox::linuxdoc(Buffer const & buf, std::ostream & os,
LatexRunParams const & runparams) const
OutputParams const & runparams) const
{
return inset.linuxdoc(buf, os, runparams);
}
int InsetBox::docbook(Buffer const & buf, std::ostream & os,
LatexRunParams const & runparams) const
OutputParams const & runparams) const
{
return inset.docbook(buf, os, runparams);
}
int InsetBox::ascii(Buffer const & buf, std::ostream & os,
LatexRunParams const & runparams) const
int InsetBox::plaintext(Buffer const & buf, std::ostream & os,
OutputParams const & runparams) const
{
int i = 0;
string const pt = params_.type;
@ -372,7 +372,7 @@ int InsetBox::ascii(Buffer const & buf, std::ostream & os,
break;
}
i = inset.ascii(buf, os, runparams);
i = inset.plaintext(buf, os, runparams);
switch (btype) {
case Frameless:

View File

@ -79,16 +79,16 @@ public:
bool showInsetDialog(BufferView * bv) const;
///
int latex(Buffer const &, std::ostream &,
LatexRunParams const &) const;
OutputParams const &) const;
///
int linuxdoc(Buffer const &, std::ostream &,
LatexRunParams const &) const;
OutputParams const &) const;
///
int docbook(Buffer const &, std::ostream &,
LatexRunParams const &) const;
OutputParams const &) const;
///
int ascii(Buffer const &, std::ostream &,
LatexRunParams const & runparams) const;
int plaintext(Buffer const &, std::ostream &,
OutputParams const & runparams) const;
///
void validate(LaTeXFeatures &) const;
///

View File

@ -155,7 +155,7 @@ InsetBranch::priv_dispatch(FuncRequest const & cmd,
int InsetBranch::latex(Buffer const & buf, ostream & os,
LatexRunParams const & runparams) const
OutputParams const & runparams) const
{
string const branch_sel = buf.params().branchlist().allSelected();
if (branch_sel.find(params_.branch, 0) != string::npos)
@ -165,7 +165,7 @@ int InsetBranch::latex(Buffer const & buf, ostream & os,
int InsetBranch::linuxdoc(Buffer const & buf, std::ostream & os,
LatexRunParams const & runparams) const
OutputParams const & runparams) const
{
string const branch_sel = buf.params().branchlist().allSelected();
if (branch_sel.find(params_.branch, 0) != string::npos)
@ -175,7 +175,7 @@ int InsetBranch::linuxdoc(Buffer const & buf, std::ostream & os,
int InsetBranch::docbook(Buffer const & buf, std::ostream & os,
LatexRunParams const & runparams) const
OutputParams const & runparams) const
{
string const branch_sel = buf.params().branchlist().allSelected();
if (branch_sel.find(params_.branch, 0) != string::npos)
@ -184,12 +184,12 @@ int InsetBranch::docbook(Buffer const & buf, std::ostream & os,
}
int InsetBranch::ascii(Buffer const & buf, std::ostream & os,
LatexRunParams const & runparams) const
int InsetBranch::plaintext(Buffer const & buf, std::ostream & os,
OutputParams const & runparams) const
{
string const branch_sel = buf.params().branchlist().allSelected();
if (branch_sel.find(params_.branch, 0) != string::npos) {
return inset.ascii(buf, os, runparams);
return inset.plaintext(buf, os, runparams);
}
return 0;
}

View File

@ -55,16 +55,16 @@ public:
bool showInsetDialog(BufferView *) const;
///
int latex(Buffer const &, std::ostream &,
LatexRunParams const &) const;
OutputParams const &) const;
///
int linuxdoc(Buffer const &, std::ostream &,
LatexRunParams const &) const;
OutputParams const &) const;
///
int docbook(Buffer const &, std::ostream &,
LatexRunParams const & runparams) const;
OutputParams const & runparams) const;
///
int ascii(Buffer const &, std::ostream &,
LatexRunParams const & runparams) const;
int plaintext(Buffer const &, std::ostream &,
OutputParams const & runparams) const;
///
void validate(LaTeXFeatures &) const;
///

View File

@ -113,7 +113,7 @@ void InsetCaption::draw(PainterInfo & pi, int x, int y) const
int InsetCaption::latex(Buffer const & buf, ostream & os,
LatexRunParams const & runparams) const
OutputParams const & runparams) const
{
// This is a bit too simplistic to take advantage of
// caption options we must add more later. (Lgb)
@ -127,8 +127,8 @@ int InsetCaption::latex(Buffer const & buf, ostream & os,
}
int InsetCaption::ascii(Buffer const & /*buf*/,ostream & /*os*/,
LatexRunParams const & /*runparams*/) const
int InsetCaption::plaintext(Buffer const & /*buf*/,ostream & /*os*/,
OutputParams const & /*runparams*/) const
{
// FIX: Implement me!
return 0;
@ -136,7 +136,7 @@ int InsetCaption::ascii(Buffer const & /*buf*/,ostream & /*os*/,
int InsetCaption::docbook(Buffer const & buf, ostream & os,
LatexRunParams const & runparams) const
OutputParams const & runparams) const
{
int ret;
os << "<title>";

View File

@ -35,13 +35,13 @@ public:
virtual void draw(PainterInfo & pi, int x, int y) const;
///
virtual int latex(Buffer const & buf, std::ostream & os,
LatexRunParams const &) const;
OutputParams const &) const;
///
int ascii(Buffer const & buf, std::ostream & os,
LatexRunParams const & runparams) const;
int plaintext(Buffer const & buf, std::ostream & os,
OutputParams const & runparams) const;
///
int docbook(Buffer const & buf, std::ostream & os,
LatexRunParams const & runparams) const;
OutputParams const & runparams) const;
};

View File

@ -325,7 +325,7 @@ InsetCitation::priv_dispatch(FuncRequest const & cmd,
}
int InsetCitation::ascii(Buffer const & buffer, ostream & os, int) const
int InsetCitation::plaintext(Buffer const & buffer, ostream & os, int) const
{
if (cache.params == params() && cache.style == getStyle(buffer))
os << cache.generated_label;
@ -340,7 +340,7 @@ int InsetCitation::ascii(Buffer const & buffer, ostream & os, int) const
// citations and then changes his mind, turning natbib support off. The output
// should revert to \cite[]{}
int InsetCitation::latex(Buffer const & buffer, ostream & os,
LatexRunParams const &) const
OutputParams const &) const
{
os << "\\";
if (buffer.params().use_natbib)

View File

@ -35,10 +35,10 @@ public:
///
InsetOld::Code lyxCode() const { return InsetOld::CITE_CODE; }
///
int ascii(Buffer const &, std::ostream &, int linelen) const;
int plaintext(Buffer const &, std::ostream &, int linelen) const;
///
int latex(Buffer const &, std::ostream &,
LatexRunParams const &) const;
OutputParams const &) const;
///
void validate(LaTeXFeatures &) const;
protected:

View File

@ -241,28 +241,28 @@ void InsetCollapsable::lfunMouseRelease(FuncRequest const & cmd)
int InsetCollapsable::latex(Buffer const & buf, ostream & os,
LatexRunParams const & runparams) const
OutputParams const & runparams) const
{
return inset.latex(buf, os, runparams);
}
int InsetCollapsable::ascii(Buffer const & buf, ostream & os,
LatexRunParams const & runparams) const
int InsetCollapsable::plaintext(Buffer const & buf, ostream & os,
OutputParams const & runparams) const
{
return inset.ascii(buf, os, runparams);
return inset.plaintext(buf, os, runparams);
}
int InsetCollapsable::linuxdoc(Buffer const & buf, ostream & os,
LatexRunParams const & runparams) const
OutputParams const & runparams) const
{
return inset.linuxdoc(buf, os, runparams);
}
int InsetCollapsable::docbook(Buffer const & buf, ostream & os,
LatexRunParams const & runparams) const
OutputParams const & runparams) const
{
return inset.docbook(buf, os, runparams);
}

View File

@ -69,16 +69,16 @@ public:
int insetInInsetY() const;
///
int latex(Buffer const &, std::ostream &,
LatexRunParams const &) const;
OutputParams const &) const;
///
int ascii(Buffer const &, std::ostream &,
LatexRunParams const &) const;
int plaintext(Buffer const &, std::ostream &,
OutputParams const &) const;
///
int linuxdoc(Buffer const &, std::ostream &,
LatexRunParams const &) const;
OutputParams const &) const;
///
int docbook(Buffer const &, std::ostream &,
LatexRunParams const & runparams) const;
OutputParams const & runparams) const;
///
void validate(LaTeXFeatures & features) const;
/// FIXME, document

View File

@ -60,29 +60,29 @@ void InsetCommand::setParams(InsetCommandParams const & p)
int InsetCommand::latex(Buffer const &, ostream & os,
LatexRunParams const &) const
OutputParams const &) const
{
os << getCommand();
return 0;
}
int InsetCommand::ascii(Buffer const &, ostream &,
LatexRunParams const &) const
int InsetCommand::plaintext(Buffer const &, ostream &,
OutputParams const &) const
{
return 0;
}
int InsetCommand::linuxdoc(Buffer const &, ostream &,
LatexRunParams const &) const
OutputParams const &) const
{
return 0;
}
int InsetCommand::docbook(Buffer const &, ostream &,
LatexRunParams const &) const
OutputParams const &) const
{
return 0;
}

View File

@ -46,16 +46,16 @@ public:
void scanCommand(std::string const & c) { p_.scanCommand(c); };
///
virtual int latex(Buffer const &, std::ostream &,
LatexRunParams const &) const;
OutputParams const &) const;
///
int ascii(Buffer const &, std::ostream &,
LatexRunParams const &) const;
int plaintext(Buffer const &, std::ostream &,
OutputParams const &) const;
///
virtual int linuxdoc(Buffer const &, std::ostream &,
LatexRunParams const &) const;
OutputParams const &) const;
///
virtual int docbook(Buffer const &, std::ostream &,
LatexRunParams const & runparams) const;
OutputParams const & runparams) const;
///
InsetOld::Code lyxCode() const { return InsetOld::NO_CODE; }

View File

@ -15,7 +15,7 @@
#include "bufferparams.h"
#include "gettext.h"
#include "paragraph.h"
#include "paragraph_funcs.h"
#include "output_latex.h"
#include "texrow.h"
#include "support/std_ostream.h"
@ -67,7 +67,7 @@ string const InsetEnvironment::editMessage() const
int InsetEnvironment::latex(Buffer const & buf, ostream & os,
LatexRunParams const & runparams) const
OutputParams const & runparams) const
{
os << layout_->latexheader;
TexRow texrow;

View File

@ -31,7 +31,7 @@ public:
InsetOld::Code lyxCode() const { return InsetOld::ENVIRONMENT_CODE; }
///
int latex(Buffer const &, std::ostream &,
LatexRunParams const &) const;
OutputParams const &) const;
///
std::string const editMessage() const;
///

View File

@ -330,7 +330,7 @@ void InsetERT::lfunMouseMotion(FuncRequest const & cmd)
int InsetERT::latex(Buffer const &, ostream & os,
LatexRunParams const &) const
OutputParams const &) const
{
ParagraphList::iterator par = inset.paragraphs.begin();
ParagraphList::iterator end = inset.paragraphs.end();
@ -361,15 +361,15 @@ int InsetERT::latex(Buffer const &, ostream & os,
}
int InsetERT::ascii(Buffer const &, ostream &,
LatexRunParams const & /*runparams*/) const
int InsetERT::plaintext(Buffer const &, ostream &,
OutputParams const & /*runparams*/) const
{
return 0;
}
int InsetERT::linuxdoc(Buffer const &, ostream & os,
LatexRunParams const &)const
OutputParams const &)const
{
ParagraphList::iterator par = inset.paragraphs.begin();
ParagraphList::iterator end = inset.paragraphs.end();
@ -397,7 +397,7 @@ int InsetERT::linuxdoc(Buffer const &, ostream & os,
int InsetERT::docbook(Buffer const &, ostream & os,
LatexRunParams const &) const
OutputParams const &) const
{
ParagraphList::iterator par = inset.paragraphs.begin();
ParagraphList::iterator end = inset.paragraphs.end();

View File

@ -65,16 +65,16 @@ public:
EDITABLE editable() const;
///
int latex(Buffer const &, std::ostream &,
LatexRunParams const &) const;
OutputParams const &) const;
///
int ascii(Buffer const &, std::ostream &,
LatexRunParams const & runparams) const;
int plaintext(Buffer const &, std::ostream &,
OutputParams const & runparams) const;
///
int linuxdoc(Buffer const &, std::ostream &,
LatexRunParams const &) const;
OutputParams const &) const;
///
int docbook(Buffer const &, std::ostream &,
LatexRunParams const & runparams) const;
OutputParams const & runparams) const;
///
void validate(LaTeXFeatures &) const {}
///

View File

@ -24,11 +24,11 @@
#include "funcrequest.h"
#include "gettext.h"
#include "LaTeXFeatures.h"
#include "latexrunparams.h"
#include "lyx_main.h"
#include "lyxlex.h"
#include "lyxrc.h"
#include "metricsinfo.h"
#include "outputparams.h"
#include "frontends/lyx_gui.h"
#include "frontends/LyXView.h"
@ -658,7 +658,7 @@ void InsetExternal::read(Buffer const & buffer, LyXLex & lex)
int InsetExternal::latex(Buffer const & buf, ostream & os,
LatexRunParams const & runparams) const
OutputParams const & runparams) const
{
// "nice" means that the buffer is exported to LaTeX format but not
// run through the LaTeX compiler.
@ -669,7 +669,7 @@ int InsetExternal::latex(Buffer const & buf, ostream & os,
// If the template has specified a PDFLaTeX output, then we try and
// use that.
if (runparams.flavor == LatexRunParams::PDFLATEX) {
if (runparams.flavor == OutputParams::PDFLATEX) {
external::Template const * const et_ptr =
external::getTemplatePtr(params_);
if (!et_ptr)
@ -688,22 +688,22 @@ int InsetExternal::latex(Buffer const & buf, ostream & os,
}
int InsetExternal::ascii(Buffer const & buf, ostream & os,
LatexRunParams const &) const
int InsetExternal::plaintext(Buffer const & buf, ostream & os,
OutputParams const &) const
{
return external::writeExternal(params_, "Ascii", buf, os);
}
int InsetExternal::linuxdoc(Buffer const & buf, ostream & os,
LatexRunParams const &) const
OutputParams const &) const
{
return external::writeExternal(params_, "LinuxDoc", buf, os);
}
int InsetExternal::docbook(Buffer const & buf, ostream & os,
LatexRunParams const &) const
OutputParams const &) const
{
return external::writeExternal(params_, "DocBook", buf, os);
}
@ -755,8 +755,8 @@ bool preview_wanted(InsetExternalParams const & params)
string const latex_string(InsetExternal const & inset, Buffer const & buffer)
{
ostringstream os;
LatexRunParams runparams;
runparams.flavor = LatexRunParams::LATEX;
OutputParams runparams;
runparams.flavor = OutputParams::LATEX;
inset.latex(buffer, os, runparams);
return os.str();

View File

@ -121,16 +121,16 @@ public:
/// \returns the number of rows (\n's) of generated code.
virtual int latex(Buffer const &, std::ostream &,
LatexRunParams const &) const;
OutputParams const &) const;
///
virtual int ascii(Buffer const &, std::ostream &,
LatexRunParams const &) const;
virtual int plaintext(Buffer const &, std::ostream &,
OutputParams const &) const;
///
virtual int linuxdoc(Buffer const &, std::ostream &,
LatexRunParams const &) const;
OutputParams const &) const;
///
virtual int docbook(Buffer const &, std::ostream &,
LatexRunParams const &) const;
OutputParams const &) const;
/// Update needed features for this inset.
virtual void validate(LaTeXFeatures & features) const;

View File

@ -24,9 +24,9 @@
#include "gettext.h"
#include "iterators.h"
#include "LaTeXFeatures.h"
#include "latexrunparams.h"
#include "LColor.h"
#include "lyxlex.h"
#include "outputparams.h"
#include "paragraph.h"
#include "support/lstrings.h"
@ -272,7 +272,7 @@ string const InsetFloat::editMessage() const
int InsetFloat::latex(Buffer const & buf, ostream & os,
LatexRunParams const & runparams) const
OutputParams const & runparams) const
{
FloatList const & floats = buf.params().getLyXTextClass().floats();
string const tmptype = (params_.wide ? params_.type + "*" : params_.type);
@ -314,7 +314,7 @@ int InsetFloat::latex(Buffer const & buf, ostream & os,
int InsetFloat::linuxdoc(Buffer const & buf, ostream & os,
LatexRunParams const & runparams) const
OutputParams const & runparams) const
{
FloatList const & floats = buf.params().getLyXTextClass().floats();
string const tmptype = params_.type;
@ -352,7 +352,7 @@ int InsetFloat::linuxdoc(Buffer const & buf, ostream & os,
int InsetFloat::docbook(Buffer const & buf, ostream & os,
LatexRunParams const & runparams) const
OutputParams const & runparams) const
{
os << '<' << params_.type << '>';
int const i = inset.docbook(buf, os, runparams);

View File

@ -56,13 +56,13 @@ public:
InsetOld::Code lyxCode() const { return InsetOld::FLOAT_CODE; }
///
int latex(Buffer const &, std::ostream &,
LatexRunParams const &) const;
OutputParams const &) const;
///
int linuxdoc(Buffer const &, std::ostream &,
LatexRunParams const &) const;
OutputParams const &) const;
///
int docbook(Buffer const &, std::ostream &,
LatexRunParams const &) const;
OutputParams const &) const;
///
std::string const editMessage() const;
///

View File

@ -140,7 +140,7 @@ InsetFloatList::priv_dispatch(FuncRequest const & cmd,
int InsetFloatList::latex(Buffer const & buf, ostream & os,
LatexRunParams const &) const
OutputParams const &) const
{
FloatList const & floats = buf.params().getLyXTextClass().floats();
FloatList::const_iterator cit = floats[getCmdName()];
@ -169,7 +169,7 @@ int InsetFloatList::latex(Buffer const & buf, ostream & os,
}
int InsetFloatList::ascii(Buffer const & buffer, ostream & os, LatexRunParams const &) const
int InsetFloatList::plaintext(Buffer const & buffer, ostream & os, OutputParams const &) const
{
os << getScreenLabel(buffer) << "\n\n";

View File

@ -47,16 +47,16 @@ public:
void read(Buffer const &, LyXLex &);
///
int latex(Buffer const &, std::ostream &,
LatexRunParams const &) const;
OutputParams const &) const;
///
int linuxdoc(Buffer const &, std::ostream &,
LatexRunParams const &) const { return 0; }
OutputParams const &) const { return 0; }
///
int docbook(Buffer const &, std::ostream &,
LatexRunParams const &) const { return 0; }
OutputParams const &) const { return 0; }
///
int ascii(Buffer const &, std::ostream &,
LatexRunParams const & runparams) const;
int plaintext(Buffer const &, std::ostream &,
OutputParams const & runparams) const;
///
void validate(LaTeXFeatures & features) const;
protected:

View File

@ -14,10 +14,10 @@
#include "insetfoot.h"
#include "gettext.h"
#include "latexrunparams.h"
// the following are needed just to get the layout of the enclosing
// paragraph. This seems a bit too much to me (JMarc)
#include "lyxlayout.h"
#include "outputparams.h"
#include "paragraph.h"
#include "paragraph_funcs.h"
@ -58,9 +58,9 @@ string const InsetFoot::editMessage() const
int InsetFoot::latex(Buffer const & buf, ostream & os,
LatexRunParams const & runparams_in) const
OutputParams const & runparams_in) const
{
LatexRunParams runparams = runparams_in;
OutputParams runparams = runparams_in;
runparams.moving_arg |= ownerPar(buf, this).layout()->intitle;
os << "%\n\\footnote{";
@ -73,7 +73,7 @@ int InsetFoot::latex(Buffer const & buf, ostream & os,
int InsetFoot::docbook(Buffer const & buf, ostream & os,
LatexRunParams const & runparams) const
OutputParams const & runparams) const
{
os << "<footnote>";
int const i = inset.docbook(buf, os, runparams);

View File

@ -30,10 +30,10 @@ public:
InsetOld::Code lyxCode() const { return InsetOld::FOOT_CODE; }
///
int latex(Buffer const &, std::ostream &,
LatexRunParams const &) const;
OutputParams const &) const;
///
int docbook(Buffer const &, std::ostream &,
LatexRunParams const & runparams) const;
OutputParams const & runparams) const;
///
std::string const editMessage() const;
};

View File

@ -64,11 +64,11 @@ TODO
#include "funcrequest.h"
#include "gettext.h"
#include "LaTeXFeatures.h"
#include "latexrunparams.h"
#include "lyx_main.h"
#include "lyxlex.h"
#include "lyxrc.h"
#include "metricsinfo.h"
#include "outputparams.h"
#include "frontends/Alert.h"
#include "frontends/LyXView.h"
@ -133,10 +133,10 @@ string const uniqueID()
}
string findTargetFormat(string const & suffix, LatexRunParams const & runparams)
string findTargetFormat(string const & suffix, OutputParams const & runparams)
{
// Are we using latex or pdflatex).
if (runparams.flavor == LatexRunParams::PDFLATEX) {
if (runparams.flavor == OutputParams::PDFLATEX) {
lyxerr[Debug::GRAPHICS] << "findTargetFormat: PDF mode" << endl;
if (contains(suffix, "ps") || suffix == "pdf")
return "pdf";
@ -416,7 +416,7 @@ string const stripExtensionIfPossible(string const & file, string const & to)
string const InsetGraphics::prepareFile(Buffer const & buf,
LatexRunParams const & runparams) const
OutputParams const & runparams) const
{
string orig_file = params().filename.absFilename();
string const rel_file = params().filename.relFilename(buf.filePath());
@ -539,7 +539,7 @@ string const InsetGraphics::prepareFile(Buffer const & buf,
int InsetGraphics::latex(Buffer const & buf, ostream & os,
LatexRunParams const & runparams) const
OutputParams const & runparams) const
{
// If there is no file specified or not existing,
// just output a message about it in the latex output.
@ -616,8 +616,8 @@ int InsetGraphics::latex(Buffer const & buf, ostream & os,
}
int InsetGraphics::ascii(Buffer const &, ostream & os,
LatexRunParams const &) const
int InsetGraphics::plaintext(Buffer const &, ostream & os,
OutputParams const &) const
{
// No graphics in ascii output. Possible to use gifscii to convert
// images to ascii approximation.
@ -631,7 +631,7 @@ int InsetGraphics::ascii(Buffer const &, ostream & os,
int InsetGraphics::linuxdoc(Buffer const & buf, ostream & os,
LatexRunParams const &) const
OutputParams const &) const
{
string const file_name = buf.niceFile() ?
params().filename.relFilename(buf.filePath()):
@ -647,7 +647,7 @@ int InsetGraphics::linuxdoc(Buffer const & buf, ostream & os,
// http://en.tldp.org/LDP/LDP-Author-Guide/inserting-pictures.html
// See also the docbook guide at http://www.docbook.org/
int InsetGraphics::docbook(Buffer const &, ostream & os,
LatexRunParams const &) const
OutputParams const &) const
{
// In DocBook v5.0, the graphic tag will be eliminated from DocBook, will
// need to switch to MediaObject. However, for now this is sufficient and

View File

@ -46,16 +46,16 @@ public:
fragile commands by adding a #\protect# before.
*/
int latex(Buffer const &, std::ostream &,
LatexRunParams const &) const;
OutputParams const &) const;
///
int ascii(Buffer const &, std::ostream &,
LatexRunParams const &) const;
int plaintext(Buffer const &, std::ostream &,
OutputParams const &) const;
///
int linuxdoc(Buffer const &, std::ostream &,
LatexRunParams const &) const;
OutputParams const &) const;
///
int docbook(Buffer const &, std::ostream &,
LatexRunParams const &) const;
OutputParams const &) const;
/** Tell LyX what the latex features you need i.e. what latex packages
you need to be included.
@ -101,7 +101,7 @@ private:
/// Create the options for the latex command.
std::string const createLatexOptions() const;
/// Convert the file if needed, and return the location of the file.
std::string const prepareFile(Buffer const & buf, LatexRunParams const &) const;
std::string const prepareFile(Buffer const & buf, OutputParams const &) const;
///
InsetGraphicsParams params_;

View File

@ -44,15 +44,15 @@ std::string const InsetHFill::getScreenLabel(Buffer const &) const
int InsetHFill::latex(Buffer const &, ostream & os,
LatexRunParams const &) const
OutputParams const &) const
{
os << getCommand();
return 0;
}
int InsetHFill::ascii(Buffer const &, ostream & os,
LatexRunParams const &) const
int InsetHFill::plaintext(Buffer const &, ostream & os,
OutputParams const &) const
{
os << '\t';
return 0;
@ -60,7 +60,7 @@ int InsetHFill::ascii(Buffer const &, ostream & os,
int InsetHFill::linuxdoc(Buffer const &, std::ostream & os,
LatexRunParams const &) const
OutputParams const &) const
{
os << '\n';
return 0;
@ -68,7 +68,7 @@ int InsetHFill::linuxdoc(Buffer const &, std::ostream & os,
int InsetHFill::docbook(Buffer const &, std::ostream & os,
LatexRunParams const &) const
OutputParams const &) const
{
os << '\n';
return 0;

View File

@ -29,16 +29,16 @@ public:
InsetOld::Code lyxCode() const { return InsetOld::HFILL_CODE; }
///
int latex(Buffer const &, std::ostream &,
LatexRunParams const &) const;
OutputParams const &) const;
///
int ascii(Buffer const &, std::ostream &,
LatexRunParams const & runparams) const;
int plaintext(Buffer const &, std::ostream &,
OutputParams const & runparams) const;
///
int linuxdoc(Buffer const &, std::ostream &,
LatexRunParams const &) const;
OutputParams const &) const;
///
int docbook(Buffer const &, std::ostream &,
LatexRunParams const & runparams) const;
OutputParams const & runparams) const;
///
void write(Buffer const & buf, std::ostream & os) const;
/// We don't need \begin_inset and \end_inset

View File

@ -22,10 +22,10 @@
#include "funcrequest.h"
#include "gettext.h"
#include "LaTeXFeatures.h"
#include "latexrunparams.h"
#include "lyx_main.h"
#include "lyxlex.h"
#include "metricsinfo.h"
#include "outputparams.h"
#include "frontends/LyXView.h"
#include "frontends/Painter.h"
@ -294,7 +294,7 @@ bool loadIfNeeded(Buffer const & buffer, InsetCommandParams const & params)
int InsetInclude::latex(Buffer const & buffer, ostream & os,
LatexRunParams const & runparams) const
OutputParams const & runparams) const
{
string incfile(params_.getContents());
@ -364,8 +364,8 @@ int InsetInclude::latex(Buffer const & buffer, ostream & os,
}
int InsetInclude::ascii(Buffer const & buffer, ostream & os,
LatexRunParams const &) const
int InsetInclude::plaintext(Buffer const & buffer, ostream & os,
OutputParams const &) const
{
if (isVerbatim(params_))
os << GetFileContents(includedFilename(buffer, params_));
@ -374,7 +374,7 @@ int InsetInclude::ascii(Buffer const & buffer, ostream & os,
int InsetInclude::linuxdoc(Buffer const & buffer, ostream & os,
LatexRunParams const & runparams) const
OutputParams const & runparams) const
{
string incfile(params_.getContents());
@ -401,8 +401,8 @@ int InsetInclude::linuxdoc(Buffer const & buffer, ostream & os,
lyxerr[Debug::LATEX] << "incfile:" << incfile << endl;
lyxerr[Debug::LATEX] << "writefile:" << writefile << endl;
LatexRunParams runp = runparams;
runp.nice = buffer.niceFile();
OutputParams runp = runparams;
runp.nice = buffer.niceFile();
tmp->makeLinuxDocFile(writefile, runp, true);
}
@ -418,7 +418,7 @@ int InsetInclude::linuxdoc(Buffer const & buffer, ostream & os,
int InsetInclude::docbook(Buffer const & buffer, ostream & os,
LatexRunParams const & runparams) const
OutputParams const & runparams) const
{
string incfile(params_.getContents());
@ -444,7 +444,7 @@ int InsetInclude::docbook(Buffer const & buffer, ostream & os,
lyxerr[Debug::LATEX] << "incfile:" << incfile << endl;
lyxerr[Debug::LATEX] << "writefile:" << writefile << endl;
LatexRunParams runp = runparams;
OutputParams runp = runparams;
runp.nice = buffer.niceFile();
tmp->makeDocBookFile(writefile, runp, true);
}
@ -595,8 +595,8 @@ bool preview_wanted(InsetCommandParams const & params, Buffer const & buffer)
string const latex_string(InsetInclude const & inset, Buffer const & buffer)
{
ostringstream os;
LatexRunParams runparams;
runparams.flavor = LatexRunParams::LATEX;
OutputParams runparams;
runparams.flavor = OutputParams::LATEX;
inset.latex(buffer, os, runparams);
return os.str();

View File

@ -67,16 +67,16 @@ public:
void read(Buffer const &, LyXLex &);
///
int latex(Buffer const &, std::ostream &,
LatexRunParams const &) const;
OutputParams const &) const;
///
int ascii(Buffer const &, std::ostream &,
LatexRunParams const &) const;
int plaintext(Buffer const &, std::ostream &,
OutputParams const &) const;
///
int linuxdoc(Buffer const &, std::ostream &,
LatexRunParams const &) const;
OutputParams const &) const;
///
int docbook(Buffer const &, std::ostream &,
LatexRunParams const &) const;
OutputParams const &) const;
///
void validate(LaTeXFeatures &) const;
///

View File

@ -76,7 +76,7 @@ DispatchResult InsetIndex::priv_dispatch(FuncRequest const & cmd,
int InsetIndex::docbook(Buffer const &, ostream & os,
LatexRunParams const &) const
OutputParams const &) const
{
os << "<indexterm><primary>" << getContents()
<< "</primary></indexterm>";

View File

@ -37,7 +37,7 @@ public:
InsetOld::Code lyxCode() const;
///
int docbook(Buffer const &, std::ostream &,
LatexRunParams const &) const;
OutputParams const &) const;
///
DispatchResult priv_dispatch(FuncRequest const & cmd,
idx_type & idx, pos_type & pos);

View File

@ -94,15 +94,15 @@ InsetLabel::priv_dispatch(FuncRequest const & cmd,
int InsetLabel::latex(Buffer const &, ostream & os,
LatexRunParams const &) const
OutputParams const &) const
{
os << escape(getCommand());
return 0;
}
int InsetLabel::ascii(Buffer const &, ostream & os,
LatexRunParams const &) const
int InsetLabel::plaintext(Buffer const &, ostream & os,
OutputParams const &) const
{
os << '<' << getContents() << '>';
return 0;
@ -110,7 +110,7 @@ int InsetLabel::ascii(Buffer const &, ostream & os,
int InsetLabel::linuxdoc(Buffer const &, ostream & os,
LatexRunParams const &) const
OutputParams const &) const
{
os << "<label id=\"" << getContents() << "\" >";
return 0;
@ -118,7 +118,7 @@ int InsetLabel::linuxdoc(Buffer const &, ostream & os,
int InsetLabel::docbook(Buffer const &, ostream & os,
LatexRunParams const &) const
OutputParams const &) const
{
os << "<anchor id=\"" << getContents() << "\">";
return 0;

View File

@ -32,16 +32,16 @@ public:
void getLabelList(Buffer const &, std::vector<std::string> & list) const;
///
int latex(Buffer const &, std::ostream &,
LatexRunParams const &) const;
OutputParams const &) const;
///
int ascii(Buffer const &, std::ostream &,
LatexRunParams const &) const;
int plaintext(Buffer const &, std::ostream &,
OutputParams const &) const;
///
int linuxdoc(Buffer const &, std::ostream &,
LatexRunParams const &) const;
OutputParams const &) const;
///
int docbook(Buffer const &, std::ostream &,
LatexRunParams const &) const;
OutputParams const &) const;
protected:
///
virtual

View File

@ -601,15 +601,15 @@ void InsetLatexAccent::read(Buffer const &, LyXLex & lex)
int InsetLatexAccent::latex(Buffer const &, ostream & os,
LatexRunParams const &) const
OutputParams const &) const
{
os << contents;
return 0;
}
int InsetLatexAccent::ascii(Buffer const &, ostream & os,
LatexRunParams const &) const
int InsetLatexAccent::plaintext(Buffer const &, ostream & os,
OutputParams const &) const
{
os << contents;
return 0;
@ -617,7 +617,7 @@ int InsetLatexAccent::ascii(Buffer const &, ostream & os,
int InsetLatexAccent::linuxdoc(Buffer const &, ostream & os,
LatexRunParams const &) const
OutputParams const &) const
{
os << contents;
return 0;
@ -625,7 +625,7 @@ int InsetLatexAccent::linuxdoc(Buffer const &, ostream & os,
int InsetLatexAccent::docbook(Buffer const &, ostream & os,
LatexRunParams const &) const
OutputParams const &) const
{
os << contents;
return 0;

View File

@ -48,16 +48,16 @@ public:
void read(Buffer const &, LyXLex & lex);
///
int latex(Buffer const &, std::ostream &,
LatexRunParams const &) const;
OutputParams const &) const;
///
int ascii(Buffer const &, std::ostream &,
LatexRunParams const &) const;
int plaintext(Buffer const &, std::ostream &,
OutputParams const &) const;
///
int linuxdoc(Buffer const &, std::ostream &,
LatexRunParams const &) const;
OutputParams const &) const;
///
int docbook(Buffer const &, std::ostream &,
LatexRunParams const &) const;
OutputParams const &) const;
///
bool directWrite() const;
///

View File

@ -53,7 +53,7 @@ void InsetLine::draw(PainterInfo & pi, int x, int y) const
int InsetLine::latex(Buffer const &, ostream & os,
LatexRunParams const &) const
OutputParams const &) const
{
os << "\\lyxline{}";
@ -67,8 +67,8 @@ int InsetLine::latex(Buffer const &, ostream & os,
}
int InsetLine::ascii(Buffer const &, ostream & os,
LatexRunParams const &) const
int InsetLine::plaintext(Buffer const &, ostream & os,
OutputParams const &) const
{
os << "-------------------------------------------";
return 0;
@ -76,7 +76,7 @@ int InsetLine::ascii(Buffer const &, ostream & os,
int InsetLine::linuxdoc(Buffer const &, std::ostream & os,
LatexRunParams const &) const
OutputParams const &) const
{
os << '\n';
return 0;
@ -84,7 +84,7 @@ int InsetLine::linuxdoc(Buffer const &, std::ostream & os,
int InsetLine::docbook(Buffer const &, std::ostream & os,
LatexRunParams const &) const
OutputParams const &) const
{
os << '\n';
return 0;

View File

@ -31,16 +31,16 @@ public:
void draw(PainterInfo & pi, int x, int y) const;
int latex(Buffer const &, std::ostream &,
LatexRunParams const &) const;
OutputParams const &) const;
int ascii(Buffer const &, std::ostream &,
LatexRunParams const &) const;
int plaintext(Buffer const &, std::ostream &,
OutputParams const &) const;
int linuxdoc(Buffer const &, std::ostream &,
LatexRunParams const &) const;
OutputParams const &) const;
int docbook(Buffer const &, std::ostream &,
LatexRunParams const &) const;
OutputParams const &) const;
void read(Buffer const &, LyXLex & lex);

View File

@ -65,7 +65,7 @@ string const InsetList::editMessage() const
int InsetList::latex(Buffer const * buf, ostream & os,
LatexRunParams const & runparams) const
OutputParams const & runparams) const
{
os << "\\footnote{%\n";

View File

@ -28,7 +28,7 @@ public:
Inset::Code lyxCode() const { return Inset::FOOT_CODE; }
///
int latex(Buffer const &, std::ostream &,
LatexRunParams const &) const;
OutputParams const &) const;
///
string const editMessage() const;
};

View File

@ -53,7 +53,7 @@ string const InsetMarginal::editMessage() const
int InsetMarginal::latex(Buffer const & buf, ostream & os,
LatexRunParams const & runparams) const
OutputParams const & runparams) const
{
os << "%\n\\marginpar{";

View File

@ -31,7 +31,7 @@ public:
InsetOld::Code lyxCode() const { return InsetOld::MARGIN_CODE; }
///
int latex(Buffer const &, std::ostream &,
LatexRunParams const &) const;
OutputParams const &) const;
///
std::string const editMessage() const;
};

View File

@ -242,7 +242,7 @@ string const InsetMinipage::editMessage() const
int InsetMinipage::latex(Buffer const & buf, ostream & os,
LatexRunParams const & runparams) const
OutputParams const & runparams) const
{
string s_pos;
switch (params_.pos) {

View File

@ -71,7 +71,7 @@ public:
InsetOld::Code lyxCode() const { return InsetOld::MINIPAGE_CODE; }
///
int latex(Buffer const &, std::ostream &,
LatexRunParams const &) const;
OutputParams const &) const;
///
std::string const editMessage() const;
///

View File

@ -50,15 +50,15 @@ void InsetNewline::metrics(MetricsInfo & mi, Dimension & dim) const
int InsetNewline::latex(Buffer const &, ostream &,
LatexRunParams const &) const
OutputParams const &) const
{
lyxerr << "Eek, calling InsetNewline::latex !" << endl;
return 0;
}
int InsetNewline::ascii(Buffer const &, ostream & os,
LatexRunParams const &) const
int InsetNewline::plaintext(Buffer const &, ostream & os,
OutputParams const &) const
{
os << '\n';
return 0;
@ -66,7 +66,7 @@ int InsetNewline::ascii(Buffer const &, ostream & os,
int InsetNewline::linuxdoc(Buffer const &, std::ostream & os,
LatexRunParams const &) const
OutputParams const &) const
{
os << '\n';
return 0;
@ -74,7 +74,7 @@ int InsetNewline::linuxdoc(Buffer const &, std::ostream & os,
int InsetNewline::docbook(Buffer const &, std::ostream & os,
LatexRunParams const &) const
OutputParams const &) const
{
os << '\n';
return 0;

View File

@ -31,16 +31,16 @@ public:
virtual void draw(PainterInfo & pi, int x, int y) const;
virtual int latex(Buffer const &, std::ostream &,
LatexRunParams const &) const;
OutputParams const &) const;
virtual int ascii(Buffer const &, std::ostream &,
LatexRunParams const &) const;
virtual int plaintext(Buffer const &, std::ostream &,
OutputParams const &) const;
virtual int linuxdoc(Buffer const &, std::ostream &,
LatexRunParams const &) const;
OutputParams const &) const;
virtual int docbook(Buffer const &, std::ostream &,
LatexRunParams const &) const;
OutputParams const &) const;
virtual void read(Buffer const &, LyXLex & lex);

View File

@ -163,7 +163,7 @@ InsetNote::priv_dispatch(FuncRequest const & cmd,
int InsetNote::latex(Buffer const & buf, ostream & os,
LatexRunParams const & runparams) const
OutputParams const & runparams) const
{
string const pt = params_.type;
@ -190,7 +190,7 @@ int InsetNote::latex(Buffer const & buf, ostream & os,
int InsetNote::linuxdoc(Buffer const & buf, std::ostream & os,
LatexRunParams const & runparams) const
OutputParams const & runparams) const
{
string const pt = params_.type;
@ -210,7 +210,7 @@ int InsetNote::linuxdoc(Buffer const & buf, std::ostream & os,
int InsetNote::docbook(Buffer const & buf, std::ostream & os,
LatexRunParams const & runparams) const
OutputParams const & runparams) const
{
string const pt = params_.type;
@ -229,14 +229,14 @@ int InsetNote::docbook(Buffer const & buf, std::ostream & os,
}
int InsetNote::ascii(Buffer const & buf, std::ostream & os,
LatexRunParams const & runparams) const
int InsetNote::plaintext(Buffer const & buf, std::ostream & os,
OutputParams const & runparams) const
{
int i = 0;
string const pt = params_.type;
if (pt != "Note") {
os << "[";
i = inset.ascii(buf, os, runparams);
i = inset.plaintext(buf, os, runparams);
os << "]";
}
return i;

View File

@ -56,16 +56,16 @@ public:
bool showInsetDialog(BufferView * bv) const;
///
int latex(Buffer const &, std::ostream &,
LatexRunParams const &) const;
OutputParams const &) const;
///
int linuxdoc(Buffer const &, std::ostream &,
LatexRunParams const &) const;
OutputParams const &) const;
///
int docbook(Buffer const &, std::ostream &,
LatexRunParams const &) const;
OutputParams const &) const;
///
int ascii(Buffer const &, std::ostream &,
LatexRunParams const &) const;
int plaintext(Buffer const &, std::ostream &,
OutputParams const &) const;
///
void validate(LaTeXFeatures &) const;
///

View File

@ -63,14 +63,14 @@ void InsetOptArg::write(Buffer const & buf, ostream & os) const
int InsetOptArg::latex(Buffer const &, ostream &,
LatexRunParams const &) const
OutputParams const &) const
{
return 0;
}
int InsetOptArg::latexOptional(Buffer const & buf, ostream & os,
LatexRunParams const & runparams) const
OutputParams const & runparams) const
{
os << '[';
int const i = inset.latex(buf, os, runparams);

View File

@ -36,10 +36,10 @@ public:
/// Standard LaTeX output -- short-circuited
int latex(Buffer const &, std::ostream &,
LatexRunParams const &) const;
OutputParams const &) const;
/// Outputting the optional parameter of a LaTeX command
int latexOptional(Buffer const &, std::ostream &,
LatexRunParams const &) const;
OutputParams const &) const;
/// Write out tothe .lyx file
void write(Buffer const & buf, std::ostream & os) const;
};

View File

@ -73,15 +73,15 @@ void InsetPagebreak::draw(PainterInfo & pi, int x, int y) const
int InsetPagebreak::latex(Buffer const &, ostream & os,
LatexRunParams const &) const
OutputParams const &) const
{
os << "\\newpage{}";
return 0;
}
int InsetPagebreak::ascii(Buffer const &, ostream & os,
LatexRunParams const &) const
int InsetPagebreak::plaintext(Buffer const &, ostream & os,
OutputParams const &) const
{
os << '\n';
return 0;
@ -89,7 +89,7 @@ int InsetPagebreak::ascii(Buffer const &, ostream & os,
int InsetPagebreak::linuxdoc(Buffer const &, std::ostream & os,
LatexRunParams const &) const
OutputParams const &) const
{
os << '\n';
return 0;
@ -97,7 +97,7 @@ int InsetPagebreak::linuxdoc(Buffer const &, std::ostream & os,
int InsetPagebreak::docbook(Buffer const &, std::ostream & os,
LatexRunParams const &) const
OutputParams const &) const
{
os << '\n';
return 0;

View File

@ -31,16 +31,16 @@ public:
void draw(PainterInfo & pi, int x, int y) const;
int latex(Buffer const &, std::ostream &,
LatexRunParams const &) const;
OutputParams const &) const;
int ascii(Buffer const &, std::ostream &,
LatexRunParams const &) const;
int plaintext(Buffer const &, std::ostream &,
OutputParams const &) const;
int linuxdoc(Buffer const &, std::ostream &,
LatexRunParams const &) const;
OutputParams const &) const;
int docbook(Buffer const &, std::ostream &,
LatexRunParams const &) const;
OutputParams const &) const;
void read(Buffer const &, LyXLex & lex);

View File

@ -17,10 +17,10 @@
#include "debug.h"
#include "language.h"
#include "LaTeXFeatures.h"
#include "latexrunparams.h"
#include "lyxlex.h"
#include "lyxrc.h"
#include "metricsinfo.h"
#include "outputparams.h"
#include "paragraph.h"
#include "paragraph_funcs.h"
@ -254,7 +254,7 @@ void InsetQuotes::read(Buffer const &, LyXLex & lex)
int InsetQuotes::latex(Buffer const & buf, ostream & os,
LatexRunParams const & runparams) const
OutputParams const & runparams) const
{
// How do we get the local language here??
lyx::pos_type curr_pos = ownerPar(buf, this).getPositionOfInset(this);
@ -305,8 +305,8 @@ int InsetQuotes::latex(Buffer const & buf, ostream & os,
}
int InsetQuotes::ascii(Buffer const &, ostream & os,
LatexRunParams const &) const
int InsetQuotes::plaintext(Buffer const &, ostream & os,
OutputParams const &) const
{
os << '"';
return 0;
@ -314,7 +314,7 @@ int InsetQuotes::ascii(Buffer const &, ostream & os,
int InsetQuotes::linuxdoc(Buffer const &, ostream & os,
LatexRunParams const &) const
OutputParams const &) const
{
os << '"';
return 0;
@ -322,7 +322,7 @@ int InsetQuotes::linuxdoc(Buffer const &, ostream & os,
int InsetQuotes::docbook(Buffer const &, ostream & os,
LatexRunParams const &) const
OutputParams const &) const
{
if (times_ == DoubleQ) {
if (side_ == LeftQ)

View File

@ -83,16 +83,16 @@ public:
void read(Buffer const &, LyXLex & lex);
///
int latex(Buffer const &, std::ostream &,
LatexRunParams const &) const;
OutputParams const &) const;
///
int ascii(Buffer const &, std::ostream &,
LatexRunParams const &) const;
int plaintext(Buffer const &, std::ostream &,
OutputParams const &) const;
///
int linuxdoc(Buffer const &, std::ostream &,
LatexRunParams const &) const;
OutputParams const &) const;
///
int docbook(Buffer const &, std::ostream &,
LatexRunParams const &) const;
OutputParams const &) const;
///
void validate(LaTeXFeatures &) const;
///

View File

@ -86,7 +86,7 @@ string const InsetRef::getScreenLabel(Buffer const &) const
int InsetRef::latex(Buffer const &, ostream & os,
LatexRunParams const &) const
OutputParams const &) const
{
if (getOptions().empty())
os << escape(getCommand());
@ -98,8 +98,8 @@ int InsetRef::latex(Buffer const &, ostream & os,
}
int InsetRef::ascii(Buffer const &, ostream & os,
LatexRunParams const &) const
int InsetRef::plaintext(Buffer const &, ostream & os,
OutputParams const &) const
{
os << '[' << getContents() << ']';
return 0;
@ -107,7 +107,7 @@ int InsetRef::ascii(Buffer const &, ostream & os,
int InsetRef::linuxdoc(Buffer const &, ostream & os,
LatexRunParams const &) const
OutputParams const &) const
{
os << "<ref id=\"" << getContents()
<< "\" name=\"" << getOptions() << "\" >";
@ -116,7 +116,7 @@ int InsetRef::linuxdoc(Buffer const &, ostream & os,
int InsetRef::docbook(Buffer const &, ostream & os,
LatexRunParams const &) const
OutputParams const &) const
{
if (getOptions().empty()) {
os << "<xref linkend=\"" << getContents() << "\">";

View File

@ -55,16 +55,16 @@ public:
bool display() const { return false; }
///
int latex(Buffer const &, std::ostream &,
LatexRunParams const &) const;
OutputParams const &) const;
///
int ascii(Buffer const &, std::ostream &,
LatexRunParams const &) const;
int plaintext(Buffer const &, std::ostream &,
OutputParams const &) const;
///
int linuxdoc(Buffer const &, std::ostream &,
LatexRunParams const &) const;
OutputParams const &) const;
///
int docbook(Buffer const &, std::ostream &,
LatexRunParams const &) const;
OutputParams const &) const;
///
void validate(LaTeXFeatures & features) const;
protected:

View File

@ -16,10 +16,10 @@
#include "insetspace.h"
#include "debug.h"
#include "latexrunparams.h"
#include "LColor.h"
#include "lyxlex.h"
#include "metricsinfo.h"
#include "outputparams.h"
#include "frontends/font_metrics.h"
#include "frontends/Painter.h"
@ -162,7 +162,7 @@ void InsetSpace::read(Buffer const &, LyXLex & lex)
int InsetSpace::latex(Buffer const &, ostream & os,
LatexRunParams const & runparams) const
OutputParams const & runparams) const
{
switch (kind_) {
case NORMAL:
@ -194,8 +194,8 @@ int InsetSpace::latex(Buffer const &, ostream & os,
}
int InsetSpace::ascii(Buffer const &, ostream & os,
LatexRunParams const &) const
int InsetSpace::plaintext(Buffer const &, ostream & os,
OutputParams const &) const
{
switch (kind_) {
case NORMAL:
@ -214,7 +214,7 @@ int InsetSpace::ascii(Buffer const &, ostream & os,
int InsetSpace::linuxdoc(Buffer const &, ostream & os,
LatexRunParams const &) const
OutputParams const &) const
{
switch (kind_) {
case NORMAL:
@ -235,7 +235,7 @@ int InsetSpace::linuxdoc(Buffer const &, ostream & os,
int InsetSpace::docbook(Buffer const &, ostream & os,
LatexRunParams const &) const
OutputParams const &) const
{
switch (kind_) {
case NORMAL:

View File

@ -62,16 +62,16 @@ public:
void read(Buffer const &, LyXLex & lex);
///
int latex(Buffer const &, std::ostream &,
LatexRunParams const &) const;
OutputParams const &) const;
///
int ascii(Buffer const &, std::ostream &,
LatexRunParams const &) const;
int plaintext(Buffer const &, std::ostream &,
OutputParams const &) const;
///
int linuxdoc(Buffer const &, std::ostream &,
LatexRunParams const &) const;
OutputParams const &) const;
///
int docbook(Buffer const &, std::ostream &,
LatexRunParams const &) const;
OutputParams const &) const;
///
virtual std::auto_ptr<InsetBase> clone() const;
///

View File

@ -157,7 +157,7 @@ void InsetSpecialChar::read(Buffer const &, LyXLex & lex)
int InsetSpecialChar::latex(Buffer const &, ostream & os,
LatexRunParams const &) const
OutputParams const &) const
{
switch (kind_) {
case HYPHENATION:
@ -180,8 +180,8 @@ int InsetSpecialChar::latex(Buffer const &, ostream & os,
}
int InsetSpecialChar::ascii(Buffer const &, ostream & os,
LatexRunParams const &) const
int InsetSpecialChar::plaintext(Buffer const &, ostream & os,
OutputParams const &) const
{
switch (kind_) {
case HYPHENATION:
@ -202,7 +202,7 @@ int InsetSpecialChar::ascii(Buffer const &, ostream & os,
int InsetSpecialChar::linuxdoc(Buffer const &, ostream & os,
LatexRunParams const &) const
OutputParams const &) const
{
switch (kind_) {
case HYPHENATION:
@ -223,7 +223,7 @@ int InsetSpecialChar::linuxdoc(Buffer const &, ostream & os,
int InsetSpecialChar::docbook(Buffer const &, ostream & os,
LatexRunParams const &) const
OutputParams const &) const
{
switch (kind_) {
case HYPHENATION:

View File

@ -54,16 +54,16 @@ public:
void read(Buffer const &, LyXLex & lex);
///
int latex(Buffer const &, std::ostream &,
LatexRunParams const &) const;
OutputParams const &) const;
///
int ascii(Buffer const &, std::ostream &,
LatexRunParams const &) const;
int plaintext(Buffer const &, std::ostream &,
OutputParams const &) const;
///
int linuxdoc(Buffer const &, std::ostream &,
LatexRunParams const &) const;
OutputParams const &) const;
///
int docbook(Buffer const &, std::ostream &,
LatexRunParams const &) const;
OutputParams const &) const;
///
virtual std::auto_ptr<InsetBase> clone() const;
///

View File

@ -21,11 +21,11 @@
#include "FuncStatus.h"
#include "gettext.h"
#include "language.h"
#include "latexrunparams.h"
#include "LColor.h"
#include "lyx_cb.h"
#include "lyxlex.h"
#include "metricsinfo.h"
#include "outputparams.h"
#include "paragraph.h"
#include "paragraph_funcs.h"
#include "ParagraphParameters.h"
@ -1117,32 +1117,32 @@ InsetTabular::priv_dispatch(FuncRequest const & cmd,
int InsetTabular::latex(Buffer const & buf, ostream & os,
LatexRunParams const & runparams) const
OutputParams const & runparams) const
{
return tabular.latex(buf, os, runparams);
}
int InsetTabular::ascii(Buffer const & buf, ostream & os,
LatexRunParams const & runparams) const
int InsetTabular::plaintext(Buffer const & buf, ostream & os,
OutputParams const & runparams) const
{
if (runparams.linelen > 0)
return tabular.ascii(buf, os, runparams,
return tabular.plaintext(buf, os, runparams,
ownerPar(buf, this).params().depth(),
false, 0);
return tabular.ascii(buf, os, runparams, 0, false, 0);
return tabular.plaintext(buf, os, runparams, 0, false, 0);
}
int InsetTabular::linuxdoc(Buffer const & buf, ostream & os,
LatexRunParams const & runparams) const
OutputParams const & runparams) const
{
return tabular.linuxdoc(buf,os, runparams);
}
int InsetTabular::docbook(Buffer const & buf, ostream & os,
LatexRunParams const & runparams) const
OutputParams const & runparams) const
{
int ret = 0;
InsetOld * master;
@ -2267,9 +2267,9 @@ bool InsetTabular::copySelection(BufferView * bv)
true, true);
ostringstream os;
LatexRunParams const runparams;
paste_tabular->ascii(*bv->buffer(), os, runparams,
ownerPar(*bv->buffer(), this).params().depth(), true, '\t');
OutputParams const runparams;
paste_tabular->plaintext(*bv->buffer(), os, runparams,
ownerPar(*bv->buffer(), this).params().depth(), true, '\t');
bv->stuffClipboard(os.str());
return true;
}

View File

@ -106,16 +106,16 @@ public:
bool display() const { return tabular.isLongTabular(); }
///
int latex(Buffer const &, std::ostream &,
LatexRunParams const &) const;
OutputParams const &) const;
///
int ascii(Buffer const &, std::ostream &,
LatexRunParams const &) const;
int plaintext(Buffer const &, std::ostream &,
OutputParams const &) const;
///
int linuxdoc(Buffer const &, std::ostream &,
LatexRunParams const &) const;
OutputParams const &) const;
///
int docbook(Buffer const &, std::ostream &,
LatexRunParams const &) const;
OutputParams const &) const;
///
void validate(LaTeXFeatures & features) const;
///

View File

@ -28,6 +28,10 @@
#include "lyxlex.h"
#include "lyxrc.h"
#include "metricsinfo.h"
#include "output_docbook.h"
#include "output_latex.h"
#include "output_linuxdoc.h"
#include "output_plaintext.h"
#include "paragraph.h"
#include "paragraph_funcs.h"
#include "ParagraphParameters.h"
@ -954,7 +958,7 @@ InsetText::priv_dispatch(FuncRequest const & cmd,
int InsetText::latex(Buffer const & buf, ostream & os,
LatexRunParams const & runparams) const
OutputParams const & runparams) const
{
TexRow texrow;
latexParagraphs(buf, paragraphs, os, texrow, runparams);
@ -962,8 +966,8 @@ int InsetText::latex(Buffer const & buf, ostream & os,
}
int InsetText::ascii(Buffer const & buf, ostream & os,
LatexRunParams const & runparams) const
int InsetText::plaintext(Buffer const & buf, ostream & os,
OutputParams const & runparams) const
{
ParagraphList::const_iterator beg = paragraphs.begin();
ParagraphList::const_iterator end = paragraphs.end();
@ -977,7 +981,7 @@ int InsetText::ascii(Buffer const & buf, ostream & os,
int InsetText::linuxdoc(Buffer const & buf, ostream & os,
LatexRunParams const & runparams) const
OutputParams const & runparams) const
{
linuxdocParagraphs(buf, paragraphs, os, runparams);
return 0;
@ -985,7 +989,7 @@ int InsetText::linuxdoc(Buffer const & buf, ostream & os,
int InsetText::docbook(Buffer const & buf, ostream & os,
LatexRunParams const & runparams) const
OutputParams const & runparams) const
{
docbookParagraphs(buf, paragraphs, os, runparams);
return 0;

View File

@ -81,16 +81,16 @@ public:
UpdatableInset *, bool lr = false);
///
int latex(Buffer const &, std::ostream &,
LatexRunParams const &) const;
OutputParams const &) const;
///
int ascii(Buffer const &, std::ostream &,
LatexRunParams const &) const;
int plaintext(Buffer const &, std::ostream &,
OutputParams const &) const;
///
int linuxdoc(Buffer const &, std::ostream &,
LatexRunParams const &) const ;
OutputParams const &) const ;
///
int docbook(Buffer const &, std::ostream &,
LatexRunParams const &) const ;
OutputParams const &) const ;
///
void validate(LaTeXFeatures & features) const;
///

View File

@ -89,7 +89,7 @@ string const InsetTheorem::editMessage() const
int InsetTheorem::latex(Buffer const * buf, ostream & os,
LatexRunParams const & runparams) const
OutputParams const & runparams) const
{
os << "\\begin{theorem}%\n";

View File

@ -34,7 +34,7 @@ public:
void draw(PainterInfo & pi, int x, int y) const;
///
int latex(Buffer const &, std::ostream &,
LatexRunParams const &) const;
OutputParams const &) const;
///
string const editMessage() const;
private:

View File

@ -94,8 +94,8 @@ InsetTOC::priv_dispatch(FuncRequest const & cmd,
}
int InsetTOC::ascii(Buffer const & buffer, ostream & os,
LatexRunParams const &) const
int InsetTOC::plaintext(Buffer const & buffer, ostream & os,
OutputParams const &) const
{
os << getScreenLabel(buffer) << "\n\n";
@ -107,7 +107,7 @@ int InsetTOC::ascii(Buffer const & buffer, ostream & os,
int InsetTOC::linuxdoc(Buffer const &, ostream & os,
LatexRunParams const &) const
OutputParams const &) const
{
if (getCmdName() == "tableofcontents")
os << "<toc>";
@ -116,7 +116,7 @@ int InsetTOC::linuxdoc(Buffer const &, ostream & os,
int InsetTOC::docbook(Buffer const &, ostream & os,
LatexRunParams const &) const
OutputParams const &) const
{
if (getCmdName() == "tableofcontents")
os << "<toc></toc>";

View File

@ -41,14 +41,14 @@ public:
///
bool display() const { return true; }
///
int ascii(Buffer const &, std::ostream &,
LatexRunParams const &) const;
int plaintext(Buffer const &, std::ostream &,
OutputParams const &) const;
///
int linuxdoc(Buffer const &, std::ostream &,
LatexRunParams const &) const;
OutputParams const &) const;
///
int docbook(Buffer const &, std::ostream &,
LatexRunParams const &) const;
OutputParams const &) const;
protected:
///
virtual

View File

@ -14,9 +14,9 @@
#include "dispatchresult.h"
#include "funcrequest.h"
#include "latexrunparams.h"
#include "LaTeXFeatures.h"
#include "gettext.h"
#include "outputparams.h"
#include "support/lstrings.h"
@ -83,7 +83,7 @@ string const InsetUrl::getScreenLabel(Buffer const &) const
int InsetUrl::latex(Buffer const &, ostream & os,
LatexRunParams const & runparams) const
OutputParams const & runparams) const
{
if (!getOptions().empty())
os << getOptions() + ' ';
@ -94,8 +94,8 @@ int InsetUrl::latex(Buffer const &, ostream & os,
}
int InsetUrl::ascii(Buffer const &, ostream & os,
LatexRunParams const &) const
int InsetUrl::plaintext(Buffer const &, ostream & os,
OutputParams const &) const
{
if (getOptions().empty())
os << '[' << getContents() << ']';
@ -106,7 +106,7 @@ int InsetUrl::ascii(Buffer const &, ostream & os,
int InsetUrl::linuxdoc(Buffer const &, ostream & os,
LatexRunParams const &) const
OutputParams const &) const
{
os << '<' << getCmdName()
<< " url=\"" << getContents() << "\""
@ -117,7 +117,7 @@ int InsetUrl::linuxdoc(Buffer const &, ostream & os,
int InsetUrl::docbook(Buffer const &, ostream & os,
LatexRunParams const &) const
OutputParams const &) const
{
os << "<ulink url=\"" << subst(getContents(),"&","&amp;")
<< "\">" << getOptions() << "</ulink>";

View File

@ -42,16 +42,16 @@ public:
bool display() const { return false; }
///
int latex(Buffer const &, std::ostream &,
LatexRunParams const &) const;
OutputParams const &) const;
///
int ascii(Buffer const &, std::ostream &,
LatexRunParams const &) const;
int plaintext(Buffer const &, std::ostream &,
OutputParams const &) const;
///
int linuxdoc(Buffer const &, std::ostream &,
LatexRunParams const &) const;
OutputParams const &) const;
///
int docbook(Buffer const &, std::ostream &,
LatexRunParams const &) const;
OutputParams const &) const;
protected:
///
virtual

View File

@ -22,9 +22,9 @@
#include "funcrequest.h"
#include "gettext.h"
#include "LaTeXFeatures.h"
#include "latexrunparams.h"
#include "LColor.h"
#include "lyxlex.h"
#include "outputparams.h"
#include "paragraph.h"
#include "support/tostr.h"
@ -185,7 +185,7 @@ string const InsetWrap::editMessage() const
int InsetWrap::latex(Buffer const & buf, ostream & os,
LatexRunParams const & runparams) const
OutputParams const & runparams) const
{
os << "\\begin{floating" << params_.type << '}';
if (!params_.placement.empty()) {
@ -201,7 +201,7 @@ int InsetWrap::latex(Buffer const & buf, ostream & os,
int InsetWrap::docbook(Buffer const & buf, ostream & os,
LatexRunParams const & runparams) const
OutputParams const & runparams) const
{
os << '<' << params_.type << '>';
int const i = inset.docbook(buf, os, runparams);

View File

@ -53,10 +53,10 @@ public:
InsetOld::Code lyxCode() const { return InsetOld::WRAP_CODE; }
///
int latex(Buffer const &, std::ostream &,
LatexRunParams const &) const;
OutputParams const &) const;
///
int docbook(Buffer const &, std::ostream &,
LatexRunParams const &) const;
OutputParams const &) const;
///
std::string const editMessage() const;
///

View File

@ -1,3 +1,11 @@
2003-11-05 José Matos <jamatos@lyx.org>
* formula.[Ch] (ascii, linuxdoc, docbook):
* formulamacro.[Ch] (ascii, linuxdoc, docbook):
* math_inset.[Ch] (ascii, linuxdoc, docbook):
* ref_inset.[Ch] (ascii, linuxdoc, docbook):
rename ascii to plaintext and LatexRunParams to OutputParams.
2003-11-03 Lars Gullik Bjønnes <larsbj@gullik.net>
* Adjust for new DispatchResult semantics.
@ -23,7 +31,6 @@
* formula.[Ch] (ascii, linuxdoc, docbook):
* formulamacro.[Ch] (ascii, linuxdoc, docbook):
* math_inset.[Ch] (ascii, linuxdoc, docbook):
* math_inset.[Ch] (ascii, linuxdoc, docbook):
* ref_inset.[Ch] (ascii, linuxdoc, docbook):
add LatexRunParams argument.

View File

@ -20,9 +20,9 @@
#include "BufferView.h"
#include "debug.h"
#include "latexrunparams.h"
#include "LColor.h"
#include "lyx_main.h"
#include "outputparams.h"
#include "frontends/Painter.h"
@ -100,7 +100,7 @@ void InsetFormula::write(Buffer const &, ostream & os) const
int InsetFormula::latex(Buffer const &, ostream & os,
LatexRunParams const & runparams) const
OutputParams const & runparams) const
{
WriteStream wi(os, runparams.moving_arg, true);
par_->write(wi);
@ -108,8 +108,8 @@ int InsetFormula::latex(Buffer const &, ostream & os,
}
int InsetFormula::ascii(Buffer const &, ostream & os,
LatexRunParams const &) const
int InsetFormula::plaintext(Buffer const &, ostream & os,
OutputParams const &) const
{
if (0 && display()) {
Dimension dim;
@ -130,20 +130,20 @@ int InsetFormula::ascii(Buffer const &, ostream & os,
int InsetFormula::linuxdoc(Buffer const & buf, ostream & os,
LatexRunParams const & runparams) const
OutputParams const & runparams) const
{
return docbook(buf, os, runparams);
}
int InsetFormula::docbook(Buffer const & buf, ostream & os,
LatexRunParams const & runparams) const
OutputParams const & runparams) const
{
MathMLStream ms(os);
ms << MTag("equation");
ms << MTag("alt");
ms << "<[CDATA[";
int res = ascii(buf, ms.os(), runparams);
int res = plaintext(buf, ms.os(), runparams);
ms << "]]>";
ms << ETag("alt");
ms << MTag("math");

View File

@ -45,16 +45,16 @@ public:
void read(Buffer const &, LyXLex & lex);
///
int latex(Buffer const &, std::ostream &,
LatexRunParams const &) const;
OutputParams const &) const;
///
int ascii(Buffer const &, std::ostream &,
LatexRunParams const &) const;
int plaintext(Buffer const &, std::ostream &,
OutputParams const &) const;
///
int linuxdoc(Buffer const &, std::ostream &,
LatexRunParams const &) const;
OutputParams const &) const;
///
int docbook(Buffer const &, std::ostream &,
LatexRunParams const &) const;
OutputParams const &) const;
///
virtual std::auto_ptr<InsetBase> clone() const;

View File

@ -18,9 +18,9 @@
#include "math_mathmlstream.h"
#include "gettext.h"
#include "latexrunparams.h"
#include "LColor.h"
#include "lyxlex.h"
#include "outputparams.h"
#include "frontends/Painter.h"
#include "frontends/font_metrics.h"
@ -75,7 +75,7 @@ void InsetFormulaMacro::write(Buffer const &, ostream & os) const
int InsetFormulaMacro::latex(Buffer const &, ostream & os,
LatexRunParams const & runparams) const
OutputParams const & runparams) const
{
WriteStream wi(os, runparams.moving_arg, true);
par()->write(wi);
@ -83,8 +83,8 @@ int InsetFormulaMacro::latex(Buffer const &, ostream & os,
}
int InsetFormulaMacro::ascii(Buffer const &, ostream & os,
LatexRunParams const &) const
int InsetFormulaMacro::plaintext(Buffer const &, ostream & os,
OutputParams const &) const
{
WriteStream wi(os, false, true);
par()->write(wi);
@ -93,16 +93,16 @@ int InsetFormulaMacro::ascii(Buffer const &, ostream & os,
int InsetFormulaMacro::linuxdoc(Buffer const & buf, ostream & os,
LatexRunParams const & runparams) const
OutputParams const & runparams) const
{
return ascii(buf, os, runparams);
return plaintext(buf, os, runparams);
}
int InsetFormulaMacro::docbook(Buffer const & buf, ostream & os,
LatexRunParams const & runparams) const
OutputParams const & runparams) const
{
return ascii(buf, os, runparams);
return plaintext(buf, os, runparams);
}

View File

@ -40,17 +40,17 @@ public:
///
void write(Buffer const &, std::ostream & os) const;
///
int ascii(Buffer const &, std::ostream &,
LatexRunParams const &) const;
int plaintext(Buffer const &, std::ostream &,
OutputParams const &) const;
///
int latex(Buffer const &, std::ostream & os,
LatexRunParams const &) const;
OutputParams const &) const;
///
int linuxdoc(Buffer const &, std::ostream & os,
LatexRunParams const &) const;
OutputParams const &) const;
///
int docbook(Buffer const &, std::ostream &,
LatexRunParams const &) const;
OutputParams const &) const;
///
virtual std::auto_ptr<InsetBase> clone() const;

View File

@ -210,19 +210,19 @@ void MathInset::mathmlize(MathMLStream & os) const
}
int MathInset::ascii(std::ostream &, LatexRunParams const &) const
int MathInset::plaintext(std::ostream &, OutputParams const &) const
{
return 0;
}
int MathInset::linuxdoc(std::ostream &, LatexRunParams const &) const
int MathInset::linuxdoc(std::ostream &, OutputParams const &) const
{
return 0;
}
int MathInset::docbook(std::ostream &, LatexRunParams const &) const
int MathInset::docbook(std::ostream &, OutputParams const &) const
{
return 0;
}

View File

@ -31,7 +31,7 @@ inclusion in the "real LyX insets" FormulaInset and FormulaMacroInset.
*/
class LatexRunParams;
class OutputParams;
class MathArrayInset;
class MathAMSArrayInset;
class MathCharInset;
@ -237,11 +237,11 @@ public:
/// describe content if cursor behind
virtual void infoize2(std::ostream &) const {}
/// plain ascii output
virtual int ascii(std::ostream & os, LatexRunParams const &) const;
virtual int plaintext(std::ostream & os, OutputParams const &) const;
/// linuxdoc output
virtual int linuxdoc(std::ostream & os, LatexRunParams const &) const;
virtual int linuxdoc(std::ostream & os, OutputParams const &) const;
/// docbook output
virtual int docbook(std::ostream & os, LatexRunParams const &) const;
virtual int docbook(std::ostream & os, OutputParams const &) const;
/// dump content to stderr for debugging
virtual void dump() const;

View File

@ -123,14 +123,14 @@ void RefInset::validate(LaTeXFeatures & features) const
}
int RefInset::ascii(std::ostream & os, LatexRunParams const &) const
int RefInset::plaintext(std::ostream & os, OutputParams const &) const
{
os << '[' << asString(cell(0)) << ']';
return 0;
}
int RefInset::linuxdoc(std::ostream & os, LatexRunParams const &) const
int RefInset::linuxdoc(std::ostream & os, OutputParams const &) const
{
os << "<ref id=\"" << asString(cell(0))
<< "\" name=\"" << asString(cell(1)) << "\" >";
@ -138,7 +138,7 @@ int RefInset::linuxdoc(std::ostream & os, LatexRunParams const &) const
}
int RefInset::docbook(std::ostream & os, LatexRunParams const &) const
int RefInset::docbook(std::ostream & os, OutputParams const &) const
{
if (cell(1).empty()) {
os << "<xref linkend=\"" << asString(cell(0)) << "\">";

View File

@ -36,11 +36,11 @@ public:
virtual RefInset * asRefInset() { return this; }
/// plain ascii output
int ascii(std::ostream & os, LatexRunParams const &) const;
int plaintext(std::ostream & os, OutputParams const &) const;
/// linuxdoc output
int linuxdoc(std::ostream & os, LatexRunParams const &) const;
int linuxdoc(std::ostream & os, OutputParams const &) const;
/// docbook output
int docbook(std::ostream & os, LatexRunParams const &) const;
int docbook(std::ostream & os, OutputParams const &) const;
/// small wrapper for the time being
DispatchResult localDispatch(FuncRequest const & cmd);

40
src/output.C Normal file
View File

@ -0,0 +1,40 @@
/**
* \file output.C
* This file is part of LyX, the document processor.
* Licence details can be found in the file COPYING.
*
* \author Lars Gullik Bjønnes
*
* Full author contact details are available in file CREDITS.
*/
#include <config.h>
#include "output.h"
#include "gettext.h"
#include "frontends/Alert.h"
#include "support/filetools.h"
#include <fstream>
using lyx::support::bformat;
using lyx::support::MakeDisplayPath;
using std::ofstream;
using std::string;
bool openFileWrite(ofstream & ofs, string const & fname)
{
ofs.open(fname.c_str());
if (!ofs) {
string const file = MakeDisplayPath(fname, 50);
string text = bformat(_("Could not open the specified "
"document\n%1$s."), file);
Alert::error(_("Could not open file"), text);
return false;
}
return true;
}

Some files were not shown because too many files have changed in this diff Show More