Add a buffer() member function to LaTeXFeatures. Not used yet.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7791 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Angus Leeming 2003-09-18 14:13:23 +00:00
parent 3f481c38fc
commit 482c265462
4 changed files with 23 additions and 7 deletions

View File

@ -1,6 +1,11 @@
2003-09-18 Angus Leeming <leeming@lyx.org>
* LaTeXFeatures.[Ch]: append an '_' to the names of all private member variables.
* LaTeXFeatures.[Ch]: append a '_' to the names of all private member variables.
(ctor): pass and store a 'Buffer const &'
(buffer): new member function.
* buffer.C (makeDocBookFile, makeLinuxDocFile, makeLaTeXFile): pass '*this' to
the LaTeXFeatures ctor.
2003-09-18 Angus Leeming <leeming@lyx.org>

View File

@ -42,8 +42,8 @@ using std::ostringstream;
using std::set;
LaTeXFeatures::LaTeXFeatures(BufferParams const & p)
: params_(p)
LaTeXFeatures::LaTeXFeatures(Buffer const & b, BufferParams const & p)
: buffer_(b), params_(p)
{}
@ -449,6 +449,12 @@ void LaTeXFeatures::showStruct() const {
}
Buffer const & LaTeXFeatures::buffer() const
{
return buffer_;
}
BufferParams const & LaTeXFeatures::bufferParams() const
{
return params_;

View File

@ -20,6 +20,7 @@
#include <list>
#include <map>
class Buffer;
class BufferParams;
struct Language;
@ -39,7 +40,7 @@ struct Language;
class LaTeXFeatures {
public:
///
LaTeXFeatures(BufferParams const &);
LaTeXFeatures(Buffer const &, BufferParams const &);
/// The packages needed by the document
string const getPackages() const;
/// The macros definitions needed by the document
@ -77,6 +78,8 @@ public:
///
void useLayout(string const & lyt);
///
Buffer const & buffer() const;
///
BufferParams const & bufferParams() const;
/// the return value is dependent upon both LyXRC and LaTeXFeatures.
bool useBabel() const;
@ -103,6 +106,8 @@ private:
///
FileMap IncludedFiles_;
///
Buffer const & buffer_;
///
BufferParams const & params_;
};

View File

@ -1111,7 +1111,7 @@ void Buffer::makeLaTeXFile(ostream & os,
// validate the buffer.
lyxerr[Debug::LATEX] << " Validating buffer..." << endl;
LaTeXFeatures features(params());
LaTeXFeatures features(*this, params());
validate(features);
lyxerr[Debug::LATEX] << " Buffer validation done." << endl;
@ -1250,7 +1250,7 @@ void Buffer::makeLinuxDocFile(string const & fname, bool nice, bool body_only)
niceFile() = nice; // this will be used by included files.
LaTeXFeatures features(params());
LaTeXFeatures features(*this, params());
validate(features);
@ -1680,7 +1680,7 @@ void Buffer::makeDocBookFile(string const & fname, bool nice, bool only_body)
niceFile() = nice; // this will be used by Insetincludes.
LaTeXFeatures features(params());
LaTeXFeatures features(*this, params());
validate(features);
texrow().reset();