[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - oox/source sd/qa
Tibor Nagy (via logerrit)
logerrit at kemper.freedesktop.org
Tue Aug 31 15:54:00 UTC 2021
oox/source/ppt/pptshape.cxx | 2 +-
sd/qa/unit/data/pptx/tdf142645.pptx |binary
sd/qa/unit/import-tests.cxx | 16 ++++++++++++++++
3 files changed, 17 insertions(+), 1 deletion(-)
New commits:
commit 9919b1c017dca81f5bf54aa27f0fda615c1bd2da
Author: Tibor Nagy <nagy.tibor2 at nisz.hu>
AuthorDate: Mon Aug 30 12:26:39 2021 +0200
Commit: Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Tue Aug 31 17:53:23 2021 +0200
tdf#142645 PPTX import: convert "ctrTitle" text to slide name
(i.e. centered title) similar to <p:ph type="title"/>.
See commit 7eb0e52527e729a21973e70d5be8e0a6779ec748
"tdf#142648 PPTX: import long slide names to avoid broken link export",
commit 253bee65bc24d999c3629a4d503d0fa01b355cfc
"tdf#142646 PPTX import: count repeating slide names" etc.
Change-Id: I5f25f04f23981ce2ff64dc792fe8464682d749a2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121295
Tested-by: László Németh <nemeth at numbertext.org>
Reviewed-by: László Németh <nemeth at numbertext.org>
(cherry picked from commit e5cfda76aefd6996813f461198816be24cd6ad43)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121289
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>
diff --git a/oox/source/ppt/pptshape.cxx b/oox/source/ppt/pptshape.cxx
index b72e6d854fc6..1c78c652526e 100644
--- a/oox/source/ppt/pptshape.cxx
+++ b/oox/source/ppt/pptshape.cxx
@@ -335,7 +335,7 @@ void PPTShape::addShape(
Reference< XShape > xShape( createAndInsert( rFilterBase, sServiceName, pTheme, rxShapes, bClearText, bool(mpPlaceholder), aTransformation, getFillProperties() ) );
// if exists and not duplicated, try to use the title text as slide name to help its re-use on UI
- if (!rSlidePersist.isMasterPage() && rSlidePersist.getPage().is() && mnSubType == XML_title)
+ if (!rSlidePersist.isMasterPage() && rSlidePersist.getPage().is() && (mnSubType == XML_title || mnSubType == XML_ctrTitle))
{
try
{
diff --git a/sd/qa/unit/data/pptx/tdf142645.pptx b/sd/qa/unit/data/pptx/tdf142645.pptx
new file mode 100644
index 000000000000..e57bd9ee176e
Binary files /dev/null and b/sd/qa/unit/data/pptx/tdf142645.pptx differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 742fb7712750..bdd27236c74a 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -122,6 +122,7 @@ public:
virtual void setUp() override;
void testDocumentLayout();
+ void testTdf142645();
void testTdf142915();
void testTdf142913();
void testTdf142590();
@@ -244,6 +245,7 @@ public:
CPPUNIT_TEST_SUITE(SdImportTest);
CPPUNIT_TEST(testDocumentLayout);
+ CPPUNIT_TEST(testTdf142645);
CPPUNIT_TEST(testTdf142915);
CPPUNIT_TEST(testTdf142913);
CPPUNIT_TEST(testTdf142590);
@@ -442,6 +444,20 @@ void SdImportTest::testDocumentLayout()
}
}
+void SdImportTest::testTdf142645()
+{
+ sd::DrawDocShellRef xDocShRef
+ = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/tdf142645.pptx"), PPTX);
+ uno::Reference<drawing::XDrawPagesSupplier> xDoc(xDocShRef->GetDoc()->getUnoModel(),
+ uno::UNO_QUERY_THROW);
+
+ uno::Reference<drawing::XDrawPage> xPage1(xDoc->getDrawPages()->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<container::XNamed> xNamed1(xPage1, uno::UNO_QUERY_THROW);
+ CPPUNIT_ASSERT_EQUAL(OUString("Hello"), xNamed1->getName());
+
+ xDocShRef->DoClose();
+}
+
void SdImportTest::testTdf142915()
{
::sd::DrawDocShellRef xDocShRef
More information about the Libreoffice-commits
mailing list