summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2018-03-06 18:47:46 +0900
committerTomaž Vajngerl <quikee@gmail.com>2018-03-07 03:23:29 +0100
commitbec51fdb04bf25b9d670982dccab728c55c83fdf (patch)
treeddce5d22b3e653c2286f274db870fad95a590272 /svx
parente030fbbf67a2490c4e734583d9f987c27506179e (diff)
cache location and mime type when saving a graphic to a storage
Change-Id: If27a5f617a103da235d6690ea0447d6c64538dea Reviewed-on: https://gerrit.libreoffice.org/50810 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/xml/xmlgrhlp.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/svx/source/xml/xmlgrhlp.cxx b/svx/source/xml/xmlgrhlp.cxx
index f8f690747959..62aa1bb6dd1b 100644
--- a/svx/source/xml/xmlgrhlp.cxx
+++ b/svx/source/xml/xmlgrhlp.cxx
@@ -49,6 +49,7 @@
#include <algorithm>
#include <memory>
+#include <utility>
using namespace com::sun::star;
using namespace com::sun::star::uno;
@@ -1070,7 +1071,9 @@ OUString SvXMLGraphicHelper::implSaveGraphic(css::uno::Reference<css::graphic::X
auto aIterator = maExportGraphics.find(aGraphic);
if (aIterator != maExportGraphics.end())
{
- return aIterator->second;
+ auto const & aURLAndMimePair = aIterator->second;
+ rOutSavedMimeType = aURLAndMimePair.second;
+ return aURLAndMimePair.first;
}
GraphicObject aGraphicObject(aGraphic);
@@ -1275,7 +1278,7 @@ OUString SvXMLGraphicHelper::implSaveGraphic(css::uno::Reference<css::graphic::X
aStoragePath += rPictureStreamName;
// put into cache
- maExportGraphics[aGraphic] = aStoragePath;
+ maExportGraphics[aGraphic] = std::make_pair(aStoragePath, rOutSavedMimeType);
return aStoragePath;
}