tdf#145004 remove fontwork text padding for case ScaleX=true
commit4e1f5b5eaddac6ff4b3028074edc8f6886d64c3f
authorRegina Henschel <rb.henschel@t-online.de>
Fri, 8 Oct 2021 20:10:35 +0000 (8 22:10 +0200)
committerRegina Henschel <rb.henschel@t-online.de>
Wed, 13 Oct 2021 11:27:58 +0000 (13 13:27 +0200)
treed6f12054e7d968128c09e9fd178d65b83c3b7595
parent56bdc6ded08ca85d765add0378426ac4356e94d3
tdf#145004 remove fontwork text padding for case ScaleX=true

The setting ScaleX=true in property TextPath in CustomShapeGeometry
is used in import of WortArt of kind 'Follow Path' from MS Office. The
value 'true' means, that the text is not stretched to the path but its
original font size is used as long as enough place is available.

The method CalculateHorizontalScalingFactor() has increased the
scaling factor by 10 percent to make a 'padding'. That results in a
too short text and a gap at start and/or end. The problem is not only
visible in imported shapes but in user designed Fontwork shapes too.
PowerPoint has no 'padding'. Currently our own preset Fontwork shapes
always use ScaleX=false and therefore are not affected.

I have not found any reason for such padding. So this patch removes it.

Change-Id: I7f2c4eb9101be1f13b006d4178ffbe75eb4ed55a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123295
Tested-by: Jenkins
Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
svx/qa/unit/customshapes.cxx
svx/qa/unit/data/tdf145004_gap_by_ScaleX.pptx [new file with mode: 0644]
svx/source/customshapes/EnhancedCustomShapeFontWork.cxx