diff -r d1d464798f08 -r e886fd2fb37d floatimageobj.cpp --- a/floatimageobj.cpp Mon May 08 13:25:46 2006 +0000 +++ b/floatimageobj.cpp Wed May 31 12:27:41 2006 +0000 @@ -95,6 +95,7 @@ positionBBox(); filename=fn; filetype=QPixmap::imageFormat (fn); + setOriginalFilename (fn); return true; } else return false; @@ -109,6 +110,10 @@ void FloatImageObj::setOriginalFilename(const QString & fn) { originalFilename=fn; + + // Set short name, too. Search from behind: + int i=originalFilename.findRev("/"); + if (i>=0) originalFilename=originalFilename.remove (0,i+1); } QString FloatImageObj::getOriginalFilename() @@ -183,6 +188,8 @@ // And really save the image icon->save (tmpdir + "/" + url, filetype); + + QString nameAttr=attribut ("orgName",originalFilename); return singleElement ("floatimage", getOrnAttr() @@ -191,6 +198,7 @@ +exportAttr +zAttr +attribut ("href",QString ("file:")+url) + +nameAttr ); }