From e0307f34378ef361c43a3737a9606bed497835dd Mon Sep 17 00:00:00 2001 From: guy Date: Wed, 5 Dec 2007 15:22:00 +0000 Subject: [PATCH] Patch level : 4.0 Files correlati : ve1.exe Ricompilazione Demo : [ ] Commento : Corretto calcolo rettangolo di stampa per campi di testo ad altezza variabile (campo descizione delle righe documento) git-svn-id: svn://10.65.10.50/trunk@15840 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- include/report.cpp | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/include/report.cpp b/include/report.cpp index b8c567c33..9c85470e7 100755 --- a/include/report.cpp +++ b/include/report.cpp @@ -1102,18 +1102,8 @@ bool TReport_field::dynamic_height() const const TRectangle& TReport_field::get_draw_rect() const { - TRectangle& rct = ((TReport_field*)this)->_draw_rct; - if (dynamic_height()) - { - TParagraph_string str(formatted_text(), rct.width()/100-1); // Sto un po' scarso - int h = str.items() * 100; - if (h <= 0) - h = 100; - if (h > _rct.height()) - h = _rct.height(); - rct.set_height(h); - } - return rct; + // Dalla 4.0 il rettangolo e' sempre gia' calcolato correttamente! + return _draw_rct; } const TReport_font& TReport_field::font() const @@ -1487,7 +1477,7 @@ void TReport_field::print(TBook& book) const if (draw_hidden()) { - if (link().not_empty()) // Devo "stampare" i link anche se nascosti + if (link().full()) // Devo "stampare" i link anche se nascosti { TRectangle rct = get_draw_rect(); rct.set_height(0); rct.set_width(0); @@ -1565,7 +1555,7 @@ void TReport_field::print(TBook& book) const { const TRectangle& pr = print_rect(book); book.draw_text(pr, str); - if (link().not_empty()) + if (link().full()) book.draw_link(pr, str, link()); } }