summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorMuthu Subramanian <sumuthu@collabora.com>2014-03-06 15:57:43 +0530
committerMuthu Subramanian <sumuthu@collabora.com>2014-03-06 16:00:47 +0530
commite8c00c409123e1d99f71c8e6cf8d672e96fb0c91 (patch)
tree9505342b34c9e07db20460eee24c82d43b81e491 /sd
parentbf2ff0468e06770f9320c652a2332f7ec137d061 (diff)
n#821567: Add unit test case.
Diffstat (limited to 'sd')
-rw-r--r--sd/qa/unit/data/pptx/n821567.pptxbin0 -> 179901 bytes
-rw-r--r--sd/qa/unit/import-tests.cxx29
2 files changed, 29 insertions, 0 deletions
diff --git a/sd/qa/unit/data/pptx/n821567.pptx b/sd/qa/unit/data/pptx/n821567.pptx
new file mode 100644
index 000000000000..9f365ad029e8
--- /dev/null
+++ b/sd/qa/unit/data/pptx/n821567.pptx
Binary files differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 486f7f32e5da..0f5732cdd082 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -57,6 +57,7 @@ public:
void testN828390_3();
void testN828390_4();
void testN828390_5();
+ void testN821567();
void testFdo68594();
void testFdo72998();
@@ -72,6 +73,7 @@ public:
CPPUNIT_TEST(testN828390_3);
CPPUNIT_TEST(testN828390_4);
CPPUNIT_TEST(testN828390_5);
+ CPPUNIT_TEST(testN821567);
CPPUNIT_TEST(testFdo68594);
CPPUNIT_TEST(testFdo72998);
@@ -204,6 +206,33 @@ void SdFiltersTest::testN759180()
}
}
+void SdFiltersTest::testN821567()
+{
+ OUString bgImage;
+ ::sd::DrawDocShellRef xDocShRef = loadURL( getURLFromSrc("/sd/qa/unit/data/pptx/n821567.pptx") );
+ CPPUNIT_ASSERT_MESSAGE( "failed to load", xDocShRef.Is() );
+
+ xDocShRef = saveAndReload( xDocShRef, ODP );
+ CPPUNIT_ASSERT_MESSAGE( "failed to load", xDocShRef.Is() );
+ CPPUNIT_ASSERT_MESSAGE( "in destruction", !xDocShRef->IsInDestruction() );
+ uno::Reference< drawing::XDrawPagesSupplier > xDoc(
+ xDocShRef->GetDoc()->getUnoModel(), uno::UNO_QUERY_THROW );
+ CPPUNIT_ASSERT_MESSAGE( "not exactly one page", xDoc->getDrawPages()->getCount() == 1 );
+ uno::Reference< drawing::XDrawPage > xPage(
+ xDoc->getDrawPages()->getByIndex(0), uno::UNO_QUERY_THROW );
+
+ uno::Reference< beans::XPropertySet > xPropSet( xPage, uno::UNO_QUERY );
+ uno::Any aAny = xPropSet->getPropertyValue( OUString("Background") );
+ if(aAny.hasValue())
+ {
+ uno::Reference< beans::XPropertySet > aXBackgroundPropSet;
+ aAny >>= aXBackgroundPropSet;
+ aAny = aXBackgroundPropSet->getPropertyValue( OUString("FillBitmapName"));
+ aAny >>= bgImage;
+ }
+ CPPUNIT_ASSERT_MESSAGE("Slide Background is not exported properly", !bgImage.isEmpty());
+}
+
void SdFiltersTest::testN828390()
{
bool bPassed = false;