summaryrefslogtreecommitdiff
path: root/winaccessibility
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2022-10-14 14:28:41 +0200
committerMiklos Vajna <vmiklos@collabora.com>2022-10-14 15:24:07 +0200
commit8d4f64427528f76afa4bf39a23edaa991850a50a (patch)
tree78e604666184d48e53382e82630c736101b36b6c /winaccessibility
parent48c0b19205af6e8d0ddee31afa011890e54b46e5 (diff)
sw: improve duplicated images in copied header/footer text
DOCX import currently maps linked headers to 2 Writer headers, the second header has a copy of the first header's content. The image in the first header is named 'Picture 1', the copied header names the image as 'Image1'. This is similar to what commit 41403fbff8140ad0ca7cf8f81d37cddcfbd19197 (sw: improve duplicated bookmarks in copied header/footer text, 2022-10-13) fixed for bookmarks, what happens is that sw::DocumentLayoutManager::CopyLayoutFormat() clears the name of the image, and then these are filled in at the end of the import in one shot, to improve performance. The downside is that it's not possible for an API user to know which was the original image and which is the copy. Fix the problem by tweaking the in-header-footer && not-in-mail-merge case to generate a name like 'Picture 1 Copy 1': this is meant to preserve the lost connection between the original image and its copy, while maintaining performance for the mail merge and body text cases where we expect lots of images. In the long run it would probably make sense to rather support linked headers/footers in Writer core so we don't have to create such a copy in the first place. Change-Id: I9679c0ce67131ed5c48eaecfcfd38abd1bcd3da4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141360 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'winaccessibility')
0 files changed, 0 insertions, 0 deletions