[poppler] Marked content, Gfx.cc

Albert Astals Cid aacid at kde.org
Tue Feb 16 15:23:28 PST 2010


A Dimarts, 9 de febrer de 2010, Nils Höglund va escriure:
> Hi,
> 
> In Gfx::opBeginMarkedContent, I would change the end of the function
> to something like:
> 
> if(numArgs == 2 && args[1].isDict ()) {
>   out->beginMarkedContent(args[0].getName(),args[1].getDict());
> } else if(numArgs == 1) {
>   out->beginMarkedContent(args[0].getName(),NULL);
> }
> 
> (adding the else clause)
> 
> Otherwise beginMarkedContent and endMarkedContent will be unbalanced
> (called different amount of times) in the output device.

This patch can not be 	added as is as it will cause TextOutputDev to crash 
since it uses the properties dictionary assuming it won't be null.

Adrian can you have a look and tell me if we should just convert

  if (properties->lookup("ActualText", &obj)) {
to
  if (properties && properties->lookup("ActualText", &obj)) {

Albert


> 
> 
> Kind regards,
> 
> 
> Nils Höglund
> _______________________________________________
> poppler mailing list
> poppler at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/poppler


More information about the poppler mailing list