From 67cf6dcf15e9caed0d7a450c68f56887a698b9e1 Mon Sep 17 00:00:00 2001 From: guy Date: Fri, 30 Sep 2011 16:15:11 +0000 Subject: [PATCH] Patch level : Files correlati : Ricompilazione Demo : [ ] Commento : Corretta compattazione righe vuote degli spreadsheet: ora non elimina le celle che valgono "0" che potrebbero essere elementi di un listbox! git-svn-id: svn://10.65.10.50/branches/R_10_00@22438 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- include/dongle.cpp | 6 +++++- include/dongle.h | 1 + include/msksheet.cpp | 4 +--- include/strings.cpp | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/include/dongle.cpp b/include/dongle.cpp index 615612aee..1e1a69f7b 100755 --- a/include/dongle.cpp +++ b/include/dongle.cpp @@ -1402,11 +1402,15 @@ bool Tdninst::decode(const TString& f) const TEnigma_machine em; o << em.year_assist() << endl; + size_t nlines = 0; TString256 l; while (em.line(l)) + { o << l << endl; + nlines++; + } - return em.ok(); + return nlines > 0; } bool Tdninst::encode(const TString& f) const diff --git a/include/dongle.h b/include/dongle.h index 20c8366ff..29068bf9b 100755 --- a/include/dongle.h +++ b/include/dongle.h @@ -115,6 +115,7 @@ protected: bool compare_cmdline(const TString& cmdline, const TString& pattern) const; public: + virtual bool ok() const { return _year_assist >= 2091; } int assist_year() const { return _year_assist; } int solar_year() const { return assistance_year2solar(_year_assist); } int test_cmdline(const TString& cmdline, bool key_must_exist, TString& msg) const; diff --git a/include/msksheet.cpp b/include/msksheet.cpp index 7e229036e..01f4486d9 100755 --- a/include/msksheet.cpp +++ b/include/msksheet.cpp @@ -1592,9 +1592,7 @@ bool TSpreadsheet::event_handler(XI_OBJ* itf, XI_EVENT *xiev) const TList_field& lst = (const TList_field&)(*_edit_field); const int sel = xvtil_drop_down_list(&cell, lst.get_codes(), lst.get_values()); if (sel >= 0) - { - const char* val = copy_cell2field(); - } + copy_cell2field(&cell); } else // edit_field { diff --git a/include/strings.cpp b/include/strings.cpp index 40f585a86..c85175e18 100755 --- a/include/strings.cpp +++ b/include/strings.cpp @@ -1957,7 +1957,7 @@ TToken_string& TToken_string::pack() trim(); for (int src = 0; _str[src]; src++) { - if ((_str[src] == ' ' || _str[src] == '0') && + if ((_str[src] == ' ') && (_str[src+1] == sep || _str[src+1] == '\0') && (src == 0 || _str[src-1] == sep)) {