Patch level : 10.0
Files correlati : ve1.exe Ricompilazione Demo : [ ] Commento : Corretto clipping campi descrizione molto ad altezza variabile spezzati su piu' pagine git-svn-id: svn://10.65.10.50/trunk@19938 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
91560994bc
commit
0b89a851d9
@ -1017,11 +1017,6 @@ bool TDongle::shown(word code) const
|
||||
TAuto_token_string ee = ini_get_string(CONFIG_GENERAL, mod, "OEM"); // Modern OEM handling
|
||||
if (ee.full())
|
||||
yes = ee.get_pos(oem()) >= 0;
|
||||
else
|
||||
{
|
||||
if (ini_get_bool(CONFIG_GENERAL, mod, "Ee")) // Legacy Enterprise Edition
|
||||
yes = oem() == 0;
|
||||
}
|
||||
}
|
||||
if (yes)
|
||||
((TBit_array&)_shown).set(code); // Setto il flag di visibilta' per la prossima volta
|
||||
@ -1129,25 +1124,29 @@ TEnigma_machine::~TEnigma_machine()
|
||||
}
|
||||
|
||||
int Tdninst::assistance_year2solar(int ay) const
|
||||
{
|
||||
return (ay/1000)*1000 + (ay%1000)/10;
|
||||
}
|
||||
{ return (ay/1000)*1000 + (ay%1000)/10; }
|
||||
|
||||
bool Tdninst::parse_date(const TString& line, TString& key, TDate& datascad) const
|
||||
int Tdninst::parse_date(const TString& line, TString& key, TDate& datascad) const
|
||||
{
|
||||
const int equal = line.find('=');
|
||||
if (equal > 0 && equal <= 16)
|
||||
{
|
||||
key = line.left(equal); key.trim();
|
||||
TString16 strdate = line.mid(equal+1, 16); strdate.trim();
|
||||
if (strdate.empty())
|
||||
{
|
||||
datascad = TODAY; // Mettiamo una data valida comunque
|
||||
return key.full() ? 1 : 0;
|
||||
}
|
||||
|
||||
int d, m, y;
|
||||
if (sscanf(strdate, "%2d-%2d-%4d", &d, &m, &y) == 3)
|
||||
{
|
||||
datascad = TDate(d, m, y);
|
||||
return datascad.ok();
|
||||
return datascad.ok() ? 2 : 0;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int Tdninst::test_cmdline(const TString& cmdline, bool key_must_exist, TString& msg) const
|
||||
|
@ -116,7 +116,7 @@ class Tdninst : public TObject
|
||||
|
||||
protected:
|
||||
int assistance_year2solar(int ay) const;
|
||||
bool parse_date(const TString& line, TString& key, TDate& d) const;
|
||||
int parse_date(const TString& line, TString& key, TDate& d) const;
|
||||
|
||||
public:
|
||||
int assist_year() const { return _year_assist; }
|
||||
|
@ -637,8 +637,8 @@ void TReport_section::print(TBook& book) const
|
||||
else
|
||||
book.draw_rectangle(rct);
|
||||
}
|
||||
|
||||
for (int i = 0; i < items(); i++)
|
||||
const int tot = items();
|
||||
for (int i = 0; i < tot; i++)
|
||||
{
|
||||
const TReport_field& f = field(i);
|
||||
f.print(book);
|
||||
@ -659,7 +659,8 @@ void TReport_section::print_clipped(TBook& book, long top, long bottom) const
|
||||
bool TReport_section::execute_postscript()
|
||||
{
|
||||
bool ok = true;
|
||||
for (int i = 0; i < items(); i++)
|
||||
const int tot = items();
|
||||
for (int i = 0; i < tot; i++)
|
||||
{
|
||||
TReport_field& f = field(i);
|
||||
f.execute_postscript();
|
||||
@ -716,7 +717,8 @@ void TReport_section::save(TXmlItem& root) const
|
||||
_prescript.save(item, "prescript");
|
||||
_postscript.save(item, "postscript");
|
||||
|
||||
for (int i = 0; i < items(); i++)
|
||||
const int tot = items();
|
||||
for (int i = 0; i < tot; i++)
|
||||
{
|
||||
const TReport_field& rf = field(i);
|
||||
rf.save(item);
|
||||
@ -2892,11 +2894,10 @@ void TReport::msg_isam_read(TVariant_stack& stack)
|
||||
|
||||
|
||||
TToken_string out(stack.pop().as_string(), '!'); // Lista dei campi di output
|
||||
|
||||
if (fkey <= 1)
|
||||
{
|
||||
const TRectype& rec = cache().get(keyrec);
|
||||
do_isam_read_output(rec, out); // Se rec e' vuoto azzera gli outputs
|
||||
const TRectype& rec = cache().get(keyrec);
|
||||
do_isam_read_output(rec, out); // Se rec e' vuoto azzera gli outputs
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -94,14 +94,14 @@ void advanced_draw_text_line(WINDOW w, const char* text, const RCT& r, char hali
|
||||
if (restore_clip)
|
||||
{
|
||||
RCT clipper;
|
||||
can_draw = xvt_rect_intersect(&clipper, &orig, (RCT*)&r) != 0;
|
||||
can_draw = xvt_rect_intersect(&clipper, &orig, &r) != 0;
|
||||
if (can_draw)
|
||||
xvt_dwin_set_clip(w, (RCT*)&clipper);
|
||||
xvt_dwin_set_clip(w, &clipper);
|
||||
else
|
||||
restore_clip = false;
|
||||
}
|
||||
else
|
||||
xvt_dwin_set_clip(w, (RCT*)&r);
|
||||
xvt_dwin_set_clip(w, &r);
|
||||
|
||||
if (can_draw)
|
||||
{
|
||||
@ -1018,7 +1018,7 @@ void TBook::set_clip(long top, long bottom)
|
||||
{
|
||||
if (bottom >= top)
|
||||
{
|
||||
const TRectangle rect(0, top, logical_page_width(), bottom-top);
|
||||
const TReport_rct rect(0, top, logical_page_width(), bottom-top);
|
||||
define_frame(rect);
|
||||
*_out << "<clip>" << endl;
|
||||
}
|
||||
@ -1265,8 +1265,8 @@ bool TBook::print_page(TWindow& win, size_t page)
|
||||
ifstream ifs(_file);
|
||||
ifs.seekg(pos);
|
||||
|
||||
_rect.set(-1,-1,0,0); // Reset frame
|
||||
RCT rct = { 0,0,0,0 };
|
||||
_rect.set(-1,-1,0,0); // Reset logical frame (1/720 coords)
|
||||
RCT rct = { 0,0,0,0 }; // Physical frame (pixel coords)
|
||||
|
||||
_horizontal_alignment = 'L'; // Reset text alignment
|
||||
_vertical_alignment = 'T';
|
||||
@ -2285,7 +2285,7 @@ TBook::TBook(const char* name)
|
||||
_file = name;
|
||||
if (_file.blank())
|
||||
{
|
||||
_file.temp("rep");
|
||||
_file.temp("rep", "rap");
|
||||
_is_temporary = true;
|
||||
}
|
||||
}
|
||||
@ -2535,13 +2535,13 @@ long TReport_book::print_section(TReport_section& rs)
|
||||
h += next_section.compute_size().y;
|
||||
}
|
||||
|
||||
const long space_left = _logical_foot_pos - _delta.y; // Calcola spazio rimasto
|
||||
const long space_left = (_logical_foot_pos - _delta.y)/100*100; // Calcola spazio rimasto
|
||||
page_break = h > space_left; // Controlla se e' sufficiente
|
||||
|
||||
// Controllo se la sezione puo' essere stampata su due pagine
|
||||
if (page_break && space_left >= 100 && rs.can_be_broken())
|
||||
if (page_break && space_left > 100 && rs.can_be_broken())
|
||||
{
|
||||
reprint_from = space_left / 100 * 100;
|
||||
reprint_from = space_left;
|
||||
rs.print_clipped(*this, 0, reprint_from);
|
||||
}
|
||||
}
|
||||
@ -2563,7 +2563,7 @@ long TReport_book::print_section(TReport_section& rs)
|
||||
rs.print(*this);
|
||||
}
|
||||
|
||||
if (rs.level() > 0 && (rs.type() != 'H' || rs.level() > 1)) // Ho stampato qualcosa che non sia lo sfondo!
|
||||
if (rs.level() > 0 && (rs.type() != 'H' || rs.level() > 1)) // Ho stampato qualcosa che non fosse lo sfondo!
|
||||
_page_break_allowed = true;
|
||||
}
|
||||
|
||||
|
@ -1363,13 +1363,25 @@ const TFilename& TFilename::temp(
|
||||
{
|
||||
if (extension && *extension)
|
||||
{
|
||||
/* Vengono creati file in posti fantasiosi
|
||||
TFilename mask(prefix);
|
||||
if (mask.empty())
|
||||
mask.tempdir();
|
||||
|
||||
mask.add("*");
|
||||
mask.ext(extension);
|
||||
const int preflen = strlen(mask.path());
|
||||
*/
|
||||
TFilename mask;
|
||||
mask.tempdir();
|
||||
if (prefix && *prefix)
|
||||
{
|
||||
mask.add(prefix);
|
||||
mask << '*';
|
||||
}
|
||||
else
|
||||
mask.add("*");
|
||||
mask.ext(extension);
|
||||
|
||||
const int star = mask.find('*');
|
||||
|
||||
TString_array list;
|
||||
const int count = list_files(mask, list);
|
||||
@ -1378,9 +1390,9 @@ const TFilename& TFilename::temp(
|
||||
{
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
const char* name = (const char*)list.row(i) + preflen;
|
||||
const char* name = (const char*)list.row(i) + star;
|
||||
const long numero = atol(name) + 1;
|
||||
mask.cut(preflen);
|
||||
mask.cut(star);
|
||||
mask << numero;
|
||||
mask.ext(extension);
|
||||
if (list.find(mask) < 0)
|
||||
@ -1388,10 +1400,7 @@ const TFilename& TFilename::temp(
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
const int star = mask.find('*');
|
||||
mask[star] = '1';
|
||||
}
|
||||
set(mask);
|
||||
}
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user