Commit f019c8a8 authored by Albert Astals Cid's avatar Albert Astals Cid

2007-05-17 Pino Toscano <pino@kde.org>

        * qt4/src/poppler-link.cc:
        Give some default values to LinkDestination
        * qt4/src/poppler-private.h:
        Fix memory leak when converting QString -> GooString
parent d68a4eb4
2007-05-17 Pino Toscano <pino@kde.org>
* qt4/src/poppler-link.cc:
Give some default values to LinkDestination
* qt4/src/poppler-private.h:
Fix memory leak when converting QString -> GooString
2007-05-12 Jeff Muizelaar <jeff@infidigm.net>
* poppler/Annot.cc: Only do appearance generation for text, choice or
......
......@@ -29,6 +29,18 @@ namespace Poppler {
LinkDestination::LinkDestination(const LinkDestinationData &data)
{
// sane defaults
m_kind = destXYZ;
m_pageNum = 0;
m_left = 0;
m_bottom = 0;
m_right = 0;
m_top = 0;
m_zoom = 1;
m_changeLeft = true;
m_changeTop = true;
m_changeZoom = false;
bool deleteDest = false;
LinkDest *ld = data.ld;
......
......@@ -55,7 +55,9 @@ namespace Poppler {
char *cstring = (char *)gmallocn(s.length(), sizeof(char));
for (int i = 0; i < len; ++i)
cstring[i] = s.at(i).unicode();
return new GooString(cstring, len);
GooString *ret = new GooString(cstring, len);
gfree(cstring);
return ret;
}
static QString UnicodeParsedString(GooString *s1) {
......
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