#include "support/filetools.h"
#include "BufferView.h"
#include "LyXView.h"
-#include "lyxfunc.h"
#include "commandtags.h"
#include "buffer.h"
#include "gettext.h"
+#include "lyxfunc.h"
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())));
}