diff options
author | Tibor Nagy <nagy.tibor2@nisz.hu> | 2022-11-18 12:06:59 +0100 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2022-11-24 16:56:38 +0100 |
commit | 3f70375cf160841b6140f5f1b2b79af3652897f8 (patch) | |
tree | 556687e6fee55aa92fffc1ce7f324dfbd2e92900 /sd | |
parent | 574db5efa9a2ab6d70faedf538be77a1eb8c597b (diff) |
tdf#152069 tdf#108356 PPTX export: fix missing tile properties
of background image patterns defined by a:tile.
Note: factor "3.6" comes from EMU.
Change-Id: I5da532ff9ad63fd6c236a58933a31dcd96cf5156
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142913
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/qa/unit/data/odp/repeatBitmapMode.odp | bin | 0 -> 19301 bytes | |||
-rw-r--r-- | sd/qa/unit/export-tests-ooxml2.cxx | 23 |
2 files changed, 23 insertions, 0 deletions
diff --git a/sd/qa/unit/data/odp/repeatBitmapMode.odp b/sd/qa/unit/data/odp/repeatBitmapMode.odp Binary files differnew file mode 100644 index 000000000000..b3d829930487 --- /dev/null +++ b/sd/qa/unit/data/odp/repeatBitmapMode.odp diff --git a/sd/qa/unit/export-tests-ooxml2.cxx b/sd/qa/unit/export-tests-ooxml2.cxx index 57008eefbf8d..4e01e9ed82fd 100644 --- a/sd/qa/unit/export-tests-ooxml2.cxx +++ b/sd/qa/unit/export-tests-ooxml2.cxx @@ -76,6 +76,7 @@ public: { } + void testRepeatBitmapMode(); void testTdf142291(); void testTdf151492(); void testTdf149697(); @@ -147,6 +148,7 @@ public: CPPUNIT_TEST_SUITE(SdOOXMLExportTest2); + CPPUNIT_TEST(testRepeatBitmapMode); CPPUNIT_TEST(testTdf142291); CPPUNIT_TEST(testTdf151492); CPPUNIT_TEST(testTdf149697); @@ -224,6 +226,27 @@ public: } }; +void SdOOXMLExportTest2::testRepeatBitmapMode() +{ + loadFromURL(u"odp/repeatBitmapMode.odp"); + save("Impress Office Open XML"); + + xmlDocUniquePtr pXmlDocContent1 = parseExport("ppt/slides/slide1.xml"); + assertXPath(pXmlDocContent1, "/p:sld/p:cSld/p:bg/p:bgPr/a:blipFill/a:tile", "tx", "1269669"); + assertXPath(pXmlDocContent1, "/p:sld/p:cSld/p:bg/p:bgPr/a:blipFill/a:tile", "ty", "186051"); + assertXPath(pXmlDocContent1, "/p:sld/p:cSld/p:bg/p:bgPr/a:blipFill/a:tile", "sx", "100000"); + assertXPath(pXmlDocContent1, "/p:sld/p:cSld/p:bg/p:bgPr/a:blipFill/a:tile", "sy", "100000"); + assertXPath(pXmlDocContent1, "/p:sld/p:cSld/p:bg/p:bgPr/a:blipFill/a:tile", "algn", "tr"); + + // if the "Scale" setting is checked in the images settings dialog. + xmlDocUniquePtr pXmlDocContent2 = parseExport("ppt/slides/slide2.xml"); + assertXPath(pXmlDocContent2, "/p:sld/p:cSld/p:bg/p:bgPr/a:blipFill/a:tile", "tx", "0"); + assertXPath(pXmlDocContent2, "/p:sld/p:cSld/p:bg/p:bgPr/a:blipFill/a:tile", "ty", "0"); + assertXPath(pXmlDocContent2, "/p:sld/p:cSld/p:bg/p:bgPr/a:blipFill/a:tile", "sx", "682760"); + assertXPath(pXmlDocContent2, "/p:sld/p:cSld/p:bg/p:bgPr/a:blipFill/a:tile", "sy", "639983"); + assertXPath(pXmlDocContent2, "/p:sld/p:cSld/p:bg/p:bgPr/a:blipFill/a:tile", "algn", "ctr"); +} + void SdOOXMLExportTest2::testTdf142291() { loadFromURL(u"pptx/tdt142291.pptx"); |