From e48b4275ceee82bd0eb128b2947302b9022e9c89 Mon Sep 17 00:00:00 2001 From: Tomaž Vajngerl Date: Mon, 19 Feb 2018 21:47:04 +0900 Subject: report the saved mimetype when saving graphic + mime from stream MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When saving we need to determine which mime type to use for the graphic. Return this information back to the caller so the metadata can be written into the file if necessary. Also add function to determine the mime type from the XGraphic by converting it to a stream first (only then we can determine the format that will actually be used and written to the storage file. Change-Id: I796da715e47f29d77dea605a2769a2217ecd6ba5 Reviewed-on: https://gerrit.libreoffice.org/49992 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl --- include/svx/xmlgrhlp.hxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include/svx') diff --git a/include/svx/xmlgrhlp.hxx b/include/svx/xmlgrhlp.hxx index 0bbdf089d2ac..94cc40d17179 100644 --- a/include/svx/xmlgrhlp.hxx +++ b/include/svx/xmlgrhlp.hxx @@ -95,7 +95,8 @@ private: virtual void SAL_CALL disposing() override; - SVX_DLLPRIVATE OUString implSaveGraphic(css::uno::Reference const & rxGraphic, OUString const & rRequestName); + SVX_DLLPRIVATE OUString implSaveGraphic(css::uno::Reference const & rxGraphic, + OUString & rOutMimeType, OUString const & rRequestName); public: SvXMLGraphicHelper( SvXMLGraphicHelperMode eCreateMode ); @@ -123,7 +124,7 @@ public: saveGraphic(css::uno::Reference const & rxGraphic) override; virtual OUString SAL_CALL - saveGraphicByName(css::uno::Reference const & rxGraphic, OUString const & rRequestName) override; + saveGraphicByName(css::uno::Reference const & rxGraphic, OUString & rOutSavedMimeType, OUString const & rRequestName) override; virtual css::uno::Reference SAL_CALL createInputStream(css::uno::Reference const & rxGraphic) override; -- cgit