diff options
Diffstat (limited to 'comphelper/source')
-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: */ |