diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2014-03-27 00:42:29 +0000 |
|---|---|---|
| committer | Jabiertxof <jtx@jtx.marker.es> | 2014-03-27 00:42:29 +0000 |
| commit | fefbd217fefe5e29d7913e58ff8b1bc9d8d44939 (patch) | |
| tree | 0fc16570bde5385eeb4933224cdfff67532bf4c4 /src/extension | |
| parent | Adding cout << output to check bug in Geom::are_near (diff) | |
| parent | Changed some return types from gint to bool. (diff) | |
| download | inkscape-fefbd217fefe5e29d7913e58ff8b1bc9d8d44939.tar.gz inkscape-fefbd217fefe5e29d7913e58ff8b1bc9d8d44939.zip | |
update to trunk
(bzr r11950.1.315)
Diffstat (limited to 'src/extension')
| -rw-r--r-- | src/extension/internal/emf-inout.cpp | 2 | ||||
| -rw-r--r-- | src/extension/internal/emf-print.cpp | 4 | ||||
| -rw-r--r-- | src/extension/internal/text_reassemble.c | 40 | ||||
| -rw-r--r-- | src/extension/internal/wmf-inout.cpp | 2 |
4 files changed, 35 insertions, 13 deletions
diff --git a/src/extension/internal/emf-inout.cpp b/src/extension/internal/emf-inout.cpp index a4d204472..eae3bfb5a 100644 --- a/src/extension/internal/emf-inout.cpp +++ b/src/extension/internal/emf-inout.cpp @@ -123,7 +123,7 @@ Emf::print_document_to_file(SPDocument *doc, const gchar *filename) throw Inkscape::Extension::Output::save_failed(); } mod->base->invoke_print(&context); - ret = mod->finish(); + (void) mod->finish(); /* Release arena */ mod->base->invoke_hide(mod->dkey); mod->base = NULL; diff --git a/src/extension/internal/emf-print.cpp b/src/extension/internal/emf-print.cpp index ed25bf767..f4f7f08cb 100644 --- a/src/extension/internal/emf-print.cpp +++ b/src/extension/internal/emf-print.cpp @@ -366,11 +366,13 @@ int PrintEmf::create_brush(SPStyle const *style, PU_COLORREF fcolor) if (!fcolor && style) { if (style->fill.isColor()) { fill_mode = DRAW_PAINT; +#if 0 +// opacity not supported by EMF float opacity = SP_SCALE24_TO_FLOAT(style->fill_opacity.value); if (opacity <= 0.0) { opacity = 0.0; // basically the same as no fill } - +#endif sp_color_get_rgb_floatv(&style->fill.value.color, rgb); hatchColor = U_RGB(255 * rgb[0], 255 * rgb[1], 255 * rgb[2]); diff --git a/src/extension/internal/text_reassemble.c b/src/extension/internal/text_reassemble.c index e28e5effb..810e3f8cc 100644 --- a/src/extension/internal/text_reassemble.c +++ b/src/extension/internal/text_reassemble.c @@ -67,8 +67,8 @@ Optional compiler switches for development: File: text_reassemble.c -Version: 0.0.12 -Date: 07-FEB-2014 +Version: 0.0.14 +Date: 25-MAR-2014 Author: David Mathog, Biology Division, Caltech email: mathog@caltech.edu Copyright: 2014 David Mathog and California Institute of Technology (Caltech) @@ -601,10 +601,13 @@ FT_INFO *ftinfo_init(void){ */ int ftinfo_make_insertable(FT_INFO *fti){ int status=0; + FNT_SPECS *tmp; if(!fti)return(2); if(fti->used >= fti->space){ fti->space += ALLOCINFO_CHUNK; - if((fti->fonts = (FNT_SPECS *) realloc(fti->fonts, fti->space * sizeof(FNT_SPECS) ))){ + tmp = (FNT_SPECS *) realloc(fti->fonts, fti->space * sizeof(FNT_SPECS) ); + if(tmp){ + fti->fonts = tmp; memset(&fti->fonts[fti->used],0,(fti->space - fti->used)*sizeof(FNT_SPECS)); } else { @@ -844,10 +847,13 @@ void ftinfo_dump(const FT_INFO *fti){ */ int fsp_alts_make_insertable(FNT_SPECS *fsp){ int status=0; + ALT_SPECS *tmp; if(!fsp)return(2); if(fsp->used >= fsp->space){ fsp->space += ALLOCINFO_CHUNK; - if((fsp->alts = (ALT_SPECS *) realloc(fsp->alts, fsp->space * sizeof(ALT_SPECS) ))){ + tmp = (ALT_SPECS *) realloc(fsp->alts, fsp->space * sizeof(ALT_SPECS) ); + if(tmp){ + fsp->alts = tmp; memset(&fsp->alts[fsp->used],0,(fsp->space - fsp->used)*sizeof(ALT_SPECS)); } else { @@ -912,10 +918,13 @@ int fsp_alts_weight(FNT_SPECS *fsp, uint32_t a_idx){ */ int csp_make_insertable(CHILD_SPECS *csp){ int status=0; + int *tmp; if(!csp)return(2); if(csp->used >= csp->space){ csp->space += ALLOCINFO_CHUNK; - if((csp->members = (int *) realloc(csp->members, csp->space * sizeof(int) ))){ + tmp = (int *) realloc(csp->members, csp->space * sizeof(int) ); + if(tmp){ + csp->members = tmp; memset(&csp->members[csp->used],0,(csp->space - csp->used)*sizeof(int)); } else { @@ -1007,9 +1016,12 @@ CX_INFO *cxinfo_init(void){ */ int cxinfo_make_insertable(CX_INFO *cxi){ int status=0; + CX_SPECS *tmp; if(cxi->used >= cxi->space){ cxi->space += ALLOCINFO_CHUNK; - if((cxi->cx = (CX_SPECS *) realloc(cxi->cx, cxi->space * sizeof(CX_SPECS) ))){ + tmp = (CX_SPECS *) realloc(cxi->cx, cxi->space * sizeof(CX_SPECS) ); + if(tmp){ + cxi->cx = tmp; memset(&cxi->cx[cxi->used],0,(cxi->space - cxi->used)*sizeof(CX_SPECS)); } else { @@ -1178,9 +1190,12 @@ TP_INFO *tpinfo_init(void){ */ int tpinfo_make_insertable(TP_INFO *tpi){ int status=0; + TCHUNK_SPECS *tmp; if(tpi->used >= tpi->space){ tpi->space += ALLOCINFO_CHUNK; - if((tpi->chunks = (TCHUNK_SPECS *) realloc(tpi->chunks, tpi->space * sizeof(TCHUNK_SPECS) ))){ + tmp = (TCHUNK_SPECS *) realloc(tpi->chunks, tpi->space * sizeof(TCHUNK_SPECS) ); + if(tmp){ + tpi->chunks = tmp; memset(&tpi->chunks[tpi->used],0,(tpi->space - tpi->used)*sizeof(TCHUNK_SPECS)); } else { @@ -1251,10 +1266,13 @@ BR_INFO *brinfo_init(void){ */ int brinfo_make_insertable(BR_INFO *bri){ int status=0; + BRECT_SPECS *tmp; if(!bri)return(2); if(bri->used >= bri->space){ bri->space += ALLOCINFO_CHUNK; - if(!(bri->rects = (BRECT_SPECS *) realloc(bri->rects, bri->space * sizeof(BRECT_SPECS) ))){ status = 1; } + tmp = (BRECT_SPECS *) realloc(bri->rects, bri->space * sizeof(BRECT_SPECS) ); + if(tmp){ bri->rects = tmp; } + else { status = 1;} } return(status); } @@ -1680,11 +1698,14 @@ int trinfo_load_ft_opts(TR_INFO *tri, int use_kern, int load_flags, int kern_mod */ int trinfo_append_out(TR_INFO *tri, const char *src){ size_t slen; + uint8_t *tmp; if(!src)return(-1); slen = strlen(src); if(tri->outused + (int) slen + 1 >= tri->outspace){ tri->outspace += TEREMAX(ALLOCOUT_CHUNK,slen+1); - if(!(tri->out = realloc(tri->out, tri->outspace )))return(-1); + tmp = realloc(tri->out, tri->outspace * sizeof(uint8_t) ); + if(tmp){ tri->out = tmp; } + else { return(-1); } } memcpy(tri->out + tri->outused, src, slen+1); /* copy the terminator */ tri->outused += slen; /* do not count the terminator in the length */ @@ -2055,7 +2076,6 @@ void TR_layout_2_svg(TR_INFO *tri){ } - tsp = tpi->chunks; /* over all complex members from phase2. Paragraphs == TR_PARA_* */ for(i=cxi->phase1; i<cxi->used;i++){ csp = &(cxi->cx[i]); diff --git a/src/extension/internal/wmf-inout.cpp b/src/extension/internal/wmf-inout.cpp index 9980d9d6d..ef95dbe45 100644 --- a/src/extension/internal/wmf-inout.cpp +++ b/src/extension/internal/wmf-inout.cpp @@ -1527,7 +1527,7 @@ int Wmf::myMetaFileProc(const char *contents, unsigned int length, PWMF_CALLBACK iType = *(uint8_t *)(contents + off + offsetof(U_METARECORD, iType ) ); if(iType == U_WMR_SETWINDOWEXT){ OK=0; - nSize = U_WMRSETWINDOWEXT_get(contents + off, &Dst); + (void) U_WMRSETWINDOWEXT_get(contents + off, &Dst); Placeable.Dst.right = Dst.x; Placeable.Dst.bottom = Dst.y; } |
