diff options
author | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-02-13 10:39:04 +0000 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-02-13 15:09:04 +0100 |
commit | 1f9d8733aef959641e1b2b081c13e97fd8be09bf (patch) | |
tree | 1bff0cedc792316f6982c22d7d23fb30f3b1a65b | |
parent | 6e0b4b9b9f5aeadf0deb4879b706fec50eb6135f (diff) |
ofz: scaling by 0 is an error for cairo rendering
which leads to leaks as cairo doesn't do anything one entering
an error state
Change-Id: I8d0f7bcb9c705bb1c2c63b2bbbccdba788113df8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163295
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
-rw-r--r-- | vcl/source/gdi/TypeSerializer.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/source/gdi/TypeSerializer.cxx b/vcl/source/gdi/TypeSerializer.cxx index 68e072892183..c4fd54c14dba 100644 --- a/vcl/source/gdi/TypeSerializer.cxx +++ b/vcl/source/gdi/TypeSerializer.cxx @@ -439,7 +439,7 @@ static bool UselessScaleForMapMode(const Fraction& rScale) // cannot be expressed as an int if (rScale.GetNumerator() == std::numeric_limits<sal_Int32>::min()) return true; - if (static_cast<double>(rScale) < 0.0) + if (static_cast<double>(rScale) <= 0.0) return true; return false; } |