diff options
author | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2017-11-29 21:12:32 +0100 |
---|---|---|
committer | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2017-12-04 09:19:18 +0100 |
commit | 5dc757b5d25894c08792036043b8714fa28a8b87 (patch) | |
tree | 3ba0563731826c94a773de5674980924e9e0ea9e /include | |
parent | f6ce8116b14892e26549c2dc2d59044a961c1dff (diff) |
tdf#113696 Add mimetype to image element
Otherwise browsers don't recognize base64 encoded svg files.
Change-Id: I54d0b87c52a1ca9da1d820751ae32159b88ed28f
Reviewed-on: https://gerrit.libreoffice.org/45528
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
(cherry picked from commit 32efde5cef2b8516a9decd0bf7091d7def1da971)
Reviewed-on: https://gerrit.libreoffice.org/45674
Diffstat (limited to 'include')
-rw-r--r-- | include/comphelper/graphicmimetype.hxx | 8 | ||||
-rw-r--r-- | include/xmloff/xmlexp.hxx | 2 |
2 files changed, 10 insertions, 0 deletions
diff --git a/include/comphelper/graphicmimetype.hxx b/include/comphelper/graphicmimetype.hxx index 3f2b5308b2d6..970342f2e5f5 100644 --- a/include/comphelper/graphicmimetype.hxx +++ b/include/comphelper/graphicmimetype.hxx @@ -13,12 +13,20 @@ #include <comphelper/comphelperdllapi.h> #include <rtl/ustring.hxx> +#include <com/sun/star/graphic/XGraphic.hpp> +#include <com/sun/star/io/XInputStream.hpp> +#include <com/sun/star/uno/Reference.hxx> + namespace comphelper { class COMPHELPER_DLLPUBLIC GraphicMimeTypeHelper { public: static OUString GetMimeTypeForExtension(const OString& rExt); + static OUString GetMimeTypeForXGraphic(css::uno::Reference<css::graphic::XGraphic> xGraphic); + static OUString GetMimeTypeForImageUrl(const OUString& rImageUrl); + static OUString + GetMimeTypeForImageStream(css::uno::Reference<css::io::XInputStream> xInputStream); }; } diff --git a/include/xmloff/xmlexp.hxx b/include/xmloff/xmlexp.hxx index 474d718d5a41..4127e2a883fa 100644 --- a/include/xmloff/xmlexp.hxx +++ b/include/xmloff/xmlexp.hxx @@ -460,6 +460,8 @@ public: OUString AddEmbeddedGraphicObject( const OUString& rGraphicObjectURL ); + css::uno::Reference<css::io::XInputStream> GetEmbeddedGraphicObjectStream( + const OUString& rGraphicObjectURL); bool AddEmbeddedGraphicObjectAsBase64( const OUString& rGraphicObjectURL ); |