From f0d215f75296b448835fed560fd49b177e41ba7c Mon Sep 17 00:00:00 2001 From: Michael Schmitt Date: Wed, 23 Aug 2006 10:41:43 +0000 Subject: [PATCH] drop linuxdoc support (part 1) git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14816 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/insets/ExternalSupport.C | 2 -- src/insets/ExternalTransforms.C | 6 ----- src/insets/ExternalTransforms.h | 1 - src/insets/insetbase.C | 7 ------ src/insets/insetbase.h | 3 --- src/insets/insetbox.C | 7 ------ src/insets/insetbox.h | 3 --- src/insets/insetbranch.C | 8 ------ src/insets/insetbranch.h | 3 --- src/insets/insetcharstyle.C | 12 --------- src/insets/insetcharstyle.h | 3 --- src/insets/insetcommand.C | 7 ------ src/insets/insetcommand.h | 3 --- src/insets/insetert.C | 22 ----------------- src/insets/insetert.h | 3 --- src/insets/insetexternal.C | 9 ------- src/insets/insetexternal.h | 3 --- src/insets/insetfloat.C | 38 ---------------------------- src/insets/insetfloat.h | 3 --- src/insets/insetfloatlist.h | 3 --- src/insets/insetgraphics.C | 15 ----------- src/insets/insetgraphics.h | 3 --- src/insets/insethfill.C | 8 ------ src/insets/insethfill.h | 3 --- src/insets/insetinclude.C | 44 --------------------------------- src/insets/insetinclude.h | 3 --- 26 files changed, 222 deletions(-) diff --git a/src/insets/ExternalSupport.C b/src/insets/ExternalSupport.C index ac6de16921..7018d37db4 100644 --- a/src/insets/ExternalSupport.C +++ b/src/insets/ExternalSupport.C @@ -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; } diff --git a/src/insets/ExternalTransforms.C b/src/insets/ExternalTransforms.C index 43b69eece1..adc9cfa989 100644 --- a/src/insets/ExternalTransforms.C +++ b/src/insets/ExternalTransforms.C @@ -325,12 +325,6 @@ string const sanitizeLatexOption(string const & input) } -string const sanitizeLinuxDocOption(string const & input) -{ - return input; -} - - namespace { template diff --git a/src/insets/ExternalTransforms.h b/src/insets/ExternalTransforms.h index ce2c86ad44..9658a759d1 100644 --- a/src/insets/ExternalTransforms.h +++ b/src/insets/ExternalTransforms.h @@ -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 { diff --git a/src/insets/insetbase.C b/src/insets/insetbase.C index 29fd67754d..eb7a818ed1 100644 --- a/src/insets/insetbase.C +++ b/src/insets/insetbase.C @@ -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 { diff --git a/src/insets/insetbase.h b/src/insets/insetbase.h index d36655597c..8bd5ec5304 100644 --- a/src/insets/insetbase.h +++ b/src/insets/insetbase.h @@ -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; diff --git a/src/insets/insetbox.C b/src/insets/insetbox.C index ed23162557..3ff49e7e85 100644 --- a/src/insets/insetbox.C +++ b/src/insets/insetbox.C @@ -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 { diff --git a/src/insets/insetbox.h b/src/insets/insetbox.h index 3e0df69ebb..f61d240548 100644 --- a/src/insets/insetbox.h +++ b/src/insets/insetbox.h @@ -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; /// diff --git a/src/insets/insetbranch.C b/src/insets/insetbranch.C index a18bf41d4f..13130aa371 100644 --- a/src/insets/insetbranch.C +++ b/src/insets/insetbranch.C @@ -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 { diff --git a/src/insets/insetbranch.h b/src/insets/insetbranch.h index 44c2786627..c70d2f2bf2 100644 --- a/src/insets/insetbranch.h +++ b/src/insets/insetbranch.h @@ -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; /// diff --git a/src/insets/insetcharstyle.C b/src/insets/insetcharstyle.C index 9d34f5f642..e2b0a65098 100644 --- a/src/insets/insetcharstyle.C +++ b/src/insets/insetcharstyle.C @@ -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 { diff --git a/src/insets/insetcharstyle.h b/src/insets/insetcharstyle.h index 375a5c84a0..de785ed71c 100644 --- a/src/insets/insetcharstyle.h +++ b/src/insets/insetcharstyle.h @@ -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; /// diff --git a/src/insets/insetcommand.C b/src/insets/insetcommand.C index 7f47611bb3..428625c097 100644 --- a/src/insets/insetcommand.C +++ b/src/insets/insetcommand.C @@ -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 { diff --git a/src/insets/insetcommand.h b/src/insets/insetcommand.h index 305e5b9657..61f6bb80c1 100644 --- a/src/insets/insetcommand.h +++ b/src/insets/insetcommand.h @@ -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; /// diff --git a/src/insets/insetert.C b/src/insets/insetert.C index ed5bf5a44e..1b33011b8d 100644 --- a/src/insets/insetert.C +++ b/src/insets/insetert.C @@ -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 { diff --git a/src/insets/insetert.h b/src/insets/insetert.h index 5efe845e40..0fe7b2d2a1 100644 --- a/src/insets/insetert.h +++ b/src/insets/insetert.h @@ -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; /// diff --git a/src/insets/insetexternal.C b/src/insets/insetexternal.C index c8faf6f0d0..5353b0c5ac 100644 --- a/src/insets/insetexternal.C +++ b/src/insets/insetexternal.C @@ -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 { diff --git a/src/insets/insetexternal.h b/src/insets/insetexternal.h index 1f09b82fe6..7937b0c0f6 100644 --- a/src/insets/insetexternal.h +++ b/src/insets/insetexternal.h @@ -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; diff --git a/src/insets/insetfloat.C b/src/insets/insetfloat.C index f5fdae343e..0df3637e9d 100644 --- a/src/insets/insetfloat.C +++ b/src/insets/insetfloat.C @@ -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 << "\n"; - - return i; -} - - int InsetFloat::docbook(Buffer const & buf, ostream & os, OutputParams const & runparams) const { diff --git a/src/insets/insetfloat.h b/src/insets/insetfloat.h index 26458a6e48..622adbaaef 100644 --- a/src/insets/insetfloat.h +++ b/src/insets/insetfloat.h @@ -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; /// diff --git a/src/insets/insetfloatlist.h b/src/insets/insetfloatlist.h index 4a7aaa317d..ffb0622552 100644 --- a/src/insets/insetfloatlist.h +++ b/src/insets/insetfloatlist.h @@ -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; } /// diff --git a/src/insets/insetgraphics.C b/src/insets/insetgraphics.C index f4e01ea3e0..03a05aa2c9 100644 --- a/src/insets/insetgraphics.C +++ b/src/insets/insetgraphics.C @@ -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 << "\n"; - os << ""; - return 0; -} - - namespace { int writeImageObject(char * format, ostream& os, OutputParams const & runparams, diff --git a/src/insets/insetgraphics.h b/src/insets/insetgraphics.h index 140a1f9d21..23d8eaa96b 100644 --- a/src/insets/insetgraphics.h +++ b/src/insets/insetgraphics.h @@ -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; diff --git a/src/insets/insethfill.C b/src/insets/insethfill.C index 32e4bb40bd..21f9e79e70 100644 --- a/src/insets/insethfill.C +++ b/src/insets/insethfill.C @@ -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 { diff --git a/src/insets/insethfill.h b/src/insets/insethfill.h index c0a26174d6..2aaff52408 100644 --- a/src/insets/insethfill.h +++ b/src/insets/insethfill.h @@ -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; /// diff --git a/src/insets/insetinclude.C b/src/insets/insetinclude.C index fc39245feb..878605fbd3 100644 --- a/src/insets/insetinclude.C +++ b/src/insets/insetinclude.C @@ -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 << ""; - } else { - runparams.exportdata->addExternalFile("linuxdoc", writefile, - exportfile); - os << '&' << include_label << ';'; - } - - return 0; -} - - int InsetInclude::docbook(Buffer const & buffer, ostream & os, OutputParams const & runparams) const { diff --git a/src/insets/insetinclude.h b/src/insets/insetinclude.h index 0f2e3255d3..06b944b8cb 100644 --- a/src/insets/insetinclude.h +++ b/src/insets/insetinclude.h @@ -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; ///