diff options
author | Hossein <hossein@libreoffice.org> | 2021-11-08 22:24:51 +0100 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2021-11-09 07:14:30 +0100 |
commit | 2f590d0b66eddc53abe775ab344a195489d0a031 (patch) | |
tree | ad2ffabaab6f3fcc89679fb3cafc34e1489089fc /writerfilter/CppunitTest_writerfilter_rtftok.mk | |
parent | Add Convertor C++ example (diff) | |
download | core-2f590d0b66eddc53abe775ab344a195489d0a031.tar.gz core-2f590d0b66eddc53abe775ab344a195489d0a031.zip |
Simplify conditions for EMR_STRETCHDIBITS (EMF)
The variables xSrc, ySrc (x/y positions) and cxSrc, cySrc (x/y size)
come from [MS-EMF] documentation, "EMR_STRETCHDIBITS Record" section.
By calculating the difference between Bitmap x size and cxSrc (called
nWidthDiff), and also Bitmap y size and cySrc (called nHeightDiff),
the conditions used to test if it is OK to crop are simplified, and
are better readable.
Redundant checks (nWidthDiff >= 0) and (nHeightDiff >= 0) are removed
because it is now obvious that when they are bigger than non-negative
xSrc and ySrc, thus they themselves can not be negative.
Change-Id: I8e82c3d469377f21d34b57f3d50f977cf71004ce
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124096
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'writerfilter/CppunitTest_writerfilter_rtftok.mk')
0 files changed, 0 insertions, 0 deletions