editors/libreoffice and poppler-0.73.0

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

editors/libreoffice and poppler-0.73.0

Matthias Kilian
Hi,

the typedef unsigned char Guchar has been removed in poppler-0.73.0
(it was in goo/gtypes.h). This diff just replaces Guchar by unsigned
char in libreoffice. It should be possible to commit this before
the poppler update.

ok?

Ciao,
        Kili

Index: patches/patch-sdext_source_pdfimport_xpdfwrapper_pdfioutdev_gpl_cxx
===================================================================
RCS file: /cvs/ports/editors/libreoffice/patches/patch-sdext_source_pdfimport_xpdfwrapper_pdfioutdev_gpl_cxx,v
retrieving revision 1.3
diff -u -p -r1.3 patch-sdext_source_pdfimport_xpdfwrapper_pdfioutdev_gpl_cxx
--- patches/patch-sdext_source_pdfimport_xpdfwrapper_pdfioutdev_gpl_cxx 4 Jan 2019 21:07:21 -0000 1.3
+++ patches/patch-sdext_source_pdfimport_xpdfwrapper_pdfioutdev_gpl_cxx 10 Jan 2019 21:48:26 -0000
@@ -1,10 +1,28 @@
 $OpenBSD: patch-sdext_source_pdfimport_xpdfwrapper_pdfioutdev_gpl_cxx,v 1.3 2019/01/04 21:07:21 kili Exp $
 
-Fix with newer poppler. From archlinux.
+Fix with newer poppler. From archlinux (up to 0.72.0).
 
 Index: sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
 --- sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx.orig
 +++ sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
+@@ -298,7 +298,7 @@ void writePpm_( OutputBuffer&     o_rOutputBuf,
+     o_rOutputBuf.resize(header_size);
+
+     // initialize stream
+-    Guchar *p;
++    unsigned char *p;
+     GfxRGB rgb;
+     std::unique_ptr<ImageStream> imgStr(
+         new ImageStream(str,
+@@ -401,7 +401,7 @@ void writeImage_( OutputBuffer&     o_rOutputBuf,
+                 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 );
 @@ -514,7 +514,7 @@ void PDFOutDev::printPath( GfxPath* pPath )
  PDFOutDev::PDFOutDev( PDFDoc* pDoc ) :
      m_pDoc( pDoc ),
Index: patches/patch-sdext_source_pdfimport_xpdfwrapper_pdfioutdev_gpl_hxx
===================================================================
RCS file: /cvs/ports/editors/libreoffice/patches/patch-sdext_source_pdfimport_xpdfwrapper_pdfioutdev_gpl_hxx,v
retrieving revision 1.3
diff -u -p -r1.3 patch-sdext_source_pdfimport_xpdfwrapper_pdfioutdev_gpl_hxx
--- patches/patch-sdext_source_pdfimport_xpdfwrapper_pdfioutdev_gpl_hxx 4 Jan 2019 21:07:21 -0000 1.3
+++ patches/patch-sdext_source_pdfimport_xpdfwrapper_pdfioutdev_gpl_hxx 10 Jan 2019 21:48:26 -0000
@@ -1,6 +1,6 @@
 $OpenBSD: patch-sdext_source_pdfimport_xpdfwrapper_pdfioutdev_gpl_hxx,v 1.3 2019/01/04 21:07:21 kili Exp $
 
-Fix with newer poppler. From archlinux.
+Fix with newer poppler. From archlinux (up to 0.72.0).
 
 Index: sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx
 --- sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx.orig
@@ -87,3 +87,12 @@ Index: sdext/source/pdfimport/xpdfwrappe
  #endif
                                          ) override;
 
+@@ -279,7 +283,7 @@ extern FILE* g_binary_out;
+
+ // 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;
+
+ #endif // INCLUDED_SDEXT_SOURCE_PDFIMPORT_XPDFWRAPPER_PDFIOUTDEV_GPL_HXX
Index: patches/patch-sdext_source_pdfimport_xpdfwrapper_pnghelper_cxx
===================================================================
RCS file: patches/patch-sdext_source_pdfimport_xpdfwrapper_pnghelper_cxx
diff -N patches/patch-sdext_source_pdfimport_xpdfwrapper_pnghelper_cxx
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-sdext_source_pdfimport_xpdfwrapper_pnghelper_cxx 10 Jan 2019 21:48:26 -0000
@@ -0,0 +1,34 @@
+$OpenBSD$
+
+Fix with poppler-0.73.0.
+
+Index: sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx
+--- sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx.orig
++++ sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx
+@@ -242,7 +242,7 @@ void PngHelper::createPng( OutputBuffer& o_rOutputBuf,
+     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 @@ void PngHelper::createPng( OutputBuffer& o_rOutputBuf,
+     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 @@ void PngHelper::createPng( OutputBuffer& o_rOutputBuf,
+     {
+         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

Reply | Threaded
Open this post in threaded view
|

Re: editors/libreoffice and poppler-0.73.0

Robert Nagy
Hi

Sure, go ahead.

On 10/01/19 22:53 +0100, Matthias Kilian wrote:

> Hi,
>
> the typedef unsigned char Guchar has been removed in poppler-0.73.0
> (it was in goo/gtypes.h). This diff just replaces Guchar by unsigned
> char in libreoffice. It should be possible to commit this before
> the poppler update.
>
> ok?
>
> Ciao,
> Kili
>
> Index: patches/patch-sdext_source_pdfimport_xpdfwrapper_pdfioutdev_gpl_cxx
> ===================================================================
> RCS file: /cvs/ports/editors/libreoffice/patches/patch-sdext_source_pdfimport_xpdfwrapper_pdfioutdev_gpl_cxx,v
> retrieving revision 1.3
> diff -u -p -r1.3 patch-sdext_source_pdfimport_xpdfwrapper_pdfioutdev_gpl_cxx
> --- patches/patch-sdext_source_pdfimport_xpdfwrapper_pdfioutdev_gpl_cxx 4 Jan 2019 21:07:21 -0000 1.3
> +++ patches/patch-sdext_source_pdfimport_xpdfwrapper_pdfioutdev_gpl_cxx 10 Jan 2019 21:48:26 -0000
> @@ -1,10 +1,28 @@
>  $OpenBSD: patch-sdext_source_pdfimport_xpdfwrapper_pdfioutdev_gpl_cxx,v 1.3 2019/01/04 21:07:21 kili Exp $
>  
> -Fix with newer poppler. From archlinux.
> +Fix with newer poppler. From archlinux (up to 0.72.0).
>  
>  Index: sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
>  --- sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx.orig
>  +++ sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
> +@@ -298,7 +298,7 @@ void writePpm_( OutputBuffer&     o_rOutputBuf,
> +     o_rOutputBuf.resize(header_size);
> +
> +     // initialize stream
> +-    Guchar *p;
> ++    unsigned char *p;
> +     GfxRGB rgb;
> +     std::unique_ptr<ImageStream> imgStr(
> +         new ImageStream(str,
> +@@ -401,7 +401,7 @@ void writeImage_( OutputBuffer&     o_rOutputBuf,
> +                 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 );
>  @@ -514,7 +514,7 @@ void PDFOutDev::printPath( GfxPath* pPath )
>   PDFOutDev::PDFOutDev( PDFDoc* pDoc ) :
>       m_pDoc( pDoc ),
> Index: patches/patch-sdext_source_pdfimport_xpdfwrapper_pdfioutdev_gpl_hxx
> ===================================================================
> RCS file: /cvs/ports/editors/libreoffice/patches/patch-sdext_source_pdfimport_xpdfwrapper_pdfioutdev_gpl_hxx,v
> retrieving revision 1.3
> diff -u -p -r1.3 patch-sdext_source_pdfimport_xpdfwrapper_pdfioutdev_gpl_hxx
> --- patches/patch-sdext_source_pdfimport_xpdfwrapper_pdfioutdev_gpl_hxx 4 Jan 2019 21:07:21 -0000 1.3
> +++ patches/patch-sdext_source_pdfimport_xpdfwrapper_pdfioutdev_gpl_hxx 10 Jan 2019 21:48:26 -0000
> @@ -1,6 +1,6 @@
>  $OpenBSD: patch-sdext_source_pdfimport_xpdfwrapper_pdfioutdev_gpl_hxx,v 1.3 2019/01/04 21:07:21 kili Exp $
>  
> -Fix with newer poppler. From archlinux.
> +Fix with newer poppler. From archlinux (up to 0.72.0).
>  
>  Index: sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx
>  --- sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx.orig
> @@ -87,3 +87,12 @@ Index: sdext/source/pdfimport/xpdfwrappe
>   #endif
>                                           ) override;
>  
> +@@ -279,7 +283,7 @@ extern FILE* g_binary_out;
> +
> + // 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;
> +
> + #endif // INCLUDED_SDEXT_SOURCE_PDFIMPORT_XPDFWRAPPER_PDFIOUTDEV_GPL_HXX
> Index: patches/patch-sdext_source_pdfimport_xpdfwrapper_pnghelper_cxx
> ===================================================================
> RCS file: patches/patch-sdext_source_pdfimport_xpdfwrapper_pnghelper_cxx
> diff -N patches/patch-sdext_source_pdfimport_xpdfwrapper_pnghelper_cxx
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-sdext_source_pdfimport_xpdfwrapper_pnghelper_cxx 10 Jan 2019 21:48:26 -0000
> @@ -0,0 +1,34 @@
> +$OpenBSD$
> +
> +Fix with poppler-0.73.0.
> +
> +Index: sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx
> +--- sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx.orig
> ++++ sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx
> +@@ -242,7 +242,7 @@ void PngHelper::createPng( OutputBuffer& o_rOutputBuf,
> +     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 @@ void PngHelper::createPng( OutputBuffer& o_rOutputBuf,
> +     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 @@ void PngHelper::createPng( OutputBuffer& o_rOutputBuf,
> +     {
> +         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
>