diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2023-07-27 08:43:59 +0200 |
---|---|---|
committer | Szymon Kłos <szymon.klos@collabora.com> | 2023-08-04 10:17:25 +0200 |
commit | ae3b97a69688553e6c40ef4b64655db09d5a0f5e (patch) | |
tree | 552d0feaae071ca8f9989af85ac2e87ea6a77208 /sd | |
parent | d501959c1b93f90321a0f1155262997e8c849753 (diff) |
pptx: import shape text from master page
If shape has custom text defined in master page
but no text itself - don't prefer placeholder text
but text from master page.
Change-Id: Id4f7aeca0e74ecd8565905cd656a182c1195fa30
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154980
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Henry Castro <hcastro@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155335
Tested-by: Szymon Kłos <szymon.klos@collabora.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/qa/unit/data/pptx/shape-master-text.pptx | bin | 0 -> 32645 bytes | |||
-rw-r--r-- | sd/qa/unit/import-tests2.cxx | 11 |
2 files changed, 11 insertions, 0 deletions
diff --git a/sd/qa/unit/data/pptx/shape-master-text.pptx b/sd/qa/unit/data/pptx/shape-master-text.pptx Binary files differnew file mode 100644 index 000000000000..ca056b852d3a --- /dev/null +++ b/sd/qa/unit/data/pptx/shape-master-text.pptx diff --git a/sd/qa/unit/import-tests2.cxx b/sd/qa/unit/import-tests2.cxx index 55ab505fc603..0b168ef2bd91 100644 --- a/sd/qa/unit/import-tests2.cxx +++ b/sd/qa/unit/import-tests2.cxx @@ -1889,6 +1889,17 @@ CPPUNIT_TEST_FIXTURE(SdImportTest2, testOverflowBehaviorClip) } } +CPPUNIT_TEST_FIXTURE(SdImportTest2, testShapeMasterText) +{ + createSdImpressDoc("pptx/shape-master-text.pptx"); + uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0)); + + uno::Reference<text::XTextRange> const xParagraph(getParagraphFromShape(0, xShape)); + + uno::Reference<text::XTextRange> xRun(getRunFromParagraph(0, xParagraph)); + CPPUNIT_ASSERT_EQUAL(OUString("Custom"), xRun->getString()); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |