summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2018-04-20 17:58:09 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2018-04-20 21:12:56 +0200
commitb11188835d3b87cd9d2a8cdb3da204cfda5d3e6e (patch)
treed4c652363b1f20e7399be1fd01d74099e3aa8f3c /filter
parent40edbce3988946d0ffceb9554de42e1e469edd92 (diff)
DOC import: lazy-read images
At least JPEG files are now only loaded when the user scrolls to the relevant page. Also fix the root cause of the EMF lazy-read problem and remove the previous workarounds. Change-Id: I9699927282b99bcb71a0d271a20bbfd56a361ee8 Reviewed-on: https://gerrit.libreoffice.org/53219 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'filter')
-rw-r--r--filter/source/msfilter/msdffimp.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index f2fbc026c16d..3e80858d9275 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -6545,7 +6545,14 @@ bool SvxMSDffManager::GetBLIPDirect( SvStream& rBLIPStream, Graphic& rData, tool
else
{ // and unleash our filter
GraphicFilter& rGF = GraphicFilter::GetGraphicFilter();
- nRes = rGF.ImportGraphic( rData, "", *pGrStream );
+ Graphic aGraphic = rGF.ImportUnloadedGraphic(*pGrStream);
+ if (aGraphic)
+ {
+ rData = aGraphic;
+ nRes = ERRCODE_NONE;
+ }
+ else
+ nRes = rGF.ImportGraphic( rData, "", *pGrStream );
// SJ: I40472, sometimes the aspect ratio (aMtfSize100) does not match and we get scaling problems,
// then it is better to use the prefsize that is stored within the metafile. Bug #72846# for what the