https://gitlab.archlinux.org/archlinux/packaging/packages/libreoffice-fresh/-/blob/main/poppler24.12-buildfix.patch?ref_type=heads --- libreoffice-25.2.0.1/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx +++ libreoffice-25.2.0.1/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx @@ -1096,17 +1096,18 @@ if (m_bSkipImages) return; OutputBuffer aBuf; initBuf(aBuf); printf( "drawMask %d %d %d", width, height, invert ); int bitsPerComponent = 1; StreamColorSpaceMode csMode = streamCSNone; - str->getImageParams( &bitsPerComponent, &csMode ); + bool hasAlpha = false; + str->getImageParams( &bitsPerComponent, &csMode, &hasAlpha ); if( bitsPerComponent == 1 && (csMode == streamCSNone || csMode == streamCSDeviceGray) ) { GfxRGB oneColor = { dblToCol( 1.0 ), dblToCol( 1.0 ), dblToCol( 1.0 ) }; GfxRGB zeroColor = { dblToCol( 0.0 ), dblToCol( 0.0 ), dblToCol( 0.0 ) }; pState->getFillColorSpace()->getRGB( pState->getFillColor(), &zeroColor ); if( invert ) writePng_( aBuf, str, width, height, oneColor, zeroColor, true ); else @@ -1313,19 +1314,19 @@ } std::unique_ptr pRgbStr(new MemStream(pBitmapData, 0, nBitmapWidth * nBitmapHeight * 3, Object(objNull))); std::unique_ptr pAlphaStr(new MemStream(reinterpret_cast(pSplashBitmap->getAlphaPtr()), 0, nBitmapWidth * nBitmapHeight, Object(objNull))); auto aDecode = Object(objNull); std::unique_ptr pRgbIdentityColorMap(new GfxImageColorMap(8, &aDecode, - new GfxDeviceRGBColorSpace())); + std::make_unique())); std::unique_ptr pGrayIdentityColorMap(new GfxImageColorMap(8, &aDecode, - new GfxDeviceGrayColorSpace())); + std::make_unique())); OutputBuffer aBuf; initBuf(aBuf); writePng_(aBuf, pRgbStr.get(), nBitmapWidth, nBitmapHeight, pRgbIdentityColorMap.get(), pAlphaStr.get(), nBitmapWidth, nBitmapHeight, pGrayIdentityColorMap.get()); writeBinaryBuffer(aBuf); // If we return false here we can fall back to the slow path return true;