]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetparent.C
prepare for 1.1.6pre2
[lyx.git] / src / insets / insetparent.C
index 36721161105f8f7bd15eafa4a99eff937136a679..128ee44b04de2ae93e90427db13bc10c41512c47 100644 (file)
 
 using std::ostream;
 
-InsetParent::InsetParent(InsetCommandParams const & p, Buffer * bf)
+
+InsetParent::InsetParent(InsetCommandParams const & p, Buffer const & bf)
        : InsetCommand(p)
 {
-       string fn = p.getContents();
-       if (bf)
-               setContents(MakeAbsPath(fn, OnlyPath(bf->fileName())));
-       else
-               setContents(fn);
+       string const fn = p.getContents();
+       setContents(MakeAbsPath(fn, OnlyPath(bf.fileName())));
 }
 
 
-string InsetParent::getScreenLabel() const 
+string const InsetParent::getScreenLabel() const 
 {
        return string(_("Parent:")) + getContents();
 }
@@ -48,7 +46,7 @@ string InsetParent::getScreenLabel() const
 void InsetParent::Edit(BufferView * bv, int, int, unsigned int)
 {    
        bv->owner()->getLyXFunc()->
-               Dispatch(LFUN_CHILDOPEN, getContents().c_str());
+               Dispatch(LFUN_CHILDOPEN, getContents());
 }