diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-04-05 15:35:13 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-04-05 19:07:32 +0200 |
commit | 242a9b634213acf03cabc373928555dc81afc672 (patch) | |
tree | 020f6139fb8bd0164d913749f39adcbae75a1d7f /include/vcl/filter | |
parent | 53d53650c29f1fa1faddbf7a95ccdf2e84f1994a (diff) |
tdf#106972 vcl PDF export, PDF images: handle indirect font references
There were a number of problems here:
- the /Resources key of a page object may be an indirect object
- the /Font key of a resource object may be an indirect object
- the /Length key of an object may be an indirect object
So in all these cases handle not only a direct dictionary / number but
also when we have a reference-to-dictionary/number.
Change-Id: Ie74371f0ba43a133a1299843ef20cbfc75fe26d7
Diffstat (limited to 'include/vcl/filter')
-rw-r--r-- | include/vcl/filter/pdfdocument.hxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/vcl/filter/pdfdocument.hxx b/include/vcl/filter/pdfdocument.hxx index 4bed3c32737a..595b4f0fdfd3 100644 --- a/include/vcl/filter/pdfdocument.hxx +++ b/include/vcl/filter/pdfdocument.hxx @@ -50,6 +50,8 @@ class VCL_DLLPUBLIC PDFObjectElement : public PDFElement double m_fObjectValue; double m_fGenerationValue; std::map<OString, PDFElement*> m_aDictionary; + /// If set, the object contains this number element (outside any dictionary/array). + PDFNumberElement* m_pNumberElement; /// Position after the '<<' token. sal_uInt64 m_nDictionaryOffset; /// Length of the dictionary buffer till (before) the '>>' token. @@ -82,8 +84,10 @@ public: sal_uInt64 GetDictionaryLength(); PDFDictionaryElement* GetDictionary(); void SetDictionary(PDFDictionaryElement* pDictionaryElement); + void SetNumberElement(PDFNumberElement* pNumberElement); + PDFNumberElement* GetNumberElement() const; /// Get access to the parsed key-value items from the object dictionary. - const std::map<OString, PDFElement*>& GetDictionaryItems() const; + const std::map<OString, PDFElement*>& GetDictionaryItems(); /// Same as GetDictionaryItems(), but entries are sorted by file offset. std::vector< std::pair<OString, PDFElement*> > GetDictionaryItemsByOffset(); void SetArray(PDFArrayElement* pArrayElement); |