Am Samstag, 10. Januar 2004 19:19 schrieb Angus Leeming: > Georg Baum wrote: > > I tried, bit it did not work. The only place where it is needed > > seems to be InsetInclude::validate(). > > Can you not pass the runparams to the inset::validate member functions > then?
Of course, but this requires changes in many places and passing around the runparams between various validate() functions (see attached). I was not sure wether this is desired. The only thing that irritates me are these two lines in Buffer::make*File: // we want this to be true outside previews (for insetexternal) niceFile() = true; Is the comment still valid? Georg
Index: src/ChangeLog =================================================================== RCS file: /cvs/lyx/lyx-devel/src/ChangeLog,v retrieving revision 1.1775 diff -u -p -r1.1775 ChangeLog --- src/ChangeLog 2004/01/09 09:04:31 1.1775 +++ src/ChangeLog 2004/01/11 12:10:13 @@ -1,3 +1,9 @@ +2004-01-11 Georg Baum <[EMAIL PROTECTED]> + + * buffer.[Ch]: remove niceFile(), use OutputParams.nice instead + * buffer.[Ch], paragraph.[Ch], paragraph_pimpl.[Ch], tabular.[Ch]: + add OutputParams parameter to validate() + 2004-01-08 Alfredo Braunstein <[EMAIL PROTECTED]> * text2.C (undoSpan): add and use Index: src/buffer.C =================================================================== RCS file: /cvs/lyx/lyx-devel/src/buffer.C,v retrieving revision 1.552 diff -u -p -r1.552 buffer.C --- src/buffer.C 2003/12/29 15:49:50 1.552 +++ src/buffer.C 2004/01/11 12:10:19 @@ -294,18 +305,6 @@ string const & Buffer::temppath() const } -bool & Buffer::niceFile() -{ - return pimpl_->nicefile; -} - - -bool Buffer::niceFile() const -{ - return pimpl_->nicefile; -} - - TexRow & Buffer::texrow() { return pimpl_->texrow; @@ -848,12 +844,11 @@ void Buffer::makeLaTeXFile(ostream & os, bool output_preamble, bool output_body) { OutputParams runparams = runparams_in; - niceFile() = runparams.nice; // this will be used by Insetincludes. // validate the buffer. lyxerr[Debug::LATEX] << " Validating buffer..." << endl; LaTeXFeatures features(*this, params()); - validate(features); + validate(features, runparams_in); lyxerr[Debug::LATEX] << " Buffer validation done." << endl; texrow().reset(); @@ -944,9 +939,6 @@ void Buffer::makeLaTeXFile(ostream & os, lyxerr[Debug::INFO] << "Finished making LaTeX file." << endl; lyxerr[Debug::INFO] << "Row count was " << texrow().rows() - 1 << '.' << endl; - - // we want this to be true outside previews (for insetexternal) - niceFile() = true; } @@ -991,11 +983,9 @@ void Buffer::makeLinuxDocFile(string con if (!openFileWrite(ofs, fname)) return; - niceFile() = runparams.nice; // this will be used by included files. - LaTeXFeatures features(*this, params()); - validate(features); + validate(features, runparams); texrow().reset(); @@ -1040,9 +1030,6 @@ void Buffer::makeLinuxDocFile(string con ofs.close(); // How to check for successful close - - // we want this to be true outside previews (for insetexternal) - niceFile() = true; } @@ -1054,10 +1041,8 @@ void Buffer::makeDocBookFile(string cons if (!openFileWrite(ofs, fname)) return; - niceFile() = runparams.nice; // this will be used by Insetincludes. - LaTeXFeatures features(*this, params()); - validate(features); + validate(features, runparams); texrow().reset(); @@ -1101,9 +1086,6 @@ void Buffer::makeDocBookFile(string cons ofs.close(); // How to check for successful close - - // we want this to be true outside previews (for insetexternal) - niceFile() = true; } @@ -1149,7 +1127,7 @@ int Buffer::runChktex() } -void Buffer::validate(LaTeXFeatures & features) const +void Buffer::validate(LaTeXFeatures & features, OutputParams const & runparams) const { LyXTextClass const & tclass = params().getLyXTextClass(); @@ -1164,7 +1142,8 @@ void Buffer::validate(LaTeXFeatures & fe features.require("amsmath"); for_each(paragraphs().begin(), paragraphs().end(), - boost::bind(&Paragraph::validate, _1, boost::ref(features))); + boost::bind(&Paragraph::validate, _1, + boost::ref(features), boost::ref(runparams))); // the bullet shapes are buffer level not paragraph level // so they are tested here Index: src/buffer.h =================================================================== RCS file: /cvs/lyx/lyx-devel/src/buffer.h,v retrieving revision 1.175 diff -u -p -r1.175 buffer.h --- src/buffer.h 2003/12/03 15:27:14 1.175 +++ src/buffer.h 2004/01/11 12:10:20 @@ -233,7 +233,7 @@ public: should perhaps inset "error" insets to help the user correct obvious mistakes. */ - void validate(LaTeXFeatures &) const; + void validate(LaTeXFeatures &, OutputParams const &) const; /// return all bibkeys from buffer and its childs void fillWithBibKeys(std::vector<std::pair<std::string, std::string> > & keys) const; @@ -270,12 +270,6 @@ public: /// Where to put temporary files. std::string const & temppath() const; - - /** If we are writing a nice LaTeX file or not. - While writing as LaTeX, tells whether we are - doing a 'nice' LaTeX file */ - bool & niceFile(); - bool niceFile() const; /// Used when typesetting to place errorboxes. TexRow & texrow(); Index: src/paragraph.C =================================================================== RCS file: /cvs/lyx/lyx-devel/src/paragraph.C,v retrieving revision 1.348 diff -u -p -r1.348 paragraph.C --- src/paragraph.C 2003/12/01 13:35:40 1.348 +++ src/paragraph.C 2004/01/11 12:10:40 @@ -238,9 +238,10 @@ void Paragraph::write(Buffer const & buf } -void Paragraph::validate(LaTeXFeatures & features) const +void Paragraph::validate(LaTeXFeatures & features, + OutputParams const & runparams) const { - pimpl_->validate(features, *layout()); + pimpl_->validate(features, runparams, *layout()); } Index: src/paragraph.h =================================================================== RCS file: /cvs/lyx/lyx-devel/src/paragraph.h,v retrieving revision 1.122 diff -u -p -r1.122 paragraph.h --- src/paragraph.h 2003/11/25 17:23:35 1.122 +++ src/paragraph.h 2004/01/11 12:10:41 @@ -104,7 +104,7 @@ public: void write(Buffer const &, std::ostream &, BufferParams const &, depth_type & depth) const; /// - void validate(LaTeXFeatures &) const; + void validate(LaTeXFeatures &, OutputParams const &) const; /// int startTeXParParams(BufferParams const &, std::ostream &, bool) const; Index: src/paragraph_pimpl.C =================================================================== RCS file: /cvs/lyx/lyx-devel/src/paragraph_pimpl.C,v retrieving revision 1.92 diff -u -p -r1.92 paragraph_pimpl.C --- src/paragraph_pimpl.C 2003/11/25 11:17:23 1.92 +++ src/paragraph_pimpl.C 2004/01/11 12:10:43 @@ -727,6 +727,7 @@ void Paragraph::Pimpl::simpleTeXSpecialC void Paragraph::Pimpl::validate(LaTeXFeatures & features, + OutputParams const & runparams, LyXLayout const & layout) const { BufferParams const & bparams = features.bufferParams(); @@ -788,7 +789,7 @@ void Paragraph::Pimpl::validate(LaTeXFea InsetList::iterator iend = owner_->insetlist.end(); for (; icit != iend; ++icit) { if (icit->inset) { - icit->inset->validate(features); + icit->inset->validate(features, runparams); if (layout.needprotect && icit->inset->lyxCode() == InsetOld::FOOT_CODE) features.require("NeedLyXFootnoteCode"); Index: src/paragraph_pimpl.h =================================================================== RCS file: /cvs/lyx/lyx-devel/src/paragraph_pimpl.h,v retrieving revision 1.41 diff -u -p -r1.41 paragraph_pimpl.h --- src/paragraph_pimpl.h 2003/11/05 12:06:05 1.41 +++ src/paragraph_pimpl.h 2004/01/11 12:10:44 @@ -159,8 +159,8 @@ struct Paragraph::Pimpl { unsigned int & column, value_type const c); /// - void validate(LaTeXFeatures & features, - LyXLayout const & layout) const; + void validate(LaTeXFeatures &, OutputParams const &, + LyXLayout const &) const; /// unsigned int id_; Index: src/tabular.C =================================================================== RCS file: /cvs/lyx/lyx-devel/src/tabular.C,v retrieving revision 1.201 diff -u -p -r1.201 tabular.C --- src/tabular.C 2003/12/01 13:35:41 1.201 +++ src/tabular.C 2004/01/11 12:10:49 @@ -2564,7 +2564,8 @@ int LyXTabular::getCellFromInset(InsetOl } -void LyXTabular::validate(LaTeXFeatures & features) const +void LyXTabular::validate(LaTeXFeatures & features, + OutputParams const & runparams) const { features.require("NeedTabularnewline"); if (isLongTabular()) @@ -2575,7 +2576,7 @@ void LyXTabular::validate(LaTeXFeatures if (getVAlignment(cell) != LYX_VALIGN_TOP || (!getPWidth(cell).zero() && !isMultiColumn(cell))) features.require("array"); - getCellInset(cell).validate(features); + getCellInset(cell).validate(features, runparams); } } Index: src/tabular.h =================================================================== RCS file: /cvs/lyx/lyx-devel/src/tabular.h,v retrieving revision 1.87 diff -u -p -r1.87 tabular.h --- src/tabular.h 2003/11/05 12:06:05 1.87 +++ src/tabular.h 2004/01/11 12:10:49 @@ -377,7 +377,7 @@ public: /// int columns() const { return columns_;} /// - void validate(LaTeXFeatures &) const; + void validate(LaTeXFeatures &, OutputParams const &) const; /// Appends \c list with all labels found within this inset. void getLabelList(Buffer const &, std::vector<std::string> & list) const; /// Index: src/insets/ChangeLog =================================================================== RCS file: /cvs/lyx/lyx-devel/src/insets/ChangeLog,v retrieving revision 1.958 diff -u -p -r1.958 ChangeLog --- src/insets/ChangeLog 2004/01/08 18:30:12 1.958 +++ src/insets/ChangeLog 2004/01/11 12:12:14 @@ -1,3 +1,15 @@ +2004-01-11 Georg Baum <[EMAIL PROTECTED]> + + * insetgraphics.C, insetinclude.C: use runparams.nice instead of + buffer->niceFile() + * insetbase.h, insetbox.[Ch], insetbranch.[Ch], insetcharstyle.[Ch], + insetcite.[Ch], insetcollapsable.[Ch], insetert.h, + insetexternal.[Ch], insetfloat.[Ch], insetfloatlist.[Ch], + insetgraphics.[Ch], insetinclude.[Ch], insetindex.[Ch], + insetline.[Ch], insetnote.[Ch], insetquotes.[Ch], + insetref.[Ch], insetspecialchar.[Ch], insettabular.[Ch], + insettext.[Ch], inseturl.[Ch], insetwrap[Ch]: add OutputParams + parameter to validate() 2004-01-08 André Pönitz <[EMAIL PROTECTED]> Index: src/insets/insetbase.h =================================================================== RCS file: /cvs/lyx/lyx-devel/src/insets/insetbase.h,v retrieving revision 1.19 diff -u -p -r1.19 insetbase.h --- src/insets/insetbase.h 2003/12/01 13:35:45 1.19 +++ src/insets/insetbase.h 2004/01/11 12:12:16 @@ -24,6 +24,7 @@ class Dimension; class PainterInfo; class LaTeXFeatures; class DispatchResult; +class OutputParams; /// Common base class to all insets class InsetBase { @@ -63,7 +64,7 @@ public: virtual void draw(PainterInfo & pi, int x, int y) const = 0; /// request "external features" - virtual void validate(LaTeXFeatures &) const {} + virtual void validate(LaTeXFeatures &, OutputParams const &) const {} /// Appends \c list with all labels found within this inset. virtual void getLabelList(Buffer const &, std::vector<std::string> & /* list */) const {} Index: src/insets/insetbox.C =================================================================== RCS file: /cvs/lyx/lyx-devel/src/insets/insetbox.C,v retrieving revision 1.15 diff -u -p -r1.15 insetbox.C --- src/insets/insetbox.C 2003/12/29 13:55:45 1.15 +++ src/insets/insetbox.C 2004/01/11 12:12:17 @@ -377,7 +377,8 @@ int InsetBox::plaintext(Buffer const & b } -void InsetBox::validate(LaTeXFeatures & features) const +void InsetBox::validate(LaTeXFeatures & features, + OutputParams const & runparams) const { features.require("calc"); BoxType btype = boxtranslator().find(params_.type); @@ -392,7 +393,7 @@ void InsetBox::validate(LaTeXFeatures & features.require("fancybox"); break; } - inset.validate(features); + inset.validate(features, runparams); } Index: src/insets/insetbox.h =================================================================== RCS file: /cvs/lyx/lyx-devel/src/insets/insetbox.h,v retrieving revision 1.9 diff -u -p -r1.9 insetbox.h --- src/insets/insetbox.h 2003/12/10 21:48:40 1.9 +++ src/insets/insetbox.h 2004/01/11 12:12:17 @@ -91,7 +91,7 @@ public: int plaintext(Buffer const &, std::ostream &, OutputParams const & runparams) const; /// - void validate(LaTeXFeatures &) const; + void validate(LaTeXFeatures &, OutputParams const &) const; /// InsetBoxParams const & params() const { return params_; } /// Index: src/insets/insetbranch.C =================================================================== RCS file: /cvs/lyx/lyx-devel/src/insets/insetbranch.C,v retrieving revision 1.36 diff -u -p -r1.36 insetbranch.C --- src/insets/insetbranch.C 2004/01/05 17:33:57 1.36 +++ src/insets/insetbranch.C 2004/01/11 12:12:18 @@ -190,9 +190,10 @@ int InsetBranch::plaintext(Buffer const } -void InsetBranch::validate(LaTeXFeatures & features) const +void InsetBranch::validate(LaTeXFeatures & features, + OutputParams const & runparams) const { - inset.validate(features); + inset.validate(features, runparams); } Index: src/insets/insetbranch.h =================================================================== RCS file: /cvs/lyx/lyx-devel/src/insets/insetbranch.h,v retrieving revision 1.12 diff -u -p -r1.12 insetbranch.h --- src/insets/insetbranch.h 2003/12/14 16:33:56 1.12 +++ src/insets/insetbranch.h 2004/01/11 12:12:18 @@ -68,7 +68,7 @@ public: int plaintext(Buffer const &, std::ostream &, OutputParams const & runparams) const; /// - void validate(LaTeXFeatures &) const; + void validate(LaTeXFeatures &, OutputParams const &) const; /// InsetBranchParams const & params() const { return params_; } /// Index: src/insets/insetcharstyle.C =================================================================== RCS file: /cvs/lyx/lyx-devel/src/insets/insetcharstyle.C,v retrieving revision 1.10 diff -u -p -r1.10 insetcharstyle.C --- src/insets/insetcharstyle.C 2003/12/16 18:49:04 1.10 +++ src/insets/insetcharstyle.C 2004/01/11 12:12:18 @@ -243,7 +243,8 @@ int InsetCharStyle::plaintext(Buffer con } -void InsetCharStyle::validate(LaTeXFeatures & features) const +void InsetCharStyle::validate(LaTeXFeatures & features, + OutputParams const &) const { features.require(params_.type); } Index: src/insets/insetcharstyle.h =================================================================== RCS file: /cvs/lyx/lyx-devel/src/insets/insetcharstyle.h,v retrieving revision 1.3 diff -u -p -r1.3 insetcharstyle.h --- src/insets/insetcharstyle.h 2003/12/06 09:31:30 1.3 +++ src/insets/insetcharstyle.h 2004/01/11 12:12:18 @@ -78,7 +78,7 @@ public: int plaintext(Buffer const &, std::ostream &, OutputParams const &) const; /// - void validate(LaTeXFeatures &) const; + void validate(LaTeXFeatures &, OutputParams const &) const; /// InsetCharStyleParams const & params() const { return params_; } Index: src/insets/insetcite.C =================================================================== RCS file: /cvs/lyx/lyx-devel/src/insets/insetcite.C,v retrieving revision 1.75 diff -u -p -r1.75 insetcite.C --- src/insets/insetcite.C 2003/12/11 15:23:15 1.75 +++ src/insets/insetcite.C 2004/01/11 12:12:19 @@ -357,7 +357,8 @@ int InsetCitation::latex(Buffer const & } -void InsetCitation::validate(LaTeXFeatures & features) const +void InsetCitation::validate(LaTeXFeatures & features, + OutputParams const &) const { if (features.bufferParams().use_natbib) features.require("natbib"); Index: src/insets/insetcite.h =================================================================== RCS file: /cvs/lyx/lyx-devel/src/insets/insetcite.h,v retrieving revision 1.47 diff -u -p -r1.47 insetcite.h --- src/insets/insetcite.h 2003/12/11 15:23:15 1.47 +++ src/insets/insetcite.h 2004/01/11 12:12:19 @@ -38,7 +38,7 @@ public: int latex(Buffer const &, std::ostream &, OutputParams const &) const; /// - void validate(LaTeXFeatures &) const; + void validate(LaTeXFeatures &, OutputParams const &) const; private: struct Cache { /// Index: src/insets/insetcollapsable.C =================================================================== RCS file: /cvs/lyx/lyx-devel/src/insets/insetcollapsable.C,v retrieving revision 1.225 diff -u -p -r1.225 insetcollapsable.C --- src/insets/insetcollapsable.C 2004/01/08 18:30:12 1.225 +++ src/insets/insetcollapsable.C 2004/01/11 12:12:20 @@ -369,9 +369,10 @@ InsetCollapsable::priv_dispatch(FuncRequ } -void InsetCollapsable::validate(LaTeXFeatures & features) const +void InsetCollapsable::validate(LaTeXFeatures & features, + OutputParams const & runparams) const { - inset.validate(features); + inset.validate(features, runparams); } Index: src/insets/insetcollapsable.h =================================================================== RCS file: /cvs/lyx/lyx-devel/src/insets/insetcollapsable.h,v retrieving revision 1.159 diff -u -p -r1.159 insetcollapsable.h --- src/insets/insetcollapsable.h 2004/01/08 18:30:12 1.159 +++ src/insets/insetcollapsable.h 2004/01/11 12:12:21 @@ -77,7 +77,7 @@ public: int docbook(Buffer const &, std::ostream &, OutputParams const & runparams) const; /// - void validate(LaTeXFeatures & features) const; + void validate(LaTeXFeatures &, OutputParams const &) const; /// get the screen x,y of the cursor void getCursorPos(int cell, int & x, int & y) const; /// Index: src/insets/insetert.h =================================================================== RCS file: /cvs/lyx/lyx-devel/src/insets/insetert.h,v retrieving revision 1.102 diff -u -p -r1.102 insetert.h --- src/insets/insetert.h 2003/12/12 14:02:14 1.102 +++ src/insets/insetert.h 2004/01/11 12:12:21 @@ -61,7 +61,7 @@ public: int docbook(Buffer const &, std::ostream &, OutputParams const & runparams) const; /// - void validate(LaTeXFeatures &) const {} + void validate(LaTeXFeatures &, OutputParams const &) const {} /// void metrics(MetricsInfo &, Dimension &) const; /// Index: src/insets/insetexternal.C =================================================================== RCS file: /cvs/lyx/lyx-devel/src/insets/insetexternal.C,v retrieving revision 1.138 diff -u -p -r1.138 insetexternal.C --- src/insets/insetexternal.C 2004/01/02 21:25:02 1.138 +++ src/insets/insetexternal.C 2004/01/11 12:12:22 @@ -735,7 +734,8 @@ int InsetExternal::docbook(Buffer const } -void InsetExternal::validate(LaTeXFeatures & features) const +void InsetExternal::validate(LaTeXFeatures & features, + OutputParams const &) const { if (params_.draft) return; Index: src/insets/insetexternal.h =================================================================== RCS file: /cvs/lyx/lyx-devel/src/insets/insetexternal.h,v retrieving revision 1.69 diff -u -p -r1.69 insetexternal.h --- src/insets/insetexternal.h 2003/12/11 11:16:18 1.69 +++ src/insets/insetexternal.h 2004/01/11 12:12:23 @@ -138,7 +138,7 @@ public: OutputParams const &) const; /// Update needed features for this inset. - virtual void validate(LaTeXFeatures & features) const; + virtual void validate(LaTeXFeatures &, OutputParams const &) const; /// InsetExternalParams const & params() const; Index: src/insets/insetfloat.C =================================================================== RCS file: /cvs/lyx/lyx-devel/src/insets/insetfloat.C,v retrieving revision 1.116 diff -u -p -r1.116 insetfloat.C --- src/insets/insetfloat.C 2003/12/11 15:23:15 1.116 +++ src/insets/insetfloat.C 2004/01/11 12:12:24 @@ -242,14 +242,15 @@ void InsetFloat::read(Buffer const & buf } -void InsetFloat::validate(LaTeXFeatures & features) const +void InsetFloat::validate(LaTeXFeatures & features, + OutputParams const & runparams) const { if (contains(params_.placement, "H")) { features.require("float"); } features.useFloat(params_.type); - InsetCollapsable::validate(features); + InsetCollapsable::validate(features, runparams); } Index: src/insets/insetfloat.h =================================================================== RCS file: /cvs/lyx/lyx-devel/src/insets/insetfloat.h,v retrieving revision 1.60 diff -u -p -r1.60 insetfloat.h --- src/insets/insetfloat.h 2003/12/01 13:35:45 1.60 +++ src/insets/insetfloat.h 2004/01/11 12:12:24 @@ -47,7 +47,7 @@ public: /// void read(Buffer const & buf, LyXLex & lex); /// - void validate(LaTeXFeatures & features) const; + void validate(LaTeXFeatures &, OutputParams const &) const; /// virtual std::auto_ptr<InsetBase> clone() const; /// Index: src/insets/insetfloatlist.C =================================================================== RCS file: /cvs/lyx/lyx-devel/src/insets/insetfloatlist.C,v retrieving revision 1.56 diff -u -p -r1.56 insetfloatlist.C --- src/insets/insetfloatlist.C 2003/12/11 15:23:15 1.56 +++ src/insets/insetfloatlist.C 2004/01/11 12:12:24 @@ -135,7 +135,8 @@ int InsetFloatList::plaintext(Buffer con } -void InsetFloatList::validate(LaTeXFeatures & features) const +void InsetFloatList::validate(LaTeXFeatures & features, + OutputParams const &) const { features.useFloat(getCmdName()); } Index: src/insets/insetfloatlist.h =================================================================== RCS file: /cvs/lyx/lyx-devel/src/insets/insetfloatlist.h,v retrieving revision 1.37 diff -u -p -r1.37 insetfloatlist.h --- src/insets/insetfloatlist.h 2003/12/11 15:23:15 1.37 +++ src/insets/insetfloatlist.h 2004/01/11 12:12:24 @@ -52,7 +52,7 @@ public: int plaintext(Buffer const &, std::ostream &, OutputParams const & runparams) const; /// - void validate(LaTeXFeatures & features) const; + void validate(LaTeXFeatures &, OutputParams const &) const; }; #endif Index: src/insets/insetgraphics.C =================================================================== RCS file: /cvs/lyx/lyx-devel/src/insets/insetgraphics.C,v retrieving revision 1.231 diff -u -p -r1.231 insetgraphics.C --- src/insets/insetgraphics.C 2003/12/11 15:23:15 1.231 +++ src/insets/insetgraphics.C 2004/01/11 12:12:27 @@ -394,9 +405,9 @@ copyToDirIfNeeded(string const & file_in bool const success = support::copy(file_in, file_out); if (!success) { lyxerr[Debug::GRAPHICS] - << support::bformat(_("Could not copy the file\n%1$s\n" - "into the temporary directory."), - file_in) + << bformat(_("Could not copy the file\n%1$s\n" + "into the temporary directory."), + file_in) << std::endl; } @@ -633,9 +685,9 @@ int InsetGraphics::plaintext(Buffer cons int InsetGraphics::linuxdoc(Buffer const & buf, ostream & os, - OutputParams const &) const + OutputParams const & runparams) const { - string const file_name = buf.niceFile() ? + string const file_name = runparams.nice ? params().filename.relFilename(buf.filePath()): params().filename.absFilename(); @@ -659,7 +711,8 @@ int InsetGraphics::docbook(Buffer const } -void InsetGraphics::validate(LaTeXFeatures & features) const +void InsetGraphics::validate(LaTeXFeatures & features, + OutputParams const &) const { // If we have no image, we should not require anything. if (params().filename.empty()) Index: src/insets/insetgraphics.h =================================================================== RCS file: /cvs/lyx/lyx-devel/src/insets/insetgraphics.h,v retrieving revision 1.91 diff -u -p -r1.91 insetgraphics.h --- src/insets/insetgraphics.h 2003/11/05 12:06:15 1.91 +++ src/insets/insetgraphics.h 2004/01/11 12:12:27 @@ -60,7 +60,7 @@ public: /** Tell LyX what the latex features you need i.e. what latex packages you need to be included. */ - void validate(LaTeXFeatures & features) const; + void validate(LaTeXFeatures &, OutputParams const &) const; /// returns LyX code associated with the inset. Used for TOC, ...) InsetOld::Code lyxCode() const { return InsetOld::GRAPHICS_CODE; } Index: src/insets/insetinclude.C =================================================================== RCS file: /cvs/lyx/lyx-devel/src/insets/insetinclude.C,v retrieving revision 1.178 diff -u -p -r1.178 insetinclude.C --- src/insets/insetinclude.C 2003/12/12 10:20:17 1.178 +++ src/insets/insetinclude.C 2004/01/11 12:12:28 @@ -388,7 +388,7 @@ int InsetInclude::linuxdoc(Buffer const // write it to a file (so far the complete file) string writefile = ChangeExtension(included_file, ".sgml"); - if (!buffer.temppath().empty() && !buffer.niceFile()) { + if (!buffer.temppath().empty() && !runparams.nice) { incfile = subst(incfile, '/','@'); writefile = AddName(buffer.temppath(), incfile); } else @@ -401,7 +401,6 @@ int InsetInclude::linuxdoc(Buffer const lyxerr[Debug::LATEX] << "writefile:" << writefile << endl; OutputParams runp = runparams; - runp.nice = buffer.niceFile(); tmp->makeLinuxDocFile(writefile, runp, true); } @@ -432,7 +431,7 @@ int InsetInclude::docbook(Buffer const & // write it to a file (so far the complete file) string writefile = ChangeExtension(included_file, ".sgml"); - if (!buffer.temppath().empty() && !buffer.niceFile()) { + if (!buffer.temppath().empty() && !runparams.nice) { incfile = subst(incfile, '/','@'); writefile = AddName(buffer.temppath(), incfile); } else @@ -444,7 +443,6 @@ int InsetInclude::docbook(Buffer const & lyxerr[Debug::LATEX] << "writefile:" << writefile << endl; OutputParams runp = runparams; - runp.nice = buffer.niceFile(); tmp->makeDocBookFile(writefile, runp, true); } @@ -459,7 +457,8 @@ int InsetInclude::docbook(Buffer const & } -void InsetInclude::validate(LaTeXFeatures & features) const +void InsetInclude::validate(LaTeXFeatures & features, + OutputParams const & runparams) const { string incfile(params_.getContents()); string writefile; @@ -467,9 +466,13 @@ void InsetInclude::validate(LaTeXFeature string const included_file = includedFilename(buffer, params_); if (!buffer.temppath().empty() && - !buffer.niceFile() && + !runparams.nice && !isVerbatim(params_)) { incfile = subst(incfile, '/','@'); +#ifdef __EMX__ +// FIXME: It seems that the following is necessary (see latex() above) +// incfile = subst(incfile, ':', '$'); +#endif writefile = AddName(buffer.temppath(), incfile); } else writefile = included_file; @@ -490,10 +492,8 @@ void InsetInclude::validate(LaTeXFeature if (loadIfNeeded(buffer, params_)) { // a file got loaded Buffer * const tmp = bufferlist.getBuffer(included_file); - if (tmp) { - tmp->niceFile() = buffer.niceFile(); - tmp->validate(features); - } + if (tmp) + tmp->validate(features, runparams); } } Index: src/insets/insetinclude.h =================================================================== RCS file: /cvs/lyx/lyx-devel/src/insets/insetinclude.h,v retrieving revision 1.95 diff -u -p -r1.95 insetinclude.h --- src/insets/insetinclude.h 2003/11/05 12:06:16 1.95 +++ src/insets/insetinclude.h 2004/01/11 12:12:28 @@ -78,7 +78,7 @@ public: int docbook(Buffer const &, std::ostream &, OutputParams const &) const; /// - void validate(LaTeXFeatures &) const; + void validate(LaTeXFeatures &, OutputParams const &) const; /// void addPreview(lyx::graphics::PreviewLoader &) const; protected: Index: src/insets/insetindex.C =================================================================== RCS file: /cvs/lyx/lyx-devel/src/insets/insetindex.C,v retrieving revision 1.59 diff -u -p -r1.59 insetindex.C --- src/insets/insetindex.C 2003/12/11 15:23:15 1.59 +++ src/insets/insetindex.C 2004/01/11 12:12:29 @@ -71,7 +71,8 @@ string const InsetPrintIndex::getScreenL } -void InsetPrintIndex::validate(LaTeXFeatures & features) const +void InsetPrintIndex::validate(LaTeXFeatures & features, + OutputParams const &) const { features.require("makeidx"); } Index: src/insets/insetindex.h =================================================================== RCS file: /cvs/lyx/lyx-devel/src/insets/insetindex.h,v retrieving revision 1.53 diff -u -p -r1.53 insetindex.h --- src/insets/insetindex.h 2003/12/11 15:23:15 1.53 +++ src/insets/insetindex.h 2004/01/11 12:12:29 @@ -48,7 +48,7 @@ public: return std::auto_ptr<InsetBase>(new InsetPrintIndex(params())); } /// Updates needed features for this inset. - void validate(LaTeXFeatures & features) const; + void validate(LaTeXFeatures &, OutputParams const &) const; /// EDITABLE editable() const { return NOT_EDITABLE; } /// Index: src/insets/insetline.C =================================================================== RCS file: /cvs/lyx/lyx-devel/src/insets/insetline.C,v retrieving revision 1.3 diff -u -p -r1.3 insetline.C --- src/insets/insetline.C 2003/11/05 12:06:16 1.3 +++ src/insets/insetline.C 2004/01/11 12:12:29 @@ -91,7 +91,8 @@ int InsetLine::docbook(Buffer const &, s } -void InsetLine::validate(LaTeXFeatures & features) const +void InsetLine::validate(LaTeXFeatures & features, + OutputParams const &) const { features.require("lyxline"); } Index: src/insets/insetline.h =================================================================== RCS file: /cvs/lyx/lyx-devel/src/insets/insetline.h,v retrieving revision 1.3 diff -u -p -r1.3 insetline.h --- src/insets/insetline.h 2003/11/05 12:06:16 1.3 +++ src/insets/insetline.h 2004/01/11 12:12:29 @@ -50,7 +50,7 @@ public: bool display() const { return true; } /// - void validate(LaTeXFeatures & features) const; + void validate(LaTeXFeatures &, OutputParams const &) const; }; #endif // INSET_NEWLINE_H Index: src/insets/insetnote.C =================================================================== RCS file: /cvs/lyx/lyx-devel/src/insets/insetnote.C,v retrieving revision 1.70 diff -u -p -r1.70 insetnote.C --- src/insets/insetnote.C 2004/01/07 14:36:42 1.70 +++ src/insets/insetnote.C 2004/01/11 12:12:29 @@ -301,7 +301,8 @@ int InsetNote::plaintext(Buffer const & } -void InsetNote::validate(LaTeXFeatures & features) const +void InsetNote::validate(LaTeXFeatures & features, + OutputParams const & runparams) const { if (params_.type == InsetNoteParams::Comment) features.require("verbatim"); @@ -309,7 +310,7 @@ void InsetNote::validate(LaTeXFeatures & features.require("color"); features.require("lyxgreyedout"); } - inset.validate(features); + inset.validate(features, runparams); } Index: src/insets/insetnote.h =================================================================== RCS file: /cvs/lyx/lyx-devel/src/insets/insetnote.h,v retrieving revision 1.40 diff -u -p -r1.40 insetnote.h --- src/insets/insetnote.h 2003/12/10 17:28:14 1.40 +++ src/insets/insetnote.h 2004/01/11 12:12:30 @@ -70,7 +70,7 @@ public: int plaintext(Buffer const &, std::ostream &, OutputParams const &) const; /// - void validate(LaTeXFeatures &) const; + void validate(LaTeXFeatures &, OutputParams const &) const; /// InsetNoteParams const & params() const { return params_; } protected: Index: src/insets/insetquotes.C =================================================================== RCS file: /cvs/lyx/lyx-devel/src/insets/insetquotes.C,v retrieving revision 1.112 diff -u -p -r1.112 insetquotes.C --- src/insets/insetquotes.C 2003/11/05 12:06:16 1.112 +++ src/insets/insetquotes.C 2004/01/11 12:12:30 @@ -339,7 +339,8 @@ int InsetQuotes::docbook(Buffer const &, } -void InsetQuotes::validate(LaTeXFeatures & features) const +void InsetQuotes::validate(LaTeXFeatures & features, + OutputParams const &) const { bool const use_babel = features.useBabel(); char type = quote_char[quote_index[side_][language_]]; Index: src/insets/insetquotes.h =================================================================== RCS file: /cvs/lyx/lyx-devel/src/insets/insetquotes.h,v retrieving revision 1.59 diff -u -p -r1.59 insetquotes.h --- src/insets/insetquotes.h 2003/11/05 12:06:17 1.59 +++ src/insets/insetquotes.h 2004/01/11 12:12:30 @@ -94,7 +94,7 @@ public: int docbook(Buffer const &, std::ostream &, OutputParams const &) const; /// - void validate(LaTeXFeatures &) const; + void validate(LaTeXFeatures &, OutputParams const &) const; /// InsetOld::Code lyxCode() const; // should this inset be handled like a normal charater Index: src/insets/insetref.C =================================================================== RCS file: /cvs/lyx/lyx-devel/src/insets/insetref.C,v retrieving revision 1.83 diff -u -p -r1.83 insetref.C --- src/insets/insetref.C 2003/12/11 15:23:15 1.83 +++ src/insets/insetref.C 2004/01/11 12:12:30 @@ -122,7 +122,8 @@ int InsetRef::docbook(Buffer const &, os } -void InsetRef::validate(LaTeXFeatures & features) const +void InsetRef::validate(LaTeXFeatures & features, + OutputParams const &) const { if (getCmdName() == "vref" || getCmdName() == "vpageref") features.require("varioref"); Index: src/insets/insetref.h =================================================================== RCS file: /cvs/lyx/lyx-devel/src/insets/insetref.h,v retrieving revision 1.60 diff -u -p -r1.60 insetref.h --- src/insets/insetref.h 2003/12/11 15:23:15 1.60 +++ src/insets/insetref.h 2004/01/11 12:12:31 @@ -65,7 +65,7 @@ public: int docbook(Buffer const &, std::ostream &, OutputParams const &) const; /// - void validate(LaTeXFeatures & features) const; + void validate(LaTeXFeatures &, OutputParams const &) const; protected: /// virtual Index: src/insets/insetspecialchar.C =================================================================== RCS file: /cvs/lyx/lyx-devel/src/insets/insetspecialchar.C,v retrieving revision 1.82 diff -u -p -r1.82 insetspecialchar.C --- src/insets/insetspecialchar.C 2003/11/21 16:35:46 1.82 +++ src/insets/insetspecialchar.C 2004/01/11 12:12:31 @@ -249,7 +249,8 @@ auto_ptr<InsetBase> InsetSpecialChar::cl } -void InsetSpecialChar::validate(LaTeXFeatures & features) const +void InsetSpecialChar::validate(LaTeXFeatures & features, + OutputParams const &) const { if (kind_ == MENU_SEPARATOR) { features.require("lyxarrow"); Index: src/insets/insetspecialchar.h =================================================================== RCS file: /cvs/lyx/lyx-devel/src/insets/insetspecialchar.h,v retrieving revision 1.64 diff -u -p -r1.64 insetspecialchar.h --- src/insets/insetspecialchar.h 2003/11/21 16:35:46 1.64 +++ src/insets/insetspecialchar.h 2004/01/11 12:12:32 @@ -71,7 +71,7 @@ public: /// We don't need \begin_inset and \end_inset bool directWrite() const { return true; } /// - void validate(LaTeXFeatures &) const; + void validate(LaTeXFeatures &, OutputParams const &) const; // should this inset be handled like a normal charater bool isChar() const; Index: src/insets/insettabular.C =================================================================== RCS file: /cvs/lyx/lyx-devel/src/insets/insettabular.C,v retrieving revision 1.390 diff -u -p -r1.390 insettabular.C --- src/insets/insettabular.C 2004/01/08 18:30:12 1.390 +++ src/insets/insettabular.C 2004/01/11 12:12:35 @@ -946,9 +946,10 @@ int InsetTabular::docbook(Buffer const & } -void InsetTabular::validate(LaTeXFeatures & features) const +void InsetTabular::validate(LaTeXFeatures & features, + OutputParams const & runparams) const { - tabular.validate(features); + tabular.validate(features, runparams); } Index: src/insets/insettabular.h =================================================================== RCS file: /cvs/lyx/lyx-devel/src/insets/insettabular.h,v retrieving revision 1.177 diff -u -p -r1.177 insettabular.h --- src/insets/insettabular.h 2004/01/08 18:30:12 1.177 +++ src/insets/insettabular.h 2004/01/11 12:12:36 @@ -106,7 +106,7 @@ public: int docbook(Buffer const &, std::ostream &, OutputParams const &) const; /// - void validate(LaTeXFeatures & features) const; + void validate(LaTeXFeatures &, OutputParams const &) const; /// InsetOld::Code lyxCode() const { return InsetOld::TABULAR_CODE; } /// get the absolute screen x,y of the cursor Index: src/insets/insettext.C =================================================================== RCS file: /cvs/lyx/lyx-devel/src/insets/insettext.C,v retrieving revision 1.565 diff -u -p -r1.565 insettext.C --- src/insets/insettext.C 2004/01/08 18:30:12 1.565 +++ src/insets/insettext.C 2004/01/11 12:12:38 @@ -375,10 +375,12 @@ int InsetText::docbook(Buffer const & bu } -void InsetText::validate(LaTeXFeatures & features) const +void InsetText::validate(LaTeXFeatures & features, + OutputParams const & runparams) const { for_each(paragraphs().begin(), paragraphs().end(), - boost::bind(&Paragraph::validate, _1, boost::ref(features))); + boost::bind(&Paragraph::validate, _1, + boost::ref(features), boost::ref(runparams))); } Index: src/insets/insettext.h =================================================================== RCS file: /cvs/lyx/lyx-devel/src/insets/insettext.h,v retrieving revision 1.240 diff -u -p -r1.240 insettext.h --- src/insets/insettext.h 2004/01/08 18:30:13 1.240 +++ src/insets/insettext.h 2004/01/11 12:12:38 @@ -84,7 +84,7 @@ public: int docbook(Buffer const &, std::ostream &, OutputParams const &) const ; /// - void validate(LaTeXFeatures & features) const; + void validate(LaTeXFeatures &, OutputParams const &) const; /// InsetOld::Code lyxCode() const { return InsetOld::TEXT_CODE; } /// FIXME, document Index: src/insets/inseturl.C =================================================================== RCS file: /cvs/lyx/lyx-devel/src/insets/inseturl.C,v retrieving revision 1.75 diff -u -p -r1.75 inseturl.C --- src/insets/inseturl.C 2003/12/11 15:23:15 1.75 +++ src/insets/inseturl.C 2004/01/11 12:12:39 @@ -100,7 +100,8 @@ int InsetUrl::docbook(Buffer const &, os } -void InsetUrl::validate(LaTeXFeatures & features) const +void InsetUrl::validate(LaTeXFeatures & features, + OutputParams const &) const { features.require("url"); } Index: src/insets/inseturl.h =================================================================== RCS file: /cvs/lyx/lyx-devel/src/insets/inseturl.h,v retrieving revision 1.66 diff -u -p -r1.66 inseturl.h --- src/insets/inseturl.h 2003/12/11 15:23:15 1.66 +++ src/insets/inseturl.h 2004/01/11 12:12:39 @@ -31,7 +31,7 @@ public: /// InsetOld::Code lyxCode() const { return InsetOld::URL_CODE; } /// - void validate(LaTeXFeatures &) const; + void validate(LaTeXFeatures &, OutputParams const &) const; /// std::string const getScreenLabel(Buffer const &) const; /// Index: src/insets/insetwrap.C =================================================================== RCS file: /cvs/lyx/lyx-devel/src/insets/insetwrap.C,v retrieving revision 1.58 diff -u -p -r1.58 insetwrap.C --- src/insets/insetwrap.C 2003/12/11 15:23:15 1.58 +++ src/insets/insetwrap.C 2004/01/11 12:12:39 @@ -159,10 +159,11 @@ void InsetWrap::read(Buffer const & buf, } -void InsetWrap::validate(LaTeXFeatures & features) const +void InsetWrap::validate(LaTeXFeatures & features, + OutputParams const & runparams) const { features.require("floatflt"); - InsetCollapsable::validate(features); + InsetCollapsable::validate(features, runparams); } Index: src/insets/insetwrap.h =================================================================== RCS file: /cvs/lyx/lyx-devel/src/insets/insetwrap.h,v retrieving revision 1.29 diff -u -p -r1.29 insetwrap.h --- src/insets/insetwrap.h 2003/12/01 13:35:49 1.29 +++ src/insets/insetwrap.h 2004/01/11 12:12:39 @@ -45,7 +45,7 @@ public: /// void read(Buffer const & buf, LyXLex & lex); /// - void validate(LaTeXFeatures & features) const; + void validate(LaTeXFeatures &, OutputParams const &) const; /// virtual std::auto_ptr<InsetBase> clone() const; /// Index: src/mathed/ChangeLog =================================================================== RCS file: /cvs/lyx/lyx-devel/src/mathed/ChangeLog,v retrieving revision 1.410 diff -u -p -r1.410 ChangeLog --- src/mathed/ChangeLog 2004/01/07 16:40:29 1.410 +++ src/mathed/ChangeLog 2004/01/11 12:12:46 @@ -1,3 +1,12 @@ +2004-01-11 Georg Baum <[EMAIL PROTECTED]> + + * formula.[Ch], formulabase.[Ch], math_boldsymbolinset.[Ch], + math_casesinset.[Ch], math_colorinset.[Ch], math_data.[Ch], + math_dfracinset.[Ch], math_fontinset.[Ch], math_hullinset.[Ch], + math_macro.[Ch], math_nestinset.[Ch], math_spaceinset.[Ch], + math_symbolinset.[Ch], ref_inset.[Ch]: add OutputParams parameter to + validate() + 2003-12-15 Ronald Florence <[EMAIL PROTECTED]> * math_symbolinset.C: fixed "ugly" patch for Qt/Mac fonts. Index: src/mathed/formula.C =================================================================== RCS file: /cvs/lyx/lyx-devel/src/mathed/formula.C,v retrieving revision 1.308 diff -u -p -r1.308 formula.C --- src/mathed/formula.C 2003/11/10 15:38:20 1.308 +++ src/mathed/formula.C 2004/01/11 12:12:47 @@ -243,9 +243,10 @@ InsetOld::Code InsetFormula::lyxCode() c } -void InsetFormula::validate(LaTeXFeatures & features) const +void InsetFormula::validate(LaTeXFeatures & features, + OutputParams const & runparams) const { - par_->validate(features); + par_->validate(features, runparams); } Index: src/mathed/formula.h =================================================================== RCS file: /cvs/lyx/lyx-devel/src/mathed/formula.h,v retrieving revision 1.105 diff -u -p -r1.105 formula.h --- src/mathed/formula.h 2003/11/05 12:06:19 1.105 +++ src/mathed/formula.h 2004/01/11 12:12:47 @@ -59,7 +59,7 @@ public: /// virtual std::auto_ptr<InsetBase> clone() const; /// - void validate(LaTeXFeatures & features) const; + void validate(LaTeXFeatures &, OutputParams const &) const; /// InsetOld::Code lyxCode() const; /// Index: src/mathed/formulabase.C =================================================================== RCS file: /cvs/lyx/lyx-devel/src/mathed/formulabase.C,v retrieving revision 1.317 diff -u -p -r1.317 formulabase.C --- src/mathed/formulabase.C 2004/01/08 18:30:13 1.317 +++ src/mathed/formulabase.C 2004/01/11 12:12:49 @@ -141,7 +141,7 @@ void InsetFormulaBase::handleFont2(Buffe -void InsetFormulaBase::validate(LaTeXFeatures &) const +void InsetFormulaBase::validate(LaTeXFeatures &, OutputParams const &) const {} Index: src/mathed/formulabase.h =================================================================== RCS file: /cvs/lyx/lyx-devel/src/mathed/formulabase.h,v retrieving revision 1.88 diff -u -p -r1.88 formulabase.h --- src/mathed/formulabase.h 2004/01/08 18:30:14 1.88 +++ src/mathed/formulabase.h 2004/01/11 12:12:49 @@ -40,7 +40,7 @@ public: /// // Don't use this for AMS validation as long as there is no // user-accessible way to override "false positives" - virtual void validate(LaTeXFeatures &) const; + virtual void validate(LaTeXFeatures &, OutputParams const &) const; /// virtual InsetOld::Code lyxCode() const; /// what appears in the minibuffer when opening Index: src/mathed/math_boldsymbolinset.C =================================================================== RCS file: /cvs/lyx/lyx-devel/src/mathed/math_boldsymbolinset.C,v retrieving revision 1.1 diff -u -p -r1.1 math_boldsymbolinset.C --- src/mathed/math_boldsymbolinset.C 2003/09/12 10:14:31 1.1 +++ src/mathed/math_boldsymbolinset.C 2004/01/11 12:12:50 @@ -61,9 +61,10 @@ void MathBoldsymbolInset::drawT(TextPain } -void MathBoldsymbolInset::validate(LaTeXFeatures & features) const +void MathBoldsymbolInset::validate(LaTeXFeatures & features, + OutputParams const & runparams) const { - MathNestInset::validate(features); + MathNestInset::validate(features, runparams); features.require("amssymb"); } Index: src/mathed/math_boldsymbolinset.h =================================================================== RCS file: /cvs/lyx/lyx-devel/src/mathed/math_boldsymbolinset.h,v retrieving revision 1.2 diff -u -p -r1.2 math_boldsymbolinset.h --- src/mathed/math_boldsymbolinset.h 2003/10/13 09:43:15 1.2 +++ src/mathed/math_boldsymbolinset.h 2004/01/11 12:12:50 @@ -31,7 +31,7 @@ public: /// void drawT(TextPainter & pi, int x, int y) const; /// - void validate(LaTeXFeatures & features) const; + void validate(LaTeXFeatures &, OutputParams const &) const; /// void write(WriteStream & os) const; /// Index: src/mathed/math_casesinset.C =================================================================== RCS file: /cvs/lyx/lyx-devel/src/mathed/math_casesinset.C,v retrieving revision 1.25 diff -u -p -r1.25 math_casesinset.C --- src/mathed/math_casesinset.C 2003/09/07 21:25:36 1.25 +++ src/mathed/math_casesinset.C 2004/01/11 12:12:50 @@ -80,8 +80,9 @@ void MathCasesInset::infoize(std::ostrea } -void MathCasesInset::validate(LaTeXFeatures & features) const +void MathCasesInset::validate(LaTeXFeatures & features, + OutputParams const & runparams) const { features.require("amsmath"); - MathGridInset::validate(features); + MathGridInset::validate(features, runparams); } Index: src/mathed/math_casesinset.h =================================================================== RCS file: /cvs/lyx/lyx-devel/src/mathed/math_casesinset.h,v retrieving revision 1.13 diff -u -p -r1.13 math_casesinset.h --- src/mathed/math_casesinset.h 2003/08/19 13:00:54 1.13 +++ src/mathed/math_casesinset.h 2004/01/11 12:12:50 @@ -37,7 +37,7 @@ public: /// void write(WriteStream & os) const; /// - void validate(LaTeXFeatures & features) const; + void validate(LaTeXFeatures &, OutputParams const &) const; }; #endif Index: src/mathed/math_colorinset.C =================================================================== RCS file: /cvs/lyx/lyx-devel/src/mathed/math_colorinset.C,v retrieving revision 1.5 diff -u -p -r1.5 math_colorinset.C --- src/mathed/math_colorinset.C 2003/10/28 08:51:33 1.5 +++ src/mathed/math_colorinset.C 2004/01/11 12:12:50 @@ -71,9 +71,10 @@ void MathColorInset::draw(PainterInfo & } -void MathColorInset::validate(LaTeXFeatures & features) const +void MathColorInset::validate(LaTeXFeatures & features, + OutputParams const & runparams) const { - MathNestInset::validate(features); + MathNestInset::validate(features, runparams); features.require("color"); } Index: src/mathed/math_colorinset.h =================================================================== RCS file: /cvs/lyx/lyx-devel/src/mathed/math_colorinset.h,v retrieving revision 1.3 diff -u -p -r1.3 math_colorinset.h --- src/mathed/math_colorinset.h 2003/10/28 08:51:33 1.3 +++ src/mathed/math_colorinset.h 2004/01/11 12:12:50 @@ -29,7 +29,7 @@ public: /// void draw(PainterInfo & pi, int x, int y) const; /// we need package color - void validate(LaTeXFeatures & features) const; + void validate(LaTeXFeatures &, OutputParams const &) const; /// void write(WriteStream & os) const; /// write normalized content Index: src/mathed/math_data.C =================================================================== RCS file: /cvs/lyx/lyx-devel/src/mathed/math_data.C,v retrieving revision 1.42 diff -u -p -r1.42 math_data.C --- src/mathed/math_data.C 2004/01/07 18:28:50 1.42 +++ src/mathed/math_data.C 2004/01/11 12:12:51 @@ -121,10 +121,11 @@ void MathArray::dump() const } -void MathArray::validate(LaTeXFeatures & features) const +void MathArray::validate(LaTeXFeatures & features, + OutputParams const & runparams) const { for (const_iterator it = begin(); it != end(); ++it) - (*it)->validate(features); + (*it)->validate(features, runparams); } Index: src/mathed/math_data.h =================================================================== RCS file: /cvs/lyx/lyx-devel/src/mathed/math_data.h,v retrieving revision 1.25 diff -u -p -r1.25 math_data.h --- src/mathed/math_data.h 2003/08/19 13:00:54 1.25 +++ src/mathed/math_data.h 2004/01/11 12:12:51 @@ -24,6 +24,7 @@ class MathMacro; class LaTeXFeatures; class ReplaceData; class MetricsInfo; +class OutputParams; class PainterInfo; class TextMetricsInfo; class TextPainter; @@ -93,7 +94,7 @@ public: /// bool contains(MathArray const & ar) const; /// - void validate(LaTeXFeatures &) const; + void validate(LaTeXFeatures &, OutputParams const &) const; /// checked write access MathAtom & operator[](pos_type); Index: src/mathed/math_dfracinset.C =================================================================== RCS file: /cvs/lyx/lyx-devel/src/mathed/math_dfracinset.C,v retrieving revision 1.1 diff -u -p -r1.1 math_dfracinset.C --- src/mathed/math_dfracinset.C 2003/10/07 08:51:14 1.1 +++ src/mathed/math_dfracinset.C 2004/01/11 12:12:51 @@ -66,8 +66,9 @@ void MathDfracInset::mathmlize(MathMLStr } -void MathDfracInset::validate(LaTeXFeatures & features) const +void MathDfracInset::validate(LaTeXFeatures & features, + OutputParams const & runparams) const { features.require("amsmath"); - MathNestInset::validate(features); + MathNestInset::validate(features, runparams); } Index: src/mathed/math_dfracinset.h =================================================================== RCS file: /cvs/lyx/lyx-devel/src/mathed/math_dfracinset.h,v retrieving revision 1.1 diff -u -p -r1.1 math_dfracinset.h --- src/mathed/math_dfracinset.h 2003/10/07 08:51:14 1.1 +++ src/mathed/math_dfracinset.h 2004/01/11 12:12:51 @@ -31,7 +31,7 @@ public: /// void mathmlize(MathMLStream &) const; /// - void validate(LaTeXFeatures & features) const; + void validate(LaTeXFeatures &, OutputParams const &) const; }; #endif Index: src/mathed/math_fontinset.C =================================================================== RCS file: /cvs/lyx/lyx-devel/src/mathed/math_fontinset.C,v retrieving revision 1.28 diff -u -p -r1.28 math_fontinset.C --- src/mathed/math_fontinset.C 2003/10/06 15:43:13 1.28 +++ src/mathed/math_fontinset.C 2004/01/11 12:12:52 @@ -77,9 +77,10 @@ string MathFontInset::name() const } -void MathFontInset::validate(LaTeXFeatures & features) const +void MathFontInset::validate(LaTeXFeatures & features, + OutputParams const & runparams) const { - MathNestInset::validate(features); + MathNestInset::validate(features, runparams); // Make sure amssymb is put in preamble if Blackboard Bold or // Fraktur used: if (key_->name == "mathfrak" || key_->name == "mathbb") Index: src/mathed/math_fontinset.h =================================================================== RCS file: /cvs/lyx/lyx-devel/src/mathed/math_fontinset.h,v retrieving revision 1.15 diff -u -p -r1.15 math_fontinset.h --- src/mathed/math_fontinset.h 2003/10/06 15:43:13 1.15 +++ src/mathed/math_fontinset.h 2004/01/11 12:12:52 @@ -41,7 +41,7 @@ public: /// void drawT(TextPainter & pi, int x, int y) const; /// - void validate(LaTeXFeatures & features) const; + void validate(LaTeXFeatures &, OutputParams const &) const; /// void infoize(std::ostream & os) const; Index: src/mathed/math_hullinset.C =================================================================== RCS file: /cvs/lyx/lyx-devel/src/mathed/math_hullinset.C,v retrieving revision 1.103 diff -u -p -r1.103 math_hullinset.C --- src/mathed/math_hullinset.C 2003/11/03 19:52:47 1.103 +++ src/mathed/math_hullinset.C 2004/01/11 12:12:55 @@ -334,7 +334,8 @@ bool MathHullInset::numberedType() const } -void MathHullInset::validate(LaTeXFeatures & features) const +void MathHullInset::validate(LaTeXFeatures & features, + OutputParams const & runparams) const { if (ams()) features.require("amsmath"); @@ -348,7 +349,7 @@ void MathHullInset::validate(LaTeXFeatur features.require("boldsymbol"); //features.binom = true; - MathGridInset::validate(features); + MathGridInset::validate(features, runparams); } Index: src/mathed/math_hullinset.h =================================================================== RCS file: /cvs/lyx/lyx-devel/src/mathed/math_hullinset.h,v retrieving revision 1.43 diff -u -p -r1.43 math_hullinset.h --- src/mathed/math_hullinset.h 2003/10/29 10:47:21 1.43 +++ src/mathed/math_hullinset.h 2004/01/11 12:12:55 @@ -54,7 +54,7 @@ public: void getLabelList(Buffer const &, std::vector<std::string> & list) const; /// - void validate(LaTeXFeatures & features) const; + void validate(LaTeXFeatures &, OutputParams const &) const; /// identifies MatrixInsets MathHullInset const * asHullInset() const { return this; } /// identifies HullInset Index: src/mathed/math_macro.C =================================================================== RCS file: /cvs/lyx/lyx-devel/src/mathed/math_macro.C,v retrieving revision 1.124 diff -u -p -r1.124 math_macro.C --- src/mathed/math_macro.C 2003/10/06 15:43:15 1.124 +++ src/mathed/math_macro.C 2004/01/11 12:12:56 @@ -184,11 +184,12 @@ bool MathMacro::idxRight(idx_type &, pos } -void MathMacro::validate(LaTeXFeatures & features) const +void MathMacro::validate(LaTeXFeatures & features, + OutputParams const & /* runparams */) const { if (name() == "binom" || name() == "mathcircumflex") features.require(name()); - //MathInset::validate(features); + //MathInset::validate(features, runparams); } Index: src/mathed/math_macro.h =================================================================== RCS file: /cvs/lyx/lyx-devel/src/mathed/math_macro.h,v retrieving revision 1.95 diff -u -p -r1.95 math_macro.h --- src/mathed/math_macro.h 2004/01/07 18:28:50 1.95 +++ src/mathed/math_macro.h 2004/01/11 12:12:56 @@ -45,7 +45,7 @@ public: bool idxRight(idx_type & idx, pos_type & pos) const; /// - void validate(LaTeXFeatures &) const; + void validate(LaTeXFeatures &, OutputParams const &) const; /// bool isMacro() const { return true; } Index: src/mathed/math_nestinset.C =================================================================== RCS file: /cvs/lyx/lyx-devel/src/mathed/math_nestinset.C,v retrieving revision 1.78 diff -u -p -r1.78 math_nestinset.C --- src/mathed/math_nestinset.C 2004/01/07 18:28:50 1.78 +++ src/mathed/math_nestinset.C 2004/01/11 12:12:56 @@ -190,10 +190,11 @@ void MathNestInset::drawSelection(Painte } -void MathNestInset::validate(LaTeXFeatures & features) const +void MathNestInset::validate(LaTeXFeatures & features, + OutputParams const & runparams) const { for (idx_type i = 0; i < nargs(); ++i) - cell(i).validate(features); + cell(i).validate(features, runparams); } Index: src/mathed/math_nestinset.h =================================================================== RCS file: /cvs/lyx/lyx-devel/src/mathed/math_nestinset.h,v retrieving revision 1.46 diff -u -p -r1.46 math_nestinset.h --- src/mathed/math_nestinset.h 2004/01/07 18:28:50 1.46 +++ src/mathed/math_nestinset.h 2004/01/11 12:12:57 @@ -79,7 +79,7 @@ public: /// can we move into this cell (see macroarg.h) bool isActive() const; /// request "external features" - void validate(LaTeXFeatures & features) const; + void validate(LaTeXFeatures &, OutputParams const &) const; /// replace in all cells void replace(ReplaceData &); Index: src/mathed/math_spaceinset.C =================================================================== RCS file: /cvs/lyx/lyx-devel/src/mathed/math_spaceinset.C,v retrieving revision 1.54 diff -u -p -r1.54 math_spaceinset.C --- src/mathed/math_spaceinset.C 2003/10/06 15:43:16 1.54 +++ src/mathed/math_spaceinset.C 2004/01/11 12:12:57 @@ -97,7 +97,8 @@ void MathSpaceInset::incSpace() } -void MathSpaceInset::validate(LaTeXFeatures & features) const +void MathSpaceInset::validate(LaTeXFeatures & features, + OutputParams const &) const { if (space_ >= 0 && space_< nSpace) { if ((latex_mathspace[space_] == "negmedspace") Index: src/mathed/math_spaceinset.h =================================================================== RCS file: /cvs/lyx/lyx-devel/src/mathed/math_spaceinset.h,v retrieving revision 1.34 diff -u -p -r1.34 math_spaceinset.h --- src/mathed/math_spaceinset.h 2003/10/06 15:43:16 1.34 +++ src/mathed/math_spaceinset.h 2004/01/11 12:12:57 @@ -38,7 +38,7 @@ public: /// void normalize(NormalStream &) const; /// - void validate(LaTeXFeatures & features) const; + void validate(LaTeXFeatures &, OutputParams const &) const; /// void maple(MapleStream &) const; /// Index: src/mathed/math_symbolinset.C =================================================================== RCS file: /cvs/lyx/lyx-devel/src/mathed/math_symbolinset.C,v retrieving revision 1.67 diff -u -p -r1.67 math_symbolinset.C --- src/mathed/math_symbolinset.C 2004/01/07 18:28:50 1.67 +++ src/mathed/math_symbolinset.C 2004/01/11 12:12:58 @@ -132,7 +132,8 @@ bool MathSymbolInset::takesLimits() cons } -void MathSymbolInset::validate(LaTeXFeatures & features) const +void MathSymbolInset::validate(LaTeXFeatures & features, + OutputParams const &) const { if (sym_->inset == "msa" || sym_->inset == "msb") features.require("amssymb"); Index: src/mathed/math_symbolinset.h =================================================================== RCS file: /cvs/lyx/lyx-devel/src/mathed/math_symbolinset.h,v retrieving revision 1.41 diff -u -p -r1.41 math_symbolinset.h --- src/mathed/math_symbolinset.h 2004/01/07 18:28:50 1.41 +++ src/mathed/math_symbolinset.h 2004/01/11 12:12:58 @@ -45,7 +45,7 @@ public: /// the LaTeX name of the symbol (without the backslash) std::string name() const; /// request "external features" - void validate(LaTeXFeatures & features) const; + void validate(LaTeXFeatures &, OutputParams const &) const; /// void normalize(NormalStream &) const; Index: src/mathed/ref_inset.C =================================================================== RCS file: /cvs/lyx/lyx-devel/src/mathed/ref_inset.C,v retrieving revision 1.39 diff -u -p -r1.39 ref_inset.C --- src/mathed/ref_inset.C 2003/11/05 12:06:20 1.39 +++ src/mathed/ref_inset.C 2004/01/11 12:12:58 @@ -114,7 +114,7 @@ string const RefInset::screenLabel() con } -void RefInset::validate(LaTeXFeatures & features) const +void RefInset::validate(LaTeXFeatures & features, OutputParams const &) const { if (commandname() == "vref" || commandname() == "vpageref") features.require("varioref"); Index: src/mathed/ref_inset.h =================================================================== RCS file: /cvs/lyx/lyx-devel/src/mathed/ref_inset.h,v retrieving revision 1.20 diff -u -p -r1.20 ref_inset.h --- src/mathed/ref_inset.h 2003/11/05 12:06:20 1.20 +++ src/mathed/ref_inset.h 2004/01/11 12:12:58 @@ -31,7 +31,7 @@ public: /// std::string const screenLabel() const; /// - void validate(LaTeXFeatures & features) const; + void validate(LaTeXFeatures &, OutputParams const &) const; /// virtual RefInset * asRefInset() { return this; }