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-12 10:44:39 +0200 |
commit | 9c8dfbc5c270f9a02c3a1ce4c6165358d57ad0b1 (patch) | |
tree | a665a1ce6906a37c0ddd97f73877f27709156993 /include | |
parent | cd3b5910ada26eb5ffef3be05ba460b3c79fb4d7 (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>
(cherry picked from commit ee73747ab58fbbd5039823767693431223c347d3)
Diffstat (limited to 'include')
-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. |