diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-02-24 17:14:23 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-03-14 13:38:47 +0100 |
commit | 42847e040b902266324d677c7369f71e8c8f6346 (patch) | |
tree | 0e8bc90142c2e2a859d8f9a52a42c49ed423b709 /xmlsecurity | |
parent | bcf71c2c604a555364d2c6cc94e0b8cc6dc52553 (diff) |
tdf#105461 vcl: add text highlight textcase
Fails with commit ee32c7d8083ae1449d6b379034be92995c142da9 (tdf#105461
PDF export: handle text fill color, 2017-02-01) reverted.
Change-Id: I3628a16d0810e3be3fb352340d06cdba472dcd3f
Reviewed-on: https://gerrit.libreoffice.org/34621
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
(cherry picked from commit 4e203ca3915e0cee2e7e02b95e78b3f5a8870098)
Diffstat (limited to 'xmlsecurity')
-rw-r--r-- | xmlsecurity/source/pdfio/pdfdocument.cxx | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/xmlsecurity/source/pdfio/pdfdocument.cxx b/xmlsecurity/source/pdfio/pdfdocument.cxx index 50e00d79c067..50174483a832 100644 --- a/xmlsecurity/source/pdfio/pdfdocument.cxx +++ b/xmlsecurity/source/pdfio/pdfdocument.cxx @@ -118,18 +118,6 @@ public: int GetGenerationValue() const; }; -/// Stream object: a byte array with a known length. -class PDFStreamElement : public PDFElement -{ - size_t m_nLength; - sal_uInt64 m_nOffset; - -public: - explicit PDFStreamElement(size_t nLength); - bool Read(SvStream& rStream) override; - sal_uInt64 GetOffset() const; -}; - /// End of a stream: 'endstream' keyword. class PDFEndStreamElement : public PDFElement { @@ -3282,6 +3270,11 @@ void PDFObjectElement::SetStream(PDFStreamElement* pStreamElement) m_pStreamElement = pStreamElement; } +PDFStreamElement* PDFObjectElement::GetStream() const +{ + return m_pStreamElement; +} + PDFArrayElement* PDFObjectElement::GetArray() const { return m_pArrayElement; @@ -3668,11 +3661,18 @@ bool PDFStreamElement::Read(SvStream& rStream) { SAL_INFO("xmlsecurity.pdfio", "PDFStreamElement::Read: length is " << m_nLength); m_nOffset = rStream.Tell(); - rStream.SeekRel(m_nLength); + std::vector<unsigned char> aBytes(m_nLength); + rStream.ReadBytes(aBytes.data(), aBytes.size()); + m_aMemory.WriteBytes(aBytes.data(), aBytes.size()); return rStream.good(); } +SvMemoryStream& PDFStreamElement::GetMemory() +{ + return m_aMemory; +} + sal_uInt64 PDFStreamElement::GetOffset() const { return m_nOffset; |