#include "ControlBibtex.h"
#include "Kernel.h"
-#include "buffer.h"
#include "lyxrc.h"
#include "helper_funcs.h"
#include "tex_helpers.h"
{
pair<string, string> dir1(_("Documents|#o#O"),
string(lyxrc.document_path));
- return browseRelFile(in_name, kernel().buffer()->filePath(),
+ return browseRelFile(in_name, kernel().bufferFilepath(),
title, pattern, false, dir1);
}
bool ControlExternal::initialiseParams(string const & data)
{
params_.reset(new InsetExternal::Params);
- InsetExternalMailer::string2params(data, *params_);
+ InsetExternalMailer::string2params(data, kernel().buffer(), *params_);
return true;
}
void ControlExternal::dispatchParams()
{
- string const lfun = InsetExternalMailer::params2string(params());
+ string const lfun =
+ InsetExternalMailer::params2string(params(), kernel().buffer());
kernel().dispatch(FuncRequest(LFUN_INSET_APPLY, lfun));
}
Assert(params_.get());
dialog().view().apply();
- string const lfun = InsetExternalMailer::params2string(params());
+ string const lfun =
+ InsetExternalMailer::params2string(params(), kernel().buffer());
kernel().dispatch(FuncRequest(LFUN_EXTERNAL_EDIT, lfun));
}
{
string const title = _("Select external file");
- string const bufpath = kernel().buffer()->filePath();
+ string const bufpath = kernel().bufferFilepath();
/// Determine the template file extension
string pattern = "*";
#include "helper_funcs.h"
-#include "buffer.h"
#include "BufferView.h"
#include "funcrequest.h"
#include "gettext.h"
bool ControlGraphics::initialiseParams(string const & data)
{
- string const bufpath = kernel().buffer()->filePath();
+ string const bufpath = kernel().bufferFilepath();
InsetGraphicsParams params;
InsetGraphicsMailer::string2params(data, bufpath, params);
params_.reset(new InsetGraphicsParams(params));
void ControlGraphics::dispatchParams()
{
- string const buffer_path = kernel().buffer()->filePath();
+ string const buffer_path = kernel().bufferFilepath();
InsetGraphicsParams tmp_params(params());
string const lfun =
InsetGraphicsMailer::params2string(tmp_params, buffer_path);
pair<string, string> dir1(_("Clipart|#C#c"), clipdir);
pair<string, string> dir2(_("Documents|#o#O"), string(lyxrc.document_path));
// Show the file browser dialog
- return browseRelFile(in_name, kernel().buffer()->filePath(),
+ return browseRelFile(in_name, kernel().bufferFilepath(),
title, "*.*", false, dir1, dir2);
}
string const ControlGraphics::readBB(string const & file)
{
string const abs_file =
- MakeAbsPath(file, kernel().buffer()->filePath());
+ MakeAbsPath(file, kernel().bufferFilepath());
// try to get it from the file, if possible. Zipped files are
// unzipped in the readBB_from_PSFile-Function
bool ControlGraphics::isFilenameValid(string const & fname) const
{
// It may be that the filename is relative.
- string const name = MakeAbsPath(fname, kernel().buffer()->filePath());
+ string const name = MakeAbsPath(fname, kernel().bufferFilepath());
return IsFileReadable(name);
}