dev/null                                              |binary
 sd/qa/unit/data/potx/tdf96389_deftabstopECMA.potx     |binary
 sd/qa/unit/data/potx/tdf96389_deftabstopISO29500.potx |binary
 sd/qa/unit/import-tests2.cxx                          |   16 ++++++++++++++--
 sd/source/ui/docshell/docshel4.cxx                    |   11 ++++-------
 5 files changed, 18 insertions(+), 9 deletions(-)

New commits:
commit 974eb666bd7edd80bf47ea8682e16b370ea4d810
Author:     Justin Luth <[email protected]>
AuthorDate: Tue Dec 2 10:42:32 2025 -0500
Commit:     Xisco Fauli <[email protected]>
CommitDate: Wed Dec 10 14:19:42 2025 +0100

    tdf#165180 tdf#96389 pptx: treat all 2010 filters the same
    
    I can't see any reason why all MS PowerPoint 2010 filters
    would not fall under the same rules
    as the main PowerPoint 2010 one.
    
    This patch effectively adds
    "Impress Office Open XML AutoPlay"
    "Impress Office Open XML Template"
    
    Unfortunately, there is nothing visually different in the unit test...
    
    make CppunitTest_sd_import_tests2 \
            CPPUNIT_TEST_NAME=testTdf96389_deftabstopISO29500
    
    Change-Id: Ifd82fbfe0298a182ddadcdff394fee4c930c81d4
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195018
    Reviewed-by: Justin Luth <[email protected]>
    Tested-by: Jenkins
    Signed-off-by: Xisco Fauli <[email protected]>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195253

diff --git a/sd/qa/unit/data/potx/tdf96389_deftabstopISO29500.potx 
b/sd/qa/unit/data/potx/tdf96389_deftabstopISO29500.potx
new file mode 100644
index 000000000000..8381bf3e0262
Binary files /dev/null and 
b/sd/qa/unit/data/potx/tdf96389_deftabstopISO29500.potx differ
diff --git a/sd/qa/unit/data/pptx/deftabstop.pptx 
b/sd/qa/unit/data/pptx/deftabstop.pptx
deleted file mode 100644
index 5cfe71794446..000000000000
Binary files a/sd/qa/unit/data/pptx/deftabstop.pptx and /dev/null differ
diff --git a/sd/qa/unit/import-tests2.cxx b/sd/qa/unit/import-tests2.cxx
index 5c7d54ef37d1..75fe572123e2 100644
--- a/sd/qa/unit/import-tests2.cxx
+++ b/sd/qa/unit/import-tests2.cxx
@@ -1952,9 +1952,9 @@ CPPUNIT_TEST_FIXTURE(SdImportTest2, testTdf128596)
     CPPUNIT_ASSERT_EQUAL(css::drawing::BitmapMode_REPEAT, bitmapmode);
 }
 
-CPPUNIT_TEST_FIXTURE(SdImportTest2, testDefaultTabStop)
+CPPUNIT_TEST_FIXTURE(SdImportTest2, testTdf96389_deftabstopISO29500)
 {
-    createSdImpressDoc("pptx/deftabstop.pptx");
+    createSdImpressDoc("potx/tdf96389_deftabstopISO29500.potx");
 
     SdXImpressDocument* pXImpressDocument = 
dynamic_cast<SdXImpressDocument*>(mxComponent.get());
     CPPUNIT_ASSERT(pXImpressDocument);
diff --git a/sd/source/ui/docshell/docshel4.cxx 
b/sd/source/ui/docshell/docshel4.cxx
index 70978b232d40..f838f315f60e 100644
--- a/sd/source/ui/docshell/docshel4.cxx
+++ b/sd/source/ui/docshell/docshel4.cxx
@@ -405,6 +405,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)
     {
         // As this is a MSFT format, we should use the "MS Compat"
@@ -437,7 +438,7 @@ bool DrawDocShell::ImportFrom(SfxMedium &rMedium,
         
mpDoc->SetCompatibilityFlag(SdrCompatibilityFlag::UseTrailingEmptyLinesInLayout,
 true);
     }
 
-    if (bIsPowerPointECMA || aFilterName == "Impress Office Open XML")
+    if (bIsPowerPointECMA || bIsPowerPointISO29500)
     {
         // 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
commit c64aa0aed17cc55147353969bb049c12d04a1ae3
Author:     Justin Luth <[email protected]>
AuthorDate: Mon Dec 1 17:17:07 2025 -0500
Commit:     Xisco Fauli <[email protected]>
CommitDate: Wed Dec 10 14:19:31 2025 +0100

    tdf#165180 tdf#96389 pptx: treat 2007 template same as other filters
    
    I can't see any reason why the template filter
    would not fall under the same rules
    as all the other PowerPoint 2007 ones.
    
    This patch effectively adds
    "Impress MS PowerPoint 2007 XML Template"
    to the filters that fall under these two categories.
    
    The first clause came from
    bnc#657899: Paragraph vertical spacing differs from PowerPoint
    without a unit test.
    
    The second clause came from
    tdf#96389 Use default tab stop value of MSO for pptx import
    
    Unfortunately, there is nothing visually different in the unit test...
    
    make CppunitTest_sd_import_tests2 \
        CPPUNIT_TEST_NAME=testTdf96389_deftabstopECMA
    
    Change-Id: Ief28fae775ff1c7a9cc8f1448a87d59caae36f86
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195016
    Tested-by: Jenkins
    Reviewed-by: Justin Luth <[email protected]>
    Signed-off-by: Xisco Fauli <[email protected]>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195251

diff --git a/sd/qa/unit/data/potx/tdf96389_deftabstopECMA.potx 
b/sd/qa/unit/data/potx/tdf96389_deftabstopECMA.potx
new file mode 100644
index 000000000000..8914bed8d0ca
Binary files /dev/null and b/sd/qa/unit/data/potx/tdf96389_deftabstopECMA.potx 
differ
diff --git a/sd/qa/unit/import-tests2.cxx b/sd/qa/unit/import-tests2.cxx
index 9ef9485783b0..5c7d54ef37d1 100644
--- a/sd/qa/unit/import-tests2.cxx
+++ b/sd/qa/unit/import-tests2.cxx
@@ -1965,6 +1965,18 @@ CPPUNIT_TEST_FIXTURE(SdImportTest2, testDefaultTabStop)
     CPPUNIT_ASSERT_EQUAL(sal_Int32(2540), nDefTab);
 }
 
+CPPUNIT_TEST_FIXTURE(SdImportTest2, testTdf96389_deftabstopECMA)
+{
+    createSdImpressDoc("potx/tdf96389_deftabstopECMA.potx");
+
+    SdXImpressDocument* pXImpressDocument = 
dynamic_cast<SdXImpressDocument*>(mxComponent.get());
+    SdDrawDocument* pDoc = pXImpressDocument->GetDoc();
+
+    sal_Int32 nDefTab = pDoc->GetDefaultTabulator();
+
+    CPPUNIT_ASSERT_EQUAL(sal_Int32(2540), nDefTab);
+}
+
 CPPUNIT_TEST_FIXTURE(SdImportTest2, testCropToZero)
 {
     // Must not crash because of division by zero
diff --git a/sd/source/ui/docshell/docshel4.cxx 
b/sd/source/ui/docshell/docshel4.cxx
index fd4fb3457416..70978b232d40 100644
--- a/sd/source/ui/docshell/docshel4.cxx
+++ b/sd/source/ui/docshell/docshel4.cxx
@@ -404,9 +404,8 @@ bool DrawDocShell::ImportFrom(SfxMedium &rMedium,
         uno::Reference<text::XTextRange> const& xInsertPosition)
 {
     const OUString aFilterName( rMedium.GetFilter()->GetFilterName() );
-    if (aFilterName == "Impress MS PowerPoint 2007 XML" ||
-        aFilterName == "Impress MS PowerPoint 2007 XML AutoPlay" ||
-        aFilterName == "Impress MS PowerPoint 2007 XML VBA")
+    const bool bIsPowerPointECMA = aFilterName.startsWith("Impress MS 
PowerPoint 2007 XML");
+    if (bIsPowerPointECMA)
     {
         // As this is a MSFT format, we should use the "MS Compat"
         // mode for spacing before and after paragraphs.
@@ -438,10 +437,7 @@ bool DrawDocShell::ImportFrom(SfxMedium &rMedium,
         
mpDoc->SetCompatibilityFlag(SdrCompatibilityFlag::UseTrailingEmptyLinesInLayout,
 true);
     }
 
-    if (aFilterName == "Impress MS PowerPoint 2007 XML" ||
-        aFilterName == "Impress MS PowerPoint 2007 XML AutoPlay" ||
-        aFilterName == "Impress MS PowerPoint 2007 XML VBA" ||
-        aFilterName == "Impress Office Open XML")
+    if (bIsPowerPointECMA || aFilterName == "Impress Office Open XML")
     {
         // 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

Reply via email to