#include "insets/insetinclude.h"
+#include "support/filefilterlist.h"
#include "support/filetools.h"
-#include "support/globbing.h"
#include <utility>
void ControlInclude::dispatchParams()
{
string const lfun = InsetIncludeMailer::params2string(params_);
- kernel().dispatch(FuncRequest(LFUN_INSET_APPLY, lfun));
+ kernel().dispatch(FuncRequest(getLfun(), lfun));
}
void ControlInclude::load(string const & file)
{
- string const format = support::getFormatFromContents(file);
- if (format == "lyx")
+ string const ext = support::GetExtension(file);
+ if (ext == "lyx")
kernel().dispatch(FuncRequest(LFUN_CHILDOPEN, file));
else
// tex file or other text file in verbatim mode