summaryrefslogtreecommitdiff
path: root/vcl/inc/pdf/ExternalPDFStreams.hxx
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2020-12-28 10:03:18 +0900
committerTomaž Vajngerl <quikee@gmail.com>2021-01-13 07:22:31 +0100
commitdcfac443c608aec2ce4e5fa30a3dd021b5a8bfd3 (patch)
treef1bd5d83427625eadb91d9e3685616efe43e7ada /vcl/inc/pdf/ExternalPDFStreams.hxx
parent68b1ae7b493eea4d77f36a0c8566ca0224f04798 (diff)
vcl: use BinaryDataContianer in VectorGraphicData
This change is needed so we can use the same data in GfxLink and in VectorGraphicData. Currently the data needed to be duplicated, which is less than ideal. Change-Id: I79419921d09681fa8f0b1ac4bf8ea84199d4aae6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108440 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'vcl/inc/pdf/ExternalPDFStreams.hxx')
-rw-r--r--vcl/inc/pdf/ExternalPDFStreams.hxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/vcl/inc/pdf/ExternalPDFStreams.hxx b/vcl/inc/pdf/ExternalPDFStreams.hxx
index ab3d057bd83c..f47aa56578d8 100644
--- a/vcl/inc/pdf/ExternalPDFStreams.hxx
+++ b/vcl/inc/pdf/ExternalPDFStreams.hxx
@@ -18,6 +18,7 @@
#include <memory>
#include <vcl/filter/pdfdocument.hxx>
+#include <vcl/BinaryDataContainer.hxx>
namespace vcl
{
@@ -27,7 +28,7 @@ namespace vcl
// reused to avoid unnecessary parsing.
struct VCL_DLLPUBLIC ExternalPDFStream
{
- std::vector<sal_uInt8> maData;
+ BinaryDataContainer maDataContainer;
std::shared_ptr<filter::PDFDocument> mpPDFDocument;
std::map<sal_Int32, sal_Int32> maCopiedResources;
@@ -38,7 +39,7 @@ struct VCL_DLLPUBLIC ExternalPDFStream
if (!mpPDFDocument)
{
SvMemoryStream aPDFStream;
- aPDFStream.WriteBytes(maData.data(), maData.size());
+ aPDFStream.WriteBytes(maDataContainer.getData(), maDataContainer.getSize());
aPDFStream.Seek(0);
mpPDFDocument = std::make_shared<filter::PDFDocument>();
if (!mpPDFDocument->Read(aPDFStream))
@@ -61,7 +62,7 @@ private:
public:
ExternalPDFStreams() {}
- sal_Int32 store(const sal_uInt8* pData, sal_uInt32 nLength);
+ sal_Int32 store(BinaryDataContainer const& rDataContainer);
ExternalPDFStream& get(sal_uInt32 nIndex);
};