Commit 8d35ac15 authored by Jon K Hellan's avatar Jon K Hellan Committed by Jon Kåre Hellan

Wrapper around gnome_print_show which accepts iso8859.1. We use this until

2000-08-30  Jon K Hellan  <hellan@acm.org>

	* src/print-cell.[ch] (print_show_iso8859_1): Wrapper around
	gnome_print_show which accepts iso8859.1. We use this until we
	switch to UTF-8 internally.

	* src/print-cell.c (print_text): Use print_show_iso8859_1.

	* src/print.c (print_hf): Ditto.

2000-08-30  Jon K Hellan  <hellan@acm.org>

	* src/print.c (print_page, print_job_info_get): Header/footer are
	measured from top/bottom of sheet, not from inside top/bottom
	margin.
	(print_page): Correct placement when centering horizontally or
	vertically.

2000-08-30  Jon K Hellan  <hellan@acm.org>

	* src/dialogs/dialog-printer-setup.c (get_printable_height):
	Remove misleading comment.
parent 80e61b8b
......@@ -21,8 +21,6 @@ Release Critical
font size and things like that.
- Copy sheet, and insert new sheet both append to the end of the sheet list
rather than inserting before the current sheet.
- Be able to print non-ASCII. gnome-print 0.21 expects UTF-8, and we
still feed it ISO-8859-X. We don't even really specify X :-)
Post 0.57 Changes
-----------------
......
2000-08-30 Jon K Hellan <hellan@acm.org>
* src/print-cell.[ch] (print_show_iso8859_1): Wrapper around
gnome_print_show which accepts iso8859.1. We use this until we
switch to UTF-8 internally.
* src/print-cell.c (print_text): Use print_show_iso8859_1.
* src/print.c (print_hf): Ditto.
2000-08-30 Jon K Hellan <hellan@acm.org>
* src/print.c (print_page, print_job_info_get): Header/footer are
measured from top/bottom of sheet, not from inside top/bottom
margin.
(print_page): Correct placement when centering horizontally or
vertically.
2000-08-29 Morten Welinder <terra@diku.dk>
* src/functions/fn-financial.c (gnumeric_sln): Value arg is float,
......
2000-08-30 Jon K Hellan <hellan@acm.org>
* src/print-cell.[ch] (print_show_iso8859_1): Wrapper around
gnome_print_show which accepts iso8859.1. We use this until we
switch to UTF-8 internally.
* src/print-cell.c (print_text): Use print_show_iso8859_1.
* src/print.c (print_hf): Ditto.
2000-08-30 Jon K Hellan <hellan@acm.org>
* src/print.c (print_page, print_job_info_get): Header/footer are
measured from top/bottom of sheet, not from inside top/bottom
margin.
(print_page): Correct placement when centering horizontally or
vertically.
2000-08-29 Morten Welinder <terra@diku.dk>
* src/functions/fn-financial.c (gnumeric_sln): Value arg is float,
......
......@@ -17,6 +17,9 @@ Jody:
John Gill:
* Double click fill support.
Jon Kåre:
* Make print work with new gnome-print
JPR:
* Put more effort into reverse engineering MATCH (and friends)
than you want to know about.
......
2000-08-30 Jon K Hellan <hellan@acm.org>
* src/print-cell.[ch] (print_show_iso8859_1): Wrapper around
gnome_print_show which accepts iso8859.1. We use this until we
switch to UTF-8 internally.
* src/print-cell.c (print_text): Use print_show_iso8859_1.
* src/print.c (print_hf): Ditto.
2000-08-30 Jon K Hellan <hellan@acm.org>
* src/print.c (print_page, print_job_info_get): Header/footer are
measured from top/bottom of sheet, not from inside top/bottom
margin.
(print_page): Correct placement when centering horizontally or
vertically.
2000-08-29 Morten Welinder <terra@diku.dk>
* src/functions/fn-financial.c (gnumeric_sln): Value arg is float,
......
2000-08-30 Jon K Hellan <hellan@acm.org>
* src/print-cell.[ch] (print_show_iso8859_1): Wrapper around
gnome_print_show which accepts iso8859.1. We use this until we
switch to UTF-8 internally.
* src/print-cell.c (print_text): Use print_show_iso8859_1.
* src/print.c (print_hf): Ditto.
2000-08-30 Jon K Hellan <hellan@acm.org>
* src/print.c (print_page, print_job_info_get): Header/footer are
measured from top/bottom of sheet, not from inside top/bottom
margin.
(print_page): Correct placement when centering horizontally or
vertically.
2000-08-29 Morten Welinder <terra@diku.dk>
* src/functions/fn-financial.c (gnumeric_sln): Value arg is float,
......
2000-08-30 Jon K Hellan <hellan@acm.org>
* src/print-cell.[ch] (print_show_iso8859_1): Wrapper around
gnome_print_show which accepts iso8859.1. We use this until we
switch to UTF-8 internally.
* src/print-cell.c (print_text): Use print_show_iso8859_1.
* src/print.c (print_hf): Ditto.
2000-08-30 Jon K Hellan <hellan@acm.org>
* src/print.c (print_page, print_job_info_get): Header/footer are
measured from top/bottom of sheet, not from inside top/bottom
margin.
(print_page): Correct placement when centering horizontally or
vertically.
2000-08-29 Morten Welinder <terra@diku.dk>
* src/functions/fn-financial.c (gnumeric_sln): Value arg is float,
......
2000-08-30 Jon K Hellan <hellan@acm.org>
* src/print-cell.[ch] (print_show_iso8859_1): Wrapper around
gnome_print_show which accepts iso8859.1. We use this until we
switch to UTF-8 internally.
* src/print-cell.c (print_text): Use print_show_iso8859_1.
* src/print.c (print_hf): Ditto.
2000-08-30 Jon K Hellan <hellan@acm.org>
* src/print.c (print_page, print_job_info_get): Header/footer are
measured from top/bottom of sheet, not from inside top/bottom
margin.
(print_page): Correct placement when centering horizontally or
vertically.
2000-08-29 Morten Welinder <terra@diku.dk>
* src/functions/fn-financial.c (gnumeric_sln): Value arg is float,
......
2000-08-30 Jon K Hellan <hellan@acm.org>
* src/print-cell.[ch] (print_show_iso8859_1): Wrapper around
gnome_print_show which accepts iso8859.1. We use this until we
switch to UTF-8 internally.
* src/print-cell.c (print_text): Use print_show_iso8859_1.
* src/print.c (print_hf): Ditto.
2000-08-30 Jon K Hellan <hellan@acm.org>
* src/print.c (print_page, print_job_info_get): Header/footer are
measured from top/bottom of sheet, not from inside top/bottom
margin.
(print_page): Correct placement when centering horizontally or
vertically.
2000-08-29 Morten Welinder <terra@diku.dk>
* src/functions/fn-financial.c (gnumeric_sln): Value arg is float,
......
2000-08-30 Jon K Hellan <hellan@acm.org>
* dialog-printer-setup.c (get_printable_height): Remove misleading
comment.
2000-07-22 Michael Meeks <michael@helixcode.com>
* dialog-cell-format.c (cb_font_changed): update.
......
......@@ -172,12 +172,6 @@ get_printable_width (dialog_print_info_t *dpi, UnitName unit)
* @unit unit
*
* Return page height minus margins, header and footer in specified unit.
*
* FIXME: This uses our traditional semantics for headers and footers, which
* is to measure the header from the bottom of the top margin. Excel uses a
* different convention, so the Excel import code must be updated. Unless we
* chicken out and go with Excel's broken convention: Both top margin and
* header are measured from the top of the page.
*/
static double
get_printable_height (dialog_print_info_t *dpi, UnitName unit)
......
......@@ -40,6 +40,52 @@ print_hline (GnomePrintContext *context,
gnome_print_stroke (context);
}
/*
* print_show_iso8859_1
*
* Like gnome_print_show, but expects an ISO 8859.1 string.
*
* NOTE: This function got introduced when gnome-print switched to UTF-8,
* and will disappear again once Gnumeric makes the switch. Deprecated at
* birth!
*/
int
print_show_iso8859_1 (GnomePrintContext *pc, char const *text)
{
guint32 u4text[128];
guint32 *dynp = NULL;
size_t len;
int ret;
char const *p;
char *u4p, *outp;
g_return_val_if_fail (pc && text, -1);
if (!*text)
return 0;
/* Dynamic allocation for long strings */
if ((len = strlen (text)) > sizeof u4text / sizeof u4text[0]) {
dynp = g_new0 (guint32, len);
u4p = dynp;
} else {
memset (u4text, '\0', sizeof u4text);
u4p = u4text;
}
outp = (char *) u4p; /* Munging types on purpose */
/* Convert to big endian UCS-4 */
for (p = text, outp += 3; *p; p++, outp += 4)
*outp = *p;
ret = gnome_print_show_ucs4 (pc, u4p, (gint) len);
if (dynp)
g_free (dynp);
return ret;
}
/***********************************************************/
/*
......@@ -54,7 +100,9 @@ print_text (GnomePrintContext *context,
double const * const line_offset, int num_lines)
{
gnome_print_moveto (context, x, text_base);
gnome_print_show (context, text);
/* FIXME:
* Switch this back to gnome_print_show once we use UTF-8 internally */
print_show_iso8859_1 (context, text);
/* FIXME how to handle small fonts ?
* the text_base should be at least 2 pixels above the bottom */
......
......@@ -15,4 +15,8 @@ void print_cell_grid (GnomePrintContext *context,
double base_x, double base_y,
double width, double height);
/* This function got introduced when gnome-print switched to UTF-8, and will
* disappear again once Gnumeric makes the switch */
int print_show_iso8859_1 (GnomePrintContext *pc, char const *text);
#endif
......@@ -250,7 +250,9 @@ print_hf (PrintJobInfo *pj, const char *format, HFSide side, double y)
x = 0;
}
gnome_print_moveto (pj->print_context, x, y);
gnome_print_show (pj->print_context, text);
/* FIXME:
* Switch this back to gnome_print_show once we use UTF-8 internally */
print_show_iso8859_1 (pj->print_context, text);
g_free (text);
}
......@@ -356,7 +358,7 @@ print_page (Sheet *sheet, int start_col, int start_row, int end_col, int end_row
/* Margins */
base_x += margins->left.points;
base_y += margins->top.points + margins->header.points;
base_y += MAX (margins->top.points, margins->header.points);
for (i = 0; i < pj->n_copies; i++){
double x = base_x;
......@@ -854,7 +856,8 @@ print_job_info_get (Sheet *sheet, PrintRange range, gboolean const preview)
pj->x_points = pj->width - (pm->left.points + pm->right.points);
pj->y_points = pj->height -
(pm->top.points + pm->bottom.points + pm->header.points + pm->footer.points);
(MAX (pm->top.points, pm->header.points) +
MAX (pm->bottom.points, pm->footer.points));
/*
* Setup render info
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment