Files
odfstudio/emfio/qa/cppunit/emf/data/TestEmfPlusSetPageTransform.emf
Bartosz Kosiorek 8b002437fb tdf#168227 EMF+ Fix implementation of SetPageTransform
The implementation of SetPageTransform was incorrectly overwriting mnMmX and mnMmY
with calculated pixel values.

These variables represent the Reference Device size from the EMF+ header and should
remain constant. Overwriting them causes mappingChanged() to calculate an incorrect
transformation matrix, as it relies on the original ratio between reference
millimeters and pixels. This led to incorrect scaling and cumulative errors
if multiple SetPageTransform records were present in the document.

This patch ensures that header constants are preserved and the Page Scale
is applied as a separate step in the transformation pipeline.

Change-Id: I7a957f57894cc079292e8f93c119dd0fdb456fb4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199380
Tested-by: Jenkins
Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
2026-02-15 12:21:53 +01:00

3.6 KiB