diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2022-06-27 15:29:25 +0300 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2022-06-27 18:57:23 +0200 |
commit | 2d9f3c066a065d6aa98f1e594dcf8a091fec2bde (patch) | |
tree | 968f4921265b3c3166e49c6385bc48ffbfb77371 /sd/qa/unit | |
parent | 398ceced15ee4fdd24b1f8db5e09096c3afa4804 (diff) |
Integer division could cancel small values of wrong sign
... as seen at some documents where the values are like -1. There
the checks in pushToPropMap may pass (the division result would be 0),
but the original small negative values would fail the asserts that
were introduced in commit 5772cef244dbee5834efbc693bc714d89ae6301d
Author Mike Kaganski <mike.kaganski@collabora.com>
Date Wed Jun 15 18:33:38 2022 +0300
tdf#134210: Reimplement cropping from srcRect and fillRect
Change-Id: I114588862b5cfd2b2e4491424430cc139bdbaae9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136492
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sd/qa/unit')
-rw-r--r-- | sd/qa/unit/data/pptx/croppedTo0.pptx | bin | 32741 -> 12974 bytes | |||
-rw-r--r-- | sd/qa/unit/import-tests2.cxx | 1 |
2 files changed, 1 insertions, 0 deletions
diff --git a/sd/qa/unit/data/pptx/croppedTo0.pptx b/sd/qa/unit/data/pptx/croppedTo0.pptx Binary files differindex fecf53559b1f..081661f48601 100644 --- a/sd/qa/unit/data/pptx/croppedTo0.pptx +++ b/sd/qa/unit/data/pptx/croppedTo0.pptx diff --git a/sd/qa/unit/import-tests2.cxx b/sd/qa/unit/import-tests2.cxx index 7bf052ca0bdc..33bbcca615b7 100644 --- a/sd/qa/unit/import-tests2.cxx +++ b/sd/qa/unit/import-tests2.cxx @@ -2056,6 +2056,7 @@ void SdImportTest2::testDefaultTabStop() void SdImportTest2::testCropToZero() { // Must not crash because of division by zero + // Also must not fail assertions because of passing negative value to CropQuotientsFromSrcRect loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/croppedTo0.pptx"), PPTX); } |