sd/qa/unit/data/potx/tdf96389_deftabstopECMA.potx |binary
 sd/qa/unit/import-tests2.cxx                      |   12 ++++++++++++
 sd/source/ui/docshell/docshel4.cxx                |   10 +++-------
 3 files changed, 15 insertions(+), 7 deletions(-)

New commits:
commit 1fbf9337f4da2001a86dfc0cda325fb9fc57987e
Author:     Justin Luth <[email protected]>
AuthorDate: Mon Dec 1 17:17:07 2025 -0500
Commit:     Justin Luth <[email protected]>
CommitDate: Fri Dec 5 22:03:19 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]>

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 40f6d6e934a8..c33264045d97 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