mirror of
https://abf.rosa.ru/djam/libreoffice.git
synced 2025-02-23 18:43:00 +00:00
138 lines
5.3 KiB
Diff
138 lines
5.3 KiB
Diff
diff -urN libreoffice-6.0.7.3/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx libreoffice-6.0.7.3-patched/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
|
|
--- libreoffice-6.0.7.3/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx 2018-10-31 02:55:21.000000000 +1000
|
|
+++ libreoffice-6.0.7.3-patched/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx 2019-10-15 18:35:58.981281235 +1000
|
|
@@ -310,7 +310,7 @@
|
|
o_rOutputBuf.resize(header_size);
|
|
|
|
// initialize stream
|
|
- Guchar *p;
|
|
+ unsigned char *p;
|
|
GfxRGB rgb;
|
|
std::unique_ptr<ImageStream> imgStr(
|
|
new ImageStream(str,
|
|
@@ -415,7 +415,7 @@
|
|
oneColor = { byteToCol( 0xff ), byteToCol( 0xff ), byteToCol( 0xff ) };
|
|
if( colorMap->getColorSpace()->getMode() == csIndexed || colorMap->getColorSpace()->getMode() == csDeviceGray )
|
|
{
|
|
- Guchar nIndex = 0;
|
|
+ unsigned char nIndex = 0;
|
|
colorMap->getRGB( &nIndex, &zeroColor );
|
|
nIndex = 1;
|
|
colorMap->getRGB( &nIndex, &oneColor );
|
|
@@ -569,7 +569,11 @@
|
|
LinkAction* pAction = link->getAction();
|
|
if (pAction && pAction->getKind() == actionURI)
|
|
{
|
|
+#if POPPLER_CHECK_VERSION(0, 72, 0)
|
|
+ const char* pURI = static_cast<LinkURI*>(pAction)->getURI()->c_str();
|
|
+#else
|
|
const char* pURI = static_cast<LinkURI*>(pAction)->getURI()->getCString();
|
|
+#endif
|
|
|
|
std::vector<char> aEsc( lcl_escapeLineFeeds(pURI) );
|
|
|
|
@@ -592,7 +596,11 @@
|
|
printf( "restoreState\n" );
|
|
}
|
|
|
|
+#if POPPLER_CHECK_VERSION(0, 71, 0)
|
|
+void PDFOutDev::setDefaultCTM(const double *pMat)
|
|
+#else
|
|
void PDFOutDev::setDefaultCTM(double *pMat)
|
|
+#endif
|
|
{
|
|
assert(pMat);
|
|
|
|
@@ -767,7 +775,11 @@
|
|
|
|
aFont = it->second;
|
|
|
|
+#if POPPLER_CHECK_VERSION(0, 72, 0)
|
|
+ std::vector<char> aEsc( lcl_escapeLineFeeds(aFont.familyName.c_str()) );
|
|
+#else
|
|
std::vector<char> aEsc( lcl_escapeLineFeeds(aFont.familyName.getCString()) );
|
|
+#endif
|
|
printf( " %d %d %d %d %f %d %s",
|
|
aFont.isEmbedded,
|
|
aFont.isBold,
|
|
diff -urN libreoffice-6.0.7.3/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx libreoffice-6.0.7.3-patched/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx
|
|
--- libreoffice-6.0.7.3/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx 2018-10-31 02:55:21.000000000 +1000
|
|
+++ libreoffice-6.0.7.3-patched/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx 2019-10-15 18:35:58.981281235 +1000
|
|
@@ -165,7 +165,11 @@
|
|
//----- initialization and control
|
|
|
|
// Set default transform matrix.
|
|
+#if POPPLER_CHECK_VERSION(0, 71, 0)
|
|
+ virtual void setDefaultCTM(const double *ctm) override;
|
|
+#else
|
|
virtual void setDefaultCTM(double *ctm) override;
|
|
+#endif
|
|
|
|
// Start a page.
|
|
virtual void startPage(int pageNum, GfxState *state
|
|
@@ -278,9 +282,13 @@
|
|
|
|
// note: if you ever change Output_t, please keep in mind that the current code
|
|
// relies on it being of 8 bit size
|
|
-typedef Guchar Output_t;
|
|
+typedef unsigned char Output_t;
|
|
typedef std::vector< Output_t > OutputBuffer;
|
|
|
|
+#if !POPPLER_CHECK_VERSION(0, 73, 0)
|
|
+static_assert(std::is_same_v<Guchar, unsigned char>, "unexpected typedef");
|
|
+#endif
|
|
+
|
|
#endif // INCLUDED_SDEXT_SOURCE_PDFIMPORT_XPDFWRAPPER_PDFIOUTDEV_GPL_HXX
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
|
diff -urN libreoffice-6.0.7.3/sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx libreoffice-6.0.7.3-patched/sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx
|
|
--- libreoffice-6.0.7.3/sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx 2018-10-31 02:55:21.000000000 +1000
|
|
+++ libreoffice-6.0.7.3-patched/sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx 2019-10-15 18:35:58.981281235 +1000
|
|
@@ -242,7 +242,7 @@
|
|
appendIHDR( o_rOutputBuf, width, height, 8, 6 ); // RGBA image
|
|
|
|
// initialize stream
|
|
- Guchar *p, *pm;
|
|
+ unsigned char *p, *pm;
|
|
GfxRGB rgb;
|
|
GfxGray alpha;
|
|
ImageStream* imgStr =
|
|
@@ -328,7 +328,7 @@
|
|
appendIHDR( o_rOutputBuf, width, height, 8, 6 ); // RGBA image
|
|
|
|
// initialize stream
|
|
- Guchar *p;
|
|
+ unsigned char *p;
|
|
GfxRGB rgb;
|
|
ImageStream* imgStr =
|
|
new ImageStream(str,
|
|
@@ -374,7 +374,7 @@
|
|
{
|
|
for( int x = 0; x < maskWidth; ++x )
|
|
{
|
|
- Guchar aPixel = 0;
|
|
+ unsigned char aPixel = 0;
|
|
imgStrMask->getPixel( &aPixel );
|
|
int nIndex = (y*height/maskHeight) * (width*4+1) + // mapped line
|
|
(x*width/maskWidth)*4 + 1 + 3 // mapped column
|
|
diff -urN libreoffice-6.0.7.3/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx libreoffice-6.0.7.3-patched/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx
|
|
--- libreoffice-6.0.7.3/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx 2018-10-31 02:55:21.000000000 +1000
|
|
+++ libreoffice-6.0.7.3-patched/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx 2019-10-15 18:34:55.807287181 +1000
|
|
@@ -69,7 +69,7 @@
|
|
|
|
// read config file
|
|
globalParams = new GlobalParams();
|
|
- globalParams->setErrQuiet(gTrue);
|
|
+ globalParams->setErrQuiet(true);
|
|
#if defined(_MSC_VER)
|
|
globalParams->setupBaseFonts(nullptr);
|
|
#endif
|
|
@@ -143,7 +143,7 @@
|
|
i,
|
|
PDFI_OUTDEV_RESOLUTION,
|
|
PDFI_OUTDEV_RESOLUTION,
|
|
- 0, gTrue, gTrue, gTrue);
|
|
+ 0, true, true, true);
|
|
rDoc.processLinks(&aOutDev, i);
|
|
}
|
|
|