From fda68426374ed915783fd306c2f56463c757774a Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Mon, 27 Jun 2016 11:26:57 +0200 Subject: ODT export: add embedded pdf support Once a .pdf file is inserted in Writer using Insert -> Image, Writer now advertises a replacement metafile for it (to make LO <= 5.2 and other ODF readers still be able to read the graphic, where the replacement is the same as the original metafile, but without .pdf data), and the ODF export writes the .pdf data with the correct extension / mime type. Also extend the checksum logic to take care of the pdf data, so on export xmloff won't think that the full and the replacement graphic are the same. The import side is still missing, so no testcase yet. Change-Id: I5c5b7c80ca4024ecbcb5b2d4442d21ca33755546 Reviewed-on: https://gerrit.libreoffice.org/26695 Reviewed-by: Miklos Vajna Tested-by: Jenkins --- svx/source/xml/xmlgrhlp.cxx | 2 ++ 1 file changed, 2 insertions(+) (limited to 'svx') diff --git a/svx/source/xml/xmlgrhlp.cxx b/svx/source/xml/xmlgrhlp.cxx index 6422c161319e..66f2a1866c41 100644 --- a/svx/source/xml/xmlgrhlp.cxx +++ b/svx/source/xml/xmlgrhlp.cxx @@ -473,6 +473,7 @@ OUString SvXMLGraphicHelper::ImplGetGraphicMimeType( const OUString& rFileName ) { "jpg", "image/jpeg" }, { "tif", "image/tiff" }, { "svg", "image/svg+xml" }, + { "pdf", "application/pdf" }, { "wmf", "image/x-wmf" }, { "eps", "image/x-eps" }, { "bmp", "image/bmp" }, @@ -691,6 +692,7 @@ void SvXMLGraphicHelper::ImplInsertGraphicURL( const OUString& rURLStr, sal_uInt else aExtension = ".svg"; break; + case GfxLinkType::NativePdf: aExtension = ".pdf"; break; default: aExtension = ".grf"; -- cgit