Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Masamichi Hosoda
poppler
Commits
efc7e5ef
Commit
efc7e5ef
authored
Apr 04, 2010
by
Hib Eris
Committed by
Albert Astals Cid
Apr 05, 2010
Browse files
Cleanup PDFDoc
parent
08a3435e
Changes
2
Hide whitespace changes
Inline
Side-by-side
poppler/PDFDoc.cc
View file @
efc7e5ef
...
...
@@ -21,6 +21,7 @@
// Copyright (C) 2009 Eric Toombs <ewtoombs@uwaterloo.ca>
// Copyright (C) 2009 Kovid Goyal <kovid@kovidgoyal.net>
// Copyright (C) 2009 Axel Struebing <axel.struebing@freenet.de>
// Copyright (C) 2010 Hib Eris <hib@hiberis.nl>
//
// 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
...
...
@@ -73,15 +74,11 @@
// PDFDoc
//------------------------------------------------------------------------
PDFDoc
::
PDFDoc
(
GooString
*
fileNameA
,
GooString
*
ownerPassword
,
GooString
*
userPassword
,
void
*
guiDataA
)
{
Object
obj
;
void
PDFDoc
::
init
()
{
ok
=
gFalse
;
errCode
=
errNone
;
guiData
=
guiDataA
;
fileName
=
NULL
;
file
=
NULL
;
str
=
NULL
;
xref
=
NULL
;
...
...
@@ -89,8 +86,16 @@ PDFDoc::PDFDoc(GooString *fileNameA, GooString *ownerPassword,
#ifndef DISABLE_OUTLINE
outline
=
NULL
;
#endif
}
PDFDoc
::
PDFDoc
(
GooString
*
fileNameA
,
GooString
*
ownerPassword
,
GooString
*
userPassword
,
void
*
guiDataA
)
{
Object
obj
;
init
();
fileName
=
fileNameA
;
guiData
=
guiDataA
;
// try to open file
#ifdef VMS
...
...
@@ -124,19 +129,10 @@ PDFDoc::PDFDoc(wchar_t *fileNameA, int fileNameLen, GooString *ownerPassword,
Object
obj
;
int
i
;
ok
=
gFalse
;
errCode
=
errNone
;
init
();
guiData
=
guiDataA
;
file
=
NULL
;
str
=
NULL
;
xref
=
NULL
;
catalog
=
NULL
;
#ifndef DISABLE_OUTLINE
outline
=
NULL
;
#endif
//~ file name should be stored in Unicode (?)
fileName
=
new
GooString
();
for
(
i
=
0
;
i
<
fileNameLen
;
++
i
)
{
...
...
@@ -174,21 +170,15 @@ PDFDoc::PDFDoc(wchar_t *fileNameA, int fileNameLen, GooString *ownerPassword,
PDFDoc
::
PDFDoc
(
BaseStream
*
strA
,
GooString
*
ownerPassword
,
GooString
*
userPassword
,
void
*
guiDataA
)
{
ok
=
gFalse
;
errCode
=
errNone
;
init
()
;
guiData
=
guiDataA
;
if
(
strA
->
getFileName
())
{
fileName
=
strA
->
getFileName
()
->
copy
();
}
else
{
fileName
=
NULL
;
}
file
=
NULL
;
str
=
strA
;
xref
=
NULL
;
catalog
=
NULL
;
#ifndef DISABLE_OUTLINE
outline
=
NULL
;
#endif
ok
=
setup
(
ownerPassword
,
userPassword
);
}
...
...
poppler/PDFDoc.h
View file @
efc7e5ef
...
...
@@ -20,6 +20,7 @@
// Copyright (C) 2008 Carlos Garcia Campos <carlosgc@gnome.org>
// Copyright (C) 2009 Eric Toombs <ewtoombs@uwaterloo.ca>
// Copyright (C) 2009 Kovid Goyal <kovid@kovidgoyal.net>
// Copyright (C) 2010 Hib Eris <hib@hiberis.nl>
//
// 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
...
...
@@ -226,7 +227,7 @@ private:
void
saveIncrementalUpdate
(
OutStream
*
outStr
);
void
saveCompleteRewrite
(
OutStream
*
outStr
);
void
init
();
GBool
setup
(
GooString
*
ownerPassword
,
GooString
*
userPassword
);
GBool
checkFooter
();
void
checkHeader
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment