summaryrefslogtreecommitdiff
path: root/starmath
diff options
context:
space:
mode:
Diffstat (limited to 'starmath')
-rw-r--r--starmath/inc/view.hxx4
-rw-r--r--starmath/source/document.cxx3
2 files changed, 4 insertions, 3 deletions
diff --git a/starmath/inc/view.hxx b/starmath/inc/view.hxx
index 8b17744d6171..03f67fdbed40 100644
--- a/starmath/inc/view.hxx
+++ b/starmath/inc/view.hxx
@@ -37,8 +37,8 @@ class SmPrintUIOptions;
class SmGraphicAccessible;
class SmGraphicWidget;
-#define MINZOOM sal_uInt16(25)
-#define MAXZOOM sal_uInt16(800)
+constexpr sal_uInt16 MINZOOM = 25;
+constexpr sal_uInt16 MAXZOOM = 800;
class SmGraphicWindow final : public InterimItemWindow
{
diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx
index 715525c94307..29dd3f2ef411 100644
--- a/starmath/source/document.cxx
+++ b/starmath/source/document.cxx
@@ -1549,7 +1549,8 @@ void SmDocShell::Impl_Print(OutputDevice& rOutDev, const SmPrintUIOptions& rPrin
sal_uInt16 nZ
= std::min(o3tl::convert(OutputSize.Width(), 100, GraphicSize.Width()),
o3tl::convert(OutputSize.Height(), 100, GraphicSize.Height()));
- nZ -= 10;
+ if (nZ > MINZOOM)
+ nZ -= 10;
Fraction aFraction(std::clamp(nZ, MINZOOM, MAXZOOM), 100);
OutputMapMode = MapMode(SmMapUnit(), Point(), aFraction, aFraction);