vcl/source/outdev/font.cxx |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit d17a8c8ee680290584a01160746e33b60a879722
Author:     Christopher Sherlock <chris.sherloc...@gmail.com>
AuthorDate: Sat Aug 16 01:33:52 2025 +1000
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Fri Aug 15 22:28:04 2025 +0200

    vcl: make variables const in OutputDevice::AttemptOLEFontScaleFix()
    
    Change-Id: Ifdfebf3244f07e4353c8510d7644f4ec02b2f9a7
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189696
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>

diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx
index 3b505fe74b40..55a36f3aaa56 100644
--- a/vcl/source/outdev/font.cxx
+++ b/vcl/source/outdev/font.cxx
@@ -812,9 +812,9 @@ bool OutputDevice::AttemptOLEFontScaleFix(vcl::Font& rFont, 
tools::Long nHeight)
     if (fDenominator == 0.0)
         return false;
     const float fNumerator = static_cast<float>(maMapRes.mnMapScNumX) * 
maMapRes.mnMapScDenomY;
-    float fStretch = fNumerator / fDenominator;
-    int nOrigWidth = mpFontInstance->mxFontMetric->GetWidth();
-    int nNewWidth = static_cast<int>(nOrigWidth * fStretch + 0.5);
+    const float fStretch = fNumerator / fDenominator;
+    const int nOrigWidth = mpFontInstance->mxFontMetric->GetWidth();
+    const int nNewWidth = static_cast<int>(nOrigWidth * fStretch + 0.5);
     bool bRet = true;
     if (nNewWidth != nOrigWidth && nNewWidth != 0)
     {

Reply via email to