1.7.18
authorinsilmaril
Wed May 31 12:27:38 2006 +0000 (2006-05-31)
changeset 334df4fdaa07527
parent 333 94cd6a451593
child 335 1fae1d33285d
1.7.18
branchobj.h
floatimageobj.cpp
     1.1 --- a/branchobj.h	Wed May 31 12:27:38 2006 +0000
     1.2 +++ b/branchobj.h	Wed May 31 12:27:38 2006 +0000
     1.3 @@ -52,6 +52,7 @@
     1.4  	BranchObj* getLastIterator();		// to interrupt and resume next iteration
     1.5  	void setLastIterator (BranchObj*);	// needed by next() 
     1.6  
     1.7 +	virtual void positionContents();
     1.8      virtual void move (double x,double y);
     1.9      virtual void move (QPoint);
    1.10      virtual void moveBy (double x,double y);
     2.1 --- a/floatimageobj.cpp	Wed May 31 12:27:38 2006 +0000
     2.2 +++ b/floatimageobj.cpp	Wed May 31 12:27:38 2006 +0000
     2.3 @@ -95,6 +95,7 @@
     2.4  		positionBBox();
     2.5  		filename=fn;
     2.6  		filetype=QPixmap::imageFormat (fn);
     2.7 +		setOriginalFilename (fn);
     2.8  		return true;
     2.9  	} else
    2.10  		return false;
    2.11 @@ -109,6 +110,10 @@
    2.12  void FloatImageObj::setOriginalFilename(const QString & fn)
    2.13  {
    2.14  	originalFilename=fn;
    2.15 +
    2.16 +	// Set short name, too. Search from behind:
    2.17 +	int i=originalFilename.findRev("/");
    2.18 +	if (i>=0) originalFilename=originalFilename.remove (0,i+1);
    2.19  }
    2.20  
    2.21  QString FloatImageObj::getOriginalFilename()
    2.22 @@ -183,6 +188,8 @@
    2.23  
    2.24  	// And really save the image
    2.25  	icon->save (tmpdir + "/" + url, filetype);
    2.26 + 
    2.27 +	QString nameAttr=attribut ("orgName",originalFilename);
    2.28  
    2.29      return singleElement ("floatimage",  
    2.30  		getOrnAttr() 
    2.31 @@ -191,6 +198,7 @@
    2.32  		+exportAttr  
    2.33  		+zAttr  
    2.34  		+attribut ("href",QString ("file:")+url)
    2.35 +		+nameAttr
    2.36  	);	
    2.37  }
    2.38