diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-06-28 15:52:59 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-06-28 14:34:05 +0000 |
commit | 0ffe9eb48a78bccf3d01a0effd5f2715174d38ff (patch) | |
tree | 0830bdbc90c0753a00f031dc1f9a9d11a5218b1f /vcl/source/filter/ipdf | |
parent | 9308f353186fb39a02eddfc281fc72ac1026e0b6 (diff) |
sd draw page: add PreviewMetafile UNO property
This allows an unnecessary GDIMetaFile -> WMF -> GDIMetaFile roundtrip,
and also avoids the odd black border at the bottom / right of the
preview metafile in the PDF import-as-graphic filter.
Change-Id: I7e3e782bbe0cf56def352e23b60864bb7773b607
Reviewed-on: https://gerrit.libreoffice.org/26743
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'vcl/source/filter/ipdf')
-rw-r--r-- | vcl/source/filter/ipdf/pdfread.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/vcl/source/filter/ipdf/pdfread.cxx b/vcl/source/filter/ipdf/pdfread.cxx index 6bd1f6f524a8..4b0e1eb5afc2 100644 --- a/vcl/source/filter/ipdf/pdfread.cxx +++ b/vcl/source/filter/ipdf/pdfread.cxx @@ -85,7 +85,7 @@ VCL_DLLPUBLIC bool ImportPDF(SvStream& rStream, Graphic& rGraphic) uno::Reference<beans::XPropertySet> xFirstPage(xDrawPages->getByIndex(0), uno::UNO_QUERY); uno::Sequence<sal_Int8> aSequence; - if (!(xFirstPage->getPropertyValue("Preview") >>= aSequence)) + if (!(xFirstPage->getPropertyValue("PreviewMetafile") >>= aSequence)) return false; if (!aSequence.hasElements()) @@ -96,8 +96,7 @@ VCL_DLLPUBLIC bool ImportPDF(SvStream& rStream, Graphic& rGraphic) aPreviewStream.WriteBytes(aSequence.getArray(), aSequence.getLength()); aPreviewStream.Seek(0); GDIMetaFile aMtf; - if (!ConvertWMFToGDIMetaFile(aPreviewStream, aMtf)) - return false; + aMtf.Read(aPreviewStream); rGraphic = aMtf; |