summaryrefslogtreecommitdiff
path: root/drawinglayer
diff options
context:
space:
mode:
authorBartosz Kosiorek <gang65@poczta.onet.pl>2018-11-27 16:11:43 +0100
committerBartosz Kosiorek <gang65@poczta.onet.pl>2018-11-28 09:10:48 +0100
commit0aabf27cd4a80cbea90fe61b4aa045b805f933ac (patch)
tree2cb204fde846e5e442616522396d689e32bc22a7 /drawinglayer
parentc5000631d3570af93a66d7aa12f78979a14344a5 (diff)
tdf#121648 EMF+ Fix displaying DrawDriverString record
With introduing String rotation support I made mistake by not removing Maping from DX-Array. With this commit I'm fixing that issue. Now drawing with DrawDriverString record, and rotation is working perfectly. Reviewed-on: https://gerrit.libreoffice.org/64079 Tested-by: Jenkins Reviewed-by: Patrick Jaap <patrick.jaap@tu-dresden.de> Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl> (cherry picked from commit f54c76e1ef8aa1e076ebbc0dbb356e87463557ed) Change-Id: I7ae051b3791d9d2d8e2143ed33d21b7bfbc551c6 Reviewed-on: https://gerrit.libreoffice.org/64105 Tested-by: Jenkins Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
Diffstat (limited to 'drawinglayer')
-rw-r--r--drawinglayer/source/tools/emfphelperdata.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/drawinglayer/source/tools/emfphelperdata.cxx b/drawinglayer/source/tools/emfphelperdata.cxx
index 06a2d0a814b2..6e4859f0bad7 100644
--- a/drawinglayer/source/tools/emfphelperdata.cxx
+++ b/drawinglayer/source/tools/emfphelperdata.cxx
@@ -1793,17 +1793,16 @@ namespace emfplushelper
sal_uInt32 pos = 0;
while (pos < glyphsCount)
{
- //determine the current length
+ // determine length with the same charsPosY values
sal_uInt32 aLength = 1;
while (pos + aLength < glyphsCount && std::abs( charsPosY[pos + aLength] - charsPosY[pos] ) < std::numeric_limits< float >::epsilon())
aLength++;
// generate the DX-Array
aDXArray.clear();
- double mappedPosX = Map(charsPosX[pos], charsPosY[pos]).getX();
- for (size_t i = 0; i < aLength-1; i++)
+ for (size_t i = 0; i < aLength - 1; i++)
{
- aDXArray.push_back(Map(charsPosX[pos + i + 1], charsPosY[pos + i + 1]).getX() - mappedPosX);
+ aDXArray.push_back(charsPosX[pos + i + 1] - charsPosX[pos]);
}
// last entry
aDXArray.push_back(0);