Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
poppler
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nathanael Noblet
poppler
Commits
42efcb73
Commit
42efcb73
authored
Nov 29, 2019
by
Albert Astals Cid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable readability-inconsistent-declaration-parameter-name
parent
ec2b036e
Changes
33
Hide whitespace changes
Inline
Side-by-side
Showing
33 changed files
with
119 additions
and
113 deletions
+119
-113
.gitlab-ci.yml
.gitlab-ci.yml
+1
-1
cpp/poppler-document.h
cpp/poppler-document.h
+3
-2
cpp/poppler-image.cpp
cpp/poppler-image.cpp
+7
-7
goo/gbase64.h
goo/gbase64.h
+2
-1
goo/gbasename.h
goo/gbasename.h
+2
-1
poppler/Annot.cc
poppler/Annot.cc
+6
-6
poppler/Annot.h
poppler/Annot.h
+6
-6
poppler/CachedFile.cc
poppler/CachedFile.cc
+3
-3
poppler/CairoFontEngine.h
poppler/CairoFontEngine.h
+6
-6
poppler/DateInfo.h
poppler/DateInfo.h
+2
-2
poppler/Form.cc
poppler/Form.cc
+18
-18
poppler/Form.h
poppler/Form.h
+6
-6
poppler/GfxFont.cc
poppler/GfxFont.cc
+4
-4
poppler/GfxFont.h
poppler/GfxFont.h
+1
-1
poppler/GfxState.h
poppler/GfxState.h
+3
-3
poppler/JPEG2000Stream.cc
poppler/JPEG2000Stream.cc
+1
-1
poppler/Movie.h
poppler/Movie.h
+5
-5
poppler/PDFDoc.h
poppler/PDFDoc.h
+1
-1
poppler/PSOutputDev.cc
poppler/PSOutputDev.cc
+2
-2
poppler/Sound.h
poppler/Sound.h
+3
-3
poppler/SplashOutputDev.cc
poppler/SplashOutputDev.cc
+1
-1
poppler/SplashOutputDev.h
poppler/SplashOutputDev.h
+3
-3
poppler/StructElement.h
poppler/StructElement.h
+1
-1
poppler/UTF.cc
poppler/UTF.cc
+3
-3
poppler/UTF.h
poppler/UTF.h
+1
-1
poppler/UnicodeTypeTable.h
poppler/UnicodeTypeTable.h
+3
-2
qt5/demos/navigationtoolbar.h
qt5/demos/navigationtoolbar.h
+3
-2
qt5/src/poppler-annotation.h
qt5/src/poppler-annotation.h
+5
-5
qt5/src/poppler-link.cc
qt5/src/poppler-link.cc
+1
-1
qt5/src/poppler-qt5.h
qt5/src/poppler-qt5.h
+10
-10
splash/Splash.cc
splash/Splash.cc
+2
-2
splash/Splash.h
splash/Splash.h
+2
-2
splash/SplashFTFontFile.h
splash/SplashFTFontFile.h
+2
-1
No files found.
.gitlab-ci.yml
View file @
42efcb73
...
...
@@ -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
...
...
cpp/poppler-document.h
View file @
42efcb73
...
...
@@ -2,6 +2,7 @@
* Copyright (C) 2009-2010, Pino Toscano <pino@kde.org>
* Copyright (C) 2016 Jakub Alba <jakubalba@gmail.com>
* Copyright (C) 2019, Masamichi Hosoda <trueroad@trueroad.jp>
* Copyright (C) 2019, Albert Astals Cid <aacid@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
(),
...
...
cpp/poppler-image.cpp
View file @
42efcb73
...
...
@@ -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
;
}
...
...
goo/gbase64.h
View file @
42efcb73
...
...
@@ -8,6 +8,7 @@
// This file is licensed under the GPLv2 or later
//
// Copyright (C) 2018 Greg Knight <lyngvi@gmail.com>
// Copyright (C) 2019 Albert Astals Cid <aacid@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
());
}
...
...
goo/gbasename.h
View file @
42efcb73
...
...
@@ -9,6 +9,7 @@
// This file is licensed under the GPLv2 or later
//
// Copyright (C) 2018 Greg Knight <lyngvi@gmail.com>
// Copyright (C) 2019 Albert Astals Cid <aacid@kde.org>
//
//========================================================================
...
...
@@ -17,6 +18,6 @@
#include <string>
std
::
string
gbasename
(
const
char
*
input
);
std
::
string
gbasename
(
const
char
*
filename
);
#endif // ndef GBASENAME_H
poppler/Annot.cc
View file @
42efcb73
...
...
@@ -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
());
}
...
...
poppler/Annot.h
View file @
42efcb73
...
...
@@ -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
*
ini
t
);
AnnotAppearanceBBox
(
PDFRectangle
*
rec
t
);
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
*
add
ed
DingbatsResource
);
void
updateAppearanceStream
();
AnnotWidgetHighlightMode
getMode
()
{
return
mode
;
}
...
...
poppler/CachedFile.cc
View file @
42efcb73
...
...
@@ -6,7 +6,7 @@
//
// Copyright 2009 Stefan Thomas <thomas@eload24.com>
// Copyright 2010, 2011 Hib Eris <hib@hiberis.nl>
// Copyright 2010, 2018 Albert Astals Cid <aacid@kde.org>
// Copyright 2010, 2018
, 2019
Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2013 Julien Nabet <serval2412@yahoo.fr>
//
//========================================================================
...
...
@@ -18,10 +18,10 @@
// CachedFile
//------------------------------------------------------------------------
CachedFile
::
CachedFile
(
CachedFileLoader
*
cache
dFileLoaderA
,
GooString
*
uriA
)
CachedFile
::
CachedFile
(
CachedFileLoader
*
cache
Loader
,
GooString
*
uriA
)
{
uri
=
uriA
;
loader
=
cache
dFileLoaderA
;
loader
=
cache
Loader
;
streamPos
=
0
;
chunks
=
new
std
::
vector
<
Chunk
>
();
...
...
poppler/CairoFontEngine.h
View file @
42efcb73
...
...
@@ -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
ref
A
,
cairo_font_face_t
*
cairo_font_faceA
,
int
*
codeToGID
A
,
unsigned
int
codeToGIDLen
A
,
bool
substitute
A
,
bool
printing
A
);
virtual
~
CairoFont
();
CairoFont
(
const
CairoFont
&
)
=
delete
;
CairoFont
&
operator
=
(
const
CairoFont
&
other
)
=
delete
;
...
...
poppler/DateInfo.h
View file @
42efcb73
...
...
@@ -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 time
t
is NULL, current time is used.
* If time
A
is NULL, current time is used.
* Returns new GooString. Free with delete.
*/
GooString
*
timeToDateString
(
const
time_t
*
time
t
);
GooString
*
timeToDateString
(
const
time_t
*
time
A
);
/* Convert PDF date string to time.
* Returns -1 if conversion fails.
...
...
poppler/Form.cc
View file @
42efcb73
...
...
@@ -185,8 +185,8 @@ bool FormWidget::setAdditionalAction(Annot::FormAdditionalActionsType t, const G
return
widget
->
setFormAdditionalAction
(
t
,
js
);
}
FormWidgetButton
::
FormWidgetButton
(
PDFDoc
*
docA
,
Object
*
ao
bj
,
unsigned
num
,
Ref
refA
,
FormField
*
p
)
:
FormWidget
(
docA
,
ao
bj
,
num
,
refA
,
p
)
FormWidgetButton
::
FormWidgetButton
(
PDFDoc
*
docA
,
Object
*
dictO
bj
,
unsigned
num
,
Ref
refA
,
FormField
*
p
)
:
FormWidget
(
docA
,
dictO
bj
,
num
,
refA
,
p
)
{
type
=
formButton
;
onStr
=
nullptr
;
...
...
@@ -264,8 +264,8 @@ FormFieldButton *FormWidgetButton::parent() const
}
FormWidgetText
::
FormWidgetText
(
PDFDoc
*
docA
,
Object
*
ao
bj
,
unsigned
num
,
Ref
refA
,
FormField
*
p
)
:
FormWidget
(
docA
,
ao
bj
,
num
,
refA
,
p
)
FormWidgetText
::
FormWidgetText
(
PDFDoc
*
docA
,
Object
*
dictO
bj
,
unsigned
num
,
Ref
refA
,
FormField
*
p
)
:
FormWidget
(
docA
,
dictO
bj
,
num
,
refA
,
p
)
{
type
=
formText
;
}
...
...
@@ -346,8 +346,8 @@ FormFieldText *FormWidgetText::parent() const
return
static_cast
<
FormFieldText
*>
(
field
);
}
FormWidgetChoice
::
FormWidgetChoice
(
PDFDoc
*
docA
,
Object
*
ao
bj
,
unsigned
num
,
Ref
refA
,
FormField
*
p
)
:
FormWidget
(
docA
,
ao
bj
,
num
,
refA
,
p
)
FormWidgetChoice
::
FormWidgetChoice
(
PDFDoc
*
docA
,
Object
*
dictO
bj
,
unsigned
num
,
Ref
refA
,
FormField
*
p
)
:
FormWidget
(
docA
,
dictO
bj
,
num
,
refA
,
p
)
{
type
=
formChoice
;
}
...
...
@@ -458,8 +458,8 @@ FormFieldChoice *FormWidgetChoice::parent() const
return
static_cast
<
FormFieldChoice
*>
(
field
);
}
FormWidgetSignature
::
FormWidgetSignature
(
PDFDoc
*
docA
,
Object
*
ao
bj
,
unsigned
num
,
Ref
refA
,
FormField
*
p
)
:
FormWidget
(
docA
,
ao
bj
,
num
,
refA
,
p
)
FormWidgetSignature
::
FormWidgetSignature
(
PDFDoc
*
docA
,
Object
*
dictO
bj
,
unsigned
num
,
Ref
refA
,
FormField
*
p
)
:
FormWidget
(
docA
,
dictO
bj
,
num
,
refA
,
p
)
{
type
=
formSignature
;
}
...
...
@@ -977,8 +977,8 @@ void FormField::setReadOnly (bool value)
//------------------------------------------------------------------------
// FormFieldButton
//------------------------------------------------------------------------
FormFieldButton
::
FormFieldButton
(
PDFDoc
*
docA
,
Object
&&
ao
bj
,
const
Ref
refA
,
FormField
*
parentA
,
std
::
set
<
int
>
*
usedParents
)
:
FormField
(
docA
,
std
::
move
(
ao
bj
),
refA
,
parentA
,
usedParents
,
formButton
)
FormFieldButton
::
FormFieldButton
(
PDFDoc
*
docA
,
Object
&&
dictO
bj
,
const
Ref
refA
,
FormField
*
parentA
,
std
::
set
<
int
>
*
usedParents
)
:
FormField
(
docA
,
std
::
move
(
dictO
bj
),
refA
,
parentA
,
usedParents
,
formButton
)
{
Dict
*
dict
=
obj
.
getDict
();
active_child
=
-
1
;
...
...
@@ -1147,8 +1147,8 @@ FormFieldButton::~FormFieldButton()
//------------------------------------------------------------------------
// FormFieldText
//------------------------------------------------------------------------
FormFieldText
::
FormFieldText
(
PDFDoc
*
docA
,
Object
&&
ao
bj
,
const
Ref
refA
,
FormField
*
parentA
,
std
::
set
<
int
>
*
usedParents
)
:
FormField
(
docA
,
std
::
move
(
ao
bj
),
refA
,
parentA
,
usedParents
,
formText
)
FormFieldText
::
FormFieldText
(
PDFDoc
*
docA
,
Object
&&
dictO
bj
,
const
Ref
refA
,
FormField
*
parentA
,
std
::
set
<
int
>
*
usedParents
)
:
FormField
(
docA
,
std
::
move
(
dictO
bj
),
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
p
ref
,
FormField
*
parent
,
std
::
set
<
int
>
*
usedParents
)
FormField
*
Form
::
createFieldFromDict
(
Object
&&
obj
,
PDFDoc
*
docA
,
const
Ref
a
ref
,
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
),
p
ref
,
parent
,
usedParents
);
field
=
new
FormFieldButton
(
docA
,
std
::
move
(
obj
),
a
ref
,
parent
,
usedParents
);
}
else
if
(
obj2
.
isName
(
"Tx"
))
{
field
=
new
FormFieldText
(
docA
,
std
::
move
(
obj
),
p
ref
,
parent
,
usedParents
);
field
=
new
FormFieldText
(
docA
,
std
::
move
(
obj
),
a
ref
,
parent
,
usedParents
);
}
else
if
(
obj2
.
isName
(
"Ch"
))
{
field
=
new
FormFieldChoice
(
docA
,
std
::
move
(
obj
),
p
ref
,
parent
,
usedParents
);
field
=
new
FormFieldChoice
(
docA
,
std
::
move
(
obj
),
a
ref
,
parent
,
usedParents
);
}
else
if
(
obj2
.
isName
(
"Sig"
))
{
field
=
new
FormFieldSignature
(
docA
,
std
::
move
(
obj
),
p
ref
,
parent
,
usedParents
);
field
=
new
FormFieldSignature
(
docA
,
std
::
move
(
obj
),
a
ref
,
parent
,
usedParents
);
}
else
{
//we don't have an FT entry => non-terminal field
field
=
new
FormField
(
docA
,
std
::
move
(
obj
),
p
ref
,
parent
,
usedParents
);
field
=
new
FormField
(
docA
,
std
::
move
(
obj
),
a
ref
,
parent
,
usedParents
);
}
return
field
;
...
...
poppler/Form.h
View file @
42efcb73
...
...
@@ -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
*
dict
Obj
,
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
*
dict
Obj
,
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
*
dict
Obj
,
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
*
dict
Obj
,
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
&&
dict
Obj
,
const
Ref
ref
,
FormField
*
parent
,
std
::
set
<
int
>
*
usedParents
);
const
GooString
*
getContent
()
const
{
return
content
;
}
const
GooString
*
getAppearanceContent
()
const
{
return
internalContent
?
internalContent
:
content
;
}
...
...
poppler/GfxFont.cc
View file @
42efcb73
...
...
@@ -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
;
...
...
poppler/GfxFont.h
View file @
42efcb73
...
...
@@ -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
;
...
...
poppler/GfxState.h
View file @
42efcb73
...
...
@@ -919,7 +919,7 @@ public:
double
xMin
,
double
yMin
,
double
xMax
,
double
yMax
)
=
0
;
virtual
double
getDistance
(
double
tMin
,
double
t
Max
)
const
=
0
;
virtual
double
getDistance
(
double
sMin
,
double
s
Max
)
const
=
0
;
private:
...
...
@@ -993,7 +993,7 @@ public:
double
xMin
,
double
yMin
,
double
xMax
,
double
yMax
)
override
;
double
getDistance
(
double
tMin
,
double
t
Max
)
const
override
;
double
getDistance
(
double
sMin
,
double
s
Max
)
const
override
;
private:
...
...
@@ -1027,7 +1027,7 @@ public:
double
xMin
,
double
yMin
,
double
xMax
,
double
yMax
)
override
;
double
getDistance
(
double
tMin
,
double
t
Max
)
const
override
;
double
getDistance
(
double
sMin
,
double
s
Max
)
const
override
;
private:
...
...
poppler/JPEG2000Stream.cc
View file @
42efcb73
...
...
@@ -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
)
{
...
...
poppler/Movie.h
View file @
42efcb73
...
...
@@ -5,7 +5,7 @@
//---------------------------------------------------------------------------------
// Hugo Mercier <hmercier31[at]gmail.com> (c) 2008
// Carlos Garcia Campos <carlosgc@gnome.org> (c) 2010
// Albert Astals Cid <aacid@kde.org> (c) 2017
, 2018
// Albert Astals Cid <aacid@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
*
a
ctObj
);
void
parseMovieActivation
(
const
Object
*
a
Dict
);
enum
MovieRepeatMode
{
repeatModeOnce
,
...
...
@@ -70,9 +70,9 @@ struct MovieActivationParameters {
class
Movie
{
public:
Movie
(
const
Object
*
objMovie
,
const
Object
*
objA
ct
);
Movie
(
const
Object
*
objMovie
);
Movie
(
const
Movie
&
movie
);
Movie
(
const
Object
*
movieDict
,
const
Object
*
aDi
ct
);
Movie
(
const
Object
*
movieDict
);
Movie
(
const
Movie
&
other
);
~
Movie
();
Movie
&
operator
=
(
const
Movie
&
)
=
delete
;
...
...
poppler/PDFDoc.h
View file @
42efcb73
...
...
@@ -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
*
a
crpForm
,
XRef
*
xRef
,
XRef
*
countRef
,
unsigned
int
numOffset
,
int
oldPageNum
,
int
newPage
Num
);
void
markAcroForm
(
Object
*
a
fObj
,
XRef
*
xRef
,
XRef
*
countRef
,
unsigned
int
numOffset
,
int
oldRefNum
,
int
newRef
Num
);
// 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
,
...
...
poppler/PSOutputDev.cc
View file @
42efcb73
...
...
@@ -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
)
{
...
...
poppler/Sound.h
View file @
42efcb73
/* Sound.h - an object that holds the sound structure
* Copyright (C) 2006-2007, Pino Toscano <pino@kde.org>
* Copyright (C) 2017
, 2018
, Albert Astals Cid <aacid@kde.org>
* Copyright (C) 2017
-2019
, Albert Astals Cid <aacid@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
();
...
...
poppler/SplashOutputDev.cc
View file @
42efcb73
...
...
@@ -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
;
...
...
poppler/SplashOutputDev.h
View file @
42efcb73
...
...
@@ -120,7 +120,7 @@ public:
~
SplashAxialPattern
();
bool
getParameter
(
double
x
s
,
double
ys
,
double
*
t
)
override
;
bool
getParameter
(
double
x
c
,
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
*
p
mat
,
int
paintType
,
int
tilingType
,
Dict
*
resDict
,
const
double
*
p
tm
,
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
;
...
...
poppler/StructElement.h
View file @
42efcb73
...
...
@@ -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
;
};
...
...
poppler/UTF.cc
View file @
42efcb73
...
...
@@ -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
;
}
...
...
poppler/UTF.h
View file @
42efcb73
...
...
@@ -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
_l
en
,
Unicode
**
ucs4_out
);
int
UTF16toUCS4
(
const
Unicode
*
utf16
,
int
utf16
L
en
,
Unicode
**
ucs4_out
);
// Convert a PDF Text String to UCS-4
// s - PDF text string
...
...
poppler/UnicodeTypeTable.h
View file @
42efcb73
...
...
@@ -17,6 +17,7 @@
// Copyright (C) 2012 Adrian Johnson <ajohnson@redneon.com>
// Copyright (C) 2016 Khaled Hosny <khaledhosny@eglug.org>
// Copyright (C) 2019 Adriaan de Groot <groot@kde.org>
// Copyright (C) 2019 Albert Astals Cid <aacid@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
**
offset
s
);
int
*
out_len
,
int
**
indice
s
);
extern
Unicode
*
unicodeNormalizeNFKC
(
const
Unicode
*
in
,
int
len
,
int
*
out_len
,
int
**
offset
s
,
int
*
out_len
,
int
**
indice
s
,
bool
reverseRTL
);
#endif
qt5/demos/navigationtoolbar.h
View file @
42efcb73