[poppler] patch: set the title for screen annotation

Pino Toscano pino at kde.org
Tue Apr 5 06:57:52 PDT 2011


Hi,

Alle martedì 5 aprile 2011, srinivas adicherla ha scritto:
> +void AnnotScreen::setTitle(GooString *title) {
> [...]
> +  obj1.initString(new_title->copy());
> +  update ("T", &obj1);
> +  delete new_title;
> +}

- the 'title' parameter is still shadowing the 'title' private member 
(so rename it)
- instead of delete 'new_title', looks like you should set it as new 
'title' (the private member), otherwise getTitle() will give the old 
title

> +void
> +poppler_annot_screen_set_title (PopplerAnnotScreen *poppler_annot,
> +                                const gchar       *title)
> +{
> [...]
> +  goo_tmp = new GooString (tmp, length);
> +  g_free (tmp);
> +
> +  annot->setTitle (goo_tmp);
> +  delete (goo_tmp);
> +}

most probably goo_tmp can go on stack

> +void                          poppler_annot_screen_set_title                   
(PopplerAnnotScreen *poppler_annot,
> +                                                                                
const gchar        *title);
>  
> +

empty line added

-- 
Pino Toscano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/poppler/attachments/20110405/6acf332b/attachment.pgp>


More information about the poppler mailing list