oox/source/drawingml/textparagraph.cxx |    1 -
 sd/qa/unit/data/pptx/tdf168835.pptx    |binary
 sd/qa/unit/uiimpress.cxx               |   26 ++++++++++++++++++++++++++
 3 files changed, 26 insertions(+), 1 deletion(-)

New commits:
commit 1cc50e3b8a838b487ce4359c3bdebabbdc298be2
Author:     Balazs Varga <[email protected]>
AuthorDate: Tue Oct 14 10:29:03 2025 +0200
Commit:     Balazs Varga <[email protected]>
CommitDate: Tue Oct 14 21:57:53 2025 +0200

    tdf#168835 sd ooxml import fix wrong placeholder char style
    
    Should not apply maEndProperties for char styles. Original issue
    (tdf#111927) works without it as well.
    
    regression after: 629105991ee77335f856d746ef44408414cc150a
    (Related: tdf#111927 - PPTX: fix placeholder title text becomes small)
    
    Change-Id: If83b267c7643ec5cc17955ff29e171efc39800b8
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192372
    Reviewed-by: Balazs Varga <[email protected]>
    Tested-by: Jenkins
    Tested-by: Gabor Kelemen <[email protected]>

diff --git a/oox/source/drawingml/textparagraph.cxx 
b/oox/source/drawingml/textparagraph.cxx
index d256f9d8af64..65d31195002e 100644
--- a/oox/source/drawingml/textparagraph.cxx
+++ b/oox/source/drawingml/textparagraph.cxx
@@ -63,7 +63,6 @@ TextCharacterProperties TextParagraph::getCharacterStyle (
     if (pTextParagraphStyle)
         
aTextCharacterStyle.assignUsed(pTextParagraphStyle->getTextCharacterProperties());
     aTextCharacterStyle.assignUsed(maProperties.getTextCharacterProperties());
-    aTextCharacterStyle.assignUsed(maEndProperties);
     return aTextCharacterStyle;
 }
 
diff --git a/sd/qa/unit/data/pptx/tdf168835.pptx 
b/sd/qa/unit/data/pptx/tdf168835.pptx
new file mode 100644
index 000000000000..ffc817f847df
Binary files /dev/null and b/sd/qa/unit/data/pptx/tdf168835.pptx differ
diff --git a/sd/qa/unit/uiimpress.cxx b/sd/qa/unit/uiimpress.cxx
index cfe019cd7e80..ec3daa013fa0 100644
--- a/sd/qa/unit/uiimpress.cxx
+++ b/sd/qa/unit/uiimpress.cxx
@@ -19,6 +19,7 @@
 #include <com/sun/star/drawing/XDrawView.hpp>
 #include <com/sun/star/drawing/XDrawPage.hpp>
 #include <com/sun/star/drawing/XMasterPageTarget.hpp>
+#include <com/sun/star/style/ParagraphAdjust.hpp>
 #include <com/sun/star/table/XMergeableCell.hpp>
 #include <com/sun/star/text/WritingMode2.hpp>
 #include <com/sun/star/view/XSelectionSupplier.hpp>
@@ -2056,6 +2057,31 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, 
testTdf166647_userpaint)
     CPPUNIT_ASSERT_EQUAL(size_t(2), 
pViewShell->GetActualPage()->GetObjCount());
 }
 
+CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf168835)
+{
+    createSdImpressDoc("pptx/tdf168835.pptx");
+    checkCurrentPageNumber(1);
+
+    dispatchCommand(mxComponent, u".uno:InsertPage"_ustr, {});
+    checkCurrentPageNumber(2);
+
+    insertStringToObject(0, u"Title of the second slide", /*bUseEscape*/ true);
+
+    uno::Reference<drawing::XDrawPagesSupplier> 
xDrawPagesSupplier(mxComponent, uno::UNO_QUERY);
+    uno::Reference<drawing::XDrawPage> 
xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(1),
+                                                 uno::UNO_QUERY);
+
+    uno::Reference<beans::XPropertySet> xShape(xDrawPage->getByIndex(0), 
uno::UNO_QUERY);
+    uno::Reference<text::XTextRange> xParagraph(getParagraphFromShape(0, 
xShape));
+
+    CPPUNIT_ASSERT_EQUAL(u"Title of the second slide"_ustr, 
xParagraph->getString());
+    CPPUNIT_ASSERT_EQUAL(44.0f, 
xShape->getPropertyValue(u"CharHeight"_ustr).get<float>());
+    CPPUNIT_ASSERT_EQUAL(sal_Int16(style::ParagraphAdjust_LEFT),
+                         
xShape->getPropertyValue(u"ParaAdjust"_ustr).get<sal_Int16>());
+    CPPUNIT_ASSERT_EQUAL(u"Arial"_ustr,
+                         
xShape->getPropertyValue(u"CharFontName"_ustr).get<OUString>());
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Reply via email to