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-- ()
|
TObject* operator-- ()
|
||||||
{ return pred_item( ); }
|
{ return pred_item( ); }
|
||||||
|
|
||||||
|
TContainer() : _last_condition(NULL) {}
|
||||||
virtual ~TContainer() { }
|
virtual ~TContainer() { }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -297,8 +297,8 @@ public:
|
|||||||
class TFuzzy_browse : public TBrowse_button
|
class TFuzzy_browse : public TBrowse_button
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
virtual void parse_input(TScanner& scanner) {}
|
virtual void parse_input(TScanner&) {}
|
||||||
virtual void parse_output(TScanner& scanner) {}
|
virtual void parse_output(TScanner&) {}
|
||||||
long find_magic(const TString& magic_val, double& best);
|
long find_magic(const TString& magic_val, double& best);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@ -28,5 +28,6 @@
|
|||||||
#define CAU_PROVV "PROVV"
|
#define CAU_PROVV "PROVV"
|
||||||
#define CAU_CODCAUREG "CODCAUREG"
|
#define CAU_CODCAUREG "CODCAUREG"
|
||||||
#define CAU_REGSPIVA "REGSPIVA"
|
#define CAU_REGSPIVA "REGSPIVA"
|
||||||
|
#define CAU_MOVCGIND "MOVCGIND"
|
||||||
|
|
||||||
#endif
|
#endif
|
@ -555,6 +555,12 @@ bool TPrinter::is_generic() const
|
|||||||
return yes;
|
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
|
// @cmember Ritorna vero se sono attivati gli elementi grafici
|
||||||
bool TPrinter::isgraphics() const
|
bool TPrinter::isgraphics() const
|
||||||
{
|
{
|
||||||
@ -2092,7 +2098,8 @@ void TPrinter::close()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Dealloca sfondi ormai inutili
|
// Dealloca sfondi ormai inutili
|
||||||
_backgrounds.destroy();
|
// _backgrounds.destroy(); // Invece servono per esportazioni successive!
|
||||||
|
|
||||||
freeze (false);
|
freeze (false);
|
||||||
_isopen = false;
|
_isopen = false;
|
||||||
}
|
}
|
||||||
|
@ -620,6 +620,9 @@ public:
|
|||||||
// @cmember Ritorna vero se la stampante e' generica/solo testo
|
// @cmember Ritorna vero se la stampante e' generica/solo testo
|
||||||
bool is_generic() const;
|
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
|
// @cmember Calcola la dimensione del font per le colonne desiderate
|
||||||
int calc_font_size(int columns) const;
|
int calc_font_size(int columns) const;
|
||||||
// @cmember Calcola il numero di colonne per il font/size attuale
|
// @cmember Calcola il numero di colonne per il font/size attuale
|
||||||
|
@ -25,8 +25,9 @@ HIDDEN int LEN_SPACES(WINDOW win, int x)
|
|||||||
|
|
||||||
void TPrintwin::paint_background(long j)
|
void TPrintwin::paint_background(long j)
|
||||||
{
|
{
|
||||||
const bool isbackground = _bg->items() > 0 && printer().isgraphics();
|
TPrinter& pr = printer();
|
||||||
const bool fink_mode = printer().get_fink_mode();
|
const bool isbackground = _bg->items() > 0 && pr.isgraphics();
|
||||||
|
const bool fink_mode = pr.get_fink_mode();
|
||||||
int rw = (int)(j % _formlen);
|
int rw = (int)(j % _formlen);
|
||||||
int cnt = 0; char ch;
|
int cnt = 0; char ch;
|
||||||
|
|
||||||
@ -40,7 +41,7 @@ void TPrintwin::paint_background(long j)
|
|||||||
|
|
||||||
if (!fink_mode)
|
if (!fink_mode)
|
||||||
{
|
{
|
||||||
const char* line = printer().background_chars(rw);
|
const char* line = pr.background_chars(rw);
|
||||||
set_color (COLOR_BLACK, COLOR_WHITE);
|
set_color (COLOR_BLACK, COLOR_WHITE);
|
||||||
xvt_dwin_draw_text(win(), _hofs , (rw*_chary + _chary - _descent + _vofs), (char*)line, -1);
|
xvt_dwin_draw_text(win(), _hofs , (rw*_chary + _chary - _descent + _vofs), (char*)line, -1);
|
||||||
// return;
|
// return;
|
||||||
@ -107,7 +108,7 @@ void TPrintwin::paint_background(long j)
|
|||||||
if (i == NULL)
|
if (i == NULL)
|
||||||
{
|
{
|
||||||
// memorizzo l'immagine così com'è alla risoluzione originale!
|
// 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));
|
i = new TImage(a.row(id));
|
||||||
_images.add(i, id);
|
_images.add(i, id);
|
||||||
}
|
}
|
||||||
@ -118,6 +119,14 @@ void TPrintwin::paint_background(long j)
|
|||||||
dst.top = _chary*rw + _vofs;
|
dst.top = _chary*rw + _vofs;
|
||||||
dst.right = dst.left + LEN_SPACES(win(), x2);
|
dst.right = dst.left + LEN_SPACES(win(), x2);
|
||||||
dst.bottom = dst.top + _chary*y2;
|
dst.bottom = dst.top + _chary*y2;
|
||||||
|
|
||||||
|
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);
|
i->draw(win(), dst);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -333,7 +342,7 @@ TPrintwin::TPrintwin(TTextfile& txt, const char* title)
|
|||||||
}
|
}
|
||||||
set_win(prwin);
|
set_win(prwin);
|
||||||
|
|
||||||
const bool ispdf = (xvt_print_is_pdf(_printrcd) != 0);
|
const bool ispdf = xvt_print_is_pdf(_printrcd) != 0;
|
||||||
|
|
||||||
if (ispdf)
|
if (ispdf)
|
||||||
{
|
{
|
||||||
@ -369,10 +378,8 @@ TPrintwin::TPrintwin(TTextfile& txt, const char* title)
|
|||||||
|
|
||||||
_formwidth = p.formwidth();
|
_formwidth = p.formwidth();
|
||||||
_inited = TRUE;
|
_inited = TRUE;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
TPrintwin::~TPrintwin()
|
TPrintwin::~TPrintwin()
|
||||||
{
|
{
|
||||||
if (_inited && win() != NULL_WIN)
|
if (_inited && win() != NULL_WIN)
|
||||||
|
@ -1525,14 +1525,11 @@ TCursor* TISAM_recordset::cursor() const
|
|||||||
if (_cursor == NULL && _use.full())
|
if (_cursor == NULL && _use.full())
|
||||||
{
|
{
|
||||||
TString use; parsed_text(use);
|
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;
|
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
|
istrstream instr(use.get_buffer(), use.len()+1); //"barata" x aggiungere il carattere finale
|
||||||
#endif
|
|
||||||
TCursor_parser parser(instr, my->_column);
|
TCursor_parser parser(instr, my->_column);
|
||||||
|
|
||||||
my->_relation = parser.get_relation();
|
my->_relation = parser.get_relation();
|
||||||
|
@ -2758,7 +2758,7 @@ bool TReport_book::add(TReport& rep, bool progind)
|
|||||||
if (rex_items <= 0)
|
if (rex_items <= 0)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
TString msg; msg << TR("Elaborazione report ") << _report->filename();
|
TString msg; msg << TR("Report ") << _report->filename();
|
||||||
|
|
||||||
TProgind* pi = NULL;
|
TProgind* pi = NULL;
|
||||||
if (progind && rex_items > 1)
|
if (progind && rex_items > 1)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user