oox/qa/unit/data/tdf165180_standardConnectorsISO29500.potx |binary
 oox/qa/unit/shape.cxx                                      |   36 +++++++++++++
 sd/source/ui/docshell/docshel4.cxx                         |   10 +--
 3 files changed, 39 insertions(+), 7 deletions(-)

New commits:
commit b67d9767755c7f16fcf7037b062287b15cd752b1
Author:     Justin Luth <[email protected]>
AuthorDate: Mon Dec 1 17:35:42 2025 -0500
Commit:     Xisco Fauli <[email protected]>
CommitDate: Wed Dec 10 14:19:51 2025 +0100

    tdf#165180 tdf#149756 tdf#152545 pptx: treat all MS PP filters the same
    
    I can't see any reason why all MS PowerPoint 2010 filters
    would not fall under the same rules
    as the PowerPoint 2007 ones.
    
    The first clause came from
    bnc#657899: Paragraph vertical spacing differs from PowerPoint
    without a unit test.
    
    Unfortunately, there is nothing visually different in the unit test...
    
    make CppunitTest_oox_shape \
        CPPUNIT_TEST_NAME=testTdf165180_standardConnectorsISO29500
    
    Change-Id: Ia65cce2e00a4dca41a3f92266eda7c217b14fc02
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195019
    Tested-by: Jenkins
    Reviewed-by: Justin Luth <[email protected]>
    Signed-off-by: Xisco Fauli <[email protected]>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195254

diff --git a/oox/qa/unit/data/tdf165180_standardConnectorsISO29500.potx 
b/oox/qa/unit/data/tdf165180_standardConnectorsISO29500.potx
new file mode 100644
index 000000000000..8acbfcfc08d6
Binary files /dev/null and 
b/oox/qa/unit/data/tdf165180_standardConnectorsISO29500.potx differ
diff --git a/oox/qa/unit/shape.cxx b/oox/qa/unit/shape.cxx
index 35c8e49bc28e..13bc7a1a086e 100644
--- a/oox/qa/unit/shape.cxx
+++ b/oox/qa/unit/shape.cxx
@@ -206,6 +206,42 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, 
testTdf165180_standardConnectorsECMA)
     }
 }
 
+CPPUNIT_TEST_FIXTURE(OoxShapeTest, testTdf165180_standardConnectorsISO29500)
+{
+    loadFromFile(u"tdf165180_standardConnectorsISO29500.potx");
+
+    uno::Reference<drawing::XDrawPagesSupplier> 
xDrawPagesSupplier(mxComponent, uno::UNO_QUERY);
+    uno::Reference<drawing::XDrawPage> 
xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
+                                                 uno::UNO_QUERY);
+
+    sal_Int32 aEdgeValue[] = { -1352, -2457, 2402, // bentConnector5
+                               3977,  0,     0, // bentConnector3
+                               -2899, 0,     0, // bentConnector3
+                               -1260, 4612,  0, // bentConnector4
+                               -1431, -2642, 0, // bentConnector4
+                               3831,  3438,  -1578 }; // bentConnector5
+    sal_Int32 nCount = 0;
+    sal_Int32 nEdgeLineDelta;
+    for (size_t i = 0; i < 10; i++)
+    {
+        uno::Reference<drawing::XShape> xShape(xDrawPage->getByIndex(i), 
uno::UNO_QUERY);
+        uno::Reference<beans::XPropertySet> xShapeProps(xShape, 
uno::UNO_QUERY);
+        bool bConnector = 
xShapeProps->getPropertySetInfo()->hasPropertyByName(u"EdgeKind"_ustr);
+        if (bConnector)
+        {
+            xShapeProps->getPropertyValue(UNO_NAME_EDGELINE1DELTA) >>= 
nEdgeLineDelta;
+            CPPUNIT_ASSERT_EQUAL(aEdgeValue[nCount], nEdgeLineDelta);
+            nCount++;
+            xShapeProps->getPropertyValue(UNO_NAME_EDGELINE2DELTA) >>= 
nEdgeLineDelta;
+            CPPUNIT_ASSERT_EQUAL(aEdgeValue[nCount], nEdgeLineDelta);
+            nCount++;
+            xShapeProps->getPropertyValue(UNO_NAME_EDGELINE3DELTA) >>= 
nEdgeLineDelta;
+            CPPUNIT_ASSERT_EQUAL(aEdgeValue[nCount], nEdgeLineDelta);
+            nCount++;
+        }
+    }
+}
+
 CPPUNIT_TEST_FIXTURE(OoxShapeTest, testTdf164623)
 {
     loadFromFile(u"tdf164623.pptx");
diff --git a/sd/source/ui/docshell/docshel4.cxx 
b/sd/source/ui/docshell/docshel4.cxx
index f838f315f60e..a2032899864b 100644
--- a/sd/source/ui/docshell/docshel4.cxx
+++ b/sd/source/ui/docshell/docshel4.cxx
@@ -406,7 +406,7 @@ bool DrawDocShell::ImportFrom(SfxMedium &rMedium,
     const OUString aFilterName( rMedium.GetFilter()->GetFilterName() );
     const bool bIsPowerPointECMA = aFilterName.startsWith("Impress MS 
PowerPoint 2007 XML");
     const bool bIsPowerPointISO29500 = aFilterName.startsWith("Impress Office 
Open XML"); // 2010+
-    if (bIsPowerPointECMA)
+    if (bIsPowerPointECMA || bIsPowerPointISO29500)
     {
         // As this is a MSFT format, we should use the "MS Compat"
         // mode for spacing before and after paragraphs.
@@ -421,10 +421,8 @@ bool DrawDocShell::ImportFrom(SfxMedium &rMedium,
         const_cast<EditEngine&>(rOutl.GetEditEngine()).SetControlWord( 
nControlWord );
 
         mpDoc->SetSummationOfParagraphs();
-    }
 
-    if (bIsPowerPointECMA)
-    {
+        // tdf#149756 tdf#152545
         // This is a "MS Compact" mode for connectors.
         // The Libreoffice uses bounding rectangle of connected shapes but
         // MSO uses snap rectangle when calculate the edge track.
@@ -436,10 +434,8 @@ bool DrawDocShell::ImportFrom(SfxMedium &rMedium,
         // tdf#168010: PowerPoint ignores empty trailing lines in autoshrink 
text when scaling font
         // (same as Impress), but takes into account in layout:
         
mpDoc->SetCompatibilityFlag(SdrCompatibilityFlag::UseTrailingEmptyLinesInLayout,
 true);
-    }
 
-    if (bIsPowerPointECMA || bIsPowerPointISO29500)
-    {
+        // tdf#96389
         // We need to be able to set the default tab size for each text object.
         // This is possible at the moment only for the whole document. See
         // TextParagraphPropertiesContext constructor. So default tab width

Reply via email to