Skip to content
Snippets Groups Projects
Commit 88c7e87a authored by David C. Lonie's avatar David C. Lonie
Browse files

Merge branch 'upstream-libharu' into libharu_compile_fix

* upstream-libharu:
  libharu 2017-05-12 (e189507c)
parents d7fa7e55 1a6dbade
No related branches found
No related tags found
No related merge requests found
......@@ -514,7 +514,7 @@ HPDF_Page_GetLocalFontName (HPDF_Page page,
/* search font-object from font-resource */
key = HPDF_Dict_GetKeyByObj (attr->fonts, font);
if (!key) {
/* if the font is not resisterd in font-resource, register font to
/* if the font is not registered in font-resource, register font to
* font-resource.
*/
char fontName[HPDF_LIMIT_MAX_NAME_LEN + 1];
......@@ -603,7 +603,7 @@ HPDF_Page_GetXObjectName (HPDF_Page page,
/* search xobject-object from xobject-resource */
key = HPDF_Dict_GetKeyByObj (attr->xobjects, xobj);
if (!key) {
/* if the xobject is not resisterd in xobject-resource, register
/* if the xobject is not registered in xobject-resource, register
* xobject to xobject-resource.
*/
char xobj_name[HPDF_LIMIT_MAX_NAME_LEN + 1];
......@@ -654,7 +654,7 @@ HPDF_Page_GetExtGStateName (HPDF_Page page,
/* search ext_gstate-object from ext_gstate-resource */
key = HPDF_Dict_GetKeyByObj (attr->ext_gstates, state);
if (!key) {
/* if the ext-gstate is not resisterd in ext-gstate resource, register
/* if the ext-gstate is not registered in ext-gstate resource, register
* to ext-gstate resource.
*/
char ext_gstate_name[HPDF_LIMIT_MAX_NAME_LEN + 1];
......@@ -704,7 +704,7 @@ HPDF_Page_GetShadingName (HPDF_Page page,
/* search shading-object from shading-resource */
key = HPDF_Dict_GetKeyByObj (attr->shadings, shading);
if (!key) {
/* if the shading is not resisterd in shadings resource, register
/* if the shading is not registered in shadings resource, register
* to shadings resource.
*/
char shading_str[HPDF_LIMIT_MAX_NAME_LEN + 1];
......
......@@ -37,19 +37,21 @@ static const char *COL_GRAY = "DeviceGray";
static HPDF_BOOL _GetDecodeArrayVertexValues(HPDF_Shading shading,
HPDF_REAL *bbox)
{
HPDF_Array decodeArray;
HPDF_Real r;
int i;
if (!shading) {
return HPDF_FALSE;
}
HPDF_Array decodeArray = (HPDF_Array)(HPDF_Dict_GetItem(shading, "Decode",
HPDF_OCLASS_ARRAY));
decodeArray = (HPDF_Array)(HPDF_Dict_GetItem(shading, "Decode",
HPDF_OCLASS_ARRAY));
if (!decodeArray) {
return HPDF_FALSE;
}
HPDF_Real r;
for (int i = 0; i < 4; ++i)
for (i = 0; i < 4; ++i)
{
r = HPDF_Array_GetItem(decodeArray, i, HPDF_OCLASS_REAL);
if (!r) {
......@@ -181,6 +183,7 @@ HPDF_Shading_AddVertexRGB(HPDF_Shading shading,
{
HPDF_STATUS ret = HPDF_OK;
RGBVertex vert;
float bbox[4];
HPDF_PTRACE((" HPDF_Shading_AddVertexRGB\n"));
......@@ -188,7 +191,6 @@ HPDF_Shading_AddVertexRGB(HPDF_Shading shading,
return HPDF_INVALID_OBJECT;
}
float bbox[4];
if (_GetDecodeArrayVertexValues(shading, bbox) != HPDF_TRUE) {
return HPDF_SetError(shading->error, HPDF_INVALID_OBJECT, 0);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment