mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-03 08:28:25 +00:00
Georg\'s last patch for bug 605
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8627 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
839b13d5d0
commit
b3bed8d879
@ -187,7 +187,6 @@ src/output_plaintext.C
|
|||||||
src/paragraph.C
|
src/paragraph.C
|
||||||
src/rowpainter.C
|
src/rowpainter.C
|
||||||
src/support/globbing.C
|
src/support/globbing.C
|
||||||
src/tex2lyx/lengthcommon.C
|
|
||||||
src/text.C
|
src/text.C
|
||||||
src/text2.C
|
src/text2.C
|
||||||
src/text3.C
|
src/text3.C
|
||||||
|
@ -1,4 +1,8 @@
|
|||||||
|
2004-04-01 Georg Baum <Georg.Baum@post.rwth-aachen.de>
|
||||||
|
|
||||||
|
* LaTeXFeatures.[Ch]: change buffer_ to a pointer and add accessor
|
||||||
|
setBuffer()
|
||||||
|
|
||||||
2004-04-07 Alfredo Braunstein <abraunst@lyx.org>
|
2004-04-07 Alfredo Braunstein <abraunst@lyx.org>
|
||||||
|
|
||||||
* BufferView.C (setCursor): call redoParagraph (some insets could
|
* BufferView.C (setCursor): call redoParagraph (some insets could
|
||||||
|
@ -43,7 +43,7 @@ using std::set;
|
|||||||
|
|
||||||
|
|
||||||
LaTeXFeatures::LaTeXFeatures(Buffer const & b, BufferParams const & p, bool n)
|
LaTeXFeatures::LaTeXFeatures(Buffer const & b, BufferParams const & p, bool n)
|
||||||
: buffer_(b), params_(p), nice_(n)
|
: buffer_(&b), params_(p), nice_(n)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -465,7 +465,13 @@ void LaTeXFeatures::showStruct() const {
|
|||||||
|
|
||||||
Buffer const & LaTeXFeatures::buffer() const
|
Buffer const & LaTeXFeatures::buffer() const
|
||||||
{
|
{
|
||||||
return buffer_;
|
return *buffer_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void LaTeXFeatures::setBuffer(Buffer const & buffer)
|
||||||
|
{
|
||||||
|
buffer_ = &buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -79,6 +79,8 @@ public:
|
|||||||
///
|
///
|
||||||
Buffer const & buffer() const;
|
Buffer const & buffer() const;
|
||||||
///
|
///
|
||||||
|
void setBuffer(Buffer const &);
|
||||||
|
///
|
||||||
BufferParams const & bufferParams() const;
|
BufferParams const & bufferParams() const;
|
||||||
/// the return value is dependent upon both LyXRC and LaTeXFeatures.
|
/// the return value is dependent upon both LyXRC and LaTeXFeatures.
|
||||||
bool useBabel() const;
|
bool useBabel() const;
|
||||||
@ -106,8 +108,12 @@ private:
|
|||||||
typedef std::map<std::string , std::string> FileMap;
|
typedef std::map<std::string , std::string> FileMap;
|
||||||
///
|
///
|
||||||
FileMap IncludedFiles_;
|
FileMap IncludedFiles_;
|
||||||
///
|
/** Buffer of the file being processed.
|
||||||
Buffer const & buffer_;
|
* This may be a child buffer of the to-be-exported file and
|
||||||
|
* therefore may not be the buffer that belongs to params_.
|
||||||
|
* Only needed by InsetInclude::validate().
|
||||||
|
*/
|
||||||
|
Buffer const * buffer_;
|
||||||
///
|
///
|
||||||
BufferParams const & params_;
|
BufferParams const & params_;
|
||||||
/** If we are writing a nice LaTeX file or not.
|
/** If we are writing a nice LaTeX file or not.
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
2004-04-01 Georg Baum <Georg.Baum@post.rwth-aachen.de>
|
||||||
|
|
||||||
|
* insetinclude.C (validate): set/reset features.buffer_ when
|
||||||
|
validating the child
|
||||||
|
|
||||||
2004-04-07 Angus Leeming <angus@localhost.localdomain>
|
2004-04-07 Angus Leeming <angus@localhost.localdomain>
|
||||||
|
|
||||||
* insetexternal.C (priv_dispatch):
|
* insetexternal.C (priv_dispatch):
|
||||||
@ -15,7 +20,7 @@
|
|||||||
|
|
||||||
* ExternalSupport.C (doSubstitution): add new variables $$AbsPath,
|
* ExternalSupport.C (doSubstitution): add new variables $$AbsPath,
|
||||||
$$RelPath_Master, $$RelPath_Parent, $$Extension,
|
$$RelPath_Master, $$RelPath_Parent, $$Extension,
|
||||||
$$AbsOrRelPath_Master and $$AbsOrRelPath_Parent. Change the meaning
|
$$AbsOrRelPathMaster and $$AbsOrRelPathParent. Change the meaning
|
||||||
of $$Basename
|
of $$Basename
|
||||||
* ExternalSupport.C (updateExternal): use absolute and output
|
* ExternalSupport.C (updateExternal): use absolute and output
|
||||||
filename where appropriate
|
filename where appropriate
|
||||||
|
@ -530,8 +530,14 @@ void InsetInclude::validate(LaTeXFeatures & features) const
|
|||||||
if (loadIfNeeded(buffer, params_)) {
|
if (loadIfNeeded(buffer, params_)) {
|
||||||
// a file got loaded
|
// a file got loaded
|
||||||
Buffer * const tmp = bufferlist.getBuffer(included_file);
|
Buffer * const tmp = bufferlist.getBuffer(included_file);
|
||||||
if (tmp)
|
if (tmp) {
|
||||||
|
// We must temporarily change features.buffer,
|
||||||
|
// otherwise it would always be the master buffer,
|
||||||
|
// and nested includes would not work.
|
||||||
|
features.setBuffer(*tmp);
|
||||||
tmp->validate(features);
|
tmp->validate(features);
|
||||||
|
features.setBuffer(buffer);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user