[poppler] poppler/qt4/src: poppler-link.cc, 1.4,
1.4.2.1 poppler-page.cc, 1.25.2.1, 1.25.2.2 poppler-qt4.h,
1.34, 1.34.2.1 poppler-textbox.cc, 1.2, 1.2.2.1
Albert Astals Cid
aacid at kemper.freedesktop.org
Sun Nov 19 05:17:15 PST 2006
Update of /cvs/poppler/poppler/qt4/src
In directory kemper:/tmp/cvs-serv26771/qt4/src
Modified Files:
Tag: POPPLER_0_5_X
poppler-link.cc poppler-page.cc poppler-qt4.h
poppler-textbox.cc
Log Message:
* qt4/src/poppler-link.cc:
* qt4/src/poppler-page.cc:
* qt4/src/poppler-qt4.h:
* qt4/src/poppler-textbox.cc: Fix memory leaks
* splash/Splash.cc: Initialize the values of nClipRes
Index: poppler-link.cc
===================================================================
RCS file: /cvs/poppler/poppler/qt4/src/poppler-link.cc,v
retrieving revision 1.4
retrieving revision 1.4.2.1
diff -u -d -r1.4 -r1.4.2.1
--- poppler-link.cc 19 May 2006 17:24:19 -0000 1.4
+++ poppler-link.cc 19 Nov 2006 13:17:13 -0000 1.4.2.1
@@ -31,10 +31,14 @@
LinkDestination::LinkDestination(const LinkDestinationData &data)
{
+ bool deleteDest = false;
LinkDest *ld = data.ld;
if ( data.namedDest && !ld )
+ {
+ deleteDest = true;
ld = data.doc->doc.findDest( data.namedDest );
+ }
if (!ld) return;
@@ -72,6 +76,8 @@
m_top = topAux;
m_right = rightAux;
m_bottom = bottomAux;
+
+ if (deleteDest) delete ld;
}
LinkDestination::LinkDestination(const QString &description)
Index: poppler-page.cc
===================================================================
RCS file: /cvs/poppler/poppler/qt4/src/poppler-page.cc,v
retrieving revision 1.25.2.1
retrieving revision 1.25.2.2
diff -u -d -r1.25.2.1 -r1.25.2.2
--- poppler-page.cc 30 Sep 2006 16:25:15 -0000 1.25.2.1
+++ poppler-page.cc 19 Nov 2006 13:17:13 -0000 1.25.2.2
@@ -328,7 +328,9 @@
for (int i = 0; i < word_list->getLength(); i++) {
TextWord *word = word_list->get(i);
- QString string = QString::fromUtf8(word->getText()->getCString());
+ GooString *gooWord = word->getText();
+ QString string = QString::fromUtf8(gooWord->getCString());
+ delete gooWord;
double xMin, yMin, xMax, yMax;
word->getBBox(&xMin, &yMin, &xMax, &yMax);
Index: poppler-qt4.h
===================================================================
RCS file: /cvs/poppler/poppler/qt4/src/poppler-qt4.h,v
retrieving revision 1.34
retrieving revision 1.34.2.1
diff -u -d -r1.34 -r1.34.2.1
--- poppler-qt4.h 25 Jun 2006 16:59:31 -0000 1.34
+++ poppler-qt4.h 19 Nov 2006 13:17:13 -0000 1.34.2.1
@@ -63,6 +63,7 @@
1/72 of an inch.
*/
TextBox(const QString& text, const QRectF &bBox);
+ ~TextBox();
/**
returns the text
Index: poppler-textbox.cc
===================================================================
RCS file: /cvs/poppler/poppler/qt4/src/poppler-textbox.cc,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -u -d -r1.2 -r1.2.2.1
--- poppler-textbox.cc 1 May 2006 18:33:47 -0000 1.2
+++ poppler-textbox.cc 19 Nov 2006 13:17:13 -0000 1.2.2.1
@@ -30,6 +30,11 @@
m_data->bBox = bBox;
}
+TextBox::~TextBox()
+{
+ delete m_data;
+}
+
const QString &TextBox::text() const
{
return m_data->text;
More information about the poppler
mailing list