Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Andi Sardina Ramos
Okular
Commits
7ab451aa
Commit
7ab451aa
authored
May 13, 2006
by
Albert Astals Cid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
some leaks less
svn path=/branches/work/kde4/playground/graphics/okular/; revision=540485
parent
8f9801ed
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
4 deletions
+11
-4
core/document.cpp
core/document.cpp
+1
-0
generators/poppler/generator_pdf.cpp
generators/poppler/generator_pdf.cpp
+10
-4
No files found.
core/document.cpp
View file @
7ab451aa
...
...
@@ -119,6 +119,7 @@ KPDFDocument::KPDFDocument( QHash<QString, Generator*> * genList )
d
->
memCheckTimer
=
0
;
d
->
saveBookmarksTimer
=
0
;
d
->
warnedOutOfMemory
=
false
;
m_usingCachedGenerator
=
false
;
}
KPDFDocument
::~
KPDFDocument
()
...
...
generators/poppler/generator_pdf.cpp
View file @
7ab451aa
/*****************************
**********************************************
* Copyright (C) 2004 by Albert Astals Cid <tsdgeos@terra.es>
*
/***************************************************************************
* Copyright (C) 2004
-2006
by Albert Astals Cid <tsdgeos@terra.es> *
* Copyright (C) 2004 by Enrico Ros <eros.kde@email.it> *
* *
* This program is free software; you can redistribute it and/or modify *
...
...
@@ -298,6 +298,7 @@ void PDFGenerator::loadPages(QVector<KPDFPage*> &pagesVector, int rotation, bool
docLock
.
unlock
();
page
->
setSearchPage
(
abstractTextPage
(
textList
,
page
->
height
(),
page
->
width
(),
rotation
));
qDeleteAll
(
textList
);
delete
p
;
if
(
clear
&&
pagesVector
[
i
])
...
...
@@ -563,7 +564,9 @@ void PDFGenerator::generatePixmap( PixmapRequest * request )
docLock
.
unlock
();
if
(
genTextPage
)
{
page
->
setSearchPage
(
abstractTextPage
(
p
->
textList
(),
page
->
height
(),
page
->
width
(),
page
->
rotation
())
);
QList
<
Poppler
::
TextBox
*>
textList
=
p
->
textList
();
page
->
setSearchPage
(
abstractTextPage
(
textList
,
page
->
height
(),
page
->
width
(),
page
->
rotation
())
);
qDeleteAll
(
textList
);
}
delete
p
;
...
...
@@ -589,6 +592,7 @@ void PDFGenerator::generateSyncTextPage( KPDFPage * page )
delete
pp
;
// ..and attach it to the page
page
->
setSearchPage
(
abstractTextPage
(
textList
,
page
->
height
(),
page
->
width
(),
page
->
rotation
())
);
qDeleteAll
(
textList
);
}
bool
PDFGenerator
::
print
(
KPrinter
&
printer
)
...
...
@@ -696,7 +700,6 @@ inline void append (KPDFTextPage* ktp,
));
}
// TODO have a look at who should delete what's inside text
KPDFTextPage
*
PDFGenerator
::
abstractTextPage
(
const
QList
<
Poppler
::
TextBox
*>
&
text
,
double
height
,
double
width
,
int
rot
)
{
KPDFTextPage
*
ktp
=
new
KPDFTextPage
;
...
...
@@ -981,8 +984,11 @@ void PDFGenerator::threadFinished()
request
->
page
->
setPixmap
(
request
->
id
,
new
QPixmap
(
*
outImage
)
);
delete
outImage
;
if
(
!
outText
.
isEmpty
()
)
{
request
->
page
->
setSearchPage
(
abstractTextPage
(
outText
,
request
->
page
->
height
(),
request
->
page
->
width
(),
request
->
page
->
rotation
()));
qDeleteAll
(
outText
);
}
bool
genObjectRects
=
request
->
id
&
(
PAGEVIEW_ID
|
PRESENTATION_ID
);
if
(
genObjectRects
)
request
->
page
->
setObjectRects
(
outRects
);
...
...
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