Aggiunto supporto per stampa immagini su pdf da form (i report già lo fanno da tempo)
Serve per l'invio dei solleciti via mail. git-svn-id: svn://10.65.10.50/branches/R_10_00@22869 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
4f1d32502e
commit
09aff3a1c2
@ -84,6 +84,7 @@ public:
|
||||
TObject* operator-- ()
|
||||
{ return pred_item( ); }
|
||||
|
||||
TContainer() : _last_condition(NULL) {}
|
||||
virtual ~TContainer() { }
|
||||
};
|
||||
|
||||
|
@ -297,8 +297,8 @@ public:
|
||||
class TFuzzy_browse : public TBrowse_button
|
||||
{
|
||||
protected:
|
||||
virtual void parse_input(TScanner& scanner) {}
|
||||
virtual void parse_output(TScanner& scanner) {}
|
||||
virtual void parse_input(TScanner&) {}
|
||||
virtual void parse_output(TScanner&) {}
|
||||
long find_magic(const TString& magic_val, double& best);
|
||||
|
||||
protected:
|
||||
|
@ -28,5 +28,6 @@
|
||||
#define CAU_PROVV "PROVV"
|
||||
#define CAU_CODCAUREG "CODCAUREG"
|
||||
#define CAU_REGSPIVA "REGSPIVA"
|
||||
#define CAU_MOVCGIND "MOVCGIND"
|
||||
|
||||
#endif
|
@ -447,7 +447,7 @@ protected: // TObject
|
||||
// @cmember Stampa l'espressione su <p out> (serve per implementare l'insertore)
|
||||
virtual void print_on(ostream& out) const ;
|
||||
virtual void evaluate_user_func(int index, int nparms, TEval_stack& stack, TTypeexp type) const;
|
||||
virtual int parse_user_func(const char * name, int nparms) const { return -1; }
|
||||
virtual int parse_user_func(const char* name, int nparms) const { return -1; }
|
||||
|
||||
// @access Public Member
|
||||
public:
|
||||
|
@ -555,6 +555,12 @@ bool TPrinter::is_generic() const
|
||||
return yes;
|
||||
}
|
||||
|
||||
// @cmember Ritorna vero se la stampante e' PDF
|
||||
bool TPrinter::is_pdf() const
|
||||
{
|
||||
return xvt_print_is_pdf(_print_rcd) != 0;
|
||||
}
|
||||
|
||||
// @cmember Ritorna vero se sono attivati gli elementi grafici
|
||||
bool TPrinter::isgraphics() const
|
||||
{
|
||||
@ -2092,7 +2098,8 @@ void TPrinter::close()
|
||||
}
|
||||
|
||||
// Dealloca sfondi ormai inutili
|
||||
_backgrounds.destroy();
|
||||
// _backgrounds.destroy(); // Invece servono per esportazioni successive!
|
||||
|
||||
freeze (false);
|
||||
_isopen = false;
|
||||
}
|
||||
|
@ -619,6 +619,9 @@ public:
|
||||
|
||||
// @cmember Ritorna vero se la stampante e' generica/solo testo
|
||||
bool is_generic() const;
|
||||
|
||||
// @cmember Ritorna vero se la stampante e' PDF
|
||||
bool is_pdf() const;
|
||||
|
||||
// @cmember Calcola la dimensione del font per le colonne desiderate
|
||||
int calc_font_size(int columns) const;
|
||||
|
@ -25,8 +25,9 @@ HIDDEN int LEN_SPACES(WINDOW win, int x)
|
||||
|
||||
void TPrintwin::paint_background(long j)
|
||||
{
|
||||
const bool isbackground = _bg->items() > 0 && printer().isgraphics();
|
||||
const bool fink_mode = printer().get_fink_mode();
|
||||
TPrinter& pr = printer();
|
||||
const bool isbackground = _bg->items() > 0 && pr.isgraphics();
|
||||
const bool fink_mode = pr.get_fink_mode();
|
||||
int rw = (int)(j % _formlen);
|
||||
int cnt = 0; char ch;
|
||||
|
||||
@ -40,7 +41,7 @@ void TPrintwin::paint_background(long j)
|
||||
|
||||
if (!fink_mode)
|
||||
{
|
||||
const char* line = printer().background_chars(rw);
|
||||
const char* line = pr.background_chars(rw);
|
||||
set_color (COLOR_BLACK, COLOR_WHITE);
|
||||
xvt_dwin_draw_text(win(), _hofs , (rw*_chary + _chary - _descent + _vofs), (char*)line, -1);
|
||||
// return;
|
||||
@ -107,7 +108,7 @@ void TPrintwin::paint_background(long j)
|
||||
if (i == NULL)
|
||||
{
|
||||
// memorizzo l'immagine così com'è alla risoluzione originale!
|
||||
const TString_array& a = printer().image_names();
|
||||
const TString_array& a = pr.image_names();
|
||||
i = new TImage(a.row(id));
|
||||
_images.add(i, id);
|
||||
}
|
||||
@ -118,7 +119,15 @@ void TPrintwin::paint_background(long j)
|
||||
dst.top = _chary*rw + _vofs;
|
||||
dst.right = dst.left + LEN_SPACES(win(), x2);
|
||||
dst.bottom = dst.top + _chary*y2;
|
||||
i->draw(win(), dst);
|
||||
|
||||
if (pr.is_pdf())
|
||||
{
|
||||
const TString_array& a = pr.image_names();
|
||||
const TString& name = a.row(id);
|
||||
xvt_dwin_draw_image_on_pdf(win(), name, &dst);
|
||||
}
|
||||
else
|
||||
i->draw(win(), dst);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -333,7 +342,7 @@ TPrintwin::TPrintwin(TTextfile& txt, const char* title)
|
||||
}
|
||||
set_win(prwin);
|
||||
|
||||
const bool ispdf = (xvt_print_is_pdf(_printrcd) != 0);
|
||||
const bool ispdf = xvt_print_is_pdf(_printrcd) != 0;
|
||||
|
||||
if (ispdf)
|
||||
{
|
||||
@ -369,10 +378,8 @@ TPrintwin::TPrintwin(TTextfile& txt, const char* title)
|
||||
|
||||
_formwidth = p.formwidth();
|
||||
_inited = TRUE;
|
||||
|
||||
}
|
||||
|
||||
|
||||
TPrintwin::~TPrintwin()
|
||||
{
|
||||
if (_inited && win() != NULL_WIN)
|
||||
|
@ -1525,14 +1525,11 @@ TCursor* TISAM_recordset::cursor() const
|
||||
if (_cursor == NULL && _use.full())
|
||||
{
|
||||
TString use; parsed_text(use);
|
||||
TPerformance_profiler prof("ISAM query");
|
||||
TParagraph_string msg(use, 64);
|
||||
TPerformance_profiler prof(msg.get(0));
|
||||
TISAM_recordset* my = (TISAM_recordset*)this;
|
||||
#ifdef LINUX
|
||||
string s(use.get_buffer());
|
||||
istringstream instr(s);
|
||||
#else
|
||||
|
||||
istrstream instr(use.get_buffer(), use.len()+1); //"barata" x aggiungere il carattere finale
|
||||
#endif
|
||||
TCursor_parser parser(instr, my->_column);
|
||||
|
||||
my->_relation = parser.get_relation();
|
||||
|
@ -2758,7 +2758,7 @@ bool TReport_book::add(TReport& rep, bool progind)
|
||||
if (rex_items <= 0)
|
||||
return true;
|
||||
|
||||
TString msg; msg << TR("Elaborazione report ") << _report->filename();
|
||||
TString msg; msg << TR("Report ") << _report->filename();
|
||||
|
||||
TProgind* pi = NULL;
|
||||
if (progind && rex_items > 1)
|
||||
|
Loading…
x
Reference in New Issue
Block a user