Created attachment 70790 [details] Move jpeglib.h into .cc file On cygwin pdftocairo displays "pdftocairo version 8.0.2". The problem is /usr/include/jconfig.h (included by jpeglib.h) on cygwin defines PACKAGE_VERSION. The attached patch fixes this by moving the #include <jpeglib.h> and libjpeg types from JpegWriter.h to JpegWriter.cc. This avoids polluting the name space of our internal header files with junk from other libraries.
Can you have a look at the spacing? seems some parts are using spaces and some other tabs. Also i'd be cool if you declare the copy constructor and the assignment operator as private without implementing so we don't end up using the default ones by mistake (since using them would create very bad things) (Look at GooString if you are unsure of what i mean)
Created attachment 70896 [details] [review] reformat goo/*Writer files I've reformatted the goo/*Writer files to be consistent with the poppler style of 2 space indent, tabs enabled, tab = 8.
Created attachment 70897 [details] [review] Move jpeglib.h into .cc file Updated patch to make copy constructor and assignment operator private.
Works for me, two minor things, feel free to fix them or not when pushing The if !priv in ::init feels a bit to much C-ish to me since we initialize priv in all the constructors Usually when one uses the FooPrivate pattern the Private class/structs holds all the data members of the class while in this case it only holds the jpeg_ ones As said feel free to fix or not and push
I've removed the !priv in ::init and moved all data members to JpegPrivate. Pushed.
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.