drop linuxdoc support (part 1)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14816 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Michael Schmitt 2006-08-23 10:41:43 +00:00
parent 83eb07fc4b
commit f0d215f752
26 changed files with 0 additions and 222 deletions

View File

@ -485,8 +485,6 @@ string const substituteOption(InsetExternalParams const & params,
return sanitizeLatexOption(opt);
if (format == "DocBook")
return sanitizeDocBookOption(opt);
if (format == "LinuxDoc")
return sanitizeLinuxDocOption(opt);
return opt;
}

View File

@ -325,12 +325,6 @@ string const sanitizeLatexOption(string const & input)
}
string const sanitizeLinuxDocOption(string const & input)
{
return input;
}
namespace {
template <typename Factory, typename Data, typename Transformer>

View File

@ -302,7 +302,6 @@ private:
*/
std::string const sanitizeLatexOption(std::string const & input);
std::string const sanitizeDocBookOption(std::string const & input);
std::string const sanitizeLinuxDocOption(std::string const & input);
enum TransformID {

View File

@ -227,13 +227,6 @@ int InsetBase::plaintext(Buffer const &,
}
int InsetBase::linuxdoc(Buffer const &,
std::ostream &, OutputParams const &) const
{
return 0;
}
int InsetBase::docbook(Buffer const &,
std::ostream &, OutputParams const &) const
{

View File

@ -187,9 +187,6 @@ public:
/// plain ascii output
virtual int plaintext(Buffer const &, std::ostream & os,
OutputParams const &) const;
/// linuxdoc output
virtual int linuxdoc(Buffer const &, std::ostream & os,
OutputParams const &) const;
/// docbook output
virtual int docbook(Buffer const &, std::ostream & os,
OutputParams const &) const;

View File

@ -365,13 +365,6 @@ int InsetBox::latex(Buffer const & buf, ostream & os,
}
int InsetBox::linuxdoc(Buffer const & buf, std::ostream & os,
OutputParams const & runparams) const
{
return InsetText::linuxdoc(buf, os, runparams);
}
int InsetBox::docbook(Buffer const & buf, std::ostream & os,
OutputParams const & runparams) const
{

View File

@ -85,9 +85,6 @@ public:
int latex(Buffer const &, std::ostream &,
OutputParams const &) const;
///
int linuxdoc(Buffer const &, std::ostream &,
OutputParams const &) const;
///
int docbook(Buffer const &, std::ostream &,
OutputParams const &) const;
///

View File

@ -225,14 +225,6 @@ int InsetBranch::latex(Buffer const & buf, ostream & os,
}
int InsetBranch::linuxdoc(Buffer const & buf, std::ostream & os,
OutputParams const & runparams) const
{
return isBranchSelected(buf) ?
InsetText::linuxdoc(buf, os, runparams) : 0;
}
int InsetBranch::docbook(Buffer const & buf, std::ostream & os,
OutputParams const & runparams) const
{

View File

@ -56,9 +56,6 @@ public:
int latex(Buffer const &, std::ostream &,
OutputParams const &) const;
///
int linuxdoc(Buffer const &, std::ostream &,
OutputParams const &) const;
///
int docbook(Buffer const &, std::ostream &,
OutputParams const & runparams) const;
///

View File

@ -285,18 +285,6 @@ int InsetCharStyle::latex(Buffer const & buf, ostream & os,
}
int InsetCharStyle::linuxdoc(Buffer const & buf, ostream & os,
OutputParams const & runparams) const
{
if (!undefined())
sgml::openTag(os, params_.latexname, params_.latexparam);
int i = InsetText::linuxdoc(buf, os, runparams);
if (!undefined())
sgml::closeTag(os, params_.latexname);
return i;
}
int InsetCharStyle::docbook(Buffer const & buf, ostream & os,
OutputParams const & runparams) const
{

View File

@ -74,9 +74,6 @@ public:
int latex(Buffer const &, std::ostream &,
OutputParams const &) const;
///
int linuxdoc(Buffer const &, std::ostream &,
OutputParams const &) const;
///
int docbook(Buffer const &, std::ostream &,
OutputParams const &) const;
///

View File

@ -85,13 +85,6 @@ int InsetCommand::plaintext(Buffer const &, ostream &,
}
int InsetCommand::linuxdoc(Buffer const &, ostream &,
OutputParams const &) const
{
return 0;
}
int InsetCommand::docbook(Buffer const &, ostream &,
OutputParams const &) const
{

View File

@ -53,9 +53,6 @@ public:
int plaintext(Buffer const &, std::ostream &,
OutputParams const &) const;
///
virtual int linuxdoc(Buffer const &, std::ostream &,
OutputParams const &) const;
///
virtual int docbook(Buffer const &, std::ostream &,
OutputParams const & runparams) const;
///

View File

@ -177,28 +177,6 @@ int InsetERT::plaintext(Buffer const &, ostream &,
}
int InsetERT::linuxdoc(Buffer const &, ostream & os,
OutputParams const &) const
{
ParagraphList::const_iterator par = paragraphs().begin();
ParagraphList::const_iterator end = paragraphs().end();
int lines = 0;
while (par != end) {
pos_type siz = par->size();
for (pos_type i = 0; i < siz; ++i)
os << par->getChar(i);
++par;
if (par != end) {
os << "\n";
lines ++;
}
}
return lines;
}
int InsetERT::docbook(Buffer const &, ostream & os,
OutputParams const &) const
{

View File

@ -55,9 +55,6 @@ public:
int plaintext(Buffer const &, std::ostream &,
OutputParams const & runparams) const;
///
int linuxdoc(Buffer const &, std::ostream &,
OutputParams const &) const;
///
int docbook(Buffer const &, std::ostream &,
OutputParams const & runparams) const;
///

View File

@ -724,15 +724,6 @@ int InsetExternal::plaintext(Buffer const & buf, ostream & os,
}
int InsetExternal::linuxdoc(Buffer const & buf, ostream & os,
OutputParams const & runparams) const
{
return external::writeExternal(params_, "LinuxDoc", buf, os,
*(runparams.exportdata), false,
runparams.inComment);
}
int InsetExternal::docbook(Buffer const & buf, ostream & os,
OutputParams const & runparams) const
{

View File

@ -129,9 +129,6 @@ public:
virtual int plaintext(Buffer const &, std::ostream &,
OutputParams const &) const;
///
virtual int linuxdoc(Buffer const &, std::ostream &,
OutputParams const &) const;
///
virtual int docbook(Buffer const &, std::ostream &,
OutputParams const &) const;

View File

@ -341,44 +341,6 @@ int InsetFloat::latex(Buffer const & buf, ostream & os,
}
int InsetFloat::linuxdoc(Buffer const & buf, ostream & os,
OutputParams const & runparams) const
{
FloatList const & floats = buf.params().getLyXTextClass().floats();
string const tmptype = params_.type;
// Figure out the float placement to use.
// From lowest to highest:
// - float default placement
// - document wide default placement
// - specific float placement
// This is the same as latex, as linuxdoc is modeled after latex.
string placement;
string const buf_placement = buf.params().float_placement;
string const def_placement = floats.defaultPlacement(params_.type);
if (!params_.placement.empty()
&& params_.placement != def_placement) {
placement = params_.placement;
} else if (params_.placement.empty()
&& !buf_placement.empty()
&& buf_placement != def_placement) {
placement = buf_placement;
}
os << "\n<" << tmptype ;
// We only output placement if different from the def_placement.
if (!placement.empty()) {
os << " loc=\"" << placement << '"';
}
os << ">";
int const i = InsetText::linuxdoc(buf, os, runparams);
os << "</" << tmptype << ">\n";
return i;
}
int InsetFloat::docbook(Buffer const & buf, ostream & os,
OutputParams const & runparams) const
{

View File

@ -57,9 +57,6 @@ public:
int latex(Buffer const &, std::ostream &,
OutputParams const &) const;
///
int linuxdoc(Buffer const &, std::ostream &,
OutputParams const &) const;
///
int docbook(Buffer const &, std::ostream &,
OutputParams const &) const;
///

View File

@ -39,9 +39,6 @@ public:
int latex(Buffer const &, std::ostream &,
OutputParams const &) const;
///
int linuxdoc(Buffer const &, std::ostream &,
OutputParams const &) const { return 0; }
///
int docbook(Buffer const &, std::ostream &,
OutputParams const &) const { return 0; }
///

View File

@ -816,21 +816,6 @@ int InsetGraphics::plaintext(Buffer const &, ostream & os,
}
int InsetGraphics::linuxdoc(Buffer const & buf, ostream & os,
OutputParams const & runparams) const
{
string const file_name = runparams.nice ?
params().filename.relFilename(buf.filePath()):
params().filename.absFilename();
runparams.exportdata->addExternalFile("linuxdoc",
params().filename.absFilename());
os << "<eps file=\"" << file_name << "\">\n";
os << "<img src=\"" << file_name << "\">";
return 0;
}
namespace {
int writeImageObject(char * format, ostream& os, OutputParams const & runparams,

View File

@ -49,9 +49,6 @@ public:
int plaintext(Buffer const &, std::ostream &,
OutputParams const &) const;
///
int linuxdoc(Buffer const &, std::ostream &,
OutputParams const &) const;
///
int docbook(Buffer const &, std::ostream &,
OutputParams const &) const;

View File

@ -59,14 +59,6 @@ int InsetHFill::plaintext(Buffer const &, ostream & os,
}
int InsetHFill::linuxdoc(Buffer const &, std::ostream & os,
OutputParams const &) const
{
os << '\n';
return 0;
}
int InsetHFill::docbook(Buffer const &, std::ostream & os,
OutputParams const &) const
{

View File

@ -32,9 +32,6 @@ public:
int plaintext(Buffer const &, std::ostream &,
OutputParams const & runparams) const;
///
int linuxdoc(Buffer const &, std::ostream &,
OutputParams const &) const;
///
int docbook(Buffer const &, std::ostream &,
OutputParams const & runparams) const;
///

View File

@ -466,50 +466,6 @@ int InsetInclude::plaintext(Buffer const & buffer, ostream & os,
}
int InsetInclude::linuxdoc(Buffer const & buffer, ostream & os,
OutputParams const & runparams) const
{
string incfile(params_.getContents());
// Do nothing if no file name has been specified
if (incfile.empty())
return 0;
string const included_file = includedFilename(buffer, params_);
// write it to a file (so far the complete file)
string const exportfile = changeExtension(incfile, ".sgml");
string writefile = changeExtension(included_file, ".sgml");
if (loadIfNeeded(buffer, params_)) {
Buffer * tmp = bufferlist.getBuffer(included_file);
writefile = makeAbsPath(FileName(writefile).mangledFilename(),
buffer.getMasterBuffer()->temppath());
if (!runparams.nice)
incfile = writefile;
lyxerr[Debug::LATEX] << "incfile:" << incfile << endl;
lyxerr[Debug::LATEX] << "exportfile:" << exportfile << endl;
lyxerr[Debug::LATEX] << "writefile:" << writefile << endl;
tmp->makeLinuxDocFile(writefile, runparams, true);
}
if (isVerbatim(params_)) {
os << "<![CDATA["
<< getFileContents(included_file)
<< "]]>";
} else {
runparams.exportdata->addExternalFile("linuxdoc", writefile,
exportfile);
os << '&' << include_label << ';';
}
return 0;
}
int InsetInclude::docbook(Buffer const & buffer, ostream & os,
OutputParams const & runparams) const
{

View File

@ -81,9 +81,6 @@ public:
int plaintext(Buffer const &, std::ostream &,
OutputParams const &) const;
///
int linuxdoc(Buffer const &, std::ostream &,
OutputParams const &) const;
///
int docbook(Buffer const &, std::ostream &,
OutputParams const &) const;
///