summaryrefslogtreecommitdiff
path: root/vcl/source/filter
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/filter')
-rw-r--r--vcl/source/filter/FilterConfigCache.cxx2
-rw-r--r--vcl/source/filter/graphicfilter.cxx2
-rw-r--r--vcl/source/filter/ipdf/pdfread.cxx7
3 files changed, 10 insertions, 1 deletions
diff --git a/vcl/source/filter/FilterConfigCache.cxx b/vcl/source/filter/FilterConfigCache.cxx
index d8d8862447c1..262bd66d7582 100644
--- a/vcl/source/filter/FilterConfigCache.cxx
+++ b/vcl/source/filter/FilterConfigCache.cxx
@@ -43,7 +43,7 @@ const char* FilterConfigCache::FilterConfigCacheEntry::InternalPixelFilterNameLi
const char* FilterConfigCache::FilterConfigCacheEntry::InternalVectorFilterNameList[] =
{
IMP_SVMETAFILE, IMP_WMF, IMP_EMF, IMP_SVSGF, IMP_SVSGV, IMP_SVG, IMP_PDF,
- EXP_SVMETAFILE, EXP_WMF, EXP_EMF, EXP_SVG, nullptr
+ EXP_SVMETAFILE, EXP_WMF, EXP_EMF, EXP_SVG, EXP_PDF, nullptr
};
const char* FilterConfigCache::FilterConfigCacheEntry::ExternalPixelFilterNameList[] =
diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx
index 38e72dc5e837..b65a8a02ea78 100644
--- a/vcl/source/filter/graphicfilter.cxx
+++ b/vcl/source/filter/graphicfilter.cxx
@@ -1698,6 +1698,8 @@ sal_uInt16 GraphicFilter::ImportGraphic( Graphic& rGraphic, const OUString& rPat
{
if (!ImportPDF(rIStream, rGraphic))
nStatus = GRFILTER_FILTERERROR;
+ else
+ eLinkType = GfxLinkType::NativePdf;
}
else
nStatus = GRFILTER_FILTERERROR;
diff --git a/vcl/source/filter/ipdf/pdfread.cxx b/vcl/source/filter/ipdf/pdfread.cxx
index cc63415eba6d..6bd1f6f524a8 100644
--- a/vcl/source/filter/ipdf/pdfread.cxx
+++ b/vcl/source/filter/ipdf/pdfread.cxx
@@ -101,6 +101,13 @@ VCL_DLLPUBLIC bool ImportPDF(SvStream& rStream, Graphic& rGraphic)
rGraphic = aMtf;
+ // Save the original PDF stream for later use.
+ rStream.Seek(STREAM_SEEK_TO_END);
+ uno::Sequence<sal_Int8> aPdfData(rStream.Tell());
+ rStream.Seek(STREAM_SEEK_TO_BEGIN);
+ rStream.ReadBytes(aPdfData.getArray(), aPdfData.getLength());
+ rGraphic.setPdfData(aPdfData);
+
return true;
}