diff --git a/ca/ca3100.cpp b/ca/ca3100.cpp index 7e4d56dd5..a51b62199 100755 --- a/ca/ca3100.cpp +++ b/ca/ca3100.cpp @@ -17,7 +17,7 @@ class TPrint_movimenti_ca_mask : public TAutomask { protected: bool on_field_event(TOperable_field& o, TField_event e, long jolly); - const TString& get_compatible_library() const; + const TString& get_report_class() const; bool test_compatible_report(); void create_page2(); int create_page2_sheet(int lf, int& y, short& dlg, bool required); @@ -26,18 +26,18 @@ public: virtual ~TPrint_movimenti_ca_mask() {} }; -const TString& TPrint_movimenti_ca_mask::get_compatible_library() const +const TString& TPrint_movimenti_ca_mask::get_report_class() const { - TString& lib = get_tmp_string(); - lib = "ca3100"; + TString& classe = get_tmp_string(); + classe = "ca3100"; const int stp = get_int(F_TIPOSTAMPA); - lib << (stp == 1 ? 'a' : 'b'); // tipo di report da usare - return lib; + classe << (stp == 1 ? 'a' : 'b'); // tipo di report da usare + return classe; } bool TPrint_movimenti_ca_mask::test_compatible_report() { - TFilename lib = get_compatible_library(); + TFilename lib = get_report_class(); const TString& name = get(F_REPORT); bool ok = name.not_empty(); if (ok) @@ -46,8 +46,8 @@ bool TPrint_movimenti_ca_mask::test_compatible_report() ok = rep.load(name); if (ok) { - TToken_string& libraries = rep.get_libraries(); - ok = libraries.get_pos(lib) >= 0; + const TString& classe = rep.get_class(); + ok = classe == lib; } } if (!ok) @@ -72,7 +72,7 @@ bool TPrint_movimenti_ca_mask::on_field_event(TOperable_field& o, TField_event e case F_REPORT: if (e == fe_button) { - const TString8 lib = get_compatible_library(); + const TString8 lib = get_report_class(); TFilename path = o.get(); if (select_custom_file(path, "rep", lib)) { diff --git a/ca/ca3200.cpp b/ca/ca3200.cpp index ecde1f2b0..982380baa 100755 --- a/ca/ca3200.cpp +++ b/ca/ca3200.cpp @@ -19,7 +19,7 @@ class TPrint_mastrini_ca_mask : public TAutomask { protected: bool on_field_event(TOperable_field& o, TField_event e, long jolly); - const TString& get_compatible_library() const; + const TString& get_report_class() const; bool test_compatible_report(); void create_page2(); int create_page2_sheet(int lf, int& y, short& dlg, bool required); @@ -28,18 +28,18 @@ public: virtual ~TPrint_mastrini_ca_mask() {} }; -const TString& TPrint_mastrini_ca_mask::get_compatible_library() const +const TString& TPrint_mastrini_ca_mask::get_report_class() const { - TString& lib = get_tmp_string(); - lib = "ca3200a"; + TString& classe = get_tmp_string(); + classe = "ca3200a"; // const int stp = get_int(F_TIPOCONTI); -// lib << (stp == 1 ? 'a' : 'b'); // tipo di report da usare in caso di report multipli - return lib; +// classe << (stp == 1 ? 'a' : 'b'); // tipo di report da usare in caso di report multipli + return classe; } bool TPrint_mastrini_ca_mask::test_compatible_report() { - TFilename lib = get_compatible_library(); + TFilename lib = get_report_class(); const TString& name = get(F_REPORT); bool ok = name.not_empty(); if (ok) @@ -48,8 +48,8 @@ bool TPrint_mastrini_ca_mask::test_compatible_report() ok = rep.load(name); if (ok) { - TToken_string& libraries = rep.get_libraries(); - ok = libraries.get_pos(lib) >= 0; + const TString& classe = rep.get_class(); + ok = classe == lib; } } if (!ok) @@ -74,7 +74,7 @@ bool TPrint_mastrini_ca_mask::on_field_event(TOperable_field& o, TField_event e, case F_REPORT: if (e == fe_button) { - const TString8 lib = get_compatible_library(); + const TString8 lib = get_report_class(); TFilename path = o.get(); if (select_custom_file(path, "rep", lib)) { diff --git a/ca/ca3700.cpp b/ca/ca3700.cpp index ecd1597fb..76b5ac488 100755 --- a/ca/ca3700.cpp +++ b/ca/ca3700.cpp @@ -19,7 +19,7 @@ class TPrint_rendiconto_ca_mask : public TAutomask { protected: bool on_field_event(TOperable_field& o, TField_event e, long jolly); - const TString& get_compatible_library() const; + const TString& get_report_class() const; bool test_compatible_report(); void create_page2(); int create_page2_sheet(int lf, int& y, short& dlg, bool required); @@ -28,18 +28,18 @@ public: virtual ~TPrint_rendiconto_ca_mask() {} }; -const TString& TPrint_rendiconto_ca_mask::get_compatible_library() const +const TString& TPrint_rendiconto_ca_mask::get_report_class() const { - TString& lib = get_tmp_string(); - lib = "ca3700a"; + TString& classe = get_tmp_string(); + classe = "ca3700a"; // const int stp = get_int(F_TIPOCONTI); -// lib << (stp == 1 ? 'a' : 'b'); // tipo di report da usare in caso di report multipli - return lib; +// classe << (stp == 1 ? 'a' : 'b'); // tipo di report da usare in caso di report multipli + return classe; } bool TPrint_rendiconto_ca_mask::test_compatible_report() { - TFilename lib = get_compatible_library(); + TFilename lib = get_report_class(); const TString& name = get(F_REPORT); bool ok = name.not_empty(); if (ok) @@ -48,8 +48,8 @@ bool TPrint_rendiconto_ca_mask::test_compatible_report() ok = rep.load(name); if (ok) { - TToken_string& libraries = rep.get_libraries(); - ok = libraries.get_pos(lib) >= 0; + const TString& classe = rep.get_class(); + ok = classe == lib; } } if (!ok) @@ -69,7 +69,7 @@ bool TPrint_rendiconto_ca_mask::on_field_event(TOperable_field& o, TField_event case F_REPORT: if (e == fe_button) { - const TString8 lib = get_compatible_library(); + const TString8 lib = get_report_class(); TFilename path = o.get(); if (select_custom_file(path, "rep", lib)) {