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 91a00f5c27f0e2f22eae4f599c9351383614ea32 Author: Balazs Varga <[email protected]> AuthorDate: Tue Oct 14 10:29:03 2025 +0200 Commit: Aron Budea <[email protected]> CommitDate: Fri Oct 17 09:29:01 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) cherry-pick from: 1cc50e3b8a838b487ce4359c3bdebabbdc298be2 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]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192425 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Aron Budea <[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 64d38fe23a2a..70598596c520 100644 --- a/sd/qa/unit/uiimpress.cxx +++ b/sd/qa/unit/uiimpress.cxx @@ -18,6 +18,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> @@ -1941,6 +1942,31 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf127696) CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0x4), nFillColor); }*/ +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: */
