diff --git a/include/sheet.cpp b/include/sheet.cpp index 8feec14d9..06a3f7319 100755 --- a/include/sheet.cpp +++ b/include/sheet.cpp @@ -1021,11 +1021,10 @@ TSheet::TSheet(short x, short y, short dx, short dy, if (buttons & 0x01) add_button(DLG_LINK, TR("Colle~ga"), K_CTRL+'G', BMP_LINK); if (buttons & 0x02) add_button(DLG_NEWREC, TR("~Nuovo"), K_INS, BMP_NEWREC); if (buttons & 0x04) add_button(DLG_DELREC, "~Elimina", K_DEL, BMP_DELREC); - //if (!check_enabled()) - { - add_button(DLG_SAVEREC, TR("~Esporta"), 0, BMP_SAVEREC); - set_handler(DLG_SAVEREC, export_handler); - } + + add_button(DLG_SAVEREC, TR("~Esporta"), 0, TOOL_EXPORT); + set_handler(DLG_SAVEREC, export_handler); + if (buttons & 0x08) add_button(DLG_QUIT, "Fine", K_ESC, BMP_QUIT); else add_button(DLG_CANCEL, "Annulla", K_ESC, BMP_CANCEL); @@ -1375,6 +1374,8 @@ bool TSheet::export_handler(TMask_field& f, KEY k) } xls << tab << endl; } + xls.close(); + xvt_sys_goto_url(name, "open"); } } return true; diff --git a/include/urldefid.h b/include/urldefid.h index f97f2c06b..9ae64ccbf 100755 --- a/include/urldefid.h +++ b/include/urldefid.h @@ -130,6 +130,7 @@ #define TOOL_LASTREC 125 #define TOOL_FINDREC 126 #define TOOL_EMAIL 139 +#define TOOL_EXPORT 151 #define TOOL_CONVERT 156 #define TOOL_INFO 162 #define TOOL_HELP 163