filter/source/msfilter/svdfppt.cxx |    8 ++++++++
 sd/qa/unit/data/ppt/tdf166030.ppt  |binary
 sd/qa/unit/import-tests2.cxx       |   12 ++++++++++++
 3 files changed, 20 insertions(+)

New commits:
commit 4a46d514a9c137c2c393e44fe526690b154de1e2
Author:     Samuel Mehrbrodt <[email protected]>
AuthorDate: Mon Feb 16 09:16:22 2026 +0100
Commit:     Samuel Mehrbrodt <[email protected]>
CommitDate: Mon Feb 16 12:02:03 2026 +0100

    tdf#166030 ppt: Fix spacing for bullets in text box
    
    Change-Id: I51bc9bb780cb01cd5d126158ea159a4989ffdc4f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199449
    Reviewed-by: Samuel Mehrbrodt <[email protected]>
    Tested-by: Jenkins

diff --git a/filter/source/msfilter/svdfppt.cxx 
b/filter/source/msfilter/svdfppt.cxx
index 230f587baefe..9f5e7d1cf69a 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -3763,6 +3763,14 @@ void PPTNumberFormatCreator::ImplGetNumberFormat( 
SdrPowerPointImport const & rM
     rNumberFormat.SetBulletChar( nBuChar );
     rNumberFormat.SetBulletRelSize( static_cast<sal_uInt16>(nBulletHeight) );
     rNumberFormat.SetBulletColor( aCol );
+
+    // tdf#166030 When bullet is enabled but both offsets are 0 (which is the 
case for TextInShape)
+    // add some default indentation to match PowerPoint's behavior.
+    if ( nIsBullet && nTextOfs == 0 && nBulletOfs == 0 )
+    {
+        nTextOfs = 288;   // ~0.4 inch text indent (default PowerPoint bullet 
indent)
+        nBulletOfs = 0;   // bullet at left edge
+    }
     sal_uInt32 nAbsLSpace = convertMasterUnitToMm100(nTextOfs);
     sal_uInt32 nFirstLineOffset = nAbsLSpace - 
convertMasterUnitToMm100(nBulletOfs);
     rNumberFormat.SetAbsLSpace( nAbsLSpace );
diff --git a/sd/qa/unit/data/ppt/tdf166030.ppt 
b/sd/qa/unit/data/ppt/tdf166030.ppt
new file mode 100644
index 000000000000..35ecbd1e6385
Binary files /dev/null and b/sd/qa/unit/data/ppt/tdf166030.ppt differ
diff --git a/sd/qa/unit/import-tests2.cxx b/sd/qa/unit/import-tests2.cxx
index 6fe0cf439d65..fd52c8e3e721 100644
--- a/sd/qa/unit/import-tests2.cxx
+++ b/sd/qa/unit/import-tests2.cxx
@@ -1501,6 +1501,18 @@ CPPUNIT_TEST_FIXTURE(SdImportTest2, testTdf149985)
     CPPUNIT_ASSERT_EQUAL(size_t(1), pPage->GetObjCount());
 }
 
+CPPUNIT_TEST_FIXTURE(SdImportTest2, testTdf166030)
+{
+    // Without the fix in place, no bullet spacing was applied
+    createSdImpressDoc("ppt/tdf166030.ppt");
+    const SdrPage* pPage = GetPage(1);
+    SdrTextObj* pTxtObj = DynCastSdrTextObj(pPage->GetObj(0));
+    const EditTextObject& aEdit = 
pTxtObj->GetOutlinerParaObject()->GetTextObject();
+    const SvxNumBulletItem* pNumFmt = 
aEdit.GetParaAttribs(1).GetItem(EE_PARA_NUMBULLET);
+    const SvxNumberFormat& rFmt = pNumFmt->GetNumRule().GetLevel(1);
+    CPPUNIT_ASSERT_EQUAL(sal_Int32(1270), rFmt.GetAbsLSpace());
+}
+
 CPPUNIT_TEST_FIXTURE(SdImportTest2, testTdf150770)
 {
     // Without the fix in place, this test would have failed to load the file

Reply via email to