Bug 46620 - [patch] support for swftools
Summary: [patch] support for swftools
Status: RESOLVED INVALID
Alias: None
Product: poppler
Classification: Unclassified
Component: splash backend (show other bugs)
Version: unspecified
Hardware: All All
: medium enhancement
Assignee: poppler-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-25 09:53 UTC by gawain
Modified: 2012-12-15 16:05 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
apply code from swftools (4.59 KB, patch)
2012-02-25 09:53 UTC, gawain
Details | Splinter Review
add support for swftools (4.30 KB, patch)
2012-03-15 14:12 UTC, gawain
Details | Splinter Review

Description gawain 2012-02-25 09:53:04 UTC
Created attachment 57632 [details] [review]
apply code from swftools

swftools has a tool to convert pdf to swf (Flash) files. To do this, it uses a patched xpdf instance. For debian i try to port swftools to poppler, but swftools needs some code, that is not available in poppler.

So please add the following patch to poppler. It makes it possible for swftools to generate selectable text in the swf file.
Comment 1 Albert Astals Cid 2012-02-26 11:03:05 UTC
Sorry but you'll have to improve your patch.

using this-> is unacceptable
Adding public class variables is unacceptable

int SplashT1Font::getNumChars()
{
  SplashT1FontFile* ff = (SplashT1FontFile *)fontFile;
  return ff->face->num_glyphs;
}

doesn't even compile
Comment 2 gawain 2012-03-01 13:27:06 UTC
Why is "this->" unacceptable?
Is it ok to add some setters and getters for the variables?
Comment 3 Albert Astals Cid 2012-03-01 13:35:19 UTC
> Why is "this->" unacceptable?
Because you don't need to use this-> in C++, the variable is there for you, no need to this-> it

> Is it ok to add some setters and getters for the variables?
Yes, taht is one does proper object oriented programming :-)
Comment 4 gawain 2012-03-15 14:12:17 UTC
Created attachment 58529 [details] [review]
add support for swftools

In this patch i removed the "this->" and added setter and getter for my variables.
I could not test the T1 part as i do not know, how to get configure to compile it.
Comment 5 Albert Astals Cid 2012-03-15 15:22:11 UTC
How about not blind coding then?

Anyway it's quite clear that SplashT1FontFile does not have a face member, no?

Also please remove the setters there, makes no sense from someone external to set those values.
Comment 6 Albert Astals Cid 2012-12-15 16:05:52 UTC
I'm closing the bug since more than 6 months have passed without a follow up on the remaining issues, if you have a newer patch that you want us to consider please reopen the bug.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.