[poppler] cpp/poppler-document.h cpp/poppler-image.cpp .gitlab-ci.yml goo/gbase64.h goo/gbasename.h poppler/Annot.cc poppler/Annot.h poppler/CachedFile.cc poppler/CairoFontEngine.h poppler/DateInfo.h poppler/Form.cc poppler/Form.h poppler/GfxFont.cc poppler/GfxFont.h poppler/GfxState.h poppler/JPEG2000Stream.cc poppler/Movie.h poppler/PDFDoc.h poppler/PSOutputDev.cc poppler/Sound.h poppler/SplashOutputDev.cc poppler/SplashOutputDev.h poppler/StructElement.h poppler/UnicodeTypeTable.h poppler/UTF.cc poppler/UTF.h qt5/demos qt5/src splash/Splash.cc splash/SplashFTFontFile.h splash/Splash.h
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Nov 29 15:14:57 UTC 2019
.gitlab-ci.yml | 2 +-
cpp/poppler-document.h | 5 +++--
cpp/poppler-image.cpp | 14 +++++++-------
goo/gbase64.h | 3 ++-
goo/gbasename.h | 3 ++-
poppler/Annot.cc | 12 ++++++------
poppler/Annot.h | 12 ++++++------
poppler/CachedFile.cc | 6 +++---
poppler/CairoFontEngine.h | 12 ++++++------
poppler/DateInfo.h | 4 ++--
poppler/Form.cc | 36 ++++++++++++++++++------------------
poppler/Form.h | 12 ++++++------
poppler/GfxFont.cc | 8 ++++----
poppler/GfxFont.h | 2 +-
poppler/GfxState.h | 6 +++---
poppler/JPEG2000Stream.cc | 2 +-
poppler/Movie.h | 10 +++++-----
poppler/PDFDoc.h | 2 +-
poppler/PSOutputDev.cc | 4 ++--
poppler/Sound.h | 6 +++---
poppler/SplashOutputDev.cc | 2 +-
poppler/SplashOutputDev.h | 6 +++---
poppler/StructElement.h | 2 +-
poppler/UTF.cc | 6 +++---
poppler/UTF.h | 2 +-
poppler/UnicodeTypeTable.h | 5 +++--
qt5/demos/navigationtoolbar.h | 5 +++--
qt5/src/poppler-annotation.h | 10 +++++-----
qt5/src/poppler-link.cc | 2 +-
qt5/src/poppler-qt5.h | 20 ++++++++++----------
splash/Splash.cc | 4 ++--
splash/Splash.h | 4 ++--
splash/SplashFTFontFile.h | 3 ++-
33 files changed, 119 insertions(+), 113 deletions(-)
New commits:
commit 42efcb738cd5924215249c55dd2d0ff7f517d6b5
Author: Albert Astals Cid <aacid at kde.org>
Date: Fri Nov 29 15:45:37 2019 +0100
Enable readability-inconsistent-declaration-parameter-name
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 2dba0f3c..406e1bcd 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -40,7 +40,7 @@ build_clang_libcpp:
script:
- git clone --branch ${CI_COMMIT_REF_NAME} --depth 1 ${TEST_DATA_URL} test-data || git clone --depth 1 ${UPSTREAM_TEST_DATA_URL} test-data
- mkdir -p build && cd build
- - CC=clang CXX=clang++ cmake -G Ninja -DCMAKE_CXX_FLAGS=-stdlib=libc++ -DTESTDATADIR=$PWD/../test-data -DCMAKE_CXX_CLANG_TIDY="clang-tidy;-header-filter=.;-checks=-*,performance-*,,bugprone-*,-bugprone-narrowing-conversions,-bugprone-macro-parentheses,-bugprone-suspicious-string-compare,-bugprone-incorrect-roundings,-bugprone-undefined-memory-manipulation;-warnings-as-errors=*" ..
+ - CC=clang CXX=clang++ cmake -G Ninja -DCMAKE_CXX_FLAGS=-stdlib=libc++ -DTESTDATADIR=$PWD/../test-data -DCMAKE_CXX_CLANG_TIDY="clang-tidy;-header-filter=.;-checks=-*,performance-*,,bugprone-*,readability-inconsistent-declaration-parameter-name,-bugprone-narrowing-conversions,-bugprone-macro-parentheses,-bugprone-suspicious-string-compare,-bugprone-incorrect-roundings,-bugprone-undefined-memory-manipulation;-warnings-as-errors=*" ..
- ninja
- ctest --output-on-failure
diff --git a/cpp/poppler-document.h b/cpp/poppler-document.h
index 07bd6eef..9162d58a 100644
--- a/cpp/poppler-document.h
+++ b/cpp/poppler-document.h
@@ -2,6 +2,7 @@
* Copyright (C) 2009-2010, Pino Toscano <pino at kde.org>
* Copyright (C) 2016 Jakub Alba <jakubalba at gmail.com>
* Copyright (C) 2019, Masamichi Hosoda <trueroad at trueroad.jp>
+ * Copyright (C) 2019, Albert Astals Cid <aacid at kde.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -114,8 +115,8 @@ public:
// So we use std::string instead of ustring.
std::map<std::string, destination> create_destination_map() const;
- bool save(const std::string &filename) const;
- bool save_a_copy(const std::string &filename) const;
+ bool save(const std::string &file_name) const;
+ bool save_a_copy(const std::string &file_name) const;
static document* load_from_file(const std::string &file_name,
const std::string &owner_password = std::string(),
diff --git a/cpp/poppler-image.cpp b/cpp/poppler-image.cpp
index daf10f02..745bf221 100644
--- a/cpp/poppler-image.cpp
+++ b/cpp/poppler-image.cpp
@@ -225,8 +225,8 @@ image::image(char *idata, int iwidth, int iheight, image::format_enum iformat)
/**
Copy constructor.
*/
-image::image(const image &pt)
- : d(pt.d)
+image::image(const image &img)
+ : d(img.d)
{
if (d) {
++d->ref;
@@ -496,16 +496,16 @@ std::vector<std::string> image::supported_image_formats()
/**
Assignment operator.
*/
-image& image::operator=(const image &pt)
+image& image::operator=(const image &img)
{
- if (this == &pt)
+ if (this == &img)
return *this;
- if (pt.d) {
- ++pt.d->ref;
+ if (img.d) {
+ ++img.d->ref;
}
image_private *old_d = d;
- d = pt.d;
+ d = img.d;
if (old_d && !--old_d->ref) {
delete old_d;
}
diff --git a/goo/gbase64.h b/goo/gbase64.h
index 06e2e8b6..a876f5b8 100644
--- a/goo/gbase64.h
+++ b/goo/gbase64.h
@@ -8,6 +8,7 @@
// This file is licensed under the GPLv2 or later
//
// Copyright (C) 2018 Greg Knight <lyngvi at gmail.com>
+// Copyright (C) 2019 Albert Astals Cid <aacid at kde.org>
//
//========================================================================
@@ -17,7 +18,7 @@
#include <string>
#include <vector>
-std::string gbase64Encode(const void* input, size_t sz);
+std::string gbase64Encode(const void* input, size_t len);
inline std::string gbase64Encode(const std::vector<char>& input)
{ return input.empty() ? std::string() : gbase64Encode(&input[0], input.size()); }
diff --git a/goo/gbasename.h b/goo/gbasename.h
index 3c5e0065..15270387 100644
--- a/goo/gbasename.h
+++ b/goo/gbasename.h
@@ -9,6 +9,7 @@
// This file is licensed under the GPLv2 or later
//
// Copyright (C) 2018 Greg Knight <lyngvi at gmail.com>
+// Copyright (C) 2019 Albert Astals Cid <aacid at kde.org>
//
//========================================================================
@@ -17,6 +18,6 @@
#include <string>
-std::string gbasename(const char* input);
+std::string gbasename(const char* filename);
#endif // ndef GBASENAME_H
diff --git a/poppler/Annot.cc b/poppler/Annot.cc
index 5ce75a8b..90c9c7de 100644
--- a/poppler/Annot.cc
+++ b/poppler/Annot.cc
@@ -985,13 +985,13 @@ void AnnotAppearance::removeStream(Ref refToStream) {
}
// Removes stream if obj is a Ref, or removes pointed streams if obj is a Dict
-void AnnotAppearance::removeStateStreams(const Object *obj1) {
- if (obj1->isRef()) {
- removeStream(obj1->getRef());
- } else if (obj1->isDict()) {
- const int size = obj1->dictGetLength();
+void AnnotAppearance::removeStateStreams(const Object *state) {
+ if (state->isRef()) {
+ removeStream(state->getRef());
+ } else if (state->isDict()) {
+ const int size = state->dictGetLength();
for (int i = 0; i < size; ++i) {
- const Object &obj2 = obj1->dictGetValNF(i);
+ const Object &obj2 = state->dictGetValNF(i);
if (obj2.isRef()) {
removeStream(obj2.getRef());
}
diff --git a/poppler/Annot.h b/poppler/Annot.h
index 1c61e701..9014f7ac 100644
--- a/poppler/Annot.h
+++ b/poppler/Annot.h
@@ -445,10 +445,10 @@ public:
void removeAllStreams();
// Test if this AnnotAppearance references the specified stream
- bool referencesStream(Ref targetStreamRef);
+ bool referencesStream(Ref refToStream);
private:
- static bool referencesStream(const Object *stateObj, Ref targetStreamRef);
+ static bool referencesStream(const Object *stateObj, Ref refToStream);
void removeStream(Ref refToStream);
void removeStateStreams(const Object *state);
@@ -511,7 +511,7 @@ protected:
class AnnotAppearanceBBox
{
public:
- AnnotAppearanceBBox(PDFRectangle *init);
+ AnnotAppearanceBBox(PDFRectangle *rect);
void setBorderWidth(double w) { borderWidth = w; }
@@ -684,7 +684,7 @@ public:
// new_content should never be NULL
virtual void setContents(GooString *new_content);
void setName(GooString *new_name);
- void setModified(GooString *new_date);
+ void setModified(GooString *new_modified);
void setFlags(unsigned int new_flags);
void setBorder(std::unique_ptr<AnnotBorder> &&new_border);
@@ -724,7 +724,7 @@ private:
// write vStr[i:j[ in appearBuf
void initialize (PDFDoc *docA, Dict *dict);
- void setPage (int new_page, bool updateP); // Called by Page::addAnnot and Annots ctor
+ void setPage (int pageIndex, bool updateP); // Called by Page::addAnnot and Annots ctor
protected:
@@ -1401,7 +1401,7 @@ public:
void draw(Gfx *gfx, bool printing) override;
- void generateFieldAppearance (bool *addDingbatsResource);
+ void generateFieldAppearance (bool *addedDingbatsResource);
void updateAppearanceStream ();
AnnotWidgetHighlightMode getMode() { return mode; }
diff --git a/poppler/CachedFile.cc b/poppler/CachedFile.cc
index 1e76d913..bacbf16b 100644
--- a/poppler/CachedFile.cc
+++ b/poppler/CachedFile.cc
@@ -6,7 +6,7 @@
//
// Copyright 2009 Stefan Thomas <thomas at eload24.com>
// Copyright 2010, 2011 Hib Eris <hib at hiberis.nl>
-// Copyright 2010, 2018 Albert Astals Cid <aacid at kde.org>
+// Copyright 2010, 2018, 2019 Albert Astals Cid <aacid at kde.org>
// Copyright (C) 2013 Julien Nabet <serval2412 at yahoo.fr>
//
//========================================================================
@@ -18,10 +18,10 @@
// CachedFile
//------------------------------------------------------------------------
-CachedFile::CachedFile(CachedFileLoader *cachedFileLoaderA, GooString *uriA)
+CachedFile::CachedFile(CachedFileLoader *cacheLoader, GooString *uriA)
{
uri = uriA;
- loader = cachedFileLoaderA;
+ loader = cacheLoader;
streamPos = 0;
chunks = new std::vector<Chunk>();
diff --git a/poppler/CairoFontEngine.h b/poppler/CairoFontEngine.h
index 34802c1f..ecdb2f42 100644
--- a/poppler/CairoFontEngine.h
+++ b/poppler/CairoFontEngine.h
@@ -42,12 +42,12 @@ class CairoFontEngine;
class CairoFont {
public:
- CairoFont(Ref ref,
- cairo_font_face_t *face,
- int *codeToGID,
- unsigned int codeToGIDLen,
- bool substitute,
- bool printing);
+ CairoFont(Ref refA,
+ cairo_font_face_t *cairo_font_faceA,
+ int *codeToGIDA,
+ unsigned int codeToGIDLenA,
+ bool substituteA,
+ bool printingA);
virtual ~CairoFont();
CairoFont(const CairoFont &) = delete;
CairoFont& operator=(const CairoFont &other) = delete;
diff --git a/poppler/DateInfo.h b/poppler/DateInfo.h
index e506569c..19d02afc 100644
--- a/poppler/DateInfo.h
+++ b/poppler/DateInfo.h
@@ -30,10 +30,10 @@
bool parseDateString(const char *string, int *year, int *month, int *day, int *hour, int *minute, int *second, char *tz, int *tzHour, int *tzMinute);
/* Converts the time_t into a PDF Date format string.
- * If timet is NULL, current time is used.
+ * If timeA is NULL, current time is used.
* Returns new GooString. Free with delete.
*/
-GooString *timeToDateString(const time_t *timet);
+GooString *timeToDateString(const time_t *timeA);
/* Convert PDF date string to time.
* Returns -1 if conversion fails.
diff --git a/poppler/Form.cc b/poppler/Form.cc
index e5a5d875..fe4d5382 100644
--- a/poppler/Form.cc
+++ b/poppler/Form.cc
@@ -185,8 +185,8 @@ bool FormWidget::setAdditionalAction(Annot::FormAdditionalActionsType t, const G
return widget->setFormAdditionalAction(t, js);
}
-FormWidgetButton::FormWidgetButton (PDFDoc *docA, Object *aobj, unsigned num, Ref refA, FormField *p) :
- FormWidget(docA, aobj, num, refA, p)
+FormWidgetButton::FormWidgetButton (PDFDoc *docA, Object *dictObj, unsigned num, Ref refA, FormField *p) :
+ FormWidget(docA, dictObj, num, refA, p)
{
type = formButton;
onStr = nullptr;
@@ -264,8 +264,8 @@ FormFieldButton *FormWidgetButton::parent() const
}
-FormWidgetText::FormWidgetText (PDFDoc *docA, Object *aobj, unsigned num, Ref refA, FormField *p) :
- FormWidget(docA, aobj, num, refA, p)
+FormWidgetText::FormWidgetText (PDFDoc *docA, Object *dictObj, unsigned num, Ref refA, FormField *p) :
+ FormWidget(docA, dictObj, num, refA, p)
{
type = formText;
}
@@ -346,8 +346,8 @@ FormFieldText *FormWidgetText::parent() const
return static_cast<FormFieldText*>(field);
}
-FormWidgetChoice::FormWidgetChoice(PDFDoc *docA, Object *aobj, unsigned num, Ref refA, FormField *p) :
- FormWidget(docA, aobj, num, refA, p)
+FormWidgetChoice::FormWidgetChoice(PDFDoc *docA, Object *dictObj, unsigned num, Ref refA, FormField *p) :
+ FormWidget(docA, dictObj, num, refA, p)
{
type = formChoice;
}
@@ -458,8 +458,8 @@ FormFieldChoice *FormWidgetChoice::parent() const
return static_cast<FormFieldChoice*>(field);
}
-FormWidgetSignature::FormWidgetSignature(PDFDoc *docA, Object *aobj, unsigned num, Ref refA, FormField *p) :
- FormWidget(docA, aobj, num, refA, p)
+FormWidgetSignature::FormWidgetSignature(PDFDoc *docA, Object *dictObj, unsigned num, Ref refA, FormField *p) :
+ FormWidget(docA, dictObj, num, refA, p)
{
type = formSignature;
}
@@ -977,8 +977,8 @@ void FormField::setReadOnly (bool value)
//------------------------------------------------------------------------
// FormFieldButton
//------------------------------------------------------------------------
-FormFieldButton::FormFieldButton(PDFDoc *docA, Object &&aobj, const Ref refA, FormField *parentA, std::set<int> *usedParents)
- : FormField(docA, std::move(aobj), refA, parentA, usedParents, formButton)
+FormFieldButton::FormFieldButton(PDFDoc *docA, Object &&dictObj, const Ref refA, FormField *parentA, std::set<int> *usedParents)
+ : FormField(docA, std::move(dictObj), refA, parentA, usedParents, formButton)
{
Dict* dict = obj.getDict();
active_child = -1;
@@ -1147,8 +1147,8 @@ FormFieldButton::~FormFieldButton()
//------------------------------------------------------------------------
// FormFieldText
//------------------------------------------------------------------------
-FormFieldText::FormFieldText(PDFDoc *docA, Object &&aobj, const Ref refA, FormField *parentA, std::set<int> *usedParents)
- : FormField(docA, std::move(aobj), refA, parentA, usedParents, formText)
+FormFieldText::FormFieldText(PDFDoc *docA, Object &&dictObj, const Ref refA, FormField *parentA, std::set<int> *usedParents)
+ : FormField(docA, std::move(dictObj), refA, parentA, usedParents, formText)
{
Dict* dict = obj.getDict();
Object obj1;
@@ -1938,21 +1938,21 @@ Object Form::fieldLookup(Dict *field, const char *key) {
return ::fieldLookup(field, key, &usedParents);
}
-FormField *Form::createFieldFromDict (Object &&obj, PDFDoc *docA, const Ref pref, FormField *parent, std::set<int> *usedParents)
+FormField *Form::createFieldFromDict (Object &&obj, PDFDoc *docA, const Ref aref, FormField *parent, std::set<int> *usedParents)
{
FormField *field;
const Object obj2 = Form::fieldLookup(obj.getDict (), "FT");
if (obj2.isName("Btn")) {
- field = new FormFieldButton(docA, std::move(obj), pref, parent, usedParents);
+ field = new FormFieldButton(docA, std::move(obj), aref, parent, usedParents);
} else if (obj2.isName("Tx")) {
- field = new FormFieldText(docA, std::move(obj), pref, parent, usedParents);
+ field = new FormFieldText(docA, std::move(obj), aref, parent, usedParents);
} else if (obj2.isName("Ch")) {
- field = new FormFieldChoice(docA, std::move(obj), pref, parent, usedParents);
+ field = new FormFieldChoice(docA, std::move(obj), aref, parent, usedParents);
} else if (obj2.isName("Sig")) {
- field = new FormFieldSignature(docA, std::move(obj), pref, parent, usedParents);
+ field = new FormFieldSignature(docA, std::move(obj), aref, parent, usedParents);
} else { //we don't have an FT entry => non-terminal field
- field = new FormField(docA, std::move(obj), pref, parent, usedParents);
+ field = new FormField(docA, std::move(obj), aref, parent, usedParents);
}
return field;
diff --git a/poppler/Form.h b/poppler/Form.h
index b6ec9140..c6248ae2 100644
--- a/poppler/Form.h
+++ b/poppler/Form.h
@@ -165,7 +165,7 @@ protected:
class FormWidgetButton: public FormWidget {
public:
- FormWidgetButton(PDFDoc *docA, Object *dict, unsigned num, Ref ref, FormField *p);
+ FormWidgetButton(PDFDoc *docA, Object *dictObj, unsigned num, Ref ref, FormField *p);
~FormWidgetButton ();
FormButtonType getButtonType() const;
@@ -188,7 +188,7 @@ protected:
class FormWidgetText: public FormWidget {
public:
- FormWidgetText(PDFDoc *docA, Object *dict, unsigned num, Ref ref, FormField *p);
+ FormWidgetText(PDFDoc *docA, Object *dictObj, unsigned num, Ref ref, FormField *p);
//return the field's content (UTF16BE)
const GooString* getContent() const;
@@ -222,7 +222,7 @@ protected:
class FormWidgetChoice: public FormWidget {
public:
- FormWidgetChoice(PDFDoc *docA, Object *dict, unsigned num, Ref ref, FormField *p);
+ FormWidgetChoice(PDFDoc *docA, Object *dictObj, unsigned num, Ref ref, FormField *p);
~FormWidgetChoice();
int getNumChoices() const;
@@ -263,7 +263,7 @@ protected:
class FormWidgetSignature: public FormWidget {
public:
- FormWidgetSignature(PDFDoc *docA, Object *dict, unsigned num, Ref ref, FormField *p);
+ FormWidgetSignature(PDFDoc *docA, Object *dictObj, unsigned num, Ref ref, FormField *p);
void updateWidgetAppearance() override;
FormSignatureType signatureType();
@@ -300,7 +300,7 @@ public:
Object* getObj() { return &obj; }
Ref getRef() { return ref; }
- void setReadOnly (bool b);
+ void setReadOnly (bool value);
bool isReadOnly () const { return readOnly; }
GooString* getDefaultAppearance() const { return defaultAppearance; }
@@ -407,7 +407,7 @@ protected:
class FormFieldText: public FormField {
public:
- FormFieldText(PDFDoc *docA, Object &&dict, const Ref ref, FormField *parent, std::set<int> *usedParents);
+ FormFieldText(PDFDoc *docA, Object &&dictObj, const Ref ref, FormField *parent, std::set<int> *usedParents);
const GooString* getContent () const { return content; }
const GooString* getAppearanceContent () const { return internalContent ? internalContent : content; }
diff --git a/poppler/GfxFont.cc b/poppler/GfxFont.cc
index 6d1aba7c..203a4dbf 100644
--- a/poppler/GfxFont.cc
+++ b/poppler/GfxFont.cc
@@ -2097,7 +2097,7 @@ int GfxCIDFont::mapCodeToGID(FoFiTrueType *ff, int cmapi,
return gid;
}
-int *GfxCIDFont::getCodeToGIDMap(FoFiTrueType *ff, int *mapsizep) {
+int *GfxCIDFont::getCodeToGIDMap(FoFiTrueType *ff, int *codeToGIDLen) {
#define N_UCS_CANDIDATES 2
/* space characters */
static const unsigned long spaces[] = {
@@ -2192,7 +2192,7 @@ int *GfxCIDFont::getCodeToGIDMap(FoFiTrueType *ff, int *mapsizep) {
int cmapPlatform, cmapEncoding;
Ref embID;
- *mapsizep = 0;
+ *codeToGIDLen = 0;
if (!ctu || !getCollection()) return nullptr;
if (getCollection()->cmp("Adobe-Identity") == 0) return nullptr;
if (getEmbeddedFontID(&embID)) {
@@ -2200,7 +2200,7 @@ int *GfxCIDFont::getCodeToGIDMap(FoFiTrueType *ff, int *mapsizep) {
* CIDToGIDMap should be embedded in PDF file
* and already set. So return it.
*/
- *mapsizep = getCIDToGIDLen();
+ *codeToGIDLen = getCIDToGIDLen();
return getCIDToGID();
}
@@ -2337,7 +2337,7 @@ int *GfxCIDFont::getCodeToGIDMap(FoFiTrueType *ff, int *mapsizep) {
}
codeToGID[code] = gid;
}
- *mapsizep = n;
+ *codeToGIDLen = n;
if (humap != nullptr) delete[] humap;
if (tumap != nullptr) delete[] tumap;
if (vumap != nullptr) delete[] vumap;
diff --git a/poppler/GfxFont.h b/poppler/GfxFont.h
index 0af943a6..1ae9ac5d 100644
--- a/poppler/GfxFont.h
+++ b/poppler/GfxFont.h
@@ -406,7 +406,7 @@ public:
int *getCIDToGID() const { return cidToGID; }
int getCIDToGIDLen() const { return cidToGIDLen; }
- int *getCodeToGIDMap(FoFiTrueType *ff, int *length);
+ int *getCodeToGIDMap(FoFiTrueType *ff, int *codeToGIDLen);
double getWidth(char* s, int len) const;
diff --git a/poppler/GfxState.h b/poppler/GfxState.h
index dd6ce8f6..99c33ed6 100644
--- a/poppler/GfxState.h
+++ b/poppler/GfxState.h
@@ -919,7 +919,7 @@ public:
double xMin, double yMin,
double xMax, double yMax) = 0;
- virtual double getDistance(double tMin, double tMax) const = 0;
+ virtual double getDistance(double sMin, double sMax) const = 0;
private:
@@ -993,7 +993,7 @@ public:
double xMin, double yMin,
double xMax, double yMax) override;
- double getDistance(double tMin, double tMax) const override;
+ double getDistance(double sMin, double sMax) const override;
private:
@@ -1027,7 +1027,7 @@ public:
double xMin, double yMin,
double xMax, double yMax) override;
- double getDistance(double tMin, double tMax) const override;
+ double getDistance(double sMin, double sMax) const override;
private:
diff --git a/poppler/JPEG2000Stream.cc b/poppler/JPEG2000Stream.cc
index 8e6902f4..123da94a 100644
--- a/poppler/JPEG2000Stream.cc
+++ b/poppler/JPEG2000Stream.cc
@@ -41,7 +41,7 @@ struct JPXStreamPrivate {
int ncomps;
bool inited;
int smaskInData;
- void init2(OPJ_CODEC_FORMAT format, unsigned char *data, int length, bool indexed);
+ void init2(OPJ_CODEC_FORMAT format, unsigned char *buf, int length, bool indexed);
};
static inline unsigned char adjustComp(int r, int adjust, int depth, int sgndcorr, bool indexed) {
diff --git a/poppler/Movie.h b/poppler/Movie.h
index edcd67cb..14be8fd3 100644
--- a/poppler/Movie.h
+++ b/poppler/Movie.h
@@ -5,7 +5,7 @@
//---------------------------------------------------------------------------------
// Hugo Mercier <hmercier31[at]gmail.com> (c) 2008
// Carlos Garcia Campos <carlosgc at gnome.org> (c) 2010
-// Albert Astals Cid <aacid at kde.org> (c) 2017, 2018
+// Albert Astals Cid <aacid at kde.org> (c) 2017-2019
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -33,7 +33,7 @@ struct MovieActivationParameters {
~MovieActivationParameters();
// parse from a "Movie Activation" dictionary
- void parseMovieActivation(const Object* actObj);
+ void parseMovieActivation(const Object* aDict);
enum MovieRepeatMode {
repeatModeOnce,
@@ -70,9 +70,9 @@ struct MovieActivationParameters {
class Movie {
public:
- Movie(const Object *objMovie, const Object *objAct);
- Movie(const Object *objMovie);
- Movie(const Movie &movie);
+ Movie(const Object *movieDict, const Object *aDict);
+ Movie(const Object *movieDict);
+ Movie(const Movie &other);
~Movie();
Movie& operator=(const Movie &) = delete;
diff --git a/poppler/PDFDoc.h b/poppler/PDFDoc.h
index ba64296e..65db1609 100644
--- a/poppler/PDFDoc.h
+++ b/poppler/PDFDoc.h
@@ -333,7 +333,7 @@ public:
void replacePageDict(int pageNo, int rotate, const PDFRectangle *mediaBox, const PDFRectangle *cropBox);
void markPageObjects(Dict *pageDict, XRef *xRef, XRef *countRef, unsigned int numOffset, int oldRefNum, int newRefNum, std::set<Dict*> *alreadyMarkedDicts = nullptr);
bool markAnnotations(Object *annots, XRef *xRef, XRef *countRef, unsigned int numOffset, int oldPageNum, int newPageNum, std::set<Dict*> *alreadyMarkedDicts = nullptr);
- void markAcroForm(Object *acrpForm, XRef *xRef, XRef *countRef, unsigned int numOffset, int oldPageNum, int newPageNum);
+ void markAcroForm(Object *afObj, XRef *xRef, XRef *countRef, unsigned int numOffset, int oldRefNum, int newRefNum);
// write all objects used by pageDict to outStr
unsigned int writePageObjects(OutStream *outStr, XRef *xRef, unsigned int numOffset, bool combine = false);
static void writeObject (Object *obj, OutStream* outStr, XRef *xref, unsigned int numOffset, unsigned char *fileKey,
diff --git a/poppler/PSOutputDev.cc b/poppler/PSOutputDev.cc
index 9e279c6a..d9d88145 100644
--- a/poppler/PSOutputDev.cc
+++ b/poppler/PSOutputDev.cc
@@ -7201,8 +7201,8 @@ void PSOutputDev::type3D1(GfxState *state, double wx, double wy,
t3NeedsRestore = true;
}
-void PSOutputDev::drawForm(Ref id) {
- writePSFmt("f_{0:d}_{1:d}\n", id.num, id.gen);
+void PSOutputDev::drawForm(Ref ref) {
+ writePSFmt("f_{0:d}_{1:d}\n", ref.num, ref.gen);
}
void PSOutputDev::psXObject(Stream *psStream, Stream *level1Stream) {
diff --git a/poppler/Sound.h b/poppler/Sound.h
index ae8d0cee..809b0a30 100644
--- a/poppler/Sound.h
+++ b/poppler/Sound.h
@@ -1,6 +1,6 @@
/* Sound.h - an object that holds the sound structure
* Copyright (C) 2006-2007, Pino Toscano <pino at kde.org>
- * Copyright (C) 2017, 2018, Albert Astals Cid <aacid at kde.org>
+ * Copyright (C) 2017-2019, Albert Astals Cid <aacid at kde.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -41,8 +41,8 @@ enum SoundEncoding {
class Sound
{
public:
- // Try to parse the Object s
- static Sound *parseSound(Object *s);
+ // Try to parse the Object obj
+ static Sound *parseSound(Object *obj);
// Destructor
~Sound();
diff --git a/poppler/SplashOutputDev.cc b/poppler/SplashOutputDev.cc
index 334074af..beb0d47c 100644
--- a/poppler/SplashOutputDev.cc
+++ b/poppler/SplashOutputDev.cc
@@ -1110,7 +1110,7 @@ public:
T3FontCache(const Ref *fontID, double m11A, double m12A,
double m21A, double m22A,
int glyphXA, int glyphYA, int glyphWA, int glyphHA,
- bool aa, bool validBBoxA);
+ bool validBBoxA, bool aa);
~T3FontCache();
T3FontCache(const T3FontCache &) = delete;
T3FontCache& operator=(const T3FontCache &) = delete;
diff --git a/poppler/SplashOutputDev.h b/poppler/SplashOutputDev.h
index 2be20036..7a64fe41 100644
--- a/poppler/SplashOutputDev.h
+++ b/poppler/SplashOutputDev.h
@@ -120,7 +120,7 @@ public:
~SplashAxialPattern();
- bool getParameter(double xs, double ys, double *t) override;
+ bool getParameter(double xc, double yc, double *t) override;
private:
double x0, y0, x1, y1;
@@ -152,7 +152,7 @@ public:
double *x2, double *y2, double *color2) override
{ shading->getTriangle(i, x0, y0, color0, x1, y1, color1, x2, y2, color2); }
- void getParameterizedColor(double t, SplashColorMode mode, SplashColorPtr c) override;
+ void getParameterizedColor(double colorinterp, SplashColorMode mode, SplashColorPtr dest) override;
private:
GfxGouraudTriangleShading *shading;
@@ -269,7 +269,7 @@ public:
void fill(GfxState *state) override;
void eoFill(GfxState *state) override;
bool tilingPatternFill(GfxState *state, Gfx *gfx, Catalog *catalog, Object *str,
- const double *pmat, int paintType, int tilingType, Dict *resDict,
+ const double *ptm, int paintType, int tilingType, Dict *resDict,
const double *mat, const double *bbox,
int x0, int y0, int x1, int y1,
double xStep, double yStep) override;
diff --git a/poppler/StructElement.h b/poppler/StructElement.h
index 83023eec..5b5b2181 100644
--- a/poppler/StructElement.h
+++ b/poppler/StructElement.h
@@ -300,7 +300,7 @@ private:
void parse(Dict* elementDict);
StructElement* parseChild(const Object *ref, Object* childObj, std::set<int> &seen);
void parseChildren(Dict* element, std::set<int> &seen);
- void parseAttributes(Dict *element, bool keepExisting = false);
+ void parseAttributes(Dict *attributes, bool keepExisting = false);
friend class StructTreeRoot;
};
diff --git a/poppler/UTF.cc b/poppler/UTF.cc
index 217b2688..e34ac934 100644
--- a/poppler/UTF.cc
+++ b/poppler/UTF.cc
@@ -42,7 +42,7 @@ bool UnicodeIsValid(Unicode ucs4)
((ucs4 & 0xfffe) != 0xfffe);
}
-int UTF16toUCS4(const Unicode *utf16, int utf16Len, Unicode **ucs4)
+int UTF16toUCS4(const Unicode *utf16, int utf16Len, Unicode **ucs4_out)
{
int i, n, len;
Unicode *u;
@@ -56,7 +56,7 @@ int UTF16toUCS4(const Unicode *utf16, int utf16Len, Unicode **ucs4)
}
len++;
}
- if (ucs4 == nullptr)
+ if (ucs4_out == nullptr)
return len;
u = (Unicode*)gmallocn(len, sizeof(Unicode));
@@ -85,7 +85,7 @@ int UTF16toUCS4(const Unicode *utf16, int utf16Len, Unicode **ucs4)
}
n++;
}
- *ucs4 = u;
+ *ucs4_out = u;
return len;
}
diff --git a/poppler/UTF.h b/poppler/UTF.h
index c1c59468..44844796 100644
--- a/poppler/UTF.h
+++ b/poppler/UTF.h
@@ -26,7 +26,7 @@
// utf16_len - number of UTF-16 characters
// ucs4_out - if not NULL, allocates and returns UCS-4 string. Free with gfree.
// returns number of UCS-4 characters
-int UTF16toUCS4(const Unicode *utf16, int utf16_len, Unicode **ucs4_out);
+int UTF16toUCS4(const Unicode *utf16, int utf16Len, Unicode **ucs4_out);
// Convert a PDF Text String to UCS-4
// s - PDF text string
diff --git a/poppler/UnicodeTypeTable.h b/poppler/UnicodeTypeTable.h
index bbfaa287..8b75cf05 100644
--- a/poppler/UnicodeTypeTable.h
+++ b/poppler/UnicodeTypeTable.h
@@ -17,6 +17,7 @@
// Copyright (C) 2012 Adrian Johnson <ajohnson at redneon.com>
// Copyright (C) 2016 Khaled Hosny <khaledhosny at eglug.org>
// Copyright (C) 2019 Adriaan de Groot <groot at kde.org>
+// Copyright (C) 2019 Albert Astals Cid <aacid at kde.org>
//
// To see a description of the changes please see the Changelog file that
// came with your tarball or type make ChangeLog if you are building from git
@@ -39,10 +40,10 @@ extern bool unicodeIsAlphabeticPresentationForm(Unicode c);
extern Unicode unicodeToUpper(Unicode c);
extern Unicode *unicodeNormalizeNFKC(const Unicode *in, int len,
- int *out_len, int **offsets);
+ int *out_len, int **indices);
extern Unicode *unicodeNormalizeNFKC(const Unicode *in, int len,
- int *out_len, int **offsets,
+ int *out_len, int **indices,
bool reverseRTL);
#endif
diff --git a/qt5/demos/navigationtoolbar.h b/qt5/demos/navigationtoolbar.h
index 06ce3f6b..0e87daee 100644
--- a/qt5/demos/navigationtoolbar.h
+++ b/qt5/demos/navigationtoolbar.h
@@ -1,6 +1,7 @@
/*
* Copyright (C) 2008-2009, Pino Toscano <pino at kde.org>
* Copyright (C) 2013, Fabio D'Urso <fabiodurso at hotmail.it>
+ * Copyright (C) 2019, Albert Astals Cid <aacid at kde.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -40,8 +41,8 @@ public:
void pageChanged(int page) override;
Q_SIGNALS:
- void zoomChanged(qreal value);
- void rotationChanged(int rotation);
+ void zoomChanged(qreal value); // NOLINT(readability-inconsistent-declaration-parameter-name)
+ void rotationChanged(int rotation); // NOLINT(readability-inconsistent-declaration-parameter-name)
private Q_SLOTS:
void slotGoFirst();
diff --git a/qt5/src/poppler-annotation.h b/qt5/src/poppler-annotation.h
index d0f7439c..3bc34b4d 100644
--- a/qt5/src/poppler-annotation.h
+++ b/qt5/src/poppler-annotation.h
@@ -1,5 +1,5 @@
/* poppler-annotation.h: qt interface to poppler
- * Copyright (C) 2006-2008, 2012, 2013, 2018 Albert Astals Cid <aacid at kde.org>
+ * Copyright (C) 2006-2008, 2012, 2013, 2018, 2019 Albert Astals Cid <aacid at kde.org>
* Copyright (C) 2006, 2008 Pino Toscano <pino at kde.org>
* Copyright (C) 2007, Brad Hards <bradh at frogmouth.net>
* Copyright (C) 2010, Philip Lorenz <lorenzph+freedesktop at gmail.com>
@@ -426,8 +426,8 @@ class POPPLER_QT5_EXPORT Annotation
protected:
/// \cond PRIVATE
Annotation( AnnotationPrivate &dd );
- Annotation( AnnotationPrivate &dd, const QDomNode &description );
- void storeBaseAnnotationProperties( QDomNode & parentNode, QDomDocument & document ) const;
+ Annotation( AnnotationPrivate &dd, const QDomNode &annNode );
+ void storeBaseAnnotationProperties( QDomNode & annNode, QDomDocument & document ) const;
Q_DECLARE_PRIVATE( Annotation )
QExplicitlySharedDataPointer<AnnotationPrivate> d_ptr;
/// \endcond
@@ -593,7 +593,7 @@ class POPPLER_QT5_EXPORT GeomAnnotation : public Annotation
enum GeomType { InscribedSquare, InscribedCircle };
GeomType geomType() const;
- void setGeomType( GeomType style );
+ void setGeomType( GeomType type );
QColor geomInnerColor() const;
void setGeomInnerColor( const QColor &color );
@@ -890,7 +890,7 @@ class POPPLER_QT5_EXPORT SoundAnnotation : public Annotation
*
* \note SoundAnnotation takes ownership of the object
*/
- void setSound( SoundObject *ef );
+ void setSound( SoundObject *s );
private:
SoundAnnotation();
diff --git a/qt5/src/poppler-link.cc b/qt5/src/poppler-link.cc
index d4730948..37233502 100644
--- a/qt5/src/poppler-link.cc
+++ b/qt5/src/poppler-link.cc
@@ -148,7 +148,7 @@ class LinkSoundPrivate : public LinkPrivate
class LinkRenditionPrivate : public LinkPrivate
{
public:
- LinkRenditionPrivate( const QRectF &area, ::MediaRendition *rendition, ::LinkRendition::RenditionOperation operation, const QString &script, const Ref annotationReference );
+ LinkRenditionPrivate( const QRectF &area, ::MediaRendition *rendition, ::LinkRendition::RenditionOperation operation, const QString &script, const Ref ref );
~LinkRenditionPrivate();
MediaRendition *rendition;
diff --git a/qt5/src/poppler-qt5.h b/qt5/src/poppler-qt5.h
index 1460690f..912ccdfd 100644
--- a/qt5/src/poppler-qt5.h
+++ b/qt5/src/poppler-qt5.h
@@ -563,7 +563,7 @@ delete it;
because doing a partial rendering update needs to copy the image
buffer so if it is not wanted it is better skipped early.
- \param closure opaque structure that will be passed
+ \param payload opaque structure that will be passed
back to partialUpdateCallback and shouldDoPartialUpdateCallback.
\warning The parameter (\p x, \p y, \p w, \p h) are not
@@ -578,7 +578,7 @@ delete it;
int x, int y, int w, int h, Rotation rotate,
RenderToImagePartialUpdateFunc partialUpdateCallback,
ShouldRenderToImagePartialQueryFunc shouldDoPartialUpdateCallback,
- const QVariant &closure
+ const QVariant &payload
) const;
/**
@@ -631,7 +631,7 @@ delete it;
\param shouldAbortRenderCallback callback that will be called
to ask if the rendering should be cancelled.
- \param closure opaque structure that will be passed
+ \param payload opaque structure that will be passed
back to partialUpdateCallback, shouldDoPartialUpdateCallback
and shouldAbortRenderCallback.
@@ -648,7 +648,7 @@ delete it;
RenderToImagePartialUpdateFunc partialUpdateCallback,
ShouldRenderToImagePartialQueryFunc shouldDoPartialUpdateCallback,
ShouldAbortQueryFunc shouldAbortRenderCallback,
- const QVariant &closure
+ const QVariant &payload
) const;
/**
@@ -781,7 +781,7 @@ delete it;
\since 0.31
**/
- bool search(const QString &text, double &rectLeft, double &rectTop, double &rectRight, double &rectBottom, SearchDirection direction, SearchFlags flags = NoSearchFlags, Rotation rotate = Rotate0) const;
+ bool search(const QString &text, double &sLeft, double &sTop, double &sRight, double &sBottom, SearchDirection direction, SearchFlags flags = NoSearchFlags, Rotation rotate = Rotate0) const;
/**
Returns a list of all occurrences of the specified text on the page.
@@ -1347,9 +1347,9 @@ QDateTime modified = m_doc->date("ModDate");
- CreationDate: the date of creation of the document
- ModDate: the date of the last change in the document
- \param data the type of date that is required
+ \param type the type of date that is required
*/
- QDateTime date( const QString & data ) const;
+ QDateTime date( const QString & type ) const;
/**
Set the Info dict date entry specified by \param key to \param val
@@ -1394,11 +1394,11 @@ QString subject = m_doc->info("Subject");
In addition to \c Title and \c Subject, other information that may
be available include \c Author, \c Keywords, \c Creator and \c Producer.
- \param data the information that is required
+ \param type the information that is required
\sa infoKeys() to get a list of the available keys
*/
- QString info( const QString & data ) const;
+ QString info( const QString & type ) const;
/**
Set the value of the document's Info dictionary entry specified by \param key to \param val
@@ -1618,7 +1618,7 @@ QString subject = m_doc->info("Subject");
\since 0.10
*/
- QByteArray fontData(const FontInfo &font) const;
+ QByteArray fontData(const FontInfo &fi) const;
/**
The documents embedded within the PDF document.
diff --git a/splash/Splash.cc b/splash/Splash.cc
index 6e30fd80..9ae4bd30 100644
--- a/splash/Splash.cc
+++ b/splash/Splash.cc
@@ -1759,8 +1759,8 @@ void Splash::setFillOverprint(bool fop) {
state->fillOverprint = fop;
}
-void Splash::setStrokeOverprint(bool gop) {
- state->strokeOverprint = gop;
+void Splash::setStrokeOverprint(bool sop) {
+ state->strokeOverprint = sop;
}
void Splash::setOverprintMode(int opm) {
diff --git a/splash/Splash.h b/splash/Splash.h
index 571bcba5..54f55220 100644
--- a/splash/Splash.h
+++ b/splash/Splash.h
@@ -115,8 +115,8 @@ public:
//----- state write
void setMatrix(SplashCoord *matrix);
- void setStrokePattern(SplashPattern *strokeColor);
- void setFillPattern(SplashPattern *fillColor);
+ void setStrokePattern(SplashPattern *strokePattern);
+ void setFillPattern(SplashPattern *fillPattern);
void setScreen(SplashScreen *screen);
void setBlendFunc(SplashBlendFunc func);
void setStrokeAlpha(SplashCoord alpha);
diff --git a/splash/SplashFTFontFile.h b/splash/SplashFTFontFile.h
index e5e0e940..b2217004 100644
--- a/splash/SplashFTFontFile.h
+++ b/splash/SplashFTFontFile.h
@@ -14,6 +14,7 @@
// Copyright (C) 2006 Takashi Iwai <tiwai at suse.de>
// Copyright (C) 2017, 2018 Oliver Sander <oliver.sander at tu-dresden.de>
// Copyright (C) 2017 Adrian Johnson <ajohnson at redneon.com>
+// Copyright (C) 2019 Albert Astals Cid <aacid at kde.org>
//
// To see a description of the changes please see the Changelog file that
// came with your tarball or type make ChangeLog if you are building from git
@@ -43,7 +44,7 @@ public:
static SplashFontFile *loadCIDFont(SplashFTFontEngine *engineA,
SplashFontFileID *idA,
SplashFontSrc *src,
- int *codeToCIDA, int codeToGIDLenA);
+ int *codeToGIDA, int codeToGIDLenA);
static SplashFontFile *loadTrueTypeFont(SplashFTFontEngine *engineA,
SplashFontFileID *idA,
SplashFontSrc *src,
More information about the poppler
mailing list