diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-04-07 18:19:41 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-04-07 21:07:52 +0000 |
commit | ee73747ab58fbbd5039823767693431223c347d3 (patch) | |
tree | 06c1b899b6a13074426b99ac7a997a92650e648a /include/vcl/filter | |
parent | 69b7204164945cfed385d58e64592ce1b17937d7 (diff) |
tdf#107018 PDF export of PDF images: handle references in nested dictionaries
Also get rid of the GetKeyOffset() and GetKeyValueLength() calls when
copying dictionaries: the reference already knows its offset and length,
so no need to call them. This makes the dictionary and the array
handling more similar.
Change-Id: I65936acfaf857636a8d83da3a4cec69289eb89d8
Reviewed-on: https://gerrit.libreoffice.org/36282
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'include/vcl/filter')
-rw-r--r-- | include/vcl/filter/pdfdocument.hxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/vcl/filter/pdfdocument.hxx b/include/vcl/filter/pdfdocument.hxx index 595b4f0fdfd3..d83cb8308f11 100644 --- a/include/vcl/filter/pdfdocument.hxx +++ b/include/vcl/filter/pdfdocument.hxx @@ -71,6 +71,9 @@ class VCL_DLLPUBLIC PDFObjectElement : public PDFElement std::vector< std::unique_ptr<PDFElement> > m_aElements; /// Uncompressed buffer of an object in an object stream. std::unique_ptr<SvMemoryStream> m_pStreamBuffer; + /// List of all reference elements inside this object's dictionary and + /// nested dictionaries. + std::vector<PDFReferenceElement*> m_aDictionaryReferences; public: PDFObjectElement(PDFDocument& rDoc, double fObjectValue, double fGenerationValue); @@ -88,8 +91,8 @@ public: PDFNumberElement* GetNumberElement() const; /// Get access to the parsed key-value items from the object dictionary. const std::map<OString, PDFElement*>& GetDictionaryItems(); - /// Same as GetDictionaryItems(), but entries are sorted by file offset. - std::vector< std::pair<OString, PDFElement*> > GetDictionaryItemsByOffset(); + const std::vector<PDFReferenceElement*>& GetDictionaryReferences() const; + void AddDictionaryReference(PDFReferenceElement* pReference); void SetArray(PDFArrayElement* pArrayElement); void SetStream(PDFStreamElement* pStreamElement); /// Access to the stream of the object, if it has any. |