Patch level : 2.1 94
Files correlati : Ricompilazione Demo : [ ] Commento : Migliorato supporto per forzatura font e lpi della stampante git-svn-id: svn://10.65.10.50/trunk@12267 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
e8893302fa
commit
d7b54e796f
@ -506,7 +506,7 @@ void TRecordset::parsed_text(TString& sql) const
|
||||
|
||||
bool ask_variable(const char* name, TVariant& var)
|
||||
{
|
||||
TMask m("Richiesta variabile", 1, 52, 4);
|
||||
TMask m(TR("Richiesta variabile"), 1, 52, 4);
|
||||
m.add_static(-1, 0, name, 1, 0);
|
||||
m.add_string(101, 0, "", 1, 1, 80, "", 50);
|
||||
m.add_button(DLG_OK, 0, "", -12, -1, 10, 2);
|
||||
@ -563,7 +563,7 @@ bool select_custom_file(TFilename& path, const char* ext)
|
||||
TString_array files;
|
||||
list_files(path, files);
|
||||
|
||||
TArray_sheet sheet(-1, -1, 78, 20, TR("Selezione"), TR("Nome@20|Descrizione@50"));
|
||||
TArray_sheet sheet(-1, -1, 78, 20, TR("Selezione"), HR("Nome@20|Descrizione@50"));
|
||||
|
||||
TString str;
|
||||
FOR_EACH_ARRAY_ROW(files, i, row)
|
||||
|
@ -1320,7 +1320,7 @@ void TReport_field::print_rect(TBook& book) const
|
||||
const COLOR color = blend_colors(section().back_color(), COLOR_BLACK, 0.5);
|
||||
book.set_brush(color, PAT_SOLID);
|
||||
TRectangle rct = get_draw_rect();
|
||||
rct += TPoint(shade_offset(), shade_offset() * section().report().lpi() / font().cpi());
|
||||
rct += TPoint(shade_offset(), shade_offset() * section().report().print_lpi() / print_font().cpi());
|
||||
if (radius() > 0)
|
||||
book.draw_round_rectangle(rct, radius());
|
||||
else
|
||||
@ -1686,10 +1686,20 @@ const TReport_font& TReport::print_font() const
|
||||
|
||||
int TReport::cpi() const
|
||||
{
|
||||
return _use_printer_font ? _print_font.cpi() : _font.cpi();
|
||||
return _font.cpi();
|
||||
}
|
||||
|
||||
int TReport::lpi() const
|
||||
{
|
||||
return _lpi;
|
||||
}
|
||||
|
||||
int TReport::print_cpi() const
|
||||
{
|
||||
return print_font().cpi();
|
||||
}
|
||||
|
||||
int TReport::print_lpi() const
|
||||
{
|
||||
return _use_printer_font ? printer().get_lines_per_inch() : _lpi;
|
||||
}
|
||||
|
@ -483,6 +483,9 @@ public:
|
||||
int lpi() const;
|
||||
void set_lpi(int lpi) { _lpi = lpi; }
|
||||
|
||||
int print_cpi() const;
|
||||
int print_lpi() const;
|
||||
|
||||
bool set_recordset(const TString& sql);
|
||||
bool set_recordset(TRecordset* sql);
|
||||
TRecordset* recordset() const { return _recordset; }
|
||||
|
@ -1431,8 +1431,8 @@ TBook::~TBook()
|
||||
TPoint TReport_book::log2dev(const TPoint& ptlog) const
|
||||
{
|
||||
TPoint ptdev;
|
||||
ptdev.x = (ptlog.x * _phr) / (100 * _report->cpi());
|
||||
ptdev.y = (ptlog.y * _pvr) / (100 * _report->lpi());
|
||||
ptdev.x = (ptlog.x * _phr) / (100 * cpi());
|
||||
ptdev.y = (ptlog.y * _pvr) / (100 * lpi());
|
||||
return ptdev;
|
||||
}
|
||||
|
||||
@ -1585,11 +1585,11 @@ bool TReport_book::init(TReport& rep)
|
||||
const TPoint res = page_res();
|
||||
|
||||
const double pollici_pagina_y = (double)siz.y / (double)res.y;
|
||||
const double righe_pagina = pollici_pagina_y * _report->lpi();
|
||||
const double righe_pagina = pollici_pagina_y * lpi();
|
||||
_logical_page_height = long(righe_pagina*100.0);
|
||||
|
||||
const double pollici_pagina_x = (double)siz.x / (double)res.x;
|
||||
const double colonne_pagina = pollici_pagina_x * _report->cpi();
|
||||
const double colonne_pagina = pollici_pagina_x * cpi();
|
||||
_logical_page_width = long(colonne_pagina*100.0);
|
||||
|
||||
const TReport_section& footer = _report->section('F',0);
|
||||
@ -1750,14 +1750,14 @@ bool TReport_book::add(TReport& rep, bool progind)
|
||||
int TReport_book::lpi() const
|
||||
{
|
||||
if (_report != NULL)
|
||||
return _report->lpi();
|
||||
return _report->print_lpi();
|
||||
return TBook::lpi();
|
||||
}
|
||||
|
||||
int TReport_book::cpi() const
|
||||
{
|
||||
if (_report != NULL)
|
||||
return _report->cpi();
|
||||
return _report->print_cpi();
|
||||
return TBook::cpi();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user