diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-10-11 08:03:58 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-10-11 10:26:58 +0000 |
commit | 3906d25a2e12123aee54654ad26699a2832389d4 (patch) | |
tree | 8c1eecad84f3771df44ec450cbd429379db85358 /xmlscript | |
parent | 4ee81e595a933b901f280c0fc250f0a34232e92a (diff) |
tdf#103001 DOCX export: fix RelId cache when switching streams
RelIds are used to refer to external streams, e.g. images. A RelId cache
tries to avoid storing the same image more than once in the export
result. RelIds are relative to an XML stream, so caching them across
stream switches is problematic. There was code already to notify the
cache after a header or footer was written, but:
1) It was only done after a switch, not before and
2) It cleared the whole cache, instead of stashing it away, and
restoring it when the write of the special stream is done.
Regression from commit b484e9814c66d8d51cea974390963a6944bc9d73
(tdf#83227 oox: reuse RelId in DML/VML export for the same graphic,
2015-09-07), this existing problem became more visible when caching
started to include draw images, not just writer ones.
Fix both problems by turning the cache into a stack that is
pushed/popped around stream changes.
Change-Id: If9ec168823eea5e272197e28f6125ba626605550
Reviewed-on: https://gerrit.libreoffice.org/29684
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'xmlscript')
0 files changed, 0 insertions, 0 deletions