diff options
author | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2018-07-03 15:16:58 +0200 |
---|---|---|
committer | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2018-07-05 08:05:40 +0200 |
commit | 7bafb7ca8ef9467f5c55766d2a38ba0d0a60837c (patch) | |
tree | 0f05fc92976b40a018c0e3f05d07d419c0536aaa /comphelper/source/misc | |
parent | 961908dde51e44b93567cb59bd398778fe1ece10 (diff) |
tdf#117901 Write signature line images as emf to ooxml
Change-Id: Idbf60be3cef2d9dde454da0279d2810488b1e157
Reviewed-on: https://gerrit.libreoffice.org/56871
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'comphelper/source/misc')
-rw-r--r-- | comphelper/source/misc/graphicmimetype.cxx | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/comphelper/source/misc/graphicmimetype.cxx b/comphelper/source/misc/graphicmimetype.cxx index 2f8ba2efbae4..0c0ca8057549 100644 --- a/comphelper/source/misc/graphicmimetype.cxx +++ b/comphelper/source/misc/graphicmimetype.cxx @@ -88,5 +88,38 @@ OUString GraphicMimeTypeHelper::GetMimeTypeForImageStream(Reference<XInputStream return GetMimeTypeForXGraphic(xGraphic); } + +OUString GraphicMimeTypeHelper::GetMimeTypeForConvertDataFormat(ConvertDataFormat convertDataFormat) +{ + switch (convertDataFormat) + { + case ConvertDataFormat::BMP: + return OUString("image/bmp"); + case ConvertDataFormat::GIF: + return OUString("image/gif"); + case ConvertDataFormat::JPG: + return OUString("image/jpeg"); + case ConvertDataFormat::PCT: + return OUString("image/x-pict"); + case ConvertDataFormat::PNG: + return OUString("image/png"); + case ConvertDataFormat::SVM: + return OUString("image/x-svm"); + case ConvertDataFormat::TIF: + return OUString("image/tiff"); + case ConvertDataFormat::WMF: + return OUString("image/x-wmf"); + case ConvertDataFormat::EMF: + return OUString("image/x-emf"); + case ConvertDataFormat::SVG: + return OUString("image/svg+xml"); + case ConvertDataFormat::PDF: + return OUString("application/pdf"); + case ConvertDataFormat::MET: // What is this? + case ConvertDataFormat::Unknown: + default: + return OUString(""); + } +} } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |