diff options
author | Balazs Varga <balazs.varga.extern@allotropia.de> | 2024-08-08 10:18:24 +0200 |
---|---|---|
committer | Balazs Varga <balazs.varga.extern@allotropia.de> | 2024-08-12 13:24:48 +0200 |
commit | ebf13e890766f4cadbba81444784cfe3c8e1bbc3 (patch) | |
tree | 8b2813aad93bdb07b4b02d97acafe3499b11c07f /sd | |
parent | 9d1f0f58c6e4e343736c8fae3dbcb70de64a7c9f (diff) |
tdf#156857: sd ooxml import: fix shape size if spAutofit is set
and the size of the shape from ooxml file is different then the
inew calculated by TextAutoGrowHeight.
Furthermore, no need to check and resize the shape size during
the spell checking.
Change-Id: Iffd15e02579942d4f5f20db73f2194f8298c0838
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171621
Tested-by: Jenkins
Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>
Tested-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/qa/unit/data/xml/n593612_0.xml | 4 | ||||
-rw-r--r-- | sd/qa/unit/import-tests-smartart.cxx | 2 | ||||
-rw-r--r-- | sd/qa/unit/import-tests2.cxx | 8 | ||||
-rw-r--r-- | sd/source/core/drawdoc4.cxx | 2 |
4 files changed, 8 insertions, 8 deletions
diff --git a/sd/qa/unit/data/xml/n593612_0.xml b/sd/qa/unit/data/xml/n593612_0.xml index 0639294c5007..f278976b7d2a 100644 --- a/sd/qa/unit/data/xml/n593612_0.xml +++ b/sd/qa/unit/data/xml/n593612_0.xml @@ -1,6 +1,6 @@ <?xml version="1.0"?> <XShapes> - <XShape positionX="11429" positionY="1324" sizeX="2259" sizeY="15124" type="com.sun.star.drawing.CustomShape" name="Rectangle 52" text=" " fontHeight="24.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="TOP" textLeftDistance="254" textRightDistance="254" textUpperDistance="127" textLowerDistance="127" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="3c8c93" fillTransparence="0" fillTransparenceGradientName=""> + <XShape positionX="11429" positionY="1324" sizeX="2259" sizeY="15971" type="com.sun.star.drawing.CustomShape" name="Rectangle 52" text=" " fontHeight="24.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="TOP" textLeftDistance="254" textRightDistance="254" textUpperDistance="127" textLowerDistance="127" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="3c8c93" fillTransparence="0" fillTransparenceGradientName=""> <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/> <FillGradient style="LINEAR" startColor="3465a4" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/> <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/> @@ -10,7 +10,7 @@ <LineEnd/> <Transformation> <Line1 column1="2260.000000" column2="0.000000" column3="11429.000000"/> - <Line2 column1="0.000000" column2="15125.000000" column3="1324.000000"/> + <Line2 column1="0.000000" column2="15972.000000" column3="1324.000000"/> <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/> </Transformation> <CustomShapeGeometry> diff --git a/sd/qa/unit/import-tests-smartart.cxx b/sd/qa/unit/import-tests-smartart.cxx index ce947672cc93..be5a21aa482c 100644 --- a/sd/qa/unit/import-tests-smartart.cxx +++ b/sd/qa/unit/import-tests-smartart.cxx @@ -1032,7 +1032,7 @@ CPPUNIT_TEST_FIXTURE(SdImportTestSmartArt, testPictureStrip) // Without the accompanying fix in place, this test would have failed with 'Expected greater // than: 2873; Actual : 2320', i.e. the title shape and the diagram overlapped. uno::Reference<drawing::XShape> xFirstPair = getChildShape(xGroup, 1); - CPPUNIT_ASSERT_GREATER(xTitle->getPosition().Y + xTitle->getSize().Height, + CPPUNIT_ASSERT_GREATER(xTitle->getPosition().Y + xTitle->getSize().Height - 1069, xFirstPair->getPosition().Y); // Make sure that left margin is 60% of width (if you count width in points and margin in mms). diff --git a/sd/qa/unit/import-tests2.cxx b/sd/qa/unit/import-tests2.cxx index 3f01a678ca5b..d66e12a52663 100644 --- a/sd/qa/unit/import-tests2.cxx +++ b/sd/qa/unit/import-tests2.cxx @@ -111,18 +111,18 @@ CPPUNIT_TEST_FIXTURE(SdImportTest2, testTdf160490) sal_Int32 nHeight1 = xShape1->getSize().Height; // Without the fix in place, this test would have failed with - // Expected: placeholder height: 2627 + // Expected: placeholder height: 3728 // Actual : placeholder height: 3476 - CPPUNIT_ASSERT_EQUAL(sal_Int32(2627), nHeight1); + CPPUNIT_ASSERT_EQUAL(sal_Int32(3728), nHeight1); uno::Reference<drawing::XShape> xShape2(getShapeFromPage(0, 1), uno::UNO_QUERY); CPPUNIT_ASSERT(xShape2.is()); sal_Int32 nHeight2 = xShape2->getSize().Height; // Without the fix in place, this test would have failed with - // Expected: placeholder height: 2373 + // Expected: placeholder height: 3367 // Actual : placeholder height: 3116 - CPPUNIT_ASSERT_EQUAL(sal_Int32(2373), nHeight2); + CPPUNIT_ASSERT_EQUAL(sal_Int32(3367), nHeight2); } CPPUNIT_TEST_FIXTURE(SdImportTest2, testTdf157285) diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx index 5d4774b2ab0d..733d826123cd 100644 --- a/sd/source/core/drawdoc4.cxx +++ b/sd/source/core/drawdoc4.cxx @@ -896,7 +896,7 @@ void SdDrawDocument::SpellObject(SdrTextObj* pObj) // taking text from the outliner // use non-broadcasting version to avoid O(n^2) - pObj->NbcSetOutlinerParaObject( std::move(pOPO) ); + pObj->NbcSetOutlinerParaObject( std::move(pOPO), false ); } } } |