Accepting request 972942 from home:dspinella:branches:LibreOffice:Factory
- Add poppler-22-04-0.patch OBS-URL: https://build.opensuse.org/request/show/972942 OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/libreoffice?expand=0&rev=1013
This commit is contained in:
parent
029cfd2f14
commit
0fd99c1185
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 26 15:34:26 UTC 2022 - Danilo Spinella <danilo.spinella@suse.com>
|
||||
|
||||
- Add poppler-22-04-0.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 19 10:40:59 UTC 2022 - Danilo Spinella <danilo.spinella@suse.com>
|
||||
|
||||
|
@ -115,6 +115,8 @@ Patch990: install-with-hardlinks.diff
|
||||
Patch991: libreoffice-no-destdircheck.patch
|
||||
# PATCH-FIX-UPSTRAM poppler-22-03-0.patch
|
||||
Patch992: poppler-22-03-0.patch
|
||||
# PATCH-FIX-SUSE poppler-22-04-0.patch
|
||||
Patch993: poppler-22-04-0.patch
|
||||
BuildRequires: %{name}-share-linker
|
||||
BuildRequires: ant
|
||||
BuildRequires: autoconf
|
||||
@ -1025,6 +1027,7 @@ Provides %{langname} translations and additional resources (help files, etc.) fo
|
||||
%patch990 -p1
|
||||
%patch991 -p1
|
||||
%patch992 -p1
|
||||
%patch993 -p1
|
||||
|
||||
# Disable some of the failing tests (some are random)
|
||||
%if 0%{?suse_version} < 1330
|
||||
|
62
poppler-22-04-0.patch
Normal file
62
poppler-22-04-0.patch
Normal file
@ -0,0 +1,62 @@
|
||||
Index: libreoffice-7.3.3.1/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
|
||||
===================================================================
|
||||
--- libreoffice-7.3.3.1.orig/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
|
||||
+++ libreoffice-7.3.3.1/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
|
||||
@@ -474,12 +474,21 @@ int PDFOutDev::parseFont( long long nNew
|
||||
{
|
||||
// TODO(P3): Unfortunately, need to read stream twice, since
|
||||
// we must write byte count to stdout before
|
||||
+#if POPPLER_CHECK_VERSION(22, 04, 0) // readEmbFontFile signature changed
|
||||
+ auto pBuf = gfxFont->readEmbFontFile( m_pDoc->getXRef());
|
||||
+ if ( pBuf )
|
||||
+ {
|
||||
+ aNewFont.isEmbedded = true;
|
||||
+ nSize = pBuf->size();
|
||||
+ }
|
||||
+#else
|
||||
char* pBuf = gfxFont->readEmbFontFile( m_pDoc->getXRef(), &nSize );
|
||||
if( pBuf )
|
||||
{
|
||||
aNewFont.isEmbedded = true;
|
||||
gfree(pBuf);
|
||||
}
|
||||
+#endif
|
||||
}
|
||||
|
||||
m_aFontMap[ nNewId ] = aNewFont;
|
||||
@@ -492,21 +501,35 @@ void PDFOutDev::writeFontFile( GfxFont*
|
||||
return;
|
||||
|
||||
int nSize = 0;
|
||||
+#if POPPLER_CHECK_VERSION(22, 04, 0) // readEmbFontFile signature changed
|
||||
+ auto pBuf = gfxFont->readEmbFontFile( m_pDoc->getXRef());
|
||||
+ if ( !pBuf )
|
||||
+ return;
|
||||
+ nSize = pBuf->size();
|
||||
+#else
|
||||
char* pBuf = gfxFont->readEmbFontFile( m_pDoc->getXRef(), &nSize );
|
||||
if( !pBuf )
|
||||
return;
|
||||
+#endif
|
||||
|
||||
// ---sync point--- see SYNC STREAMS above
|
||||
fflush(stdout);
|
||||
|
||||
+#if POPPLER_CHECK_VERSION(22, 04, 0) // readEmbFontFile signature changed
|
||||
+ if( fwrite(pBuf->data(), sizeof(unsigned char), nSize, g_binary_out) != static_cast<size_t>(nSize) )
|
||||
+ {
|
||||
+#else
|
||||
if( fwrite(pBuf, sizeof(char), nSize, g_binary_out) != static_cast<size_t>(nSize) )
|
||||
{
|
||||
gfree(pBuf);
|
||||
+#endif
|
||||
exit(1); // error
|
||||
}
|
||||
// ---sync point--- see SYNC STREAMS above
|
||||
fflush(g_binary_out);
|
||||
+#if !POPPLER_CHECK_VERSION(22, 04, 0) // readEmbFontFile signature changed
|
||||
gfree(pBuf);
|
||||
+#endif
|
||||
}
|
||||
|
||||
#if POPPLER_CHECK_VERSION(0, 83, 0)
|
Loading…
x
Reference in New Issue
Block a user