svx/qa/unit/customshapes.cxx | 24 +++++++++++----------- svx/source/customshapes/EnhancedCustomShape2d.cxx | 3 +- 2 files changed, 14 insertions(+), 13 deletions(-)
New commits: commit 404d12e9f71efbabf6cd8f5488d8dabf9f086af7 Author: Regényi Balázs <regenyi.bal...@nisz.hu> AuthorDate: Sat Jan 16 13:48:44 2021 +0100 Commit: Tünde Tóth <toth.tu...@nisz.hu> CommitDate: Thu Oct 21 10:53:53 2021 +0200 tdf#139549 DOCX import: document got modified at import time Regression of bda05ba17362222b74727872579b65b3fa14e3d8 "tdf#41466 DOCX import: fix VML v:shape/v:textbox". Co-authored-by: Tünde Tóth Change-Id: I8762aa8a710c3a37290e1db854b8cc86db6757b8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109436 Tested-by: László Németh <nem...@numbertext.org> Reviewed-by: László Németh <nem...@numbertext.org> (cherry picked from commit 2ffdd37067926ddb841c6055205f267b96706945) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123967 Tested-by: Tünde Tóth <toth.tu...@nisz.hu> Reviewed-by: Tünde Tóth <toth.tu...@nisz.hu> diff --git a/svx/qa/unit/customshapes.cxx b/svx/qa/unit/customshapes.cxx index 791588f1984d..dd1b79f4bc60 100644 --- a/svx/qa/unit/customshapes.cxx +++ b/svx/qa/unit/customshapes.cxx @@ -607,9 +607,9 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf127785_Mirror) const sal_Int32 nWidthV = aBoundRectV.Width; const sal_Int32 nLeftV = aBoundRectV.X; const sal_Int32 nTopV = aBoundRectV.Y; - if (abs(nHeightV - 4149) > 5 || abs(nWidthV - 3819) > 5) + if (abs(nHeightV - 8000) > 10 || abs(nWidthV - 8000) > 10) sErrors += "Flip vertical wrong size."; - if (abs(nLeftV - 3155) > 5 || abs(nTopV - 3736) > 5) + if (abs(nLeftV - 1000) > 10 || abs(nTopV - 2000) > 10) sErrors += " Flip vertical wrong position."; uno::Reference<drawing::XShape> xShapeH(getShape(1)); @@ -621,9 +621,9 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf127785_Mirror) const sal_Int32 nWidthH = aBoundRectH.Width; const sal_Int32 nLeftH = aBoundRectH.X; const sal_Int32 nTopH = aBoundRectH.Y; - if (abs(nHeightH - 4149) > 5 || abs(nWidthH - 3819) > 5) + if (abs(nHeightH - 8000) > 10 || abs(nWidthH - 8000) > 10) sErrors += " Flip horizontal wrong size."; - if (abs(nLeftH - 15026) > 5 || abs(nTopH - 4115) > 5) + if (abs(nLeftH - 13000) > 10 || abs(nTopH - 2000) > 10) sErrors += " Flip horizontal wrong position."; CPPUNIT_ASSERT_EQUAL(OUString(), sErrors); @@ -686,13 +686,13 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf127785_Asymmetric) const sal_Int32 nTop = aBoundRect.Y; const sal_Int32 nRight = aBoundRect.X + aBoundRect.Width - 1; const sal_Int32 nBottom = aBoundRect.Y + aBoundRect.Height - 1; - if (abs(nLeft - 10034) > 5) + if (abs(nLeft - 9000) > 10) sErrors += "wrong left"; - if (abs(nRight - 12973) > 5) + if (abs(nRight - 19000) > 10) sErrors += " wrong right"; - if (abs(nTop - 7892) > 5) + if (abs(nTop - 3000) > 10) sErrors += " wrong top"; - if (abs(nBottom - 14884) > 5) + if (abs(nBottom - 18000) > 10) sErrors += " wrong bottom"; CPPUNIT_ASSERT_EQUAL(OUString(), sErrors); @@ -719,13 +719,13 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf127785_TextRotateAngle) const sal_Int32 nTop = aBoundRect.Y; const sal_Int32 nRight = aBoundRect.X + aBoundRect.Width - 1; const sal_Int32 nBottom = aBoundRect.Y + aBoundRect.Height - 1; - if (abs(nLeft - 5054) > 5) + if (abs(nLeft - 2000) > 10) sErrors += "wrong left"; - if (abs(nRight - 6374) > 5) + if (abs(nRight - 14000) > 10) sErrors += " wrong right"; - if (abs(nTop - 4516) > 5) + if (abs(nTop - 3000) > 10) sErrors += " wrong top"; - if (abs(nBottom - 8930) > 5) + if (abs(nBottom - 9000) > 10) sErrors += " wrong bottom"; CPPUNIT_ASSERT_EQUAL(OUString(), sErrors); diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx index 556e440e491c..71f51ae7055e 100644 --- a/svx/source/customshapes/EnhancedCustomShape2d.cxx +++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx @@ -2866,9 +2866,10 @@ SdrObjectUniquePtr EnhancedCustomShape2d::CreatePathObj( bool bLineGeometryNeede SdrPathObj* pObj(rCandidate.first.get()); const drawing::LineStyle eLineStyle(pObj->GetMergedItem(XATTR_LINESTYLE).GetValue()); const drawing::FillStyle eFillStyle(pObj->GetMergedItem(XATTR_FILLSTYLE).GetValue()); + const auto pText = pObj->getActiveText(); // #i40600# if bLineGeometryNeededOnly is set, linestyle does not matter - if(bLineGeometryNeededOnly || (drawing::LineStyle_NONE != eLineStyle) || (drawing::FillStyle_NONE != eFillStyle)) + if(pText || bLineGeometryNeededOnly || (drawing::LineStyle_NONE != eLineStyle) || (drawing::FillStyle_NONE != eFillStyle)) vNewList.push_back(std::move(rCandidate)); }