tdf#160084 Simplify comparison for basegfx::fTools
Change-Id: I5db5200f59f32e428963a2c5bd6f70da42ec078f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176780 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
This commit is contained in:
committed by
Xisco Fauli
parent
10b0ab7ba8
commit
458353be11
@@ -634,8 +634,8 @@ sal_uInt32 SlideBackgroundFillPrimitive2D::getPrimitive2DID() const
|
||||
rObjectTransform.decompose(aScale, aTranslate, fRotate, fShearX);
|
||||
|
||||
// extract mirroring
|
||||
const bool bMirrorX(basegfx::fTools::less(aScale.getX(), 0.0));
|
||||
const bool bMirrorY(basegfx::fTools::less(aScale.getY(), 0.0));
|
||||
const bool bMirrorX(aScale.getX() < 0.0);
|
||||
const bool bMirrorY(aScale.getY() < 0.0);
|
||||
aScale = basegfx::absolute(aScale);
|
||||
|
||||
// Get the real size, since polygon outline and scale
|
||||
|
||||
@@ -706,7 +706,7 @@ void handleNegativeScale(basegfx::B2DTuple & scale, double * rotate) {
|
||||
|
||||
// #i75086# Old DrawingLayer (GeoStat and geometry) does not support holding negative scalings
|
||||
// in X and Y which equal a 180 degree rotation. Recognize it and react accordingly
|
||||
if(basegfx::fTools::less(scale.getX(), 0.0) && basegfx::fTools::less(scale.getY(), 0.0))
|
||||
if(scale.getX() < 0.0 && scale.getY() < 0.0)
|
||||
{
|
||||
scale.setX(fabs(scale.getX()));
|
||||
scale.setY(fabs(scale.getY()));
|
||||
|
||||
@@ -901,8 +901,8 @@ void SdrTextObj::impDecomposeContourTextPrimitive(
|
||||
|
||||
// mirroring. We are now in the polygon sizes. When mirroring in X and Y,
|
||||
// move the null point which was top left to bottom right.
|
||||
const bool bMirrorX(basegfx::fTools::less(aScale.getX(), 0.0));
|
||||
const bool bMirrorY(basegfx::fTools::less(aScale.getY(), 0.0));
|
||||
const bool bMirrorX(aScale.getX() < 0.0);
|
||||
const bool bMirrorY(aScale.getY() < 0.0);
|
||||
|
||||
// in-between the translations of the single primitives will take place. Afterwards,
|
||||
// the object's transformations need to be applied
|
||||
@@ -1050,8 +1050,8 @@ void SdrTextObj::impDecomposeAutoFitTextPrimitive(
|
||||
|
||||
// mirroring. We are now in aAnchorTextRange sizes. When mirroring in X and Y,
|
||||
// move the null point which was top left to bottom right.
|
||||
const bool bMirrorX(basegfx::fTools::less(aScale.getX(), 0.0));
|
||||
const bool bMirrorY(basegfx::fTools::less(aScale.getY(), 0.0));
|
||||
const bool bMirrorX(aScale.getX() < 0.0);
|
||||
const bool bMirrorY(aScale.getY() < 0.0);
|
||||
aNewTransformB.scale(bMirrorX ? -1.0 : 1.0, bMirrorY ? -1.0 : 1.0);
|
||||
|
||||
// in-between the translations of the single primitives will take place. Afterwards,
|
||||
@@ -1350,8 +1350,8 @@ void SdrTextObj::impDecomposeBlockTextPrimitive(
|
||||
|
||||
// mirroring. We are now in aAnchorTextRange sizes. When mirroring in X and Y,
|
||||
// move the null point which was top left to bottom right.
|
||||
const bool bMirrorX(basegfx::fTools::less(aScale.getX(), 0.0));
|
||||
const bool bMirrorY(basegfx::fTools::less(aScale.getY(), 0.0));
|
||||
const bool bMirrorX(aScale.getX() < 0.0);
|
||||
const bool bMirrorY(aScale.getY() < 0.0);
|
||||
|
||||
// in-between the translations of the single primitives will take place. Afterwards,
|
||||
// the object's transformations need to be applied
|
||||
@@ -1437,8 +1437,8 @@ void SdrTextObj::impDecomposeStretchTextPrimitive(
|
||||
|
||||
// When mirroring in X and Y,
|
||||
// move the null point which was top left to bottom right.
|
||||
const bool bMirrorX(basegfx::fTools::less(aScale.getX(), 0.0));
|
||||
const bool bMirrorY(basegfx::fTools::less(aScale.getY(), 0.0));
|
||||
const bool bMirrorX(aScale.getX() < 0.0);
|
||||
const bool bMirrorY(aScale.getY() < 0.0);
|
||||
|
||||
// in-between the translations of the single primitives will take place. Afterwards,
|
||||
// the object's transformations need to be applied
|
||||
@@ -1863,8 +1863,8 @@ void SdrTextObj::impDecomposeChainedTextPrimitive(
|
||||
|
||||
// mirroring. We are now in aAnchorTextRange sizes. When mirroring in X and Y,
|
||||
// move the null point which was top left to bottom right.
|
||||
const bool bMirrorX(basegfx::fTools::less(aScale.getX(), 0.0));
|
||||
const bool bMirrorY(basegfx::fTools::less(aScale.getY(), 0.0));
|
||||
const bool bMirrorX(aScale.getX() < 0.0);
|
||||
const bool bMirrorY(aScale.getY() < 0.0);
|
||||
aNewTransformB.scale(bMirrorX ? -1.0 : 1.0, bMirrorY ? -1.0 : 1.0);
|
||||
|
||||
// in-between the translations of the single primitives will take place. Afterwards,
|
||||
|
||||
Reference in New Issue
Block a user