summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2020-12-15 16:54:46 +0900
committerTomaž Vajngerl <quikee@gmail.com>2020-12-21 10:49:12 +0100
commit0df9ea8d654103256a67f4a6977468bd01a00f01 (patch)
tree619b4c176c2ceb4b07bb4f5dd99ea6d64ea6fa85 /include
parent107a20ee079ae852b3b33412f234aab2dc35168f (diff)
pdf: add a public function to load PDF as a VectorGraphicData
This adds a public function that loads a PDF as a VectorGraphicData which essentially spilts the ImportPDF to general import as a VectorGraphicData and then creation of a new Graphic. This is needed so we can just load the VectorGraphicData independent to a Graphic itself, so we don't needlessly create a new Graphic instance in some cases. Change-Id: Ib5f570242da69a1537bfdf1054f8eb40ecead31b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107991 Tested-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'include')
-rw-r--r--include/vcl/pdfread.hxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/vcl/pdfread.hxx b/include/vcl/pdfread.hxx
index b693c432302b..084bd3f913b5 100644
--- a/include/vcl/pdfread.hxx
+++ b/include/vcl/pdfread.hxx
@@ -34,7 +34,12 @@ VCL_DLLPUBLIC size_t RenderPDFBitmaps(const void* pBuffer, int nSize,
std::vector<BitmapEx>& rBitmaps, size_t nFirstPage = 0,
int nPages = 1, const basegfx::B2DTuple* pSizeHint = nullptr);
-/// Imports a PDF stream into rGraphic as VectorGraphicData.
+/// Imports a PDF stream as a VectorGraphicData.
+VCL_DLLPUBLIC bool
+importPdfVectorGraphicData(SvStream& rStream,
+ std::shared_ptr<VectorGraphicData>& rVectorGraphicData);
+
+/// Imports a PDF stream into rGraphic.
VCL_DLLPUBLIC bool ImportPDF(SvStream& rStream, Graphic& rGraphic);
struct PDFGraphicAnnotation