Kaydet (Commit) 50d371ae authored tarafından Michael Stahl's avatar Michael Stahl

sdext: fix build with poppler 0.73

... which has removed Guchar, Gushort, Guint, Gulong...

Change-Id: Ia54ad378031f167f6779f6ffe574b85c1e72f26d
Reviewed-on: https://gerrit.libreoffice.org/66305
Tested-by: Jenkins
Reviewed-by: 's avatarMichael Stahl <Michael.Stahl@cib.de>
üst 9c3faeae
...@@ -298,7 +298,7 @@ static void writePpm_( OutputBuffer& o_rOutputBuf, ...@@ -298,7 +298,7 @@ static void writePpm_( OutputBuffer& o_rOutputBuf,
o_rOutputBuf.resize(header_size); o_rOutputBuf.resize(header_size);
// initialize stream // initialize stream
Guchar *p; unsigned char *p;
GfxRGB rgb; GfxRGB rgb;
std::unique_ptr<ImageStream> imgStr( std::unique_ptr<ImageStream> imgStr(
new ImageStream(str, new ImageStream(str,
...@@ -401,7 +401,7 @@ static void writeImage_( OutputBuffer& o_rOutputBuf, ...@@ -401,7 +401,7 @@ static void writeImage_( OutputBuffer& o_rOutputBuf,
oneColor = { byteToCol( 0xff ), byteToCol( 0xff ), byteToCol( 0xff ) }; oneColor = { byteToCol( 0xff ), byteToCol( 0xff ), byteToCol( 0xff ) };
if( colorMap->getColorSpace()->getMode() == csIndexed || colorMap->getColorSpace()->getMode() == csDeviceGray ) if( colorMap->getColorSpace()->getMode() == csIndexed || colorMap->getColorSpace()->getMode() == csDeviceGray )
{ {
Guchar nIndex = 0; unsigned char nIndex = 0;
colorMap->getRGB( &nIndex, &zeroColor ); colorMap->getRGB( &nIndex, &zeroColor );
nIndex = 1; nIndex = 1;
colorMap->getRGB( &nIndex, &oneColor ); colorMap->getRGB( &nIndex, &oneColor );
......
...@@ -278,9 +278,13 @@ extern FILE* g_binary_out; ...@@ -278,9 +278,13 @@ extern FILE* g_binary_out;
// note: if you ever change Output_t, please keep in mind that the current code // note: if you ever change Output_t, please keep in mind that the current code
// relies on it being of 8 bit size // relies on it being of 8 bit size
typedef Guchar Output_t; typedef unsigned char Output_t;
typedef std::vector< Output_t > OutputBuffer; 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 #endif // INCLUDED_SDEXT_SOURCE_PDFIMPORT_XPDFWRAPPER_PDFIOUTDEV_GPL_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -242,7 +242,7 @@ void PngHelper::createPng( OutputBuffer& o_rOutputBuf, ...@@ -242,7 +242,7 @@ void PngHelper::createPng( OutputBuffer& o_rOutputBuf,
appendIHDR( o_rOutputBuf, width, height, 8, 6 ); // RGBA image appendIHDR( o_rOutputBuf, width, height, 8, 6 ); // RGBA image
// initialize stream // initialize stream
Guchar *p, *pm; unsigned char *p, *pm;
GfxRGB rgb; GfxRGB rgb;
GfxGray alpha; GfxGray alpha;
std::unique_ptr<ImageStream> imgStr( std::unique_ptr<ImageStream> imgStr(
...@@ -328,7 +328,7 @@ void PngHelper::createPng( OutputBuffer& o_rOutputBuf, ...@@ -328,7 +328,7 @@ void PngHelper::createPng( OutputBuffer& o_rOutputBuf,
appendIHDR( o_rOutputBuf, width, height, 8, 6 ); // RGBA image appendIHDR( o_rOutputBuf, width, height, 8, 6 ); // RGBA image
// initialize stream // initialize stream
Guchar *p; unsigned char *p;
GfxRGB rgb; GfxRGB rgb;
std::unique_ptr<ImageStream> imgStr( std::unique_ptr<ImageStream> imgStr(
new ImageStream(str, new ImageStream(str,
...@@ -374,7 +374,7 @@ void PngHelper::createPng( OutputBuffer& o_rOutputBuf, ...@@ -374,7 +374,7 @@ void PngHelper::createPng( OutputBuffer& o_rOutputBuf,
{ {
for( int x = 0; x < maskWidth; ++x ) for( int x = 0; x < maskWidth; ++x )
{ {
Guchar aPixel = 0; unsigned char aPixel = 0;
imgStrMask->getPixel( &aPixel ); imgStrMask->getPixel( &aPixel );
int nIndex = (y*height/maskHeight) * (width*4+1) + // mapped line int nIndex = (y*height/maskHeight) * (width*4+1) + // mapped line
(x*width/maskWidth)*4 + 1 + 3 // mapped column (x*width/maskWidth)*4 + 1 + 3 // mapped column
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment