aboutsummaryrefslogtreecommitdiffstats
path: root/community/libreoffice/poppler-22.04.patch
diff options
context:
space:
mode:
Diffstat (limited to 'community/libreoffice/poppler-22.04.patch')
-rw-r--r--community/libreoffice/poppler-22.04.patch71
1 files changed, 0 insertions, 71 deletions
diff --git a/community/libreoffice/poppler-22.04.patch b/community/libreoffice/poppler-22.04.patch
deleted file mode 100644
index 6eb2f4c3c76..00000000000
--- a/community/libreoffice/poppler-22.04.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-Patch-Source: https://cgit.freebsd.org/ports/commit/?id=d9b5ef800dbd
-
---- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx.orig 2022-04-26 16:11:01 UTC
-+++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
-@@ -474,11 +474,17 @@ int PDFOutDev::parseFont( long long nNewId, GfxFont* g
- {
- // TODO(P3): Unfortunately, need to read stream twice, since
- // we must write byte count to stdout before
-+#if !POPPLER_CHECK_VERSION(22, 3, 0)
- char* pBuf = gfxFont->readEmbFontFile( m_pDoc->getXRef(), &nSize );
-+#else
-+ std::optional<std::vector<unsigned char>> pBuf = gfxFont->readEmbFontFile( m_pDoc->getXRef() );
-+#endif
- if( pBuf )
- {
- aNewFont.isEmbedded = true;
-+#if !POPPLER_CHECK_VERSION(22, 3, 0)
- gfree(pBuf);
-+#endif
- }
- }
-
-@@ -492,21 +498,32 @@ void PDFOutDev::writeFontFile( GfxFont* gfxFont ) cons
- return;
-
- int nSize = 0;
-- char* pBuf = gfxFont->readEmbFontFile( m_pDoc->getXRef(), &nSize );
-+#if !POPPLER_CHECK_VERSION(22, 3, 0)
-+ char* pBuf = gfxFont->readEmbFontFile( m_pDoc->getXRef(), &nSize );
-+#else
-+ std::optional<std::vector<unsigned char>> pBuf = gfxFont->readEmbFontFile( m_pDoc->getXRef() );
-+#endif
- if( !pBuf )
- return;
-
- // ---sync point--- see SYNC STREAMS above
- fflush(stdout);
--
-+#if !POPPLER_CHECK_VERSION(22, 3, 0)
- if( fwrite(pBuf, sizeof(char), nSize, g_binary_out) != static_cast<size_t>(nSize) )
-+#else
-+ if( fwrite(reinterpret_cast<char*>(pBuf.value().data()), sizeof(char), nSize, g_binary_out) != static_cast<size_t>(nSize) )
-+#endif
- {
-- gfree(pBuf);
-+#if !POPPLER_CHECK_VERSION(22, 3, 0)
-+ gfree(pBuf);
-+#endif
- exit(1); // error
- }
- // ---sync point--- see SYNC STREAMS above
- fflush(g_binary_out);
-- gfree(pBuf);
-+#if !POPPLER_CHECK_VERSION(22, 3, 0)
-+ gfree(pBuf);
-+#endif
- }
-
- #if POPPLER_CHECK_VERSION(0, 83, 0)
-@@ -759,7 +776,11 @@ void PDFOutDev::updateFont(GfxState *state)
- {
- assert(state);
-
-+#if !POPPLER_CHECK_VERSION(22, 3, 0)
- GfxFont *gfxFont = state->getFont();
-+#else
-+ GfxFont *gfxFont = state->getFont().get();
-+#endif
- if( !gfxFont )
- return;
-