diff options
author | Aditya <adityasahu1511@gmail.com> | 2020-07-20 17:13:13 +0530 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2020-07-30 07:30:05 +0200 |
commit | 104f7027ea3bea45849cb5d88a1893e69bf3606c (patch) | |
tree | fd81f655d3748852b2b4c279aabee32d7eff6ed3 /comphelper | |
parent | 1486f96317aa6eac34ddb7ef4e1c64824bb269b4 (diff) |
svx: GalleryObjectCollection shared class and related refactoring work
Add GalleryObjectCollection, a shared class primarily owned by GalleryTheme
which contains object list to be used by GalleryTheme and GalleryBinaryEngine.
Refactor ImplCreateUniqueURL, InsertGraphic()
Implement comphelper::GraphicMimeTypeHelper::GetExtensionForConvertDataFormat()
Refactor Actualize(), implement updateSvDrawObject(), updateTheme()
Move ImplCreateSvDrawStorage into constructor instead of calling in directly.
Change-Id: I6a8c552268628b4e192f45112ac9e8789c6e1609
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99035
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'comphelper')
-rw-r--r-- | comphelper/source/misc/graphicmimetype.cxx | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/comphelper/source/misc/graphicmimetype.cxx b/comphelper/source/misc/graphicmimetype.cxx index 4286c92f7a96..290050df13f8 100644 --- a/comphelper/source/misc/graphicmimetype.cxx +++ b/comphelper/source/misc/graphicmimetype.cxx @@ -119,5 +119,53 @@ OUString GraphicMimeTypeHelper::GetMimeTypeForConvertDataFormat(ConvertDataForma return ""; } } + +char const* GraphicMimeTypeHelper::GetExtensionForConvertDataFormat(ConvertDataFormat nFormat) +{ + char const* pExt = nullptr; + // create extension + if (nFormat != ConvertDataFormat::Unknown) + { + switch (nFormat) + { + case ConvertDataFormat::BMP: + pExt = ".bmp"; + break; + case ConvertDataFormat::GIF: + pExt = ".gif"; + break; + case ConvertDataFormat::JPG: + pExt = ".jpg"; + break; + case ConvertDataFormat::MET: + pExt = ".met"; + break; + case ConvertDataFormat::PCT: + pExt = ".pct"; + break; + case ConvertDataFormat::PNG: + pExt = ".png"; + break; + case ConvertDataFormat::SVM: + pExt = ".svm"; + break; + case ConvertDataFormat::TIF: + pExt = ".tif"; + break; + case ConvertDataFormat::WMF: + pExt = ".wmf"; + break; + case ConvertDataFormat::EMF: + pExt = ".emf"; + break; + + default: + pExt = ".grf"; + break; + } + } + return pExt; +} } + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |