Projects
home:pandora:RobinOS23
texlive-base
_service:download_src_package:texlive-20210325-...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:download_src_package:texlive-20210325-poppler-22.04.patch of Package texlive-base
From dd073d080af0ca1f14bd4f1352dbbf7a84967f63 Mon Sep 17 00:00:00 2001 From: Chunmei Xu <xuchunmei@linux.alibaba.com> Date: Tue, 26 Apr 2022 20:03:47 +0800 Subject: [PATCH] texlive 20210324 poppler 22.04 refer to https://github.com/OpenMandrivaAssociation/texlive/blob/master/texlive-20210324-poppler-22.03.patch https://github.com/OpenMandrivaAssociation/texlive/blob/master/texlive-20210324-poppler-22.04.patch Signed-off-by: Chunmei Xu <xuchunmei@linux.alibaba.com> --- source/configure | 2 +- source/libs/xpdf/ac/xpdf.ac | 2 +- source/texk/web2c/pdftexdir/pdftoepdf.cc | 14 ++++++-------- source/texk/web2c/pdftexdir/pdftosrc.cc | 8 +++----- 4 files changed, 11 insertions(+), 15 deletions(-) diff --git a/source/configure b/source/configure index 46f55db8..949f8d48 100755 --- a/source/configure +++ b/source/configure @@ -22090,7 +22090,7 @@ $as_echo_n "checking requested system \`xpdf' library... " >&6; } int main () { -GfxFont *gfxFont; gfxFont->decRefCnt(); +GfxFont *gfxFont; gfxFont->isOk(); ; return 0; } diff --git a/source/libs/xpdf/ac/xpdf.ac b/source/libs/xpdf/ac/xpdf.ac index 737a0b3f..31d60e32 100644 --- a/source/libs/xpdf/ac/xpdf.ac +++ b/source/libs/xpdf/ac/xpdf.ac @@ -9,4 +9,4 @@ dnl ## TL sources) KPSE_TRY_LIBXX([xpdf], [#include <GfxFont.h>], - [GfxFont *gfxFont; gfxFont->decRefCnt();]) + [GfxFont *gfxFont; gfxFont->isOk();]) diff --git a/source/texk/web2c/pdftexdir/pdftoepdf.cc b/source/texk/web2c/pdftexdir/pdftoepdf.cc index c1ee0907..717773f1 100644 --- a/source/texk/web2c/pdftexdir/pdftoepdf.cc +++ b/source/texk/web2c/pdftexdir/pdftoepdf.cc @@ -123,7 +123,7 @@ struct InObj { struct UsedEncoding { int enc_objnum; - GfxFont *font; + std::unique_ptr<GfxFont> font; UsedEncoding *next; }; @@ -168,7 +168,7 @@ static PdfDocument *find_add_document(char *file_name) p->xref = xref = 0; p->occurences = 0; GString *docName = new GString(p->file_name); - p->doc = new PDFDoc(docName); // takes ownership of docName + p->doc = new PDFDoc(std::make_unique<GString>(p->file_name)); if (!p->doc->isOk() || !p->doc->okToPrint()) { pdftex_fail("xpdf: reading PDF image failed"); } @@ -204,13 +204,13 @@ static void delete_document(PdfDocument * pdf_doc) // -------------------------------------------------------------------- -static int addEncoding(GfxFont * gfont) +static int addEncoding(std::unique_ptr<GfxFont> &gfont) { UsedEncoding *n; n = new UsedEncoding; n->next = encodingList; encodingList = n; - n->font = gfont; + n->font = std::move(gfont); n->enc_objnum = pdfnewobjnum(); return n->enc_objnum; } @@ -395,7 +395,6 @@ static void copyFont(const char *tag, Object * fontRef) { Object fontdict, subtype, basefont, fontdescRef, fontdesc, charset, stemV; - GfxFont *gfont; fd_entry *fd; fm_entry *fontmap; // Check whether the font has already been embedded before analysing it. @@ -441,7 +440,7 @@ static void copyFont(const char *tag, Object * fontRef) embed_whole_font(fd); addFontDesc(fontdescRef.getRef(), fd); copyName(tag); - gfont = GfxFont::makeFont(xref, tag, fontRef->getRef(), + auto gfont = GfxFont::makeFont(xref, tag, fontRef->getRef(), fontdict.getDict()); pdf_printf(" %d 0 R ", addFont(fontRef->getRef(), fd, addEncoding(gfont))); @@ -673,7 +672,7 @@ static void writeEncodings() ("PDF inclusion: CID fonts are not supported" " (try to disable font replacement to fix this)"); } - if ((s = (char *) ((Gfx8BitFont *) r->font)->getCharName(i)) != 0) + if ((s = (char *)(reinterpret_cast<Gfx8BitFont*>(r->font.get()))->getCharName(i)) != 0) glyphNames[i] = s; else glyphNames[i] = notdef; @@ -682,7 +681,6 @@ static void writeEncodings() } for (r = encodingList; r != 0; r = n) { n = r->next; - r->font->decRefCnt(); delete r; } } diff --git a/source/texk/web2c/pdftexdir/pdftosrc.cc b/source/texk/web2c/pdftexdir/pdftosrc.cc index 1c703b3b..cfc4edb5 100644 --- a/source/texk/web2c/pdftexdir/pdftosrc.cc +++ b/source/texk/web2c/pdftexdir/pdftosrc.cc @@ -72,7 +72,6 @@ int main(int argc, char *argv[]) { char *p, buf[1024]; PDFDoc *doc; - GString *fileName; Stream *s; Object srcStream, srcName, catalogDict; FILE *outfile; @@ -86,9 +85,8 @@ int main(int argc, char *argv[]) "Usage: pdftosrc <PDF-file> [<stream-object-number>]\n"); exit(1); } - fileName = new GString(argv[1]); globalParams = std::unique_ptr<GlobalParams>(new GlobalParams()); - doc = new PDFDoc(fileName); + doc = new PDFDoc(std::make_unique<GString>(argv[1])); if (!doc->isOk()) { fprintf(stderr, "Invalid PDF file\n"); exit(1); @@ -126,7 +124,7 @@ int main(int argc, char *argv[]) fprintf(stderr, "Not a Stream object\n"); exit(1); } - sprintf(buf, "%s", fileName->c_str()); + sprintf(buf, "%s", argv[1]); if ((p = strrchr(buf, '.')) == 0) p = strchr(buf, 0); if (objgen == 0) @@ -136,7 +134,7 @@ int main(int argc, char *argv[]) outname = buf; } else { // objnum < 0 means we are extracting the XRef table extract_xref_table = true; - sprintf(buf, "%s", fileName->c_str()); + sprintf(buf, "%s", argv[1]); if ((p = strrchr(buf, '.')) == 0) p = strchr(buf, 0); sprintf(p, ".xref"); -- 2.34.1
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2