[pdf] Propagate status

Check and return a few forgotten error codes from static functions.
This commit is contained in:
Chris Wilson 2008-09-25 09:39:41 +01:00
parent 907f550a1b
commit ba18d57339
2 changed files with 16 additions and 4 deletions

View file

@ -1303,7 +1303,10 @@ _cairo_pdf_operators_emit_cluster (cairo_pdf_operators_t *pdf_operators,
/* Fallback to using ActualText to map zero or more glyphs to a
* unicode string. */
_cairo_pdf_operators_flush_glyphs (pdf_operators);
status = _cairo_pdf_operators_flush_glyphs (pdf_operators);
if (status)
return status;
status = _cairo_pdf_operators_begin_actualtext (pdf_operators, utf8, utf8_len);
if (status)
return status;
@ -1367,7 +1370,9 @@ _cairo_pdf_operators_show_text_glyphs (cairo_pdf_operators_t *pdf_operators,
pdf_operators->is_new_text_object = FALSE;
if (pdf_operators->in_text_object == FALSE) {
_cairo_pdf_operators_begin_text (pdf_operators);
status = _cairo_pdf_operators_begin_text (pdf_operators);
if (status)
return status;
/* Force Tm and Tf to be emitted when starting a new text
* object.*/
@ -1386,7 +1391,10 @@ _cairo_pdf_operators_show_text_glyphs (cairo_pdf_operators_t *pdf_operators,
if (pdf_operators->is_new_text_object ||
! _cairo_matrix_scale_equal (&pdf_operators->text_matrix, &text_matrix))
{
_cairo_pdf_operators_flush_glyphs (pdf_operators);
status = _cairo_pdf_operators_flush_glyphs (pdf_operators);
if (status)
return status;
x = glyphs[0].x;
y = glyphs[0].y;
cairo_matrix_transform_point (&pdf_operators->cairo_to_pdf, &x, &y);

View file

@ -2956,7 +2956,11 @@ _cairo_pdf_surface_emit_to_unicode_stream (cairo_pdf_surface_t *surface,
"<%02x> ",
i + 1);
}
_cairo_pdf_surface_emit_unicode_for_glyph (surface, font_subset->utf8[i + 1]);
status = _cairo_pdf_surface_emit_unicode_for_glyph (surface,
font_subset->utf8[i + 1]);
if (status)
return status;
_cairo_output_stream_printf (surface->output,
"\n");
}