diff options
author | Tobias C. Berner <tcberner@FreeBSD.org> | 2019-02-11 17:10:05 +0000 |
---|---|---|
committer | Tobias C. Berner <tcberner@FreeBSD.org> | 2019-02-11 17:10:05 +0000 |
commit | fd928f19e0f899bb9d5c038055a1a7b42fbcdccb (patch) | |
tree | 3ba7e67672e6da68e14d2308683ddd7b22af74e2 /print | |
parent | 16e13958b160d2237d8197c344596e055d84f93b (diff) | |
download | ports-fd928f19e0f899bb9d5c038055a1a7b42fbcdccb.tar.gz ports-fd928f19e0f899bb9d5c038055a1a7b42fbcdccb.zip |
Notes
Diffstat (limited to 'print')
-rw-r--r-- | print/scribus-devel/files/patch-scribus_plugins_import_pdf_slaoutput.cpp | 118 | ||||
-rw-r--r-- | print/scribus-devel/files/patch-scribus_plugins_import_pdf_slaoutput.h | 34 |
2 files changed, 136 insertions, 16 deletions
diff --git a/print/scribus-devel/files/patch-scribus_plugins_import_pdf_slaoutput.cpp b/print/scribus-devel/files/patch-scribus_plugins_import_pdf_slaoutput.cpp index f7762cbca03a..c57aa07648cd 100644 --- a/print/scribus-devel/files/patch-scribus_plugins_import_pdf_slaoutput.cpp +++ b/print/scribus-devel/files/patch-scribus_plugins_import_pdf_slaoutput.cpp @@ -1,4 +1,4 @@ ---- scribus/plugins/import/pdf/slaoutput.cpp.orig 2018-12-11 13:04:07 UTC +--- scribus/plugins/import/pdf/slaoutput.cpp.orig 2019-01-10 06:21:56 UTC +++ scribus/plugins/import/pdf/slaoutput.cpp @@ -44,7 +44,7 @@ LinkSubmitForm::LinkSubmitForm(Object *actionObj) { @@ -397,6 +397,15 @@ { // qDebug() << "Draw Image Mask"; QImage * image = 0; +@@ -2449,7 +2442,7 @@ void SlaOutputDev::drawImageMask(GfxState *state, Obje + int x, y, i, bit; + unsigned char *dest = 0; + unsigned char *buffer; +- Guchar *pix; ++ unsigned char *pix; + ImageStream * imgStr = new ImageStream(str, width, 1, 1); + imgStr->reset(); + #ifdef WORDS_BIGENDIAN @@ -2512,8 +2505,7 @@ void SlaOutputDev::drawImageMask(GfxState *state, Obje t++; } @@ -418,6 +427,32 @@ { // qDebug() << "Masked Image Components" << colorMap->getNumPixelComps(); ImageStream * imgStr = new ImageStream(str, width, colorMap->getNumPixelComps(), colorMap->getBits()); +@@ -2617,7 +2609,7 @@ void SlaOutputDev::drawSoftMaskedImage(GfxState *state + for (int y = 0; y < height; y++) + { + dest = (unsigned int *)(buffer + y * 4 * width); +- Guchar * pix = imgStr->getLine(); ++ unsigned char * pix = imgStr->getLine(); + colorMap->getRGBLine(pix, dest, width); + } + image = new QImage(buffer, width, height, QImage::Format_RGB32); +@@ -2630,13 +2622,13 @@ void SlaOutputDev::drawSoftMaskedImage(GfxState *state + } + ImageStream *mskStr = new ImageStream(maskStr, maskWidth, maskColorMap->getNumPixelComps(), maskColorMap->getBits()); + mskStr->reset(); +- Guchar *mdest = 0; ++ unsigned char *mdest = 0; + unsigned char * mbuffer = new unsigned char[maskWidth * maskHeight]; + memset(mbuffer, 0, maskWidth * maskHeight); + for (int y = 0; y < maskHeight; y++) + { +- mdest = (Guchar *)(mbuffer + y * maskWidth); +- Guchar * pix = mskStr->getLine(); ++ mdest = (unsigned char *)(mbuffer + y * maskWidth); ++ unsigned char * pix = mskStr->getLine(); + maskColorMap->getGrayLine(pix, mdest, maskWidth); + } + if ((maskWidth != width) || (maskHeight != height)) @@ -2658,8 +2650,7 @@ void SlaOutputDev::drawSoftMaskedImage(GfxState *state t++; } @@ -437,6 +472,33 @@ { ImageStream * imgStr = new ImageStream(str, width, colorMap->getNumPixelComps(), colorMap->getBits()); imgStr->reset(); +@@ -2760,7 +2751,7 @@ void SlaOutputDev::drawMaskedImage(GfxState *state, Ob + for (int y = 0; y < height; y++) + { + dest = (unsigned int *)(buffer + y * 4 * width); +- Guchar * pix = imgStr->getLine(); ++ unsigned char * pix = imgStr->getLine(); + colorMap->getRGBLine(pix, dest, width); + } + image = new QImage(buffer, width, height, QImage::Format_RGB32); +@@ -2773,14 +2764,14 @@ void SlaOutputDev::drawMaskedImage(GfxState *state, Ob + } + ImageStream *mskStr = new ImageStream(maskStr, maskWidth, 1, 1); + mskStr->reset(); +- Guchar *mdest = 0; ++ unsigned char *mdest = 0; + int invert_bit = maskInvert ? 1 : 0; + unsigned char * mbuffer = new unsigned char[maskWidth * maskHeight]; + memset(mbuffer, 0, maskWidth * maskHeight); + for (int y = 0; y < maskHeight; y++) + { +- mdest = (Guchar *)(mbuffer + y * maskWidth); +- Guchar * pix = mskStr->getLine(); ++ mdest = (unsigned char *)(mbuffer + y * maskWidth); ++ unsigned char * pix = mskStr->getLine(); + for (int x = 0; x < maskWidth; x++) + { + if (pix[x] ^ invert_bit) @@ -2808,8 +2799,7 @@ void SlaOutputDev::drawMaskedImage(GfxState *state, Ob t++; } @@ -456,6 +518,24 @@ { ImageStream * imgStr = new ImageStream(str, width, colorMap->getNumPixelComps(), colorMap->getBits()); // qDebug() << "Image Components" << colorMap->getNumPixelComps() << "Mask" << maskColors; +@@ -2912,7 +2902,7 @@ void SlaOutputDev::drawImage(GfxState *state, Object * + for (int y = 0; y < height; y++) + { + QRgb *s = (QRgb*)(image->scanLine(y)); +- Guchar *pix = imgStr->getLine(); ++ unsigned char *pix = imgStr->getLine(); + for (int x = 0; x < width; x++) + { + GfxRGB rgb; +@@ -2940,7 +2930,7 @@ void SlaOutputDev::drawImage(GfxState *state, Object * + for (int y = 0; y < height; y++) + { + QRgb *s = (QRgb*)(image->scanLine(y)); +- Guchar *pix = imgStr->getLine(); ++ unsigned char *pix = imgStr->getLine(); + for (int x = 0; x < width; x++) + { + if (colorMap->getNumPixelComps() == 4) @@ -2973,8 +2963,7 @@ void SlaOutputDev::drawImage(GfxState *state, Object * delete image; return; @@ -608,7 +688,12 @@ : "(unnamed)"); goto err2; } -@@ -3488,7 +3477,7 @@ void SlaOutputDev::updateFont(GfxState *state) +@@ -3484,11 +3473,11 @@ void SlaOutputDev::updateFont(GfxState *state) + if (n) { + codeToGID = (int *)gmallocn(n, sizeof(int)); + memcpy(codeToGID, ((GfxCIDFont *)gfxFont)->getCIDToGID(), +- n * sizeof(Gushort)); ++ n * sizeof(unsigned short)); } } else { if (fileName) @@ -626,6 +711,15 @@ : "(unnamed)"); goto err2; } +@@ -3559,7 +3548,7 @@ void SlaOutputDev::updateFont(GfxState *state) + GooString *fileName; + char *tmpBuf; + int tmpBufLen; +- Gushort *codeToGID; ++ unsigned short *codeToGID; + DisplayFontParam *dfp; + double *textMat; + double m11, m12, m21, m22, fontSize; @@ -3604,7 +3593,7 @@ void SlaOutputDev::updateFont(GfxState *state) } if (!dfp) @@ -705,7 +799,16 @@ goto err2; } break; -@@ -3703,7 +3692,7 @@ void SlaOutputDev::updateFont(GfxState *state) +@@ -3696,14 +3685,14 @@ void SlaOutputDev::updateFont(GfxState *state) + n = ((GfxCIDFont *)gfxFont)->getCIDToGIDLen(); + if (n) + { +- codeToGID = (Gushort *)gmallocn(n, sizeof(Gushort)); +- memcpy(codeToGID, ((GfxCIDFont *)gfxFont)->getCIDToGID(), n * sizeof(Gushort)); ++ codeToGID = (unsigned short *)gmallocn(n, sizeof(unsigned short)); ++ memcpy(codeToGID, ((GfxCIDFont *)gfxFont)->getCIDToGID(), n * sizeof(unsigned short)); + } + } else { if (fileName) @@ -723,6 +826,15 @@ goto err2; } break; +@@ -3775,7 +3764,7 @@ void SlaOutputDev::drawChar(GfxState *state, double x, + qPath.setFillRule(Qt::WindingFill); + for (int i = 0; i < fontPath->getLength(); ++i) + { +- Guchar f; ++ unsigned char f; + fontPath->getPoint(i, &x1, &y1, &f); + if (f & splashPathFirst) + qPath.moveTo(x1,y1); @@ -3793,8 +3782,7 @@ void SlaOutputDev::drawChar(GfxState *state, double x, if (f & splashPathLast) qPath.closeSubpath(); diff --git a/print/scribus-devel/files/patch-scribus_plugins_import_pdf_slaoutput.h b/print/scribus-devel/files/patch-scribus_plugins_import_pdf_slaoutput.h index fce11994c7e5..7ec2a45fb445 100644 --- a/print/scribus-devel/files/patch-scribus_plugins_import_pdf_slaoutput.h +++ b/print/scribus-devel/files/patch-scribus_plugins_import_pdf_slaoutput.h @@ -1,6 +1,14 @@ ---- scribus/plugins/import/pdf/slaoutput.h.orig 2018-12-11 13:04:07 UTC +--- scribus/plugins/import/pdf/slaoutput.h.orig 2019-01-10 06:21:56 UTC +++ scribus/plugins/import/pdf/slaoutput.h -@@ -61,9 +61,9 @@ class LinkSubmitForm: public LinkAction (public) +@@ -26,7 +26,6 @@ for which a new license (GPL+exception) is in place. + #include "selection.h" + #include "vgradient.h" + +-#include <poppler/goo/gtypes.h> + #include <poppler/Object.h> + #include <poppler/OutputDev.h> + #include <poppler/Gfx.h> +@@ -61,9 +60,9 @@ class LinkSubmitForm: public LinkAction (public) // Destructor. virtual ~LinkSubmitForm(); // Was the LinkImportData created successfully? @@ -12,7 +20,7 @@ GooString *getFileName() { return fileName; } int getFlags() { return m_flags; } private: -@@ -83,9 +83,9 @@ class LinkImportData: public LinkAction (public) +@@ -83,9 +82,9 @@ class LinkImportData: public LinkAction (public) // Destructor. virtual ~LinkImportData(); // Was the LinkImportData created successfully? @@ -24,7 +32,7 @@ GooString *getFileName() { return fileName; } private: GooString *fileName; // file name -@@ -98,9 +98,9 @@ class SplashOutFontFileID: public SplashFontFileID +@@ -98,9 +97,9 @@ class SplashOutFontFileID: public SplashFontFileID { public: @@ -36,7 +44,7 @@ { return ((SplashOutFontFileID *)id)->r.num == r.num && ((SplashOutFontFileID *)id)->r.gen == r.gen; } -@@ -115,18 +115,18 @@ class AnoOutputDev : public OutputDev +@@ -115,18 +114,18 @@ class AnoOutputDev : public OutputDev public: AnoOutputDev(ScribusDoc* doc, QStringList *importedColors); virtual ~AnoOutputDev(); @@ -64,7 +72,7 @@ QString CurrColorText; QString CurrColorFill; -@@ -135,7 +135,7 @@ class AnoOutputDev : public OutputDev +@@ -135,7 +134,7 @@ class AnoOutputDev : public OutputDev GooString *m_fontName; GooString *m_itemText; private: @@ -73,7 +81,7 @@ ScribusDoc* m_doc; QStringList *m_importedColors; }; -@@ -148,7 +148,7 @@ class SlaOutputDev : public OutputDev (public) +@@ -148,7 +147,7 @@ class SlaOutputDev : public OutputDev (public) virtual ~SlaOutputDev(); LinkAction* SC_getAction(AnnotWidget *ano); LinkAction* SC_getAdditionalAction(const char *key, AnnotWidget *ano); @@ -82,7 +90,7 @@ bool handleTextAnnot(Annot* annota, double xCoor, double yCoor, double width, double height); bool handleLinkAnnot(Annot* annota, double xCoor, double yCoor, double width, double height); bool handleWidgetAnnot(Annot* annota, double xCoor, double yCoor, double width, double height); -@@ -156,15 +156,15 @@ class SlaOutputDev : public OutputDev (public) +@@ -156,15 +155,15 @@ class SlaOutputDev : public OutputDev (public) void handleActions(PageItem* ite, AnnotWidget *ano); void startDoc(PDFDoc *doc, XRef *xrefA, Catalog *catA); @@ -107,7 +115,7 @@ virtual void startPage(int pageNum, GfxState *, XRef *); virtual void endPage(); // graphics state -@@ -175,30 +175,30 @@ class SlaOutputDev : public OutputDev (public) +@@ -175,30 +174,30 @@ class SlaOutputDev : public OutputDev (public) virtual void stroke(GfxState *state); virtual void fill(GfxState *state); virtual void eoFill(GfxState *state); @@ -149,7 +157,7 @@ { return state->getFillColorSpace()->getMode() == csPattern; } -@@ -206,36 +206,36 @@ class SlaOutputDev : public OutputDev (public) +@@ -206,36 +205,36 @@ class SlaOutputDev : public OutputDev (public) virtual void endMaskClip(GfxState *state) { qDebug() << "End Mask Clip"; } //----- grouping operators @@ -198,7 +206,7 @@ virtual void clearSoftMask(GfxState * /*state*/); virtual void updateFillColor(GfxState *state); -@@ -245,7 +245,7 @@ class SlaOutputDev : public OutputDev (public) +@@ -245,7 +244,7 @@ class SlaOutputDev : public OutputDev (public) virtual void beginTextObject(GfxState *state); virtual void endTextObject(GfxState *state); virtual void drawChar(GfxState *state, double /*x*/, double /*y*/, double /*dx*/, double /*dy*/, double /*originX*/, double /*originY*/, CharCode /*code*/, int /*nBytes*/, Unicode * /*u*/, int /*uLen*/); @@ -207,7 +215,7 @@ virtual void endType3Char(GfxState * /*state*/); virtual void type3D0(GfxState * /*state*/, double /*wx*/, double /*wy*/); virtual void type3D1(GfxState * /*state*/, double /*wx*/, double /*wy*/, double /*llx*/, double /*lly*/, double /*urx*/, double /*ury*/); -@@ -260,13 +260,13 @@ class SlaOutputDev : public OutputDev (public) +@@ -260,13 +259,13 @@ class SlaOutputDev : public OutputDev (public) private: void getPenState(GfxState *state); @@ -225,7 +233,7 @@ bool checkClip(); bool pathIsClosed; QString CurrColorFill; -@@ -283,9 +283,9 @@ class SlaOutputDev : public OutputDev (public) +@@ -283,9 +282,9 @@ class SlaOutputDev : public OutputDev (public) struct groupEntry { QList<PageItem*> Items; |