diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2021-02-01 21:03:39 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2021-02-02 09:04:56 +0100 |
commit | ddc0714c40c6ea85336431a88b523f3e5c63a3f8 (patch) | |
tree | 9611f9733643b0d14868187a7e4bfd9f11c8a956 /offapi | |
parent | 945fb5d8693478559e489d2c4cf948adf6033fe1 (diff) |
tdf#139869 vcl: fix lazy-loading of BMP images with logic size
Regression from commit 7b355669c6ddeab2e6cec692d6afdff41c61d0fb
(Function to load graphic swapped out (loaded on demand), 2018-04-14),
the code assumes that the map mode and size of a graphic is the same
when the image is not yet loaded and when it's loaded already.
This was not the case for the BMP import, where ImplReadDIBBody()
produced a map mode with scaling and MapUnit::MapMM as the map unit,
while GraphicDescriptor assumed that the logic size is always MapUnit::Map100thMM.
This resulted in SwNoTextNode::HasContour() using one map mode when the
contour polygon is imported and an other one was used while renderin,
effectively hiding the image.
Fix the problem by extending GraphicDescriptor, so a format detector can
opt in to provide its own map mode and size according to that map mode,
this way the detector and the BMP import will create matching map modes
and sizes, resulting in a visible image in the bugdoc.
Change-Id: I71e786a4601c63f58da2e6ab9d7681ec6dd7b806
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110275
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'offapi')
0 files changed, 0 insertions, 0 deletions