diff --git a/src/f9/f90100.cpp b/src/f9/f90100.cpp index ecec09176..bf54630aa 100644 --- a/src/f9/f90100.cpp +++ b/src/f9/f90100.cpp @@ -84,7 +84,7 @@ int TEstrai_mask::estrai() long nreg = mov.get_long(MOV_NUMREG); - if (nreg == 20045) + if (nreg == 207) int here = 0; if (escluso) diff --git a/src/f9/f9lib01.cpp b/src/f9/f9lib01.cpp index af03a0347..6499dad0a 100644 --- a/src/f9/f9lib01.cpp +++ b/src/f9/f9lib01.cpp @@ -482,6 +482,12 @@ void TEstrazione::copy_file_to_webapp_fld(TMovimento_estr& movimento) const { TFilename dest(base); + if (file.is_relative_path()) + { + const TString studio = prefix().get_studio(); + file.insert(studio); + } + if (cd != nullptr && file.full()) dest.add(cd->catdoc()); else @@ -879,7 +885,7 @@ const char* TEstrazione::diagnostica_mov() const long numreg = mov_i.numreg(); - if (numreg == 20045) { + if (numreg == 210) { int here = 0; } diff --git a/src/include/automask.h b/src/include/automask.h index 5f52634e2..39e55a6b3 100755 --- a/src/include/automask.h +++ b/src/include/automask.h @@ -1,7 +1,7 @@ #ifndef __AUTOMASK_H #define __AUTOMASK_H -#ifndef __DEFMASK_H +#ifndef __DEFMASK_Hautomask #include #endif diff --git a/src/include/golem.cpp b/src/include/golem.cpp index 3214a30af..dccc0b41e 100755 --- a/src/include/golem.cpp +++ b/src/include/golem.cpp @@ -73,6 +73,18 @@ bool print_url(const char* url) return ok; } +const TString & get_golem_path(long ditta) +{ + TFilename golem_path; + if (ditta < 0) + ditta = prefix().get_codditta(); + golem_path = firm2dir(ditta); + golem_path.add("golem"); + if (!dexist(golem_path)) + make_dir(golem_path); + return get_tmp_string() = golem_path; +} + /////////////////////////////////////////////////////////// // Maschera GOLEM /////////////////////////////////////////////////////////// @@ -452,13 +464,8 @@ bool TGolem_field::autosave(TRelation& r) const int logicnum = r.lfile().num(); dir.get(logicnum, _nolock, _nordir, _sysdirop); const long ditta = dir.is_com() ? 0 : prefix().get_codditta(); - - TFilename golem_path; - golem_path = firm2dir(ditta); - golem_path.add("golem"); - if (!dexist(golem_path)) - make_dir(golem_path); - + const TFilename golem_path = get_golem_path(ditta); + const int old_items = _old_value.items(); const int new_items = new_value.items(); const int items = new_items > old_items ? new_items : old_items; @@ -506,6 +513,8 @@ bool TGolem_field::autosave(TRelation& r) } fcopy(new_file, old_file); + if (old_file.starts_with(golem_path)) + old_file = old_file.mid(golem_path.len()); new_row.add(old_file, 0); new_value.add(new_row, i); diff --git a/src/include/golem.h b/src/include/golem.h index f8dedd29a..e54084633 100755 --- a/src/include/golem.h +++ b/src/include/golem.h @@ -15,6 +15,8 @@ bool print_url(const char* url); class TMAPI_session; +const TString & get_golem_path(long ditta); + class TMail_message : public TString_array { TString_array _recipients, _copy_recipients, _attachments; diff --git a/src/include/msksheet.cpp b/src/include/msksheet.cpp index f67b88e69..2d0e72f17 100755 --- a/src/include/msksheet.cpp +++ b/src/include/msksheet.cpp @@ -337,9 +337,9 @@ public: // @cmember Modifica a video la riga void update(int row); // @cmember Ritorna la disabilitazione della colonna

- bool column_disabled(int col) const { return _column_disabled[col]; } + bool column_disabled(int col) const; // @cmember Ritorna l' abilitazione della colonna

- bool column_enabled(int col) const { return !column_disabled(col); } + bool column_enabled(int col) const; // @cmember Ritorna il contenuto della riga

-esima TToken_string& row(int n) { return _str.row(n); } @@ -1065,6 +1065,21 @@ bool TSpreadsheet::destroy( return ok; } +bool TSpreadsheet::column_disabled(int col) const +{ + if (col >= FIRST_FIELD) + col = cid2index(col); + return _column_disabled[col]; +} + +bool TSpreadsheet::column_enabled(int col) const +{ + if (col >= FIRST_FIELD) + col = cid2index(col); + return !column_disabled(col); +} + + // @doc INTERNAL // @mfunc Modifica a video la riga