forked from amazingfate/loongoffice
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>
4.8 KiB
40x40px
4.8 KiB
40x40px