summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-office/calligra/files/calligra-3.1.0-poppler-0.72.patch')
-rw-r--r--app-office/calligra/files/calligra-3.1.0-poppler-0.72.patch43
1 files changed, 14 insertions, 29 deletions
diff --git a/app-office/calligra/files/calligra-3.1.0-poppler-0.72.patch b/app-office/calligra/files/calligra-3.1.0-poppler-0.72.patch
index 3b2e690257be..817a8ddcd679 100644
--- a/app-office/calligra/files/calligra-3.1.0-poppler-0.72.patch
+++ b/app-office/calligra/files/calligra-3.1.0-poppler-0.72.patch
@@ -1,54 +1,39 @@
-From 8f20ea906235cbee1d4aac4706e4eb03366875bf Mon Sep 17 00:00:00 2001
-From: "Tobias C. Berner" <tcberner@FreeBSD.org>
-Date: Mon, 7 Jan 2019 19:50:48 +0100
-Subject: [PATCH] Make compatible with poppler 0.72
+From 3784fdf0259a14f1f7b20c156dcfe42b45d76896 Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <asturm@gentoo.org>
+Date: Thu, 24 Jan 2019 23:55:02 +0100
+Subject: [PATCH] Fix build with poppler-0.72
+This is a downstream fix without backwards compat, not upstreamable.
---
- filters/karbon/pdf/SvgOutputDev.cpp | 13 +++++++++++++
- 1 file changed, 13 insertions(+)
+ filters/karbon/pdf/SvgOutputDev.cpp | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/filters/karbon/pdf/SvgOutputDev.cpp b/filters/karbon/pdf/SvgOutputDev.cpp
-index 4a1fad6bbcf..b1d4ea2d427 100644
+index 391e86cc117..bc72a003efb 100644
--- a/filters/karbon/pdf/SvgOutputDev.cpp
+++ b/filters/karbon/pdf/SvgOutputDev.cpp
-@@ -25,6 +25,7 @@
- #include <poppler/GfxState.h>
- #include <poppler/Stream.h>
- #include <poppler/GfxFont.h>
-+#include <poppler/glib/poppler-features.h>
-
- #include <QFile>
- #include <QTextStream>
-@@ -409,7 +410,11 @@ void SvgOutputDev::drawString(GfxState * state, const GooString * s)
+@@ -402,7 +402,7 @@ void SvgOutputDev::drawString(GfxState * state, const GooString * s)
QString str;
-+#if POPPLER_CHECK_VERSION(0,72,0)
+- const char * p = s->getCString();
+ const char * p = s->c_str();
-+#else
- const char * p = s->getCString();
-+#endif
int len = s->getLength();
CharCode code;
Unicode *u = nullptr;
-@@ -459,10 +464,18 @@ void SvgOutputDev::drawString(GfxState * state, const GooString * s)
+@@ -451,10 +451,10 @@ void SvgOutputDev::drawString(GfxState * state, const GooString * s)
*d->body << " y=\"" << y << "px\"";
if (font && font->getFamily()) {
-+#if POPPLER_CHECK_VERSION(0,72,0)
+- *d->body << " font-family=\"" << QString::fromLatin1(font->getFamily()->getCString()) << "\"";
+ *d->body << " font-family=\"" << QString::fromLatin1(font->getFamily()->c_str()) << "\"";
-+#else
- *d->body << " font-family=\"" << QString::fromLatin1(font->getFamily()->getCString()) << "\"";
-+#endif
//debugPdf << "font family:" << QString::fromLatin1( font->getFamily()->getCString() );
} else if (font && font->getName()) {
-+#if POPPLER_CHECK_VERSION(0,72,0)
+- *d->body << " font-family=\"" << QString::fromLatin1(font->getName()->getCString()) << "\"";
+ *d->body << " font-family=\"" << QString::fromLatin1(font->getName()->c_str()) << "\"";
-+#else
- *d->body << " font-family=\"" << QString::fromLatin1(font->getName()->getCString()) << "\"";
-+#endif
//debugPdf << "font name:" << QString::fromLatin1( font->getName()->getCString() );
}
*d->body << " font-size=\"" << qMax(state->getFontSize(), state->getTransformedFontSize()) << "px\"";
--
2.20.1
+