InsetExternal::InsetExternal()
: form_external(0)
{
- tempname = TmpFileName();
+ tempname = lyx::tempName(); //TmpFileName();
}
bool error = false;
do {
- // ProhibitInput(current_view);
if (once) {
p = fileDlg.Select(_("External inset file"),
current_path,
p = fileDlg.Select(_("External inset file"), buf,
regexp, string());
}
- // AllowInput(current_view);
if (p.empty()) return;
fl_raise_form(form_external->form_external);
} else {
fl_show_form(form_external->form_external,
- FL_PLACE_MOUSE | FL_FREE_SIZE,
- FL_FULLBORDER, _("Insert external inset"));
+ FL_PLACE_MOUSE | FL_FREE_SIZE, FL_TRANSIENT,
+ _("Insert external inset"));
if (ow < 0) {
ow = form_external->form_external->w;
oh = form_external->form_external->h;
void InsetExternal::Read(Buffer const *, LyXLex & lex)
{
lex.EatLine();
- string format = lex.GetString();
- int pos1 = format.find(",");
+ string const format = lex.GetString();
+ string::size_type const pos1 = format.find(",");
templatename = format.substr(0, pos1);
- int pos2 = format.find("\",\"", pos1);
+ string::size_type const pos2 = format.find("\",\"", pos1);
filename = format.substr(pos1 + 2, pos2 - (pos1 + 2));
parameters = format.substr(pos2 + 3, format.length() - (pos2 + 4));
}
-int InsetExternal::Ascii(Buffer const * buf, std::ostream & os) const
+int InsetExternal::Ascii(Buffer const * buf, std::ostream & os, int) const
{
return write("Ascii", buf, os);
}
}
-Inset * InsetExternal::Clone() const
+Inset * InsetExternal::Clone(Buffer const &) const
{
InsetExternal * inset = new InsetExternal();
inset->templatename = templatename;
string const & s) const
{
string result;
- string basename = ChangeExtension(filename, string());
+ string const basename = ChangeExtension(filename, string());
result = subst(s, "$$FName", filename);
result = subst(result, "$$Basename", basename);
result = subst(result, "$$Parameters", parameters);
// Handle the $$Contents(filename) syntax
if (contains(result, "$$Contents(\"")) {
- int const pos = result.find("$$Contents(\"");
- int const end = result.find("\")", pos);
+ string::size_type const pos = result.find("$$Contents(\"");
+ string::size_type const end = result.find("\")", pos);
string const file = result.substr(pos + 12, end - (pos + 12));
string contents;
if (buffer) {