Commit 9e9b82da authored by Albert Astals Cid's avatar Albert Astals Cid

* 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
parent b9faacc6
2006-11-19 Albert Astals Cid <aacid@kde.org>
* 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
2006-11-18 Albert Astals Cid <aacid@kde.org>
* qt4/src/poppler-document.cc
......
......@@ -31,10 +31,14 @@ namespace Poppler {
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 @@ namespace Poppler {
m_top = topAux;
m_right = rightAux;
m_bottom = bottomAux;
if (deleteDest) delete ld;
}
LinkDestination::LinkDestination(const QString &description)
......
......@@ -340,7 +340,9 @@ QList<TextBox*> Page::textList(Rotation rotate) const
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);
......
......@@ -64,6 +64,7 @@ namespace Poppler {
1/72 of an inch.
*/
TextBox(const QString& text, const QRectF &bBox);
~TextBox();
/**
Returns the text of this text box
......
......@@ -30,6 +30,11 @@ TextBox::TextBox(const QString& text, const QRectF &bBox)
m_data->bBox = bBox;
}
TextBox::~TextBox()
{
delete m_data;
}
const QString &TextBox::text() const
{
return m_data->text;
......
......@@ -445,7 +445,7 @@ void Splash::strokeNarrow(SplashXPath *xPath) {
int x0, x1, x2, x3, y0, y1, x, y, t;
SplashCoord dx, dy, dxdy;
SplashClipResult clipRes;
int nClipRes[3];
int nClipRes[3] = {0, 0, 0};
int i;
for (i = 0, seg = xPath->segs; i < xPath->length; ++i, ++seg) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment