John Levon wrote: > On Mon, Jul 21, 2003 at 12:28:29PM +0000, Angus Leeming wrote: > >> Might help if you had the patch... > > Have you tested this with things like "Save As" ? > > regards > john
Shrug. No, but this is a sample, encoding only the graphics inset with a FileName member. I can't see what can go wrong with write given that FileName stores the absolute path to the file and a flag save_abs_path_ saying how the user expects it to be output. Note that the buffer path is passed to the Write method, so things should work prefectly. string const FileName::outputFilename(string const & buffer_path) const { return save_abs_path_ ? name_ : MakeRelPath(name_, buffer_path); } void InsetGraphicsParams::Write(ostream & os, string const & bufpath) const { if (!filename.empty()) { - os << "\tfilename " << MakeRelPath(filename, bufpath) << '\n'; + os << "\tfilename " << filename.outputFilename(bufpath) << '\n'; } ... Ok, I've just tested. Works like a dream. -- Angus