summaryrefslogtreecommitdiff
path: root/sd/qa/unit/export-tests-ooxml2.cxx
diff options
context:
space:
mode:
authorTamás Zolnai <tamas.zolnai@collabora.com>2018-02-27 06:54:16 +0100
committerTamás Zolnai <tamas.zolnai@collabora.com>2018-02-27 11:07:01 +0100
commitf41a08183504a59d6ffc7a00ed7f24e6b19995ab (patch)
tree9b0d075076e7de48ff49be3247e208a93787626f /sd/qa/unit/export-tests-ooxml2.cxx
parenta5411abe23cdf1e4de3ab5abfe209a4cbf07e511 (diff)
tdf#111789: TextBox shadow propeties are not saved to PPTX
Change-Id: I0c858676e1fc02a72b4b6bfd10f512d8e9166061 Reviewed-on: https://gerrit.libreoffice.org/50402 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Diffstat (limited to 'sd/qa/unit/export-tests-ooxml2.cxx')
-rw-r--r--sd/qa/unit/export-tests-ooxml2.cxx39
1 files changed, 39 insertions, 0 deletions
diff --git a/sd/qa/unit/export-tests-ooxml2.cxx b/sd/qa/unit/export-tests-ooxml2.cxx
index ed282a6e787b..9fb9d4ab6ff0 100644
--- a/sd/qa/unit/export-tests-ooxml2.cxx
+++ b/sd/qa/unit/export-tests-ooxml2.cxx
@@ -132,6 +132,7 @@ public:
void testTdf115394();
void testTdf115394Zero();
void testBulletsAsImage();
+ void testTdf111789();
CPPUNIT_TEST_SUITE(SdOOXMLExportTest2);
@@ -189,6 +190,7 @@ public:
CPPUNIT_TEST(testTdf115394);
CPPUNIT_TEST(testTdf115394Zero);
CPPUNIT_TEST(testBulletsAsImage);
+ CPPUNIT_TEST(testTdf111789);
CPPUNIT_TEST_SUITE_END();
@@ -1499,6 +1501,43 @@ void SdOOXMLExportTest2::testBulletsAsImage()
xDocShRef->DoClose();
}
+void SdOOXMLExportTest2::testTdf111789()
+{
+ // Shadow properties were not exported for text shapes.
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf111789.pptx"), PPTX);
+ utl::TempFile tempFile;
+ xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
+
+ // First text shape has some shadow
+ {
+ uno::Reference< beans::XPropertySet > xShape( getShapeFromPage( 0, 0, xDocShRef ) );
+ bool bHasShadow = false;
+ xShape->getPropertyValue("Shadow") >>= bHasShadow;
+ CPPUNIT_ASSERT(bHasShadow);
+ double fShadowDist = 0.0;
+ xShape->getPropertyValue("ShadowXDistance") >>= fShadowDist;
+ CPPUNIT_ASSERT_EQUAL(static_cast<double>(273), fShadowDist);
+ xShape->getPropertyValue("ShadowYDistance") >>= fShadowDist;
+ CPPUNIT_ASSERT_EQUAL(static_cast<double>(273), fShadowDist);
+ sal_Int32 nColor = 0;
+ xShape->getPropertyValue("ShadowColor") >>= nColor;
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0xFF0000), nColor);
+ sal_Int32 nTransparency = 0;
+ xShape->getPropertyValue("ShadowTransparence") >>= nTransparency;
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(7), nTransparency);
+ }
+
+ // Second text shape has no shadow
+ {
+ uno::Reference< beans::XPropertySet > xShape( getShapeFromPage( 1, 0, xDocShRef ) );
+ bool bHasShadow = false;
+ xShape->getPropertyValue("Shadow") >>= bHasShadow;
+ CPPUNIT_ASSERT(!bHasShadow);
+ }
+
+ xDocShRef->DoClose();
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(SdOOXMLExportTest2);
CPPUNIT_PLUGIN_IMPLEMENT();