summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorRegényi Balázs <regenyi.balazs@nisz.hu>2021-01-16 13:48:44 +0100
committerLászló Németh <nemeth@numbertext.org>2021-06-28 09:35:18 +0200
commit2ffdd37067926ddb841c6055205f267b96706945 (patch)
treedd6e110c40c5a07d66f43c75b3962e2796bc0cf8 /svx
parent67a56b7159158cea076df9aa258a36b02e115ec3 (diff)
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 <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'svx')
-rw-r--r--svx/qa/unit/customshapes.cxx24
-rw-r--r--svx/source/customshapes/EnhancedCustomShape2d.cxx3
2 files changed, 14 insertions, 13 deletions
diff --git a/svx/qa/unit/customshapes.cxx b/svx/qa/unit/customshapes.cxx
index 830c0074c757..b7b0788c4bba 100644
--- a/svx/qa/unit/customshapes.cxx
+++ b/svx/qa/unit/customshapes.cxx
@@ -610,9 +610,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));
@@ -624,9 +624,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);
@@ -689,13 +689,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);
@@ -722,13 +722,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 046f5a783c31..154f2df08c9e 100644
--- a/svx/source/customshapes/EnhancedCustomShape2d.cxx
+++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx
@@ -2864,9 +2864,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));
}