summaryrefslogtreecommitdiff
path: root/poppler
AgeCommit message (Collapse)AuthorFilesLines
2019-12-03Fix calling a function on a null pointerAlbert Astals Cid1-13/+10
It wasn't crashing but it's defenitely undefined behaviour. Now instead of calling copy that calls the constructor we call the constructor directly, which deals fine with a null "other" to be created from Also some const
2019-12-03Add some more constAlbert Astals Cid4-85/+87
2019-12-03Enable modernize-loop-convertAlbert Astals Cid14-69/+50
2019-12-02enable modernize-redundant-void-argAlbert Astals Cid3-4/+4
No copyright, it's a mechanical change
2019-12-02enable modernize-use-bool-literalsAlbert Astals Cid12-33/+33
No copyright, this is a mechanical change
2019-12-02Enable modernize-use-emplaceAlbert Astals Cid1-1/+1
Not claiming copyright since it's a mechanical change
2019-12-02Enable modernize-use-equals-deleteAlbert Astals Cid3-8/+10
Not claiming copyright since the change is mechanical
2019-12-02Enable modernize-use-overrideAlbert Astals Cid25-118/+118
not claiming copyright for this since it's a mechanical change
2019-12-02Enable modernize-make-shared and modernize-make-uniqueAlbert Astals Cid2-2/+2
2019-12-01Update (C) of last commitAlbert Astals Cid2-0/+2
2019-12-01JBIG2Stream: fix leak in reset() if called several timesEven Rouault2-5/+13
JBIG2Stream::reset() currently allocates new values for the segments and globalSegments member variable. This causes a memory leak if the method is called several times, which can be triggered by the GDAL library that uses Poppler. So add a freeSegments() method where we move the related cleanup of close(), and call that method from reset() and close().
2019-12-01Move the clear for loops into a functionAlbert Astals Cid2-22/+15
And also call memset because it's clearer from "this is what i want" point of view, compiler optimizers are smart enough to convert back to a loop if needed
2019-11-30Rework Hints::readTables a bitAlbert Astals Cid1-9/+16
fail and return immediately if the length is 0 also set ok to false in a few other "failed to read table" cases
2019-11-30Improve pdftops -optimizecolorspace by implementing the CMYK to K conversion ↵William Bader1-49/+132
in more places. This fixes the conversion of the PDF in poppler/poppler#833
2019-11-30Links: Remove two unused functionsAlbert Astals Cid2-24/+0
Note: If you're one of the people using the internal API against our wishes, you can still roll out these functions yourself
2019-11-30Turn Links::links into a std::vector instead of **Albert Astals Cid2-29/+9
2019-11-29Enable modernize-deprecated-headersAlbert Astals Cid68-174/+174
2019-11-29Enable readability-string-compareAlbert Astals Cid2-15/+15
2019-11-29Enable readability-inconsistent-declaration-parameter-nameAlbert Astals Cid21-78/+79
2019-11-28Move enableFreeType out of GlobalParamsAlbert Astals Cid4-15/+4
It's now moved to pdftoppm+SplashOutputDev that were the only users
2019-11-28Some more constAlbert Astals Cid5-32/+32
2019-11-28HtmlPage::dumpComplexHeaders: Fix memory leakAlbert Astals Cid2-3/+3
We can't do const std::string htmlEncoding = HtmlOutputDev::mapEncodingToHtml(globalParams->getTextEncodingName())->toStr(); since HtmlOutputDev::mapEncodingToHtml returned a GooString that needed deletion. It's all std::strings now
2019-11-28Make GfxFont constructor protectedAlbert Astals Cid1-3/+1
You're not supposed to create a GfxFont by itself
2019-11-27some more constAlbert Astals Cid9-37/+52
2019-11-27FontInfo: Add some constAlbert Astals Cid2-13/+13
2019-11-26Linearization: add const to functionsAlbert Astals Cid2-21/+22
2019-11-26Update (C)Albert Astals Cid1-0/+1
2019-11-26Do not recognized as linearized documents that lack a valid Linearized dictEven Rouault1-0/+2
Documents such as the one at https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=19098 (under embargo at the time of writing) have the structure of the Linearized dict but lack valid integer object numbers. Poppler still manages to make some sense of that, but not recognizing such corrupted files as linearized would help the consumer (GDAL) that does admitedly nasty things around Poppler...
2019-11-24Add const to TextOutputDev & friendsAlbert Astals Cid5-169/+169
2019-11-24Remove useless virtual markers on override functionsAlbert Astals Cid2-16/+16
2019-11-24Make Stream::getKind constAlbert Astals Cid11-36/+51
2019-11-23Add some const to GfxState & friendsAlbert Astals Cid10-114/+107
2019-11-22Remove Object::streamIs and Object::isStream(const char *)Albert Astals Cid1-8/+0
2019-11-22Remove Object::streamGetLineAlbert Astals Cid1-4/+0
2019-11-22Remove Object::streamLookCharAlbert Astals Cid1-4/+0
2019-11-22Remove Object::streamSetPosAlbert Astals Cid2-5/+2
2019-11-22Remove Object::streamGetPosAlbert Astals Cid3-9/+5
2019-11-09Make globalParams a std::unique_ptrOliver Sander2-2/+3
2019-11-08Fix uninitialized memory use in JBIG2Stream::readTextRegionSegAlbert Astals Cid1-1/+4
When the unlikely condition triggers
2019-10-30Update (C) of previous commitsAlbert Astals Cid1-1/+1
2019-10-30Introduce Object::getNumWithDefaultValueAlbert Astals Cid5-216/+111
Is like getNum but instead of asserting if Object is not a num it returns the given default value I find it much easier to read rect->x1 = obj1.arrayGet(0).getNumWithDefaultValue(0); than (obj2 = obj1.arrayGet(0), obj2.isNum() ? rect->x1 = obj2.getNum() : rect->x1 = 0); On top of it has the benefit of being slightly faster
2019-10-27unicodeNormalizeNFKC: Make in constAdriaan de Groot2-4/+6
2019-10-24Import md5 code from xpdf 4.02Albert Astals Cid1-140/+179
Fixes issue 832
2019-10-23Make FontInfo::scan return a std::vector objectOliver Sander2-5/+5
... rather than a pointer to a std::vector. Given that a std::vector is little more than a pointer and some size information, there is no need to create std::vector objects on the heap. Returning them by value is just as fast (the vector content is not copied), and makes the code more readable, too.
2019-10-23Use a std::unique_ptr for XRefOliver Sander1-5/+4
This makes memory handling a tiny bit more robust.
2019-10-20Update (C)Albert Astals Cid2-0/+2
2019-10-20CharCodeToUnicode::mapToUnicode: Make clear the data is constAlbert Astals Cid21-40/+41
2019-10-18Add const in CharCodeToUnicodecorentin2-3/+3
Function updated: getLength mapToUnicode
2019-10-09Fix assert on malformed documentsAlbert Astals Cid1-1/+6
2019-10-07Update (C) of previous commitAlbert Astals Cid1-1/+1