@@ -1,129 +0,0 @@
|
||||
From 85c0dff3422fa3c26fbc2e8d8561f597ec24bd92 Mon Sep 17 00:00:00 2001
|
||||
From: Jean Ghali <jghali@libertysurf.fr>
|
||||
Date: Wed, 2 Feb 2022 23:12:52 +0000
|
||||
Subject: [PATCH] #16734: Build break with poppler 22.2.0
|
||||
|
||||
git-svn-id: svn://scribus.net/trunk/Scribus@24884 11d20701-8431-0410-a711-e3c959e3b870
|
||||
---
|
||||
scribus/plugins/import/pdf/slaoutput.cpp | 47 +++++++++++++++++++-----
|
||||
1 file changed, 37 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/scribus/plugins/import/pdf/slaoutput.cpp b/scribus/plugins/import/pdf/slaoutput.cpp
|
||||
index 5894bf2ad6..3650c96f52 100644
|
||||
--- a/scribus/plugins/import/pdf/slaoutput.cpp
|
||||
+++ b/scribus/plugins/import/pdf/slaoutput.cpp
|
||||
@@ -7,6 +7,11 @@ for which a new license (GPL+exception) is in place.
|
||||
|
||||
#include "slaoutput.h"
|
||||
|
||||
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 2, 0)
|
||||
+#include <memory>
|
||||
+#include <optional>
|
||||
+#endif
|
||||
+
|
||||
#include <poppler/GlobalParams.h>
|
||||
#include <poppler/poppler-config.h>
|
||||
#include <poppler/FileSpec.h>
|
||||
@@ -3027,18 +3032,24 @@ void SlaOutputDev::markPoint(POPPLER_CONST char *name, Dict *properties)
|
||||
void SlaOutputDev::updateFont(GfxState *state)
|
||||
{
|
||||
GfxFont *gfxFont;
|
||||
- GfxFontLoc *fontLoc;
|
||||
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 2, 0)
|
||||
+ std::optional<GfxFontLoc> fontLoc;
|
||||
+ const GooString * fileName = nullptr;
|
||||
+ std::unique_ptr<FoFiTrueType> ff;
|
||||
+#else
|
||||
+ GfxFontLoc * fontLoc = nullptr;
|
||||
+ GooString * fileName = nullptr;
|
||||
+ FoFiTrueType * ff = nullptr;
|
||||
+#endif
|
||||
GfxFontType fontType;
|
||||
SlaOutFontFileID *id;
|
||||
SplashFontFile *fontFile;
|
||||
SplashFontSrc *fontsrc = nullptr;
|
||||
- FoFiTrueType *ff;
|
||||
Object refObj, strObj;
|
||||
- GooString *fileName;
|
||||
- char *tmpBuf;
|
||||
+ char *tmpBuf = nullptr;
|
||||
int tmpBufLen = 0;
|
||||
- int *codeToGID;
|
||||
- const double *textMat;
|
||||
+ int *codeToGID = nullptr;
|
||||
+ const double *textMat = nullptr;
|
||||
double m11, m12, m21, m22, fontSize;
|
||||
SplashCoord mat[4];
|
||||
int n = 0;
|
||||
@@ -3046,9 +3057,6 @@ void SlaOutputDev::updateFont(GfxState *state)
|
||||
SplashCoord matrix[6];
|
||||
|
||||
m_font = nullptr;
|
||||
- fileName = nullptr;
|
||||
- tmpBuf = nullptr;
|
||||
- fontLoc = nullptr;
|
||||
|
||||
gfxFont = state->getFont();
|
||||
if (!gfxFont)
|
||||
@@ -3083,7 +3091,11 @@ void SlaOutputDev::updateFont(GfxState *state)
|
||||
}
|
||||
else
|
||||
{ // gfxFontLocExternal
|
||||
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 2, 0)
|
||||
+ fileName = fontLoc->pathAsGooString();
|
||||
+#else
|
||||
fileName = fontLoc->path;
|
||||
+#endif
|
||||
fontType = fontLoc->fontType;
|
||||
}
|
||||
|
||||
@@ -3136,9 +3148,14 @@ void SlaOutputDev::updateFont(GfxState *state)
|
||||
ff = FoFiTrueType::make(tmpBuf, tmpBufLen);
|
||||
if (ff)
|
||||
{
|
||||
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 2, 0)
|
||||
+ codeToGID = ((Gfx8BitFont*) gfxFont)->getCodeToGIDMap(ff.get());
|
||||
+ ff.reset();
|
||||
+#else
|
||||
codeToGID = ((Gfx8BitFont *)gfxFont)->getCodeToGIDMap(ff);
|
||||
- n = 256;
|
||||
delete ff;
|
||||
+#endif
|
||||
+ n = 256;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -3209,8 +3226,13 @@ void SlaOutputDev::updateFont(GfxState *state)
|
||||
ff = FoFiTrueType::make(tmpBuf, tmpBufLen);
|
||||
if (! ff)
|
||||
goto err2;
|
||||
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 2, 0)
|
||||
+ codeToGID = ((GfxCIDFont*) gfxFont)->getCodeToGIDMap(ff.get(), &n);
|
||||
+ ff.reset();
|
||||
+#else
|
||||
codeToGID = ((GfxCIDFont *)gfxFont)->getCodeToGIDMap(ff, &n);
|
||||
delete ff;
|
||||
+#endif
|
||||
}
|
||||
if (!(fontFile = m_fontEngine->loadTrueTypeFont(
|
||||
id,
|
||||
@@ -3247,14 +3269,19 @@ void SlaOutputDev::updateFont(GfxState *state)
|
||||
mat[3] = -m22;
|
||||
m_font = m_fontEngine->getFont(fontFile, mat, matrix);
|
||||
|
||||
+#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(22, 2, 0)
|
||||
delete fontLoc;
|
||||
+#endif
|
||||
if (fontsrc && !fontsrc->isFile)
|
||||
fontsrc->unref();
|
||||
return;
|
||||
|
||||
err2:
|
||||
delete id;
|
||||
+#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(22, 2, 0)
|
||||
delete fontLoc;
|
||||
+#endif
|
||||
+
|
||||
err1:
|
||||
if (fontsrc && !fontsrc->isFile)
|
||||
fontsrc->unref();
|
||||
@@ -1,24 +0,0 @@
|
||||
diff -Naur scribus-1.3.6.orig/scribus/plugins/gettext/htmlim/CMakeLists.txt scribus-1.3.6/scribus/plugins/gettext/htmlim/CMakeLists.txt
|
||||
--- scribus-1.3.6.orig/scribus/plugins/gettext/htmlim/CMakeLists.txt 2007-09-30 22:55:37.000000000 +0300
|
||||
+++ scribus-1.3.6/scribus/plugins/gettext/htmlim/CMakeLists.txt 2010-05-17 16:39:49.842776114 +0300
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
ADD_LIBRARY(${SCRIBUS_HTML_GT_PLUGIN} MODULE ${HTML_GT_PLUGIN_SOURCES} ${HTML_GT_PLUGIN_MOC_SOURCES})
|
||||
|
||||
-target_link_libraries(${SCRIBUS_HTML_GT_PLUGIN} ${PLUGIN_LIBRARIES})
|
||||
+target_link_libraries(${SCRIBUS_HTML_GT_PLUGIN} ${PLUGIN_LIBRARIES} ${LIBXML2_LIBRARIES} ${ZLIB_LIBRARIES})
|
||||
|
||||
INSTALL(TARGETS ${SCRIBUS_HTML_GT_PLUGIN}
|
||||
LIBRARY
|
||||
diff -Naur scribus-1.3.6.orig/scribus/plugins/gettext/odtim/CMakeLists.txt scribus-1.3.6/scribus/plugins/gettext/odtim/CMakeLists.txt
|
||||
--- scribus-1.3.6.orig/scribus/plugins/gettext/odtim/CMakeLists.txt 2007-09-30 22:55:37.000000000 +0300
|
||||
+++ scribus-1.3.6/scribus/plugins/gettext/odtim/CMakeLists.txt 2010-05-17 16:40:13.467775741 +0300
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
ADD_LIBRARY(${SCRIBUS_ODT_IM_PLUGIN} MODULE ${ODT_IM_PLUGIN_SOURCES} ${ODT_IM_PLUGIN_MOC_SOURCES})
|
||||
|
||||
-target_link_libraries(${SCRIBUS_ODT_IM_PLUGIN} ${PLUGIN_LIBRARIES})
|
||||
+target_link_libraries(${SCRIBUS_ODT_IM_PLUGIN} ${PLUGIN_LIBRARIES} ${LIBXML2_LIBRARIES} ${ZLIB_LIBRARIES})
|
||||
|
||||
INSTALL(TARGETS ${SCRIBUS_ODT_IM_PLUGIN}
|
||||
LIBRARY
|
||||
@@ -1,11 +0,0 @@
|
||||
--- scribus/prefsmanager.cpp 2006-07-29 02:29:59.000000000 +0300
|
||||
+++ scribus/prefsmanager.cpp.new 2006-10-07 22:25:58.000000000 +0300
|
||||
@@ -117,7 +117,7 @@
|
||||
bool goodFont = false;
|
||||
for ( SCFontsIterator itf(appPrefs.AvailFonts); itf.current(); ++itf)
|
||||
{
|
||||
- if ((itf.currentKey() == "Arial Regular") || (itf.currentKey() == "Times New Roman Regular"))
|
||||
+ if ((itf.currentKey() == "Arial Regular") || (itf.currentKey() == "Times New Roman Regular") || (itf.currentKey() == "Nimbus Roman No9 L Regular"))
|
||||
{
|
||||
appPrefs.toolSettings.defFont = itf.currentKey();
|
||||
goodFont = true;
|
||||
@@ -1,11 +0,0 @@
|
||||
--- CMakeLists.orig.txt 2010-03-23 15:13:30.838325329 +0200
|
||||
+++ CMakeLists.txt 2010-03-23 15:13:03.968450007 +0200
|
||||
@@ -325,7 +325,7 @@
|
||||
|
||||
# Set the XDG mime stuff
|
||||
SET(MIMEDIR "share/mime/packages/")
|
||||
-SET(MIMELNKDIR "share/mimelnk/application/")
|
||||
+SET(MIMELNKDIR "share/applications/")
|
||||
|
||||
##############################################################################################################
|
||||
########## Build Setup ##########
|
||||
@@ -1,52 +0,0 @@
|
||||
From f19410ac3b27e33dd62105746784e61e85b90a1d Mon Sep 17 00:00:00 2001
|
||||
From: Jean Ghali <jghali@libertysurf.fr>
|
||||
Date: Wed, 2 Mar 2022 22:22:53 +0000
|
||||
Subject: [PATCH] #16764: Build break with poppler 22.03.0
|
||||
|
||||
git-svn-id: svn://scribus.net/trunk/Scribus@24982 11d20701-8431-0410-a711-e3c959e3b870
|
||||
---
|
||||
scribus/plugins/import/pdf/importpdf.cpp | 13 +++++++++++++
|
||||
1 file changed, 13 insertions(+)
|
||||
|
||||
diff --git a/scribus/plugins/import/pdf/importpdf.cpp b/scribus/plugins/import/pdf/importpdf.cpp
|
||||
index 154e58a3f0..392dcd9e64 100644
|
||||
--- a/scribus/plugins/import/pdf/importpdf.cpp
|
||||
+++ b/scribus/plugins/import/pdf/importpdf.cpp
|
||||
@@ -89,7 +89,11 @@ QImage PdfPlug::readThumbnail(const QString& fName)
|
||||
#endif
|
||||
globalParams->setErrQuiet(gTrue);
|
||||
|
||||
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 3, 0)
|
||||
+ PDFDoc pdfDoc{ std::make_unique<GooString>(fname) };
|
||||
+#else
|
||||
PDFDoc pdfDoc{fname, nullptr, nullptr, nullptr};
|
||||
+#endif
|
||||
if (!pdfDoc.isOk() || pdfDoc.getErrorCode() == errEncrypted)
|
||||
return QImage();
|
||||
|
||||
@@ -342,7 +346,11 @@ bool PdfPlug::convert(const QString& fn)
|
||||
globalParams->setErrQuiet(gTrue);
|
||||
// globalParams->setPrintCommands(gTrue);
|
||||
QList<OptionalContentGroup*> ocgGroups;
|
||||
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 3, 0)
|
||||
+ auto pdfDoc = std::make_unique<PDFDoc>(std::make_unique<GooString>(fname));
|
||||
+#else
|
||||
auto pdfDoc = std::unique_ptr<PDFDoc>(new PDFDoc(fname, nullptr, nullptr, nullptr));
|
||||
+#endif
|
||||
if (pdfDoc)
|
||||
{
|
||||
if (pdfDoc->getErrorCode() == errEncrypted)
|
||||
@@ -361,8 +369,13 @@ bool PdfPlug::convert(const QString& fn)
|
||||
#else
|
||||
auto fname = new GooString(QFile::encodeName(fn).data());
|
||||
#endif
|
||||
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 3, 0)
|
||||
+ std::optional<GooString> userPW(std::in_place, text.toLocal8Bit().data());
|
||||
+ pdfDoc.reset(new PDFDoc(std::make_unique<GooString>(fname), userPW, userPW, nullptr));
|
||||
+#else
|
||||
auto userPW = new GooString(text.toLocal8Bit().data());
|
||||
pdfDoc.reset(new PDFDoc(fname, userPW, userPW, nullptr));
|
||||
+#endif
|
||||
qApp->changeOverrideCursor(QCursor(Qt::WaitCursor));
|
||||
}
|
||||
if ((!pdfDoc) || (pdfDoc->getErrorCode() != errNone))
|
||||
@@ -1,288 +0,0 @@
|
||||
From f2237b8f0b5cf7690e864a22ef7a63a6d769fa36 Mon Sep 17 00:00:00 2001
|
||||
From: Jean Ghali <jghali@libertysurf.fr>
|
||||
Date: Fri, 1 Apr 2022 23:52:32 +0000
|
||||
Subject: [PATCH] Fix build with poppler 22.04.0
|
||||
|
||||
git-svn-id: svn://scribus.net/trunk/Scribus@25074 11d20701-8431-0410-a711-e3c959e3b870
|
||||
---
|
||||
scribus/plugins/import/pdf/slaoutput.cpp | 123 ++++++++++++++---------
|
||||
1 file changed, 78 insertions(+), 45 deletions(-)
|
||||
|
||||
diff --git a/scribus/plugins/import/pdf/slaoutput.cpp b/scribus/plugins/import/pdf/slaoutput.cpp
|
||||
index e20a81f99e..5626fe3477 100644
|
||||
--- a/scribus/plugins/import/pdf/slaoutput.cpp
|
||||
+++ b/scribus/plugins/import/pdf/slaoutput.cpp
|
||||
@@ -174,8 +174,13 @@ void AnoOutputDev::drawString(GfxState *state, POPPLER_CONST GooString *s)
|
||||
int shade = 100;
|
||||
currColorText = getColor(state->getFillColorSpace(), state->getFillColor(), &shade);
|
||||
fontSize = state->getFontSize();
|
||||
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 4, 0)
|
||||
+ if (state->getFont() && state->getFont()->getName())
|
||||
+ fontName = new GooString(state->getFont()->getName().value());
|
||||
+#else
|
||||
if (state->getFont())
|
||||
fontName = state->getFont()->getName()->copy();
|
||||
+#endif
|
||||
itemText = s->copy();
|
||||
}
|
||||
|
||||
@@ -357,7 +362,12 @@ std::unique_ptr<LinkAction> SlaOutputDev::SC_getAdditionalAction(const char *key
|
||||
GBool SlaOutputDev::annotations_callback(Annot *annota, void *user_data)
|
||||
{
|
||||
SlaOutputDev *dev = (SlaOutputDev*)user_data;
|
||||
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 4, 0)
|
||||
+ const PDFRectangle& annotRect = annota->getRect();;
|
||||
+ const PDFRectangle* box = &annotRect;
|
||||
+#else
|
||||
PDFRectangle *box = annota->getRect();
|
||||
+#endif
|
||||
double xCoor = dev->m_doc->currentPage()->xOffset() + box->x1 - dev->cropOffsetX;
|
||||
double yCoor = dev->m_doc->currentPage()->yOffset() + dev->m_doc->currentPage()->height() - box->y2 + dev->cropOffsetY;
|
||||
double width = box->x2 - box->x1;
|
||||
@@ -684,7 +694,12 @@ bool SlaOutputDev::handleWidgetAnnot(Annot* annota, double xCoor, double yCoor,
|
||||
if (apa || !achar)
|
||||
{
|
||||
AnoOutputDev *annotOutDev = new AnoOutputDev(m_doc, m_importedColors);
|
||||
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 4, 0)
|
||||
+ const PDFRectangle& annotaRect = annota->getRect();
|
||||
+ Gfx* gfx = new Gfx(pdfDoc, annotOutDev, pdfDoc->getPage(m_actPage)->getResourceDict(), &annotaRect, nullptr);
|
||||
+#else
|
||||
Gfx *gfx = new Gfx(pdfDoc, annotOutDev, pdfDoc->getPage(m_actPage)->getResourceDict(), annota->getRect(), nullptr);
|
||||
+#endif
|
||||
ano->draw(gfx, false);
|
||||
if (!bgFound)
|
||||
m_currColorFill = annotOutDev->currColorFill;
|
||||
@@ -2916,22 +2931,27 @@ void SlaOutputDev::markPoint(POPPLER_CONST char *name, Dict *properties)
|
||||
|
||||
void SlaOutputDev::updateFont(GfxState *state)
|
||||
{
|
||||
- GfxFont *gfxFont;
|
||||
-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 2, 0)
|
||||
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 4, 0)
|
||||
+ std::optional<GfxFontLoc> fontLoc;
|
||||
+ std::string fileName;
|
||||
+ std::unique_ptr<FoFiTrueType> ff;
|
||||
+ std::optional<std::vector<unsigned char>> tmpBuf;
|
||||
+#elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 2, 0)
|
||||
std::optional<GfxFontLoc> fontLoc;
|
||||
const GooString * fileName = nullptr;
|
||||
std::unique_ptr<FoFiTrueType> ff;
|
||||
+ char* tmpBuf = nullptr;
|
||||
#else
|
||||
GfxFontLoc * fontLoc = nullptr;
|
||||
GooString * fileName = nullptr;
|
||||
FoFiTrueType * ff = nullptr;
|
||||
+ char* tmpBuf = nullptr;
|
||||
#endif
|
||||
GfxFontType fontType;
|
||||
SlaOutFontFileID *id;
|
||||
SplashFontFile *fontFile;
|
||||
SplashFontSrc *fontsrc = nullptr;
|
||||
Object refObj, strObj;
|
||||
- char *tmpBuf = nullptr;
|
||||
int tmpBufLen = 0;
|
||||
int *codeToGID = nullptr;
|
||||
const double *textMat = nullptr;
|
||||
@@ -2943,7 +2963,11 @@ void SlaOutputDev::updateFont(GfxState *state)
|
||||
|
||||
m_font = nullptr;
|
||||
|
||||
- gfxFont = state->getFont();
|
||||
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 4, 0)
|
||||
+ GfxFont* gfxFont = state->getFont().get();
|
||||
+#else
|
||||
+ GfxFont* gfxFont = state->getFont();
|
||||
+#endif
|
||||
if (!gfxFont)
|
||||
goto err1;
|
||||
|
||||
@@ -2968,15 +2992,23 @@ void SlaOutputDev::updateFont(GfxState *state)
|
||||
if (fontLoc->locType == gfxFontLocEmbedded)
|
||||
{
|
||||
// if there is an embedded font, read it to memory
|
||||
- tmpBuf = gfxFont->readEmbFontFile(xref, &tmpBufLen);
|
||||
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 4, 0)
|
||||
+ tmpBuf = gfxFont->readEmbFontFile((xref) ? xref : pdfDoc->getXRef());
|
||||
if (! tmpBuf)
|
||||
goto err2;
|
||||
+#else
|
||||
+ tmpBuf = gfxFont->readEmbFontFile(xref, &tmpBufLen);
|
||||
+ if (!tmpBuf)
|
||||
+ goto err2;
|
||||
+#endif
|
||||
|
||||
// external font
|
||||
}
|
||||
else
|
||||
{ // gfxFontLocExternal
|
||||
-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 2, 0)
|
||||
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 4, 0)
|
||||
+ fileName = fontLoc->path;
|
||||
+#elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 2, 0)
|
||||
fileName = fontLoc->pathAsGooString();
|
||||
#else
|
||||
fileName = fontLoc->path;
|
||||
@@ -2985,52 +3017,54 @@ void SlaOutputDev::updateFont(GfxState *state)
|
||||
}
|
||||
|
||||
fontsrc = new SplashFontSrc;
|
||||
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 4, 0)
|
||||
+ if (!fileName.empty())
|
||||
+ fontsrc->setFile(fileName);
|
||||
+ else
|
||||
+ fontsrc->setBuf(std::move(tmpBuf.value()));
|
||||
+#else
|
||||
if (fileName)
|
||||
fontsrc->setFile(fileName, gFalse);
|
||||
else
|
||||
fontsrc->setBuf(tmpBuf, tmpBufLen, gTrue);
|
||||
+#endif
|
||||
|
||||
// load the font file
|
||||
switch (fontType) {
|
||||
case fontType1:
|
||||
- if (!(fontFile = m_fontEngine->loadType1Font(
|
||||
- id,
|
||||
- fontsrc,
|
||||
- (const char **)((Gfx8BitFont *) gfxFont)->getEncoding())))
|
||||
+ if (!(fontFile = m_fontEngine->loadType1Font(id, fontsrc, (const char **)((Gfx8BitFont *) gfxFont)->getEncoding())))
|
||||
{
|
||||
- error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'",
|
||||
- gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)");
|
||||
+ error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)");
|
||||
goto err2;
|
||||
}
|
||||
break;
|
||||
case fontType1C:
|
||||
- if (!(fontFile = m_fontEngine->loadType1CFont(
|
||||
- id,
|
||||
- fontsrc,
|
||||
- (const char **)((Gfx8BitFont *) gfxFont)->getEncoding())))
|
||||
+ if (!(fontFile = m_fontEngine->loadType1CFont(id, fontsrc, (const char **)((Gfx8BitFont *) gfxFont)->getEncoding())))
|
||||
{
|
||||
- error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'",
|
||||
- gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)");
|
||||
+ error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)");
|
||||
goto err2;
|
||||
}
|
||||
break;
|
||||
case fontType1COT:
|
||||
- if (!(fontFile = m_fontEngine->loadOpenTypeT1CFont(
|
||||
- id,
|
||||
- fontsrc,
|
||||
- (const char **)((Gfx8BitFont *) gfxFont)->getEncoding())))
|
||||
+ if (!(fontFile = m_fontEngine->loadOpenTypeT1CFont(id, fontsrc, (const char **)((Gfx8BitFont *) gfxFont)->getEncoding())))
|
||||
{
|
||||
- error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'",
|
||||
- gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)");
|
||||
+ error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)");
|
||||
goto err2;
|
||||
}
|
||||
break;
|
||||
case fontTrueType:
|
||||
case fontTrueTypeOT:
|
||||
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 4, 0)
|
||||
+ if (!fileName.empty())
|
||||
+ ff = FoFiTrueType::load(fileName.c_str());
|
||||
+ else
|
||||
+ ff = FoFiTrueType::make(fontsrc->buf.data(), fontsrc->buf.size());
|
||||
+#else
|
||||
if (fileName)
|
||||
ff = FoFiTrueType::load(fileName->getCString());
|
||||
else
|
||||
ff = FoFiTrueType::make(tmpBuf, tmpBufLen);
|
||||
+#endif
|
||||
if (ff)
|
||||
{
|
||||
#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 2, 0)
|
||||
@@ -3047,24 +3081,17 @@ void SlaOutputDev::updateFont(GfxState *state)
|
||||
codeToGID = nullptr;
|
||||
n = 0;
|
||||
}
|
||||
- if (!(fontFile = m_fontEngine->loadTrueTypeFont(
|
||||
- id,
|
||||
- fontsrc,
|
||||
- codeToGID, n)))
|
||||
+ if (!(fontFile = m_fontEngine->loadTrueTypeFont(id, fontsrc, codeToGID, n)))
|
||||
{
|
||||
- error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'",
|
||||
- gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)");
|
||||
+ error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)");
|
||||
goto err2;
|
||||
}
|
||||
break;
|
||||
case fontCIDType0:
|
||||
case fontCIDType0C:
|
||||
- if (!(fontFile = m_fontEngine->loadCIDFont(
|
||||
- id,
|
||||
- fontsrc)))
|
||||
+ if (!(fontFile = m_fontEngine->loadCIDFont(id, fontsrc)))
|
||||
{
|
||||
- error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'",
|
||||
- gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)");
|
||||
+ error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)");
|
||||
goto err2;
|
||||
}
|
||||
break;
|
||||
@@ -3080,10 +3107,7 @@ void SlaOutputDev::updateFont(GfxState *state)
|
||||
codeToGID = nullptr;
|
||||
n = 0;
|
||||
}
|
||||
- if (!(fontFile = m_fontEngine->loadOpenTypeCFFFont(
|
||||
- id,
|
||||
- fontsrc,
|
||||
- codeToGID, n)))
|
||||
+ if (!(fontFile = m_fontEngine->loadOpenTypeCFFFont(id, fontsrc, codeToGID, n)))
|
||||
{
|
||||
error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'",
|
||||
gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)");
|
||||
@@ -3105,10 +3129,17 @@ void SlaOutputDev::updateFont(GfxState *state)
|
||||
}
|
||||
else
|
||||
{
|
||||
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 4, 0)
|
||||
+ if (!fileName.empty())
|
||||
+ ff = FoFiTrueType::load(fileName.c_str());
|
||||
+ else
|
||||
+ ff = FoFiTrueType::make(fontsrc->buf.data(), fontsrc->buf.size());
|
||||
+#else
|
||||
if (fileName)
|
||||
ff = FoFiTrueType::load(fileName->getCString());
|
||||
else
|
||||
ff = FoFiTrueType::make(tmpBuf, tmpBufLen);
|
||||
+#endif
|
||||
if (! ff)
|
||||
goto err2;
|
||||
#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 2, 0)
|
||||
@@ -3119,13 +3150,9 @@ void SlaOutputDev::updateFont(GfxState *state)
|
||||
delete ff;
|
||||
#endif
|
||||
}
|
||||
- if (!(fontFile = m_fontEngine->loadTrueTypeFont(
|
||||
- id,
|
||||
- fontsrc,
|
||||
- codeToGID, n, faceIndex)))
|
||||
+ if (!(fontFile = m_fontEngine->loadTrueTypeFont(id, fontsrc, codeToGID, n, faceIndex)))
|
||||
{
|
||||
- error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'",
|
||||
- gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)");
|
||||
+ error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)");
|
||||
goto err2;
|
||||
}
|
||||
break;
|
||||
@@ -3269,9 +3296,15 @@ void SlaOutputDev::drawChar(GfxState* state, double x, double y, double dx, doub
|
||||
GBool SlaOutputDev::beginType3Char(GfxState *state, double x, double y, double dx, double dy, CharCode code, POPPLER_CONST_082 Unicode *u, int uLen)
|
||||
{
|
||||
// qDebug() << "beginType3Char";
|
||||
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 4, 0)
|
||||
GfxFont *gfxFont;
|
||||
+ if (!(gfxFont = state->getFont().get()))
|
||||
+ return gTrue;
|
||||
+#else
|
||||
+ GfxFont* gfxFont;
|
||||
if (!(gfxFont = state->getFont()))
|
||||
return gTrue;
|
||||
+#endif
|
||||
if (gfxFont->getType() != fontType3)
|
||||
return gTrue;
|
||||
F3Entry f3e;
|
||||
@@ -1,28 +0,0 @@
|
||||
From f75c1613db67f4067643d0218a2db3235e42ec9f Mon Sep 17 00:00:00 2001
|
||||
From: Jean Ghali <jghali@libertysurf.fr>
|
||||
Date: Thu, 3 Feb 2022 19:46:13 +0000
|
||||
Subject: [PATCH] Small update vs latest code in poppler
|
||||
|
||||
git-svn-id: svn://scribus.net/trunk/Scribus@24885 11d20701-8431-0410-a711-e3c959e3b870
|
||||
---
|
||||
scribus/plugins/import/pdf/slaoutput.cpp | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/scribus/plugins/import/pdf/slaoutput.cpp b/scribus/plugins/import/pdf/slaoutput.cpp
|
||||
index 3650c96f52..a6f4e00fa9 100644
|
||||
--- a/scribus/plugins/import/pdf/slaoutput.cpp
|
||||
+++ b/scribus/plugins/import/pdf/slaoutput.cpp
|
||||
@@ -3072,10 +3072,10 @@ void SlaOutputDev::updateFont(GfxState *state)
|
||||
delete id;
|
||||
else
|
||||
{
|
||||
- if (!(fontLoc = gfxFont->locateFont(xref, nullptr)))
|
||||
+ fontLoc = gfxFont->locateFont((xref) ? xref : pdfDoc->getXRef(), nullptr);
|
||||
+ if (!fontLoc)
|
||||
{
|
||||
- error(errSyntaxError, -1, "Couldn't find a font for '{0:s}'",
|
||||
- gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)");
|
||||
+ error(errSyntaxError, -1, "Couldn't find a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)");
|
||||
goto err2;
|
||||
}
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
Description: Fix case of "OpenSSL" to match the case of the file shipped by cmake
|
||||
Author: Mattia Rizzolo <mattia@debian.org>
|
||||
Last-Update: 2017-06-05
|
||||
|
||||
--- a/cmake/modules/FindLIBPODOFO.cmake
|
||||
+++ b/cmake/modules/FindLIBPODOFO.cmake
|
||||
@@ -45,7 +45,7 @@
|
||||
#message(STATUS "PODOFO PATCH VERSION ${PODOFO_PATCH_VER}")
|
||||
set(LIBPODOFO_VERSION "${PODOFO_MAJOR_VER}.${PODOFO_MINOR_VER}.${PODOFO_PATCH_VER}" CACHE STRING "PoDoFo version string")
|
||||
if(LIBPODOFO_VERSION VERSION_GREATER "0.9.4")
|
||||
- find_package(OPENSSL)
|
||||
+ find_package(OpenSSL)
|
||||
if (OPENSSL_FOUND)
|
||||
message("OpenSSL found OK for installed version of PoDoFo (>= 0.9.5) - Enabling support for PDF embedded in AI")
|
||||
set(LIBPODOFO_FOUND TRUE CACHE BOOLEAN "Was libpodofo found")
|
||||
@@ -0,0 +1,111 @@
|
||||
diff --git a/scribus/plugins/import/pdf/slaoutput.cpp b/scribus/plugins/import/pdf/slaoutput.cpp
|
||||
index db463b6..eb86be2 100644
|
||||
--- a/scribus/plugins/import/pdf/slaoutput.cpp
|
||||
+++ b/scribus/plugins/import/pdf/slaoutput.cpp
|
||||
@@ -7,6 +7,7 @@ for which a new license (GPL+exception) is in place.
|
||||
|
||||
#include "slaoutput.h"
|
||||
|
||||
+#include <array>
|
||||
#include <memory>
|
||||
#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 2, 0)
|
||||
#include <optional>
|
||||
@@ -2495,7 +2496,12 @@ void SlaOutputDev::drawImageMask(GfxState *state, Object *ref, Stream *str, int
|
||||
{
|
||||
// qDebug() << "Draw Image Mask";
|
||||
auto imgStr = std::make_shared<ImageStream>(str, width, 1, 1);
|
||||
-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 02, 0)
|
||||
+
|
||||
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 1, 0)
|
||||
+ bool rewindDone = imgStr->rewind();
|
||||
+ if (!rewindDone)
|
||||
+ return;
|
||||
+#elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 02, 0)
|
||||
bool resetDone = imgStr->reset();
|
||||
if (!resetDone)
|
||||
return;
|
||||
@@ -2576,7 +2582,12 @@ void SlaOutputDev::drawSoftMaskedImage(GfxState *state, Object *ref, Stream *str
|
||||
{
|
||||
// qDebug() << "SlaOutputDev::drawSoftMaskedImage Masked Image Components" << colorMap->getNumPixelComps();
|
||||
auto imgStr = std::make_shared<ImageStream>(str, width, colorMap->getNumPixelComps(), colorMap->getBits());
|
||||
-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 02, 0)
|
||||
+
|
||||
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 1, 0)
|
||||
+ bool rewindDone = imgStr->rewind();
|
||||
+ if (!rewindDone)
|
||||
+ return;
|
||||
+#elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 02, 0)
|
||||
bool resetDone = imgStr->reset();
|
||||
if (!resetDone)
|
||||
return;
|
||||
@@ -2598,7 +2609,11 @@ void SlaOutputDev::drawSoftMaskedImage(GfxState *state, Object *ref, Stream *str
|
||||
return;
|
||||
|
||||
auto mskStr = std::make_shared<ImageStream>(maskStr, maskWidth, maskColorMap->getNumPixelComps(), maskColorMap->getBits());
|
||||
-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 02, 0)
|
||||
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 1, 0)
|
||||
+ bool mskRewindDone = mskStr->rewind();
|
||||
+ if (!mskRewindDone)
|
||||
+ return;
|
||||
+#elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 02, 0)
|
||||
bool mskResetDone = mskStr->reset();
|
||||
if (!mskResetDone)
|
||||
return;
|
||||
@@ -2660,7 +2675,11 @@ void SlaOutputDev::drawMaskedImage(GfxState *state, Object *ref, Stream *str, i
|
||||
{
|
||||
// qDebug() << "SlaOutputDev::drawMaskedImage";
|
||||
auto imgStr = std::make_shared<ImageStream>(str, width, colorMap->getNumPixelComps(), colorMap->getBits());
|
||||
-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 02, 0)
|
||||
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 1, 0)
|
||||
+ bool rewindDone = imgStr->rewind();
|
||||
+ if (!rewindDone)
|
||||
+ return;
|
||||
+#elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 02, 0)
|
||||
bool resetDone = imgStr->reset();
|
||||
if (resetDone)
|
||||
return;
|
||||
@@ -2682,7 +2701,11 @@ void SlaOutputDev::drawMaskedImage(GfxState *state, Object *ref, Stream *str, i
|
||||
return;
|
||||
|
||||
auto mskStr = std::make_shared<ImageStream>(maskStr, maskWidth, 1, 1);
|
||||
-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 02, 0)
|
||||
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 1, 0)
|
||||
+ bool mskRewindDone = mskStr->rewind();
|
||||
+ if (!mskRewindDone)
|
||||
+ return;
|
||||
+#elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 02, 0)
|
||||
bool mskResetDone = mskStr->reset();
|
||||
if (!mskResetDone)
|
||||
return;
|
||||
@@ -2732,7 +2755,11 @@ void SlaOutputDev::drawMaskedImage(GfxState *state, Object *ref, Stream *str, i
|
||||
void SlaOutputDev::drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, bool interpolate, const int* maskColors, bool inlineImg)
|
||||
{
|
||||
auto imgStr = std::make_shared<ImageStream>(str, width, colorMap->getNumPixelComps(), colorMap->getBits());
|
||||
-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 02, 0)
|
||||
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 1, 0)
|
||||
+ bool rewindDone = imgStr->rewind();
|
||||
+ if (!rewindDone)
|
||||
+ return;
|
||||
+#elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 02, 0)
|
||||
bool resetDone = imgStr->reset();
|
||||
if (!resetDone)
|
||||
return;
|
||||
@@ -3125,10 +3152,18 @@ void SlaOutputDev::updateFont(GfxState *state)
|
||||
#endif
|
||||
const double *textMat = nullptr;
|
||||
double m11, m12, m21, m22, fontSize;
|
||||
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 1, 0)
|
||||
+ std::array<SplashCoord, 4> mat = { 1.0, 0.0, 0.0, 1.0 };
|
||||
+#else
|
||||
SplashCoord mat[4] = { 1.0, 0.0, 0.0, 1.0 };
|
||||
+#endif
|
||||
int n = 0;
|
||||
int faceIndex = 0;
|
||||
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 1, 0)
|
||||
+ std::array<SplashCoord, 6> matrix = { 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 };
|
||||
+#else
|
||||
SplashCoord matrix[6] = { 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 };
|
||||
+#endif
|
||||
|
||||
m_font = nullptr;
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
--- a/CMakeLists_Dependencies.cmake 2019-07-31 00:34:43.000000000 +0200
|
||||
+++ b/CMakeLists_Dependencies.cmake 2019-10-02 00:17:34.968355656 +0200
|
||||
@@ -954,6 +954,16 @@
|
||||
endif()
|
||||
#>>HUNSPELL for Speelling support
|
||||
|
||||
+#<<HYPHEN for Hyphenation support
|
||||
+find_package(HYPHEN)
|
||||
+if(HYPHEN_FOUND)
|
||||
+ message("System Hyphen Found OK")
|
||||
+ set(HAVE_HYPHEN ON)
|
||||
+else()
|
||||
+ message("Hyphen or its developer libraries NOT found - using bundled Hyphen instead")
|
||||
+endif()
|
||||
+#>>HYPHEN for Hyphenation support
|
||||
+
|
||||
#<<PoDoFo for AI PDF import
|
||||
option(WITH_PODOFO "Enable support for PDF embedded in AI" ON)
|
||||
if (WITH_PODOFO)
|
||||
@@ -1,54 +0,0 @@
|
||||
diff --git a/scribus/CMakeLists.txt b/scribus/CMakeLists.txt
|
||||
index aec69d3..9451404 100644
|
||||
--- a/scribus/CMakeLists.txt
|
||||
+++ b/scribus/CMakeLists.txt
|
||||
@@ -587,7 +587,9 @@ set(SCRIBUS_SOURCES
|
||||
${SCRIBUS_GMAGICK_SRC}
|
||||
)
|
||||
|
||||
-if(NOT HAVE_HYPHEN)
|
||||
+if(HAVE_HYPHEN)
|
||||
+ include_directories(${HYPHEN_INCLUDE_DIR})
|
||||
+else()
|
||||
include_directories(third_party/hyphen)
|
||||
set(SCRIBUS_SOURCES
|
||||
${SCRIBUS_SOURCES}
|
||||
@@ -678,12 +680,6 @@ if(HAVE_PODOFO)
|
||||
|
||||
endif()
|
||||
|
||||
-if(HAVE_HYPHEN)
|
||||
- target_link_libraries(${EXE_NAME} PRIVATE
|
||||
- ${HYPHEN_LIBRARY}
|
||||
- )
|
||||
-endif()
|
||||
-
|
||||
|
||||
if(GESTURE_FRAME_PREVIEW)
|
||||
message(STATUS "Enable gesture frame preview [experimental]")
|
||||
@@ -743,6 +739,12 @@ if(WANT_PCH)
|
||||
target_precompile_headers(${EXE_NAME} PRIVATE scribus_pch.h)
|
||||
endif()
|
||||
|
||||
+if(HAVE_HYPHEN)
|
||||
+ target_link_libraries(${EXE_NAME} PRIVATE
|
||||
+ ${HYPHEN_LIBRARY}
|
||||
+ )
|
||||
+endif()
|
||||
+
|
||||
if(WIN32)
|
||||
set_target_properties(${EXE_NAME}
|
||||
PROPERTIES
|
||||
diff --git a/scribus/hyphenator.h b/scribus/hyphenator.h
|
||||
index 7fa4abd..2863c70 100644
|
||||
--- a/scribus/hyphenator.h
|
||||
+++ b/scribus/hyphenator.h
|
||||
@@ -13,7 +13,7 @@ for which a new license (GPL+exception) is in place.
|
||||
#include <QSet>
|
||||
|
||||
#include "scribusapi.h"
|
||||
-#include "third_party/hyphen/hyphen.h"
|
||||
+#include <hyphen.h>
|
||||
|
||||
class ScribusDoc;
|
||||
class ScribusMainWindow;
|
||||
@@ -1,81 +0,0 @@
|
||||
From 7ce0ac16fd42d61ef9082b27822c7d9d79c7fef7 Mon Sep 17 00:00:00 2001
|
||||
From: Jean Ghali <jghali@libertysurf.fr>
|
||||
Date: Mon, 1 Mar 2021 21:52:54 +0000
|
||||
Subject: [PATCH 1/2] Attempt to fix build of pdf import plugin with poppler
|
||||
21.03.0
|
||||
|
||||
git-svn-id: svn://scribus.net/trunk/Scribus@24537 11d20701-8431-0410-a711-e3c959e3b870
|
||||
---
|
||||
scribus/plugins/import/pdf/slaoutput.cpp | 12 +++++++++++-
|
||||
scribus/plugins/import/pdf/slaoutput.h | 4 ++++
|
||||
2 files changed, 15 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/scribus/plugins/import/pdf/slaoutput.cpp b/scribus/plugins/import/pdf/slaoutput.cpp
|
||||
index 7cbc73e..d1b37a0 100644
|
||||
--- a/scribus/plugins/import/pdf/slaoutput.cpp
|
||||
+++ b/scribus/plugins/import/pdf/slaoutput.cpp
|
||||
@@ -2292,9 +2292,19 @@ GBool SlaOutputDev::patchMeshShadedFill(GfxState *state, GfxPatchMeshShading *sh
|
||||
return gTrue;
|
||||
}
|
||||
|
||||
-GBool SlaOutputDev::tilingPatternFill(GfxState *state, Gfx * /*gfx*/, Catalog *cat, Object *str, POPPLER_CONST_070 double *pmat, int paintType, int tilingType, Dict *resDict, POPPLER_CONST_070 double *mat, POPPLER_CONST_070 double *bbox, int x0, int y0, int x1, int y1, double xStep, double yStep)
|
||||
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(21, 3, 0)
|
||||
+bool SlaOutputDev::tilingPatternFill(GfxState *state, Gfx * /*gfx*/, Catalog *cat, GfxTilingPattern *tPat, const double *mat, int x0, int y0, int x1, int y1, double xStep, double yStep)
|
||||
+#else
|
||||
+GBool SlaOutputDev::tilingPatternFill(GfxState *state, Gfx * /*gfx*/, Catalog *cat, Object *str, POPPLER_CONST_070 double *pmat, int /*paintType*/, int /*tilingType*/, Dict *resDict, POPPLER_CONST_070 double *mat, POPPLER_CONST_070 double *bbox, int x0, int y0, int x1, int y1, double xStep, double yStep)
|
||||
+#endif
|
||||
{
|
||||
// qDebug() << "SlaOutputDev::tilingPatternFill";
|
||||
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(21, 3, 0)
|
||||
+ const double *bbox = tPat->getBBox();
|
||||
+ const double *pmat = tPat->getMatrix();
|
||||
+ Dict *resDict = tPat->getResDict();
|
||||
+#endif
|
||||
+
|
||||
PDFRectangle box;
|
||||
Gfx *gfx;
|
||||
QString id;
|
||||
diff --git a/scribus/plugins/import/pdf/slaoutput.h b/scribus/plugins/import/pdf/slaoutput.h
|
||||
index 5149f19..66c3420 100644
|
||||
--- a/scribus/plugins/import/pdf/slaoutput.h
|
||||
+++ b/scribus/plugins/import/pdf/slaoutput.h
|
||||
@@ -197,7 +197,11 @@ public:
|
||||
void stroke(GfxState *state) override;
|
||||
void fill(GfxState *state) override;
|
||||
void eoFill(GfxState *state) override;
|
||||
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(21, 3, 0)
|
||||
+ bool tilingPatternFill(GfxState *state, Gfx *gfx, Catalog *cat, GfxTilingPattern *tPat, const double *mat, int x0, int y0, int x1, int y1, double xStep, double yStep) override;
|
||||
+#else
|
||||
GBool tilingPatternFill(GfxState *state, Gfx *gfx, Catalog *cat, Object *str, POPPLER_CONST_070 double *pmat, int paintType, int tilingType, Dict *resDict, POPPLER_CONST_070 double *mat, POPPLER_CONST_070 double *bbox, int x0, int y0, int x1, int y1, double xStep, double yStep) override;
|
||||
+#endif
|
||||
GBool functionShadedFill(GfxState * /*state*/, GfxFunctionShading * /*shading*/) override { qDebug() << "Function Shaded Fill"; return gFalse; }
|
||||
GBool axialShadedFill(GfxState *state, GfxAxialShading *shading, double tMin, double tMax) override;
|
||||
GBool axialShadedSupportExtend(GfxState *state, GfxAxialShading *shading) override { return (shading->getExtend0() == shading->getExtend1()); }
|
||||
|
||||
From 6b9ff916959bcb941866f0bd86da639a421337f8 Mon Sep 17 00:00:00 2001
|
||||
From: Jean Ghali <jghali@libertysurf.fr>
|
||||
Date: Mon, 1 Mar 2021 22:00:02 +0000
|
||||
Subject: [PATCH 2/2] Attempt to fix build of pdf import plugin with poppler
|
||||
21.03.0
|
||||
|
||||
git-svn-id: svn://scribus.net/trunk/Scribus@24538 11d20701-8431-0410-a711-e3c959e3b870
|
||||
---
|
||||
scribus/plugins/import/pdf/slaoutput.cpp | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/scribus/plugins/import/pdf/slaoutput.cpp b/scribus/plugins/import/pdf/slaoutput.cpp
|
||||
index d1b37a0..de0a414 100644
|
||||
--- a/scribus/plugins/import/pdf/slaoutput.cpp
|
||||
+++ b/scribus/plugins/import/pdf/slaoutput.cpp
|
||||
@@ -2336,7 +2336,11 @@ GBool SlaOutputDev::tilingPatternFill(GfxState *state, Gfx * /*gfx*/, Catalog *c
|
||||
// Unset the clip path as it is unrelated to the pattern's coordinate space.
|
||||
QPainterPath savedClip = m_currentClipPath;
|
||||
m_currentClipPath = QPainterPath();
|
||||
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(21, 3, 0)
|
||||
+ gfx->display(tPat->getContentStream());
|
||||
+#else
|
||||
gfx->display(str);
|
||||
+#endif
|
||||
m_currentClipPath = savedClip;
|
||||
inPattern--;
|
||||
gElements = m_groupStack.pop();
|
||||
@@ -1,15 +0,0 @@
|
||||
scribus/sclayer.cpp | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/scribus/sclayer.cpp b/scribus/sclayer.cpp
|
||||
index 502112b..4da7bd5 100644
|
||||
--- a/scribus/sclayer.cpp
|
||||
+++ b/scribus/sclayer.cpp
|
||||
@@ -9,6 +9,7 @@ for which a new license (GPL+exception) is in place.
|
||||
|
||||
#include <QHash> //necessary to avoid msvc warnings induced by SCRIBUS_API on ScLayers + early instanciation of templates
|
||||
#include <QVector> //necessary to avoid msvc warnings induced by SCRIBUS_API on ScLayers + early instanciation of templates
|
||||
+#include <QObject>
|
||||
#include <QtAlgorithms>
|
||||
|
||||
ScLayer::ScLayer(void)
|
||||
@@ -1,123 +0,0 @@
|
||||
CMakeLists.txt | 8 ++++++++
|
||||
scribus/colormgmt/CMakeLists.txt | 2 ++
|
||||
scribus/desaxe/CMakeLists.txt | 1 +
|
||||
scribus/fonts/CMakeLists.txt | 1 +
|
||||
scribus/styles/CMakeLists.txt | 2 ++
|
||||
scribus/text/CMakeLists.txt | 1 +
|
||||
scribus/third_party/lib2geom/CMakeLists.txt | 8 +-------
|
||||
scribus/third_party/zip/CMakeLists.txt | 2 ++
|
||||
8 files changed, 18 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 29d66f3..62d145f 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -131,6 +131,14 @@ IF (_machine_sparc64)
|
||||
SET(ARCH64BIT 1)
|
||||
ENDIF (_machine_sparc64)
|
||||
|
||||
+# We need to pass -fPIC to lib2geom on amd64, mips, mipsel, and hppa. See:
|
||||
+# http://www.gentoo.org/proj/en/base/amd64/howtos/index.xml?part=1&chap=3 and
|
||||
+# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=559133
|
||||
+
|
||||
+IF (ARCH_X86_64 EQUAL 1 OR ARCH_HPPA EQUAL 1 OR ARCH_MIPS EQUAL 1 OR ARCH_MIPS_64 EQUAL 1 OR ARCH_PPC_64 EQUAL 1)
|
||||
+ SET(CMAKE_CXX_FLAGS_FPIC "-fPIC")
|
||||
+ENDIF (ARCH_X86_64 EQUAL 1 OR ARCH_HPPA EQUAL 1 OR ARCH_MIPS EQUAL 1 OR ARCH_MIPS_64 EQUAL 1 OR ARCH_PPC_64 EQUAL 1)
|
||||
+
|
||||
## Do our Apple OSX version setup
|
||||
IF (APPLE AND CMAKE_SIZEOF_VOID_P EQUAL 8 AND (ARCH_X86 EQUAL 1 OR ARCH_X86_64 EQUAL 1))
|
||||
STRING(REGEX REPLACE ".*-darwin([0-9]+).*" "\\1" _apple_ver "${MACHINE}")
|
||||
diff --git a/scribus/colormgmt/CMakeLists.txt b/scribus/colormgmt/CMakeLists.txt
|
||||
index 7298a28..87c4f5e 100644
|
||||
--- a/scribus/colormgmt/CMakeLists.txt
|
||||
+++ b/scribus/colormgmt/CMakeLists.txt
|
||||
@@ -3,6 +3,8 @@ ${CMAKE_SOURCE_DIR}
|
||||
${CMAKE_SOURCE_DIR}/scribus
|
||||
)
|
||||
|
||||
+SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_FPIC}")
|
||||
+
|
||||
INCLUDE_DIRECTORIES( ${LCMS2_INCLUDE_DIR} )
|
||||
SET(SCRIBUS_LCMS_IMPL_SOURCES
|
||||
sclcms2colormgmtengineimpl.cpp
|
||||
diff --git a/scribus/desaxe/CMakeLists.txt b/scribus/desaxe/CMakeLists.txt
|
||||
index 0098028..85e76b6 100644
|
||||
--- a/scribus/desaxe/CMakeLists.txt
|
||||
+++ b/scribus/desaxe/CMakeLists.txt
|
||||
@@ -4,6 +4,7 @@ ${CMAKE_SOURCE_DIR}/scribus
|
||||
${FREETYPE_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
+SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_FPIC}")
|
||||
|
||||
SET(SCRIBUS_DESAXE_LIB_SOURCES
|
||||
saxXML.cpp
|
||||
diff --git a/scribus/fonts/CMakeLists.txt b/scribus/fonts/CMakeLists.txt
|
||||
index 799e102..f04c680 100644
|
||||
--- a/scribus/fonts/CMakeLists.txt
|
||||
+++ b/scribus/fonts/CMakeLists.txt
|
||||
@@ -4,6 +4,7 @@ ${CMAKE_SOURCE_DIR}/scribus
|
||||
${FREETYPE_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
+SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_FPIC}")
|
||||
|
||||
SET(SCRIBUS_FONTS_LIB_SOURCES
|
||||
scface.cpp
|
||||
diff --git a/scribus/styles/CMakeLists.txt b/scribus/styles/CMakeLists.txt
|
||||
index 6e0cf0a..2839689 100644
|
||||
--- a/scribus/styles/CMakeLists.txt
|
||||
+++ b/scribus/styles/CMakeLists.txt
|
||||
@@ -4,6 +4,8 @@ INCLUDE_DIRECTORIES(
|
||||
${FREETYPE_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
+SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_FPIC}")
|
||||
+
|
||||
SET(SCRIBUS_STYLES_MOC_CLASSES
|
||||
)
|
||||
|
||||
diff --git a/scribus/text/CMakeLists.txt b/scribus/text/CMakeLists.txt
|
||||
index 1cd112f..4f658e3 100644
|
||||
--- a/scribus/text/CMakeLists.txt
|
||||
+++ b/scribus/text/CMakeLists.txt
|
||||
@@ -4,6 +4,7 @@ INCLUDE_DIRECTORIES(
|
||||
${FREETYPE_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
+SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_FPIC}")
|
||||
|
||||
SET(SCRIBUS_TEXT_MOC_CLASSES
|
||||
storytext.h
|
||||
diff --git a/scribus/third_party/lib2geom/CMakeLists.txt b/scribus/third_party/lib2geom/CMakeLists.txt
|
||||
index 6187d96..3106f6e 100755
|
||||
--- a/scribus/third_party/lib2geom/CMakeLists.txt
|
||||
+++ b/scribus/third_party/lib2geom/CMakeLists.txt
|
||||
@@ -5,13 +5,7 @@ ${CMAKE_SOURCE_DIR}/scribus
|
||||
|
||||
SET(2GEOM_VERSION 0.1.0)
|
||||
|
||||
-# We need to pass -fPIC to lib2geom on amd64, mips, mipsel, and hppa. See:
|
||||
-# http://www.gentoo.org/proj/en/base/amd64/howtos/index.xml?part=1&chap=3 and
|
||||
-# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=559133
|
||||
-
|
||||
-IF (ARCH_X86_64 EQUAL 1 OR ARCH_HPPA EQUAL 1 OR ARCH_MIPS EQUAL 1 OR ARCH_MIPS_64 EQUAL 1 OR ARCH_PPC_64 EQUAL 1)
|
||||
- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
|
||||
-ENDIF (ARCH_X86_64 EQUAL 1 OR ARCH_HPPA EQUAL 1 OR ARCH_MIPS EQUAL 1 OR ARCH_MIPS_64 EQUAL 1 OR ARCH_PPC_64 EQUAL 1)
|
||||
+SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_FPIC}")
|
||||
|
||||
OPTION(2GEOM_BUILD_SHARED
|
||||
"Build lib2geom and libtoy as shared libraries."
|
||||
diff --git a/scribus/third_party/zip/CMakeLists.txt b/scribus/third_party/zip/CMakeLists.txt
|
||||
index edf9683..f7676ab 100644
|
||||
--- a/scribus/third_party/zip/CMakeLists.txt
|
||||
+++ b/scribus/third_party/zip/CMakeLists.txt
|
||||
@@ -4,6 +4,8 @@ ${CMAKE_SOURCE_DIR}/scribus
|
||||
${ZLIB_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
+SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_FPIC}")
|
||||
+
|
||||
SET(SCRIBUS_ZIP_LIB_SOURCES
|
||||
unzip.cpp
|
||||
zip.cpp
|
||||
@@ -1,42 +0,0 @@
|
||||
CMakeLists.txt | 28 +++++++++++++++-------------
|
||||
1 file changed, 15 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 29d66f3..1c08cdd 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -244,19 +244,21 @@ else()
|
||||
endif()
|
||||
|
||||
#SHARE - use the default on Apple as TAG_VERSION is empty
|
||||
-if(WIN32 OR OS2)
|
||||
- set(DOCDIR "${CMAKE_INSTALL_DATAROOTDIR}/doc/")
|
||||
-else()
|
||||
- if(TAG_VERSION OR BUILD_OSX_BUNDLE)
|
||||
- set(DOCDIR "${CMAKE_INSTALL_DATAROOTDIR}/doc/${MAIN_DIR_NAME}${TAG_VERSION}/")
|
||||
- else()
|
||||
- if(NOT WANT_VERSIONING)
|
||||
- set(DOCDIR "${CMAKE_INSTALL_DATAROOTDIR}/doc/${MAIN_DIR_NAME}/")
|
||||
- else()
|
||||
- set(DOCDIR "${CMAKE_INSTALL_DATAROOTDIR}/doc/${MAIN_DIR_NAME}-${VERSION}/")
|
||||
- endif()
|
||||
- endif()
|
||||
-endif()
|
||||
+if(NOT DOCDIR)
|
||||
+ if(WIN32 OR OS2)
|
||||
+ set(DOCDIR "${CMAKE_INSTALL_DATAROOTDIR}/doc/")
|
||||
+ else()
|
||||
+ if(TAG_VERSION OR BUILD_OSX_BUNDLE)
|
||||
+ set(DOCDIR "${CMAKE_INSTALL_DATAROOTDIR}/doc/${MAIN_DIR_NAME}${TAG_VERSION}/")
|
||||
+ else()
|
||||
+ if(NOT WANT_VERSIONING)
|
||||
+ set(DOCDIR "${CMAKE_INSTALL_DATAROOTDIR}/doc/${MAIN_DIR_NAME}/")
|
||||
+ else()
|
||||
+ set(DOCDIR "${CMAKE_INSTALL_DATAROOTDIR}/doc/${MAIN_DIR_NAME}-${VERSION}/")
|
||||
+ endif()
|
||||
+ endif()
|
||||
+ endif()
|
||||
+endif()
|
||||
if(NOT IS_ABSOLUTE ${DOCDIR})
|
||||
add_definitions("-DDOCDIR=\\\"${CMAKE_INSTALL_PREFIX}/${DOCDIR}\\\"")
|
||||
else()
|
||||
@@ -1,16 +0,0 @@
|
||||
scribus/third_party/prc/CMakeLists.txt | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/scribus/third_party/prc/CMakeLists.txt b/scribus/third_party/prc/CMakeLists.txt
|
||||
index 5f7c2c6..1da7177 100644
|
||||
--- a/scribus/third_party/prc/CMakeLists.txt
|
||||
+++ b/scribus/third_party/prc/CMakeLists.txt
|
||||
@@ -5,6 +5,8 @@ ${OPENGL_INCLUDE_DIR}
|
||||
${FREETYPE_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_FPIC}")
|
||||
+
|
||||
set(SCRIBUS_PRC_LIB_SOURCES
|
||||
oPRCFile.cc
|
||||
PRCbitStream.cc
|
||||
@@ -1,20 +0,0 @@
|
||||
--- a/scribus/plugins/import/pdf/slaoutput.cpp
|
||||
+++ b/scribus/plugins/import/pdf/slaoutput.cpp
|
||||
@@ -3741,9 +3741,16 @@ void SlaOutputDev::getPenState(GfxState *state)
|
||||
break;
|
||||
}
|
||||
double lw = state->getLineWidth();
|
||||
- double *dashPattern;
|
||||
int dashLength;
|
||||
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 9, 0)
|
||||
+ const double *dashPattern;
|
||||
+ const std::vector<double> &dash = state->getLineDash(&DashOffset);
|
||||
+ dashPattern = dash.data();
|
||||
+ dashLength = dash.size();
|
||||
+#else
|
||||
+ double *dashPattern;
|
||||
state->getLineDash(&dashPattern, &dashLength, &DashOffset);
|
||||
+#endif
|
||||
QVector<double> pattern(dashLength);
|
||||
for (int i = 0; i < dashLength; ++i)
|
||||
{
|
||||
@@ -1,10 +0,0 @@
|
||||
--- scribus-0.8/scribus/scfonts.cpp.orig Sun Sep 22 10:54:38 2002
|
||||
+++ scribus-0.8/scribus/scfonts.cpp Thu Oct 24 11:53:26 2002
|
||||
@@ -463,6 +463,7 @@
|
||||
char **fontpath=XGetFontPath(display,&pathcount);
|
||||
for(i=0; i<pathcount; ++i)
|
||||
AddPath(fontpath[i]);
|
||||
+ AddPath("/usr/share/fonts/Type1");
|
||||
XFreeFontPath(fontpath);
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<IsA>app:gui</IsA>
|
||||
<Summary>Desktop Publishing (DTP) and Layout program</Summary>
|
||||
<Description>Scribus is an opensource desktop publishing application with features like CMYK colorspace and PDF output.</Description>
|
||||
<Archive sha1sum="3e41b349f6403d3c3058455da3700013e88153d2" type="tarxz">http://sourceforge.net/projects/scribus/files/scribus-devel/1.5.8/scribus-1.5.8.tar.xz</Archive>
|
||||
<Archive sha1sum="4859b04724a1d6fe6b8784689dd2c153b1af2864" type="tarxz">https://downloads.sourceforge.net/scribus/scribus-1.6.5.tar.xz</Archive>
|
||||
<BuildDependencies>
|
||||
<Dependency>cmake</Dependency>
|
||||
<Dependency>cups-devel</Dependency>
|
||||
@@ -56,13 +56,14 @@
|
||||
<Dependency>libfreehand-devel</Dependency>
|
||||
</BuildDependencies>
|
||||
<Patches>
|
||||
<Patch>scribus-1.5.3-fpic.patch</Patch>
|
||||
<Patch>85c0dff3422f.patch</Patch>
|
||||
<Patch>f75c1613db67.patch</Patch>
|
||||
<Patch>f19410ac3b27.patch</Patch>
|
||||
<Patch>f2237b8f0b5c.patch</Patch>
|
||||
<Patch>scribus-1.5.8-poppler-22.09.0.patch</Patch>
|
||||
<!-- <Patch>scribus-1.5.3-fpic.patch</Patch> -->
|
||||
<!-- <Patch>85c0dff3422f.patch</Patch> -->
|
||||
<!-- <Patch>f75c1613db67.patch</Patch> -->
|
||||
<!-- <Patch>f19410ac3b27.patch</Patch> -->
|
||||
<!-- <Patch>f2237b8f0b5c.patch</Patch> -->
|
||||
<!-- <Patch>scribus-1.5.8-poppler-22.09.0.patch</Patch> -->
|
||||
<Patch>gentoo/scribus-1.5.8-cmake.patch</Patch>
|
||||
<Patch>fix_build_with_poppler_26.01.0.patch</Patch>
|
||||
</Patches>
|
||||
</Source>
|
||||
|
||||
@@ -117,6 +118,13 @@
|
||||
</Package>
|
||||
|
||||
<History>
|
||||
<Update release="11">
|
||||
<Date>2026-02-21</Date>
|
||||
<Version>1.6.5</Version>
|
||||
<Comment>Version bump.</Comment>
|
||||
<Name>Pisi Linux Community</Name>
|
||||
<Email>admin@pisilinux.org</Email>
|
||||
</Update>
|
||||
<Update release="10">
|
||||
<Date>2023-10-28</Date>
|
||||
<Version>1.5.8</Version>
|
||||
|
||||
Reference in New Issue
Block a user