mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Fix export of graphics file with relative path name.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3820 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
9c628bc4ac
commit
545777433a
@ -1,3 +1,11 @@
|
||||
2002-03-25 Angus Leeming <a.leeming@ic.ac.uk>
|
||||
|
||||
* insetgraphics.C (prepareFile): ensure that the file has an absolute
|
||||
path when preparing export.
|
||||
|
||||
* insetgraphicsParams.[Ch] (Write): no longer passed Buffer *, as we
|
||||
no longer MakeRelPath.
|
||||
|
||||
2002-03-22 Angus Leeming <a.leeming@ic.ac.uk>
|
||||
|
||||
* insetgraphics.[Ch] (c-tor, setParams, updateInset): passed filepath.
|
||||
|
@ -382,10 +382,10 @@ Inset::EDITABLE InsetGraphics::editable() const
|
||||
}
|
||||
|
||||
|
||||
void InsetGraphics::write(Buffer const * buf, ostream & os) const
|
||||
void InsetGraphics::write(Buffer const *, ostream & os) const
|
||||
{
|
||||
os << "Graphics FormatVersion " << VersionNumber << '\n';
|
||||
params().Write(buf, os);
|
||||
params().Write(os);
|
||||
}
|
||||
|
||||
|
||||
@ -403,6 +403,7 @@ void InsetGraphics::read(Buffer const * buf, LyXLex & lex)
|
||||
updateInset(buf->filePath());
|
||||
}
|
||||
|
||||
|
||||
void InsetGraphics::readInsetGraphics(LyXLex & lex)
|
||||
{
|
||||
bool finished = false;
|
||||
@ -608,7 +609,7 @@ string const InsetGraphics::prepareFile(Buffer const *buf) const
|
||||
// return original filename without the extension
|
||||
//
|
||||
// if it's a zipped one, than let LaTeX do the rest!!!
|
||||
string filename_ = params().filename;
|
||||
string filename_ = MakeAbsPath(params().filename, buf->filePath());
|
||||
bool const zipped = zippedFile(filename_);
|
||||
|
||||
if ((zipped && params().noUnzip) || buf->niceFile) {
|
||||
|
@ -182,13 +182,11 @@ bool operator!=(InsetGraphicsParams const & left,
|
||||
}
|
||||
|
||||
|
||||
void InsetGraphicsParams::Write(Buffer const * buf, ostream & os) const
|
||||
void InsetGraphicsParams::Write(ostream & os) const
|
||||
{
|
||||
// If there is no filename, write nothing for it.
|
||||
if (! filename.empty()) {
|
||||
os << "\tfilename "
|
||||
<< MakeRelPath(filename, buf->filePath())
|
||||
<< '\n';
|
||||
if (!filename.empty()) {
|
||||
os << "\tfilename " << filename << '\n';
|
||||
}
|
||||
if (!bb.empty()) // bounding box
|
||||
os << "\tBoundingBox " << bb << '\n';
|
||||
|
@ -88,7 +88,7 @@ struct InsetGraphicsParams
|
||||
///
|
||||
InsetGraphicsParams & operator=(InsetGraphicsParams const &);
|
||||
/// Save the parameters in the LyX format stream.
|
||||
void Write(Buffer const * buf, std::ostream & os) const;
|
||||
void Write(std::ostream & os) const;
|
||||
/// If the token belongs to our parameters, read it.
|
||||
bool Read(LyXLex & lex, string const & token);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user