diff options
-rw-r--r-- | include/svx/xmlgrhlp.hxx | 2 | ||||
-rw-r--r-- | svx/source/xml/xmlgrhlp.cxx | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/include/svx/xmlgrhlp.hxx b/include/svx/xmlgrhlp.hxx index 94cc40d17179..578b9a5f98fb 100644 --- a/include/svx/xmlgrhlp.hxx +++ b/include/svx/xmlgrhlp.hxx @@ -63,7 +63,7 @@ private: ::std::set< OUString > maURLSet; std::unordered_map<OUString, css::uno::Reference<css::graphic::XGraphic>> maGraphicObjects; - std::unordered_map<Graphic, OUString> maExportGraphics; + std::unordered_map<Graphic, std::pair<OUString, OUString>> maExportGraphics; SvXMLGraphicHelperMode meCreateMode; OUString maOutputMimeType; 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; } |