summaryrefslogtreecommitdiff
path: root/sc/source/filter/xcl97
diff options
context:
space:
mode:
authorDaniel Arato (NISZ) <arato.daniel@nisz.hu>2021-08-30 14:13:52 +0200
committerLászló Németh <nemeth@numbertext.org>2021-08-31 13:56:38 +0200
commiteae0636311d3a1b3a1af58a3e4df686b55afa3fa (patch)
tree776398cb607cb66a7ef5ced29d7b339fb3cf93a6 /sc/source/filter/xcl97
parenta58b9010b38ca43d4b3a2b30fcd6bec28db1b344 (diff)
tdf#142881 XLSX import: fix shapes rotated exactly 45°,
135°, 225° and 315° by correcting their cell anchor points, like MSO does. Previously the XLSX export with the bad anchor points messed up the rotation of the shapes, resulting also broken text content in LO and MSO. Thanks to Regina Henschel for analyzing the problem. Co-authored-by: Szabolcs Tóth <toth.szabolcs@nisz.hu> Change-Id: Ica625545a22a74ed027ac0fa2bbf38804611c172 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121307 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sc/source/filter/xcl97')
-rw-r--r--sc/source/filter/xcl97/xcl97rec.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sc/source/filter/xcl97/xcl97rec.cxx b/sc/source/filter/xcl97/xcl97rec.cxx
index 3a05578f14e2..bdc3648d7584 100644
--- a/sc/source/filter/xcl97/xcl97rec.cxx
+++ b/sc/source/filter/xcl97/xcl97rec.cxx
@@ -1120,7 +1120,7 @@ void XclObjAny::WriteFromTo( XclExpXmlStream& rStrm, const Reference< XShape >&
// MSO changes the anchor positions at these angles and that does an extra 90 degrees
// rotation on our shapes, so we output it in such position that MSO
// can draw this shape correctly.
- if ((nRotation >= 4500_deg100 && nRotation < 13500_deg100) || (nRotation >= 22500_deg100 && nRotation < 31500_deg100))
+ if ((nRotation > 4500_deg100 && nRotation <= 13500_deg100) || (nRotation > 22500_deg100 && nRotation <= 31500_deg100))
{
aTopLeft.X = aTopLeft.X - nHalfHeight + nHalfWidth;
aTopLeft.Y = aTopLeft.Y - nHalfWidth + nHalfHeight;