parent
9c0462aa33
commit
79e145b371
|
@ -0,0 +1,85 @@
|
|||
From a615718222f8ad3bba4b88fad640382e517f7dd9 Mon Sep 17 00:00:00 2001
|
||||
From: Antonio Rojas <arojas@archlinux.org>
|
||||
Date: Wed, 24 Oct 2018 08:28:00 +0200
|
||||
Subject: Fix build with poppler>=0.69
|
||||
|
||||
Remove no longer available Object::memCheck usage (which didn't do anything anyway since DEBUG_MEM was not set); add some const's
|
||||
|
||||
Differential Revision: https://phabricator.kde.org/D16388
|
||||
---
|
||||
filters/karbon/pdf/PdfImport.cpp | 3 ---
|
||||
filters/karbon/pdf/SvgOutputDev.cpp | 8 ++++----
|
||||
filters/karbon/pdf/SvgOutputDev.h | 2 +-
|
||||
3 files changed, 5 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/filters/karbon/pdf/PdfImport.cpp b/filters/karbon/pdf/PdfImport.cpp
|
||||
index c3e96b0..48b08df 100644
|
||||
--- filters/karbon/pdf/PdfImport.cpp
|
||||
+++ filters/karbon/pdf/PdfImport.cpp
|
||||
@@ -102,9 +102,6 @@ KoFilter::ConversionStatus PdfImport::convert(const QByteArray& from, const QByt
|
||||
delete globalParams;
|
||||
globalParams = 0;
|
||||
|
||||
- // check for memory leaks
|
||||
- Object::memCheck(stderr);
|
||||
-
|
||||
return KoFilter::OK;
|
||||
}
|
||||
|
||||
diff --git a/filters/karbon/pdf/SvgOutputDev.cpp b/filters/karbon/pdf/SvgOutputDev.cpp
|
||||
index 931917a..7901317 100644
|
||||
--- filters/karbon/pdf/SvgOutputDev.cpp
|
||||
+++ filters/karbon/pdf/SvgOutputDev.cpp
|
||||
@@ -212,7 +212,7 @@ QString SvgOutputDev::convertMatrix(const QMatrix &matrix)
|
||||
.arg(matrix.dx()) .arg(matrix.dy());
|
||||
}
|
||||
|
||||
-QString SvgOutputDev::convertMatrix(double * matrix)
|
||||
+QString SvgOutputDev::convertMatrix(const double * matrix)
|
||||
{
|
||||
return QString("matrix(%1 %2 %3 %4 %5 %6)")
|
||||
.arg(matrix[0]).arg(matrix[1])
|
||||
@@ -402,7 +402,7 @@ void SvgOutputDev::drawString(GfxState * state, GooString * s)
|
||||
|
||||
QString str;
|
||||
|
||||
- char * p = s->getCString();
|
||||
+ const char * p = s->getCString();
|
||||
int len = s->getLength();
|
||||
CharCode code;
|
||||
Unicode *u = nullptr;
|
||||
@@ -429,7 +429,7 @@ void SvgOutputDev::drawString(GfxState * state, GooString * s)
|
||||
double x = state->getCurX();
|
||||
double y = state->getCurY();
|
||||
|
||||
- double * ctm = state->getCTM();
|
||||
+ const double * ctm = state->getCTM();
|
||||
QMatrix transform(ctm[0], ctm[1], ctm[2], ctm[3], ctm[4], ctm[5]);
|
||||
|
||||
QMatrix mirror;
|
||||
@@ -522,7 +522,7 @@ void SvgOutputDev::drawImage(GfxState *state, Object */*ref*/, Stream *str,
|
||||
return;
|
||||
}
|
||||
|
||||
- double * ctm = state->getCTM();
|
||||
+ const double * ctm = state->getCTM();
|
||||
QMatrix m;
|
||||
m.setMatrix(ctm[0] / width, ctm[1] / width, -ctm[2] / height, -ctm[3] / height, ctm[2] + ctm[4], ctm[3] + ctm[5]);
|
||||
|
||||
diff --git a/filters/karbon/pdf/SvgOutputDev.h b/filters/karbon/pdf/SvgOutputDev.h
|
||||
index 85fe55d..2a44908 100644
|
||||
--- filters/karbon/pdf/SvgOutputDev.h
|
||||
+++ filters/karbon/pdf/SvgOutputDev.h
|
||||
@@ -84,7 +84,7 @@ public:
|
||||
private:
|
||||
QString convertPath(GfxPath *path);
|
||||
QString convertMatrix(const QMatrix &matrix);
|
||||
- QString convertMatrix(double * matrix);
|
||||
+ QString convertMatrix(const double * matrix);
|
||||
QString printFill();
|
||||
QString printStroke();
|
||||
|
||||
--
|
||||
cgit v0.11.2
|
||||
|
||||
|
|
@ -0,0 +1,132 @@
|
|||
diff --git a/filters/karbon/pdf/PdfImport.cpp b/filters/karbon/pdf/PdfImport.cpp
|
||||
index 48b08dfa32d..e910dae0756 100644
|
||||
--- filters/karbon/pdf/PdfImport.cpp
|
||||
+++ filters/karbon/pdf/PdfImport.cpp
|
||||
@@ -88,9 +88,9 @@ KoFilter::ConversionStatus PdfImport::convert(const QByteArray& from, const QByt
|
||||
SvgOutputDev * dev = new SvgOutputDev(m_chain->outputFile());
|
||||
if (dev->isOk()) {
|
||||
int rotate = 0;
|
||||
- GBool useMediaBox = gTrue;
|
||||
- GBool crop = gFalse;
|
||||
- GBool printing = gFalse;
|
||||
+ bool useMediaBox = true;
|
||||
+ bool crop = false;
|
||||
+ bool printing = false;
|
||||
pdfDoc->displayPages(dev, firstPage, lastPage, hDPI, vDPI, rotate, useMediaBox, crop, printing);
|
||||
dev->dumpContent();
|
||||
}
|
||||
diff --git a/filters/karbon/pdf/SvgOutputDev.cpp b/filters/karbon/pdf/SvgOutputDev.cpp
|
||||
index 5692824bc45..43205170991 100644
|
||||
--- filters/karbon/pdf/SvgOutputDev.cpp
|
||||
+++ filters/karbon/pdf/SvgOutputDev.cpp
|
||||
@@ -39,7 +39,7 @@ class SvgOutputDev::Private
|
||||
{
|
||||
public:
|
||||
Private(const QString &fname)
|
||||
- : svgFile(fname), defs(0), body(0), state(gTrue)
|
||||
+ : svgFile(fname), defs(0), body(0), state(true)
|
||||
, brush(Qt::SolidPattern) {}
|
||||
|
||||
~Private() {
|
||||
@@ -52,7 +52,7 @@ public:
|
||||
QString defsData;
|
||||
QTextStream * defs;
|
||||
QTextStream * body;
|
||||
- GBool state;
|
||||
+ bool state;
|
||||
QSizeF pageSize;
|
||||
QPen pen;
|
||||
QBrush brush;
|
||||
@@ -62,7 +62,7 @@ SvgOutputDev::SvgOutputDev(const QString &fileName)
|
||||
: d(new Private(fileName))
|
||||
{
|
||||
if (! d->svgFile.open(QIODevice::WriteOnly)) {
|
||||
- d->state = gFalse;
|
||||
+ d->state = false;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -75,24 +75,24 @@ SvgOutputDev::~SvgOutputDev()
|
||||
delete d;
|
||||
}
|
||||
|
||||
-GBool SvgOutputDev::isOk()
|
||||
+bool SvgOutputDev::isOk()
|
||||
{
|
||||
return d->state;
|
||||
}
|
||||
|
||||
-GBool SvgOutputDev::upsideDown()
|
||||
+bool SvgOutputDev::upsideDown()
|
||||
{
|
||||
- return gTrue;
|
||||
+ return true;
|
||||
}
|
||||
|
||||
-GBool SvgOutputDev::useDrawChar()
|
||||
+bool SvgOutputDev::useDrawChar()
|
||||
{
|
||||
- return gFalse;
|
||||
+ return false;
|
||||
}
|
||||
|
||||
-GBool SvgOutputDev::interpretType3Chars()
|
||||
+bool SvgOutputDev::interpretType3Chars()
|
||||
{
|
||||
- return gFalse;
|
||||
+ return false;
|
||||
}
|
||||
|
||||
void SvgOutputDev::startPage(int pageNum, GfxState *state, XRef */*xref*/)
|
||||
@@ -480,7 +480,7 @@ void SvgOutputDev::drawString(GfxState * state, GooString * s)
|
||||
|
||||
void SvgOutputDev::drawImage(GfxState *state, Object */*ref*/, Stream *str,
|
||||
int width, int height, GfxImageColorMap *colorMap,
|
||||
- int *maskColors, GBool /*inlineImg*/)
|
||||
+ int *maskColors, bool /*inlineImg*/)
|
||||
{
|
||||
ImageStream * imgStr = new ImageStream(str, width, colorMap->getNumPixelComps(), colorMap->getBits());
|
||||
imgStr->reset();
|
||||
@@ -549,7 +549,7 @@ void SvgOutputDev::drawImage(GfxState *state, Object */*ref*/, Stream *str,
|
||||
|
||||
void SvgOutputDev::drawImage(GfxState *state, Object *ref, Stream *str,
|
||||
int width, int height, GfxImageColorMap *colorMap,
|
||||
- GBool /*interpolate*/, int *maskColors, GBool inlineImg)
|
||||
+ bool /*interpolate*/, int *maskColors, bool inlineImg)
|
||||
{
|
||||
drawImage(state, ref, str, width, height, colorMap, maskColors, inlineImg);
|
||||
}
|
||||
diff --git a/filters/karbon/pdf/SvgOutputDev.h b/filters/karbon/pdf/SvgOutputDev.h
|
||||
index 2a4490848bf..cdb1d4e43b1 100644
|
||||
--- filters/karbon/pdf/SvgOutputDev.h
|
||||
+++ filters/karbon/pdf/SvgOutputDev.h
|
||||
@@ -44,11 +44,11 @@ public:
|
||||
explicit SvgOutputDev(const QString &fileName);
|
||||
virtual ~SvgOutputDev();
|
||||
|
||||
- GBool isOk();
|
||||
+ bool isOk();
|
||||
|
||||
- virtual GBool upsideDown();
|
||||
- virtual GBool useDrawChar();
|
||||
- virtual GBool interpretType3Chars();
|
||||
+ virtual bool upsideDown();
|
||||
+ virtual bool useDrawChar();
|
||||
+ virtual bool interpretType3Chars();
|
||||
virtual void startPage(int pageNum, GfxState *state, XRef *xref);
|
||||
virtual void endPage();
|
||||
|
||||
@@ -63,10 +63,10 @@ public:
|
||||
// images
|
||||
virtual void drawImage(GfxState *state, Object *ref, Stream *str,
|
||||
int width, int height, GfxImageColorMap *colorMap,
|
||||
- int *maskColors, GBool inlineImg);
|
||||
+ int *maskColors, bool inlineImg);
|
||||
virtual void drawImage(GfxState *state, Object *ref, Stream *str,
|
||||
int width, int height, GfxImageColorMap *colorMap,
|
||||
- GBool interpolate, int *maskColors, GBool inlineImg);
|
||||
+ bool interpolate, int *maskColors, bool inlineImg);
|
||||
|
||||
// styles
|
||||
virtual void updateAll(GfxState *state);
|
||||
|
|
@ -1,9 +1,10 @@
|
|||
# Template file for 'calligra'
|
||||
pkgname=calligra
|
||||
version=3.1.0
|
||||
revision=12
|
||||
revision=13
|
||||
build_style=cmake
|
||||
configure_args="-Wno-dev -DCALLIGRA_SHOULD_BUILD_UNMAINTAINED=ON"
|
||||
configure_args="-Wno-dev -DCALLIGRA_SHOULD_BUILD_UNMAINTAINED=ON
|
||||
-DBUILD_TESTING=OFF"
|
||||
hostmakedepends="automoc4 perl pkg-config extra-cmake-modules"
|
||||
makedepends="akonadi-contacts-devel akonadi5-devel ecm-devel eigen3.2
|
||||
exiv2-devel kactivities5-devel gsl-devel
|
||||
|
|
Loading…
Reference in New Issue