starmath/source/view.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 79b4fc22792d3fa905579db900315dff22c51b22
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Sun Oct 29 14:57:03 2023 +0300
Commit:     Adolfo Jayme Barrientos <fit...@ubuntu.com>
CommitDate: Mon Oct 30 16:42:40 2023 +0100

    tdf#157966: fix "Fit to page" printing option
    
    Regression after commit bf4bbc3c2174b21577b8878bc3197923ba44a029
    (replace std::max(std::min()) with std::clamp, 2020-11-16).
    
    Change-Id: Iada43ba352cbfb5ea597c72c871b47beb2d766c9
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158617
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>
    Signed-off-by: Xisco Fauli <xiscofa...@libreoffice.org>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158649
    Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com>

diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index 37105394a32e..76eef9fe6d88 100644
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -1469,7 +1469,7 @@ void SmViewShell::Impl_Print(OutputDevice &rOutDev, const 
SmPrintUIOptions &rPri
                 sal_uInt16 nZ = std::min(o3tl::convert(OutputSize.Width(), 
100, GraphicSize.Width()),
                                          o3tl::convert(OutputSize.Height(), 
100, GraphicSize.Height()));
                 nZ -= 10;
-                Fraction aFraction(std::clamp(nZ, MINZOOM, sal_uInt16(100)), 
1);
+                Fraction aFraction(std::clamp(nZ, MINZOOM, MAXZOOM), 100);
 
                 OutputMapMode = MapMode(SmMapUnit(), Point(), aFraction, 
aFraction);
             }

Reply via email to