summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--svtools/source/graphic/descriptor.cxx1
-rw-r--r--svtools/source/graphic/descriptor.hxx1
-rw-r--r--sw/qa/extras/odfexport/odfexport.cxx5
3 files changed, 7 insertions, 0 deletions
diff --git a/svtools/source/graphic/descriptor.cxx b/svtools/source/graphic/descriptor.cxx
index 22e8285cae37..8bba24751935 100644
--- a/svtools/source/graphic/descriptor.cxx
+++ b/svtools/source/graphic/descriptor.cxx
@@ -307,6 +307,7 @@ void GraphicDescriptor::_getPropertyValues( const comphelper::PropertyMapEntry**
// added Svg mimetype support
case GfxLinkType::NativeSvg: pMimeType = MIMETYPE_SVG; break;
+ case GfxLinkType::NativePdf: pMimeType = MIMETYPE_PDF; break;
default:
pMimeType = nullptr;
diff --git a/svtools/source/graphic/descriptor.hxx b/svtools/source/graphic/descriptor.hxx
index 4878ceef5b2d..8c1c352b64fd 100644
--- a/svtools/source/graphic/descriptor.hxx
+++ b/svtools/source/graphic/descriptor.hxx
@@ -51,6 +51,7 @@
#define MIMETYPE_SGV "image/x-sgv"
#define MIMETYPE_EMF "image/x-emf"
#define MIMETYPE_SVG "image/svg+xml"
+#define MIMETYPE_PDF "application/pdf"
#define MIMETYPE_VCLGRAPHIC "image/x-vclgraphic"
namespace comphelper { class PropertySetInfo; }
diff --git a/sw/qa/extras/odfexport/odfexport.cxx b/sw/qa/extras/odfexport/odfexport.cxx
index a8a8812508b5..13b9a368fb02 100644
--- a/sw/qa/extras/odfexport/odfexport.cxx
+++ b/sw/qa/extras/odfexport/odfexport.cxx
@@ -1210,6 +1210,11 @@ DECLARE_ODFEXPORT_TEST(testEmbeddedPdf, "embedded-pdf.odt")
// This failed, pdf+png replacement graphics pair didn't survive an ODT roundtrip.
CPPUNIT_ASSERT(!getProperty<OUString>(xShape, "ReplacementGraphicURL").isEmpty());
+ auto xGraphic = getProperty< uno::Reference<graphic::XGraphic> >(xShape, "Graphic");
+ CPPUNIT_ASSERT(xGraphic.is());
+ // This was image/x-vclgraphic, not exposing the info that the image is a PDF one.
+ CPPUNIT_ASSERT_EQUAL(OUString("application/pdf"), getProperty<OUString>(xGraphic, "MimeType"));
+
if (mbExported)
{
uno::Sequence<uno::Any> aArgs(1);