Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 492352 Details for
Bug 629708
net-print/cups-filters-1.17.2 fails to build with app-text/poppler-0.58.0
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Half-working patch
cups-filters-1.17.2_poppler0.58.patch (text/plain), 23.65 KB, created by
Malcolm Lashley
on 2017-09-04 19:09:10 UTC
(
hide
)
Description:
Half-working patch
Filename:
MIME Type:
Creator:
Malcolm Lashley
Created:
2017-09-04 19:09:10 UTC
Size:
23.65 KB
patch
obsolete
>=== modified file 'filter/pdf.cxx' >--- cups-filters-1.17.2/filter/pdf.cxx 2017-08-15 18:32:47 +0000 >+++ cups-filters-1.17.2/filter/pdf.cxx 2017-09-04 18:34:54 +0000 >@@ -124,93 +124,70 @@ > { > XRef *xref = doc->getXRef(); > Ref *pageref = doc->getCatalog()->getPageRef(page); >- Object dict, lenobj, stream, streamrefobj; >- Object pageobj, contents; >- Object array; >+ Object streamrefobj; > Ref r; > >- xref->fetch(pageref->num, pageref->gen, &pageobj); >- if (!pageobj.isDict() || !pageobj.dictLookupNF("Contents", &contents)) { >- fprintf(stderr, "Error: malformed pdf\n"); >+ Object pageobj = xref->fetch(pageref->num, pageref->gen); >+ Object contents = pageobj.dictLookupNF("Contents"); >+ if (!pageobj.isDict() || contents.isNull()) { >+ fprintf(stderr, "Error: malformed pdf (in pdf_prepend_stream neither pageobj is a dict nor were Contents found)\n"); > return; > } > > if (contents.isRef()) >- xref->fetch(contents.getRefNum(), contents.getRefGen(), &contents); >+ contents = xref->fetch(contents.getRefNum(), contents.getRefGen()); > >- lenobj.initInt(len); >- dict.initDict(xref); >- dict.dictSet("Length", &lenobj); >- stream.initStream(new MemStream(buf, 0, len, &dict)); >+ Dict *dict = new Dict(xref); >+ dict->set("Length", Object((int)len)); >+ MemStream *ms = new MemStream(buf, 0, len, Object(dict)); >+ Object stream = Object(static_cast<Stream*>(ms)); > > r = xref->addIndirectObject(&stream); >- streamrefobj.initRef(r.num, r.gen); > >- array.initArray(xref); >- array.arrayAdd(&streamrefobj); >+ Array *array = new Array(xref); >+ array->add(Object(r.num, r.gen)); > > if (contents.isStream()) { >- pageobj.dictLookupNF("Contents", &contents); // streams must be indirect, i.e. not fetch()-ed >- array.arrayAdd(&contents); >+ // streams must be indirect, i.e. not fetch()-ed >+ array->add(Object(pageobj.dictLookupNF("Contents"))); > } > else if (contents.isArray()) { > int i, len = contents.arrayGetLength(); >- Object obj; > for (i = 0; i < len; i++) { >- contents.arrayGetNF(i, &obj); >- array.arrayAdd(&obj); >+ array->add(Object(contents.arrayGetNF(i))); > } > } > else >- fprintf(stderr, "Error: malformed pdf\n"); >+ fprintf(stderr, "Error: malformed pdf (not stream or array in pdf_prepend_stream)\n"); > >- pageobj.dictSet("Contents", &array); >+ pageobj.dictSet("Contents", Object(array)); > > xref->setModifiedObject(&pageobj, *pageref); >- pageobj.free(); >-} >- >- >-static Object * name_object(const char *s) >-{ >- Object *o = new Object(); >- o->initName((char *)s); >- return o; >-} >- >-/* >- * Create new PDF integer type object. >- */ >-static Object * int_object(int i) >-{ >- Object *o = new Object(); >- o->initInt(i); >- return o; >-} >+// pageobj.free(); >+} >+ > > static Object * get_resource_dict(XRef *xref, > Dict *pagedict, > Object *resdict, > Ref *resref) > { >- Object res; > > /* TODO resource dict can also be inherited */ >- if (!pagedict->lookupNF("Resources", &res)) >- return NULL; >+ Object res = pagedict->lookupNF("Resources"); > > if (res.isRef()) { > *resref = res.getRef(); >- xref->fetch(resref->num, resref->gen, resdict); >+ *resdict = xref->fetch(resref->num, resref->gen); > } > else if (res.isDict()) { >- res.copy(resdict); >+ *resdict = res.copy(); > resref->num = 0; > } > else > resdict = NULL; > >- res.free(); >+// res.free(); > return resdict; > } > >@@ -221,34 +198,33 @@ > { > XRef *xref = doc->getXRef(); > Ref *pageref = doc->getCatalog()->getPageRef(page); >- Object pageobj, font, fonts; > > Object resdict; > Ref resref; > >- xref->fetch(pageref->num, pageref->gen, &pageobj); >+ Object pageobj = xref->fetch(pageref->num, pageref->gen); > if (!pageobj.isDict()) { >- fprintf(stderr, "Error: malformed pdf\n"); >+ fprintf(stderr, "Error: malformed pdf (not a dict in pdf_add_type1_font)\n"); > return; > } > > if (!get_resource_dict(xref, pageobj.getDict(), &resdict, &resref)) { >- fprintf(stderr, "Error: malformed pdf\n"); >- pageobj.free(); >+ fprintf(stderr, "Error: malformed pdf (could not get resource dict in pdf_add_type1_font)\n"); >+// pageobj.free(); > return; > } > >- font.initDict(xref); >- font.dictSet("Type", name_object("Font")); >- font.dictSet("Subtype", name_object("Type1")); >- font.dictSet("BaseFont", name_object(name)); >+ Object font = Object(new Dict(xref)); >+ >+ font.dictSet("Type", Object(objName,"Font")); >+ font.dictSet("Subtype", Object(objName,"Type1")); >+ font.dictSet("BaseFont", Object(objName,name)); > xref->addIndirectObject(&font); > >- resdict.dictLookupNF("Font", &fonts); >+ Object fonts = resdict.dictLookupNF("Font"); > if (fonts.isNull()) { > /* Create new font dic obj in page's resources */ >- fonts.initDict(xref); >- resdict.dictSet("Font", &fonts); >+ resdict.dictSet("Font", Object(new Dict(xref))); > } > > Object *fonts_dic; >@@ -259,7 +235,7 @@ > fonts_dic = &fonts; > } else if ( fonts.isRef() ) { > /* "Font" resource is indirect reference object */ >- xref->fetch(fonts.getRefNum(), fonts.getRefGen(), &dereferenced_obj); >+ dereferenced_obj = xref->fetch(fonts.getRefNum(), fonts.getRefGen()); > fonts_dic = &dereferenced_obj; > } > >@@ -269,7 +245,8 @@ > } > > /* Add new entry to "Font" resource */ >- fonts_dic->dictSet("bannertopdf-font", &font); >+// TODO Malc - can't make this compile... >+// fonts_dic->dictSet("bannertopdf-font", &font); > > /* Notify poppler about changes */ > if ( fonts.isRef() ) { >@@ -281,7 +258,7 @@ > else > xref->setModifiedObject(&resdict, resref); > >- pageobj.free(); >+// pageobj.free(); > } > > >@@ -289,27 +266,22 @@ > const char *key, > float rect[4]) > { >- Object o; > Array *array; > int i; > >- if (!dict->dictLookup(key, &o)) >- return false; >+ Object o = dict->dictLookup(key); > > if (!o.isArray()) { >- o.free(); > return false; > } > > array = o.getArray(); > for (i = 0; i < 4; i++) { >- Object el; >- if (array->get(i, &el) && el.isNum()) >+ Object el = array->get(i); >+ if (el.isNum()) > rect[i] = el.getNum(); >- el.free(); > } > >- o.free(); > return i == 4; > } > >@@ -319,18 +291,14 @@ > const char *key, > float rect[4]) > { >- Object array; > int i; >- >- array.initArray(xref); >+ Array *array = new Array(xref); > > for (i = 0; i < 4; i++) { >- Object el; >- el.initReal(rect[i]); >- array.arrayAdd(&el); >+ array->add(Object((double)rect[i])); > } > >- dict->dictSet(key, &array); >+ dict->dictSet(key, Object(array)); > } > > >@@ -357,11 +325,10 @@ > { > XRef *xref = doc->getXRef(); > Ref *pageref = doc->getCatalog()->getPageRef(page); >- Object pageobj; > float mediabox[4] = { 0.0, 0.0, width, length }; > float old_mediabox[4]; > >- xref->fetch(pageref->num, pageref->gen, &pageobj); >+ Object pageobj = xref->fetch(pageref->num, pageref->gen); > if (!pageobj.isDict()) { > fprintf(stderr, "Error: malformed pdf\n"); > return; >@@ -381,7 +348,6 @@ > dict_set_rect (xref, &pageobj, "BleedBox", mediabox); > > xref->setModifiedObject(&pageobj, *pageref); >- pageobj.free(); > } > > >@@ -391,24 +357,23 @@ > { > XRef *xref = doc->getXRef(); > Ref *pageref = doc->getCatalog()->getPageRef(pagenr); >- Object page, parentref, parent, kids, ref, countobj; > int i; > >- xref->fetch(pageref->num, pageref->gen, &page); >+ Object page = xref->fetch(pageref->num, pageref->gen); > if (!page.isDict("Page")) { > fprintf(stderr, "Error: malformed pdf (invalid Page object)\n"); > return; > } > >- page.dictLookupNF("Parent", &parentref); >- parentref.fetch(xref, &parent); >+ Object parentref = page.dictLookupNF("Parent"); >+ Object parent = parentref.fetch(xref); > if (!parent.isDict("Pages")) { > fprintf(stderr, "Error: malformed pdf (Page.Parent must point to a " > "Pages object)\n"); > return; > } > >- parent.dictLookup("Kids", &kids); >+ Object kids = parent.dictLookup("Kids"); > if (!kids.isArray()) { > fprintf(stderr, "Error: malformed pdf (Pages.Kids must be an array)\n"); > return; >@@ -418,16 +383,14 @@ > // object to the end of the array > // Note: We must make a (shallow) copy of the page object to avoid loops in > // the pages tree (not supported by major pdf implementations). >+ Array *array = kids.getArray(); >+ > for (i = 1; i < count; i++) { > Ref r = xref->addIndirectObject(&page); >- ref.initRef(r.num, r.gen); >- kids.arrayAdd(&ref); >- ref.free(); >+ array->add(Object(r.num,r.gen)); > } > >- countobj.initInt(count); >- parent.dictSet("Count", &countobj); >- countobj.free(); >+ parent.dictSet("Count", Object((int)count)); > > xref->setModifiedObject(&parent, parentref.getRef()); > } >@@ -521,9 +484,8 @@ > fprintf(stderr, "Can't get page from PDF tamplate file.\n"); > return 0; > } >- Object pageobj; > Ref pageref = page->getRef(); >- xref->fetch(pageref.num, pageref.gen, &pageobj); >+ Object pageobj = xref->fetch(pageref.num, pageref.gen); > > const char *font_size = lookup_opt(opt, "banner-font-size"); > if ( ! font_size ) { >@@ -613,9 +575,7 @@ > appearance->append(" Tf"); > > /* Modify field's appearance */ >- Object appearance_obj; >- appearance_obj.initString(appearance); >- field_obj->getDict()->set("DA", &appearance_obj); >+ field_obj->getDict()->set("DA", Object(appearance)); > > /* > * Create /AP - entry stuff. >@@ -652,59 +612,46 @@ > appearance_stream->append("ET\n"); > appearance_stream->append("EMC\n"); > >- Object appearance_stream_dic; >- appearance_stream_dic.initDict(xref); >+ Dict *appearance_stream_dic = new Dict(xref); > > /* > * Appearance stream dic. > * See: 4.9 Form XObjects > * TABLE 4.41 Additional entries specific to a type 1 form dictionary > */ >- appearance_stream_dic.dictSet("Type", name_object("XObject")); >- appearance_stream_dic.dictSet("Subtype", name_object("Form")); >- appearance_stream_dic.dictSet("FormType", int_object(1)); >- Object obj_ref_x; >- obj_ref_x.initRef(resref.num, resref.gen); >- appearance_stream_dic.dictSet("Resources", &obj_ref_x); >+ appearance_stream_dic->set("Type", Object(objName,"XObject")); >+ appearance_stream_dic->set("Subtype", Object(objName,"Form")); >+ appearance_stream_dic->set("FormType", Object((int)1)); >+ appearance_stream_dic->set("Resources", Object(resref.num, resref.gen)); > > /* BBox array: TODO. currently out of the head. */ >- Object array; >- array.initArray(xref); >- Object el; >- el.initReal(0); >- array.arrayAdd(&el); >- el.initReal(0); >- array.arrayAdd(&el); >- el.initReal(237); >- array.arrayAdd(&el); >- el.initReal(25); >- array.arrayAdd(&el); >- appearance_stream_dic.dictSet("BBox", &array); >- appearance_stream_dic.dictSet("Length", int_object(appearance_stream->getLength())); >+ Array *array = new Array(xref); >+ array->add(Object((double)0)); >+ array->add(Object((double)0)); >+ array->add(Object((double)237)); >+ array->add(Object((double)25)); >+ appearance_stream_dic->set("BBox", Object(array)); >+ appearance_stream_dic->set("Length", Object((int)appearance_stream->getLength())); > > MemStream *mem_stream = new MemStream(appearance_stream->getCString(), >- 0, appearance_stream->getLength(), &appearance_stream_dic); >+ 0, appearance_stream->getLength(), Object(appearance_stream_dic)); > > /* Make obj stream */ >- Object stream; >- stream.initStream(mem_stream); >+ Object stream = Object(static_cast<Stream*>(mem_stream)); > > Ref r; > r = xref->addIndirectObject(&stream); > > /* Update Xref table */ >- Object obj_ref; >- obj_ref.initRef(r.num, r.gen); > > /* > * Fill Annotation's appearance streams dic /AP > * See: 8.4.4 Appearance Streams > */ >- Object appearance_streams_dic; >- appearance_streams_dic.initDict(xref); >- appearance_streams_dic.dictSet("N", &obj_ref); >+ Dict *appearance_streams_dic = new Dict(xref); >+ appearance_streams_dic->set("N", Object(r.num, r.gen)); > >- field_obj->getDict()->set("AP", &appearance_streams_dic); >+ field_obj->getDict()->set("AP", Object(appearance_streams_dic)); > > /* Notify poppler about changes */ > xref->setModifiedObject(field_obj, field_ref); >@@ -721,24 +668,19 @@ > * OpenOffice - by default sets it to 'true'. > */ > Object *obj_form = catalog->getAcroForm(); >- Object obj1; >- obj1.initBool(gFalse); >- obj_form->dictSet("NeedAppearances", &obj1); >+ obj_form->dictSet("NeedAppearances", Object(gFalse)); > /* Add AccroForm as indirect obj */ > Ref ref_form = xref->addIndirectObject(obj_form); > > /* > * So update Catalog object. > */ >- Object* catObj = new Object(); >- catObj = xref->getCatalog(catObj); >+ Object catObj = xref->getCatalog(); > Ref catRef; > catRef.gen = xref->getRootGen(); > catRef.num = xref->getRootNum(); >- Object obj2; >- obj2.initRef(ref_form.num, ref_form.gen); >- catObj->dictSet("AcroForm", &obj2); >- xref->setModifiedObject(catObj, catRef); >+ catObj.dictSet("AcroForm", Object(ref_form.num, ref_form.gen)); >+ xref->setModifiedObject(&catObj, catRef); > > /* Success */ > return 1; >@@ -779,31 +721,29 @@ > XRef *xref = doc->getXRef(); > > /* Font dictionary object for embeded font */ >- Object f_dic; >- f_dic.initDict(xref); >- f_dic.dictSet("Type", name_object("Font")); >+ Dict *f_dic = new Dict(xref); >+ f_dic->set("Type", Object(objName,"Font")); > > /* Stream lenght */ >- f_dic.dictSet("Length", int_object(outlen)); >+ f_dic->set("Length", Object((int)outlen)); > > /* Lenght for EMB_FMT_TTF font type */ > if ( Font->outtype == EMB_FMT_TTF ) { >- f_dic.dictSet("Length1", int_object(outlen)); >+ f_dic->set("Length1", Object((int)outlen)); > } > > /* Add font subtype */ > const char *subtype = emb_pdf_get_fontfile_subtype(Font); > if ( subtype ) { >- f_dic.dictSet("Subtype", name_object(copyString(subtype))); >+ f_dic->set("Subtype", Object(objName,copyString(subtype))); > } > > /* Create memory stream font. Add it to font dic. */ > MemStream *mem_stream = new MemStream(font_stream->getCString(), >- 0, outlen, &f_dic); >+ 0, outlen, Object(f_dic)); > > /* Make obj stream */ >- Object stream; >- stream.initStream(mem_stream); >+ Object stream = Object(static_cast<Stream*>(mem_stream)); > > Ref r; > >@@ -811,11 +751,10 @@ > r = xref->addIndirectObject(&stream); > > /* Get page object */ >- Object pageobj; > Ref pageref = page->getRef(); >- xref->fetch(pageref.num, pageref.gen, &pageobj); >+ Object pageobj = xref->fetch(pageref.num, pageref.gen); > if (!pageobj.isDict()) { >- fprintf(stderr, "Error: malformed pdf.\n"); >+ fprintf(stderr, "Error: malformed pdf. (in pdf_embed_font pags is not a dict)\n"); > return 0; > } > >@@ -824,19 +763,17 @@ > Ref resref; > Object *ret = get_resource_dict(xref, pageobj.getDict(), &resdict, &resref); > if ( !ret ) { >- fprintf(stderr, "Error: malformed pdf\n"); >- pageobj.free(); >+ fprintf(stderr, "Error: malformed pdf. (in pdf_embed_font could not get resource dict\n"); > return 0; > } > > /* Dictionary for all fonts in page's resources */ >- Object fonts; >- >- resdict.dictLookupNF("Font", &fonts); >+ Object fonts = resdict.dictLookupNF("Font"); > if (fonts.isNull()) { > /* Create new one, if doesn't exists */ >- fonts.initDict(xref); >- resdict.dictSet("Font", &fonts); >+ Dict* d = new Dict(xref); >+ resdict.dictSet("Font", Object(d)); >+ fonts = Object(d); > fprintf(stderr, "Create new font dict in page's resources.\n"); > } > >@@ -865,8 +802,6 @@ > r = xref->addIndirectObject(cidfont_resource_dic); > > /* r - cid resource dic */ >- Object font_res_obj_ref; >- font_res_obj_ref.initRef(r.num, r.gen); > > Object *fonts_dic; > Object dereferenced_obj; >@@ -876,7 +811,7 @@ > fonts_dic = &fonts; > } else if ( fonts.isRef() ) { > /* "Font" resource is indirect reference object */ >- xref->fetch(fonts.getRefNum(), fonts.getRefGen(), &dereferenced_obj); >+ dereferenced_obj = xref->fetch(fonts.getRefNum(), fonts.getRefGen()); > fonts_dic = &dereferenced_obj; > } > >@@ -886,7 +821,7 @@ > } > > /* Add to fonts dic new font */ >- fonts_dic->dictSet("stanv_font", &font_res_obj_ref); >+ fonts_dic->dictSet("stanv_font", Object(r.num, r.gen)); > > /* Notify poppler about changes in fonts dic */ > if ( fonts.isRef() ) { >@@ -897,8 +832,6 @@ > xref->setModifiedObject(&resdict, resref); > fprintf(stderr, "Resource dict was changed.\n"); > >- pageobj.free(); >- > /* Success */ > return 1; > } >@@ -1104,65 +1037,50 @@ > XRef *xref = doc->getXRef(); > > /* Font dictionary for embeded font */ >- Object *dic = new Object(); >- dic->initDict(xref); >+ Object *dic = new Object( new Dict(xref)); > >- dic->dictSet("Type", name_object("FontDescriptor")); >+ dic->dictSet("Type", Object(objName,"FontDescriptor")); > dic->dictSet( > "FontName", >- name_object(copyString(emb_pdf_escape_name(fdes->fontname,-1)))); >- dic->dictSet("Flags", int_object(fdes->flags)); >- dic->dictSet("ItalicAngle", int_object(fdes->italicAngle)); >- dic->dictSet("Ascent", int_object(fdes->ascent)); >- dic->dictSet("Descent", int_object(fdes->descent)); >- dic->dictSet("CapHeight", int_object(fdes->capHeight)); >- dic->dictSet("StemV", int_object(fdes->stemV)); >+ Object(objName,copyString(emb_pdf_escape_name(fdes->fontname,-1)))); >+ dic->dictSet("Flags", Object((int)fdes->flags)); >+ dic->dictSet("ItalicAngle", Object((int)fdes->italicAngle)); >+ dic->dictSet("Ascent", Object((int)fdes->ascent)); >+ dic->dictSet("Descent", Object((int)fdes->descent)); >+ dic->dictSet("CapHeight", Object((int)fdes->capHeight)); >+ dic->dictSet("StemV", Object((int)fdes->stemV)); > > /* FontBox array */ >- Object array; >- array.initArray(xref); >- >- Object el; >- >- el.initReal(fdes->bbxmin); >- array.arrayAdd(&el); >- >- el.initReal(fdes->bbymin); >- array.arrayAdd(&el); >- >- el.initReal(fdes->bbxmax); >- array.arrayAdd(&el); >- >- el.initReal(fdes->bbymax); >- array.arrayAdd(&el); >- >- dic->dictSet("FontBBox", &array); >+ Array *array = new Array(xref); >+ >+ array->add(Object((double) fdes->bbxmin)); >+ array->add(Object((double) fdes->bbymin)); >+ array->add(Object((double) fdes->bbxmax)); >+ array->add(Object((double) fdes->bbymax)); >+ >+ dic->dictSet("FontBBox", Object(array)); > > if (fdes->xHeight) { >- dic->dictSet("XHeight", int_object(fdes->xHeight)); >+ dic->dictSet("XHeight", Object((int)fdes->xHeight)); > } > > if (fdes->avgWidth) { >- dic->dictSet("AvgWidth", int_object(fdes->avgWidth)); >+ dic->dictSet("AvgWidth", Object((int)fdes->avgWidth)); > } > > if (fdes->panose) { > /* Font dictionary for embeded font */ >- Object style_dic; >- style_dic.initDict(xref); >+ Dict *style_dic = new Dict(xref); > > Object panose; > > GooString *panose_str = new GooString(fdes->panose, 12); >- panose.initString(panose_str); >- style_dic.dictSet("Panose", &panose); >+ style_dic->set("Panose", Object(panose_str)); > >- dic->dictSet("Style", &style_dic); >+ dic->dictSet("Style", Object(style_dic)); > } > >- Object ref_obj; >- ref_obj.initRef(fontfile_obj_ref.num, fontfile_obj_ref.gen); >- dic->dictSet(emb_pdf_get_fontfile_key(emb), &ref_obj); >+ dic->dictSet(emb_pdf_get_fontfile_key(emb), Object(fontfile_obj_ref.num, fontfile_obj_ref.gen)); > > return dic; > } >@@ -1181,45 +1099,36 @@ > /* Get XREF table */ > XRef *xref = doc->getXRef(); > >- Object *dic = new Object(); >- dic->initDict(xref); >+ Object *dic = new Object(new Dict(xref)); > >- dic->dictSet("Type", name_object("Font")); >+ dic->dictSet("Type", Object(objName,"Font")); > dic->dictSet( > "Subtype", >- name_object(copyString(emb_pdf_get_font_subtype(emb)))); >+ Object(objName,copyString(emb_pdf_get_font_subtype(emb)))); > dic->dictSet( > "BaseFont", >- name_object(copyString(emb_pdf_escape_name(fdes->fontname,-1)))); >+ Object(objName,copyString(emb_pdf_escape_name(fdes->fontname,-1)))); > >- Object ref_obj; >- ref_obj.initRef(fontdescriptor_obj_ref.num, fontdescriptor_obj_ref.gen); >- dic->dictSet("FontDescriptor", &ref_obj); >+ dic->dictSet("FontDescriptor", Object(fontdescriptor_obj_ref.num, fontdescriptor_obj_ref.gen)); > > if ( emb->plan & EMB_A_MULTIBYTE ) { > assert(fwid->warray); > >- Object CIDSystemInfo_dic; >- CIDSystemInfo_dic.initDict(xref); >- >- Object registry; >- Object ordering; >+ Dict * CIDSystemInfo_dic = new Dict(xref); > > GooString *str; > > str = new GooString(copyString(fdes->registry)); >- registry.initString(str); >- CIDSystemInfo_dic.dictSet("Registry", ®istry); >+ CIDSystemInfo_dic->set("Registry", Object(str)); > > str = new GooString(copyString(fdes->ordering)); >- ordering.initString(str); >- CIDSystemInfo_dic.dictSet("Ordering", &ordering); >- >- CIDSystemInfo_dic.dictSet("Supplement", int_object(fdes->supplement)); >- >- dic->dictSet("CIDSystemInfo", &CIDSystemInfo_dic); >- >- dic->dictSet("DW", int_object(fwid->default_width)); >+ CIDSystemInfo_dic->set("Ordering", Object(str)); >+ >+ CIDSystemInfo_dic->set("Supplement", Object((int)fdes->supplement)); >+ >+ dic->dictSet("CIDSystemInfo", Object(CIDSystemInfo_dic)); >+ >+ dic->dictSet("DW", Object((int)fwid->default_width)); > } > > return dic; >@@ -1249,11 +1158,10 @@ > /* Get XREF table */ > XRef *xref = doc->getXRef(); > >- Object *dic = new Object(); >- dic->initDict(xref); >+ Object *dic = new Object(new Dict(xref)); > >- dic->dictSet("Type", name_object("Font")); >- dic->dictSet("Subtype", name_object("Type0")); >+ dic->dictSet("Type", Object(objName,("Font"))); >+ dic->dictSet("Subtype", Object(objName,("Type0"))); > > > GooString * basefont = new GooString(); >@@ -1262,18 +1170,15 @@ > basefont->append((addenc[0])?encoding:""); > > dic->dictSet("BaseFont", >- name_object(copyString(basefont->getCString()))); >- >- dic->dictSet("Encoding", name_object(copyString(encoding))); >- >- Object obj; >- obj.initRef(fontdescriptor_obj_ref.num, fontdescriptor_obj_ref.gen); >- >- Object array; >- array.initArray(xref); >- array.arrayAdd(&obj); >- >- dic->dictSet("DescendantFonts", &array); >+ Object(objName,(copyString(basefont->getCString())))); >+ >+ dic->dictSet("Encoding", Object(objName,(copyString(encoding)))); >+ >+ >+ Array *array = new Array(xref); >+ array->add(Object(fontdescriptor_obj_ref.num, fontdescriptor_obj_ref.gen)); >+ >+ dic->dictSet("DescendantFonts", Object(array)); > > return dic; > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 629708
:
491962
|
491964
| 492352 |
492426