inkscape/inkscape-poppler-24.05.0.patch
Ana Guerrero 2c868094c1 - Update to version 1.4+39:
* Fix <solidcolor solid-color="..." />
  * Fix boolop fill-rule as attribute
  * Fix crash on pasting mesh gradient
  * Test URI rebasing for clones
  * Fix copying clone referencing other document
  * Fix Linux snap package build (1.4.x)
  * Fix building with Poppler 24.11
  * Future-proof against poppler 24.10 changes
  * Fix crash with rebasing invalid URL
  * Fix saving crash with unspecified exception
  * Fix PDF text import for text with character and word spacing.
  * Update libcroco
  * Fix LAB decoding in Adobe ASE swatch file
  * Fix building with poppler 24.12.0
- Switch to source service git checkout. Make future version
  updates and pulling fixes from upstream stable branch easy.

OBS-URL: https://build.opensuse.org/package/show/graphics/inkscape?expand=0&rev=127
2024-12-31 14:09:22 +00:00

47 lines
2.0 KiB
Diff

Index: inkscape-1.3.2_2023-11-25_091e20ef0f/src/extension/internal/pdfinput/poppler-transition-api.h
===================================================================
--- inkscape-1.3.2_2023-11-25_091e20ef0f.orig/src/extension/internal/pdfinput/poppler-transition-api.h
+++ inkscape-1.3.2_2023-11-25_091e20ef0f/src/extension/internal/pdfinput/poppler-transition-api.h
@@ -13,6 +13,15 @@
#define SEEN_POPPLER_TRANSITION_API_H
#include <glib/poppler-features.h>
+#include <poppler/UTF.h>
+
+#if POPPLER_CHECK_VERSION(24, 5, 0)
+#define _POPPLER_HAS_UNICODE_BOM(value) (hasUnicodeByteOrderMark(value->toStr()))
+#define _POPPLER_HAS_UNICODE_BOMLE(value) (hasUnicodeByteOrderMarkLE(value->toStr()))
+#else
+#define _POPPLER_HAS_UNICODE_BOM(value) (value->hasUnicodeMarker())
+#define _POPPLER_HAS_UNICODE_BOMLE(value) (value->hasUnicodeMarkerLE())
+#endif
#if POPPLER_CHECK_VERSION(22, 4, 0)
#define _POPPLER_FONTPTR_TO_GFX8(font_ptr) ((Gfx8BitFont *)font_ptr.get())
Index: inkscape-1.3.2_2023-11-25_091e20ef0f/src/extension/internal/pdfinput/poppler-utils.cpp
===================================================================
--- inkscape-1.3.2_2023-11-25_091e20ef0f.orig/src/extension/internal/pdfinput/poppler-utils.cpp
+++ inkscape-1.3.2_2023-11-25_091e20ef0f/src/extension/internal/pdfinput/poppler-utils.cpp
@@ -12,6 +12,8 @@
#include "poppler-utils.h"
+#include <poppler/UTF.h>
+
#include "2geom/affine.h"
#include "GfxFont.h"
#include "GfxState.h"
@@ -563,10 +565,10 @@ std::string getDictString(Dict *dict, co
*/
std::string getString(const GooString *value)
{
- if (value->hasUnicodeMarker()) {
+ if (_POPPLER_HAS_UNICODE_BOM(value)) {
return g_convert(value->getCString () + 2, value->getLength () - 2,
"UTF-8", "UTF-16BE", NULL, NULL, NULL);
- } else if (value->hasUnicodeMarkerLE()) {
+ } else if (_POPPLER_HAS_UNICODE_BOMLE(value)) {
return g_convert(value->getCString () + 2, value->getLength () - 2,
"UTF-8", "UTF-16LE", NULL, NULL, NULL);
}