From 4b0033da60b3bd53d8a9c1d08b852ecfc884167b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Lars=20Gullik=20Bj=C3=B8nnes?= Date: Mon, 10 Mar 2003 18:00:29 +0000 Subject: [PATCH] remove commented code git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6434 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/buffer.C | 79 ---------------------------------------------------- src/buffer.h | 9 ------ 2 files changed, 88 deletions(-) diff --git a/src/buffer.C b/src/buffer.C index f43140f674..8b55fbecca 100644 --- a/src/buffer.C +++ b/src/buffer.C @@ -1815,85 +1815,6 @@ void Buffer::makeLaTeXFile(ostream & os, } -#if 0 -// -// LaTeX all paragraphs from par to endpar, if endpar == 0 then to the end -// -void Buffer::latexParagraphs(ostream & ofs, - ParagraphList::iterator par, - ParagraphList::iterator endpar, - TexRow & texrow, - bool moving_arg) const -{ - bool was_title = false; - bool already_title = false; - LyXTextClass const & tclass = params.getLyXTextClass(); - - // if only_body - while (par != endpar) { - Inset * in = par->inInset(); - // well we have to check if we are in an inset with unlimited - // length (all in one row) if that is true then we don't allow - // any special options in the paragraph and also we don't allow - // any environment other then "Standard" to be valid! - if ((in == 0) || !in->forceDefaultParagraphs(in)) { - LyXLayout_ptr const & layout = par->layout(); - - if (layout->intitle) { - if (already_title) { - lyxerr <<"Error in latexParagraphs: You" - " should not mix title layouts" - " with normal ones." << endl; - } else if (!was_title) { - was_title = true; - if (tclass.titletype() == TITLE_ENVIRONMENT) { - ofs << "\\begin{" - << tclass.titlename() - << "}\n"; - texrow.newline(); - } - } - } else if (was_title && !already_title) { - if (tclass.titletype() == TITLE_ENVIRONMENT) { - ofs << "\\end{" << tclass.titlename() - << "}\n"; - } - else { - ofs << "\\" << tclass.titlename() - << "\n"; - } - texrow.newline(); - already_title = true; - was_title = false; - } - - if (layout->isEnvironment() || - !par->params().leftIndent().zero()) - { - par = TeXEnvironment(this, params, paragraphs, par, ofs, texrow); - } else { - par = TeXOnePar(this, params, paragraphs, par, ofs, texrow, moving_arg); - } - } else { - par = TeXOnePar(this, params, paragraphs, par, ofs, texrow, moving_arg); - } - } - // It might be that we only have a title in this document - if (was_title && !already_title) { - if (tclass.titletype() == TITLE_ENVIRONMENT) { - ofs << "\\end{" << tclass.titlename() - << "}\n"; - } - else { - ofs << "\\" << tclass.titlename() - << "\n"; - } - texrow.newline(); - } -} -#endif - - bool Buffer::isLatex() const { return params.getLyXTextClass().outputType() == LATEX; diff --git a/src/buffer.h b/src/buffer.h index b179e462dc..54ff5865f8 100644 --- a/src/buffer.h +++ b/src/buffer.h @@ -147,15 +147,6 @@ public: bool nice, bool only_body = false, bool only_preamble = false); -#if 0 - /** LaTeX all paragraphs from par to endpar. - \param \a endpar if == 0 then to the end - */ - void latexParagraphs(std::ostream & os, - ParagraphList::iterator par, - ParagraphList::iterator endpar, - TexRow & texrow, bool moving_arg = false) const; -#endif /// void simpleDocBookOnePar(std::ostream &, Paragraph * par, int & desc_on, -- 2.39.5