vcl/source/image/ImplImageTree.cxx | 6 ++++++ 1 file changed, 6 insertions(+)
New commits: commit fcccd6bf9feb46feb14a07aa22de5f9ea52d394c Author: Regina Henschel <rb.hensc...@t-online.de> AuthorDate: Sun Aug 18 20:50:18 2024 +0200 Commit: Regina Henschel <rb.hensc...@t-online.de> CommitDate: Thu Aug 22 18:12:00 2024 +0200 tdf#153421 On Windows exclude cropmarkers.svg from scaling The file cropmarkers.svg is used to create individual crop markers. That methods expects a certain, fixed size in unit pixel. The number of pixels was wrong on Windows, if display scale is set so large that resulting dpi is larger than 120. The patch excludes this special file from scaling. For testing you need to set display scale to larger than 125% in Windows (125%*96dpi=120dpi). And remove any existing cropmarkers.png in cache/themename_svg/DPI/svx/res/. 'DPI' therein is not your actual dpi but the scaling factor from CountDPIScaleFactor. Change-Id: I6b508e28f2f3782441ad1283cfe85c4bd1588383 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172019 Tested-by: Jenkins Reviewed-by: Patrick Luby <guibomac...@gmail.com> Reviewed-by: Regina Henschel <rb.hensc...@t-online.de> diff --git a/vcl/source/image/ImplImageTree.cxx b/vcl/source/image/ImplImageTree.cxx index f565461f8607..e2409a8475d0 100644 --- a/vcl/source/image/ImplImageTree.cxx +++ b/vcl/source/image/ImplImageTree.cxx @@ -179,6 +179,12 @@ void loadImageFromStream(std::shared_ptr<SvStream> const & xStream, OUString con else if (rPath.endsWith(".svg")) { rParameters.mbWriteImageToCache = true; // We always want to cache a SVG image + #ifdef _WIN32 + // tdf#153421. Do not scale, individual crop handles are created from it using pixel unit. + if (rPath.endsWith("cropmarkers.svg")) + vcl::bitmap::loadFromSvg(*xStream, rPath, rParameters.mrBitmap, 1.0); + else + #endif vcl::bitmap::loadFromSvg(*xStream, rPath, rParameters.mrBitmap, aScalePercentage / 100.0); if (bConvertToDarkTheme)