summaryrefslogtreecommitdiff
path: root/include/xmlsecurity
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2017-02-27 14:29:03 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2017-02-27 15:35:48 +0000
commit64bac5c0f005afd46bbf402c5d548e2ee6c9e5c4 (patch)
treebc5a09d557804b2d3a37f92bcaf50caa24a73f09 /include/xmlsecurity
parentaee31a4e8fa6c6f49f70945c5675085d938651ef (diff)
tdf#105093 vcl PDF export: add embedded video testcase
Fails with commit 4ad249af88d15f2c8a09f0721a59d82718fcc201 (tdf#105093 sd PDF export: handle embedded videos, 2017-01-04) reverted. Change-Id: I413ec9a5da3c0783541dcd28fb9a62dd896f955b Reviewed-on: https://gerrit.libreoffice.org/34681 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'include/xmlsecurity')
-rw-r--r--include/xmlsecurity/pdfio/pdfdocument.hxx33
1 files changed, 33 insertions, 0 deletions
diff --git a/include/xmlsecurity/pdfio/pdfdocument.hxx b/include/xmlsecurity/pdfio/pdfdocument.hxx
index 5a8ea6c2c71d..5f64b650ed17 100644
--- a/include/xmlsecurity/pdfio/pdfdocument.hxx
+++ b/include/xmlsecurity/pdfio/pdfdocument.hxx
@@ -90,6 +90,37 @@ public:
void SetStreamBuffer(std::unique_ptr<SvMemoryStream>& pStreamBuffer);
};
+/// Array object: a list.
+class XMLSECURITY_DLLPUBLIC PDFArrayElement : public PDFElement
+{
+ /// Location after the '[' token.
+ sal_uInt64 m_nOffset = 0;
+ std::vector<PDFElement*> m_aElements;
+public:
+ PDFArrayElement();
+ bool Read(SvStream& rStream) override;
+ void PushBack(PDFElement* pElement);
+ const std::vector<PDFElement*>& GetElements();
+};
+
+/// Reference object: something with a unique ID.
+class XMLSECURITY_DLLPUBLIC PDFReferenceElement : public PDFElement
+{
+ PDFDocument& m_rDoc;
+ int m_fObjectValue;
+ int m_fGenerationValue;
+
+public:
+ PDFReferenceElement(PDFDocument& rDoc, int fObjectValue, int fGenerationValue);
+ bool Read(SvStream& rStream) override;
+ /// Assuming the reference points to a number object, return its value.
+ double LookupNumber(SvStream& rStream) const;
+ /// Lookup referenced object, without assuming anything about its contents.
+ PDFObjectElement* LookupObject();
+ int GetObjectValue() const;
+ int GetGenerationValue() const;
+};
+
/// Stream object: a byte array with a known length.
class XMLSECURITY_DLLPUBLIC PDFStreamElement : public PDFElement
{
@@ -146,6 +177,8 @@ public:
const std::map<OString, PDFElement*>& GetItems() const;
/// Looks up an object which is only referenced in this dictionary.
PDFObjectElement* LookupObject(const OString& rDictionaryKey);
+ /// Looks up an element which is contained in this dictionary.
+ PDFElement* LookupElement(const OString& rDictionaryKey);
};
enum class TokenizeMode