sw/qa/extras/uiwriter/uiwriter.cxx | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+)
New commits: commit c89207eaa4ea1b55be46ea083cce174a373035b2 Author: Varun <varun.dh...@studentpartner.com> Date: Tue Aug 18 20:08:50 2015 +0530 Added Test for tdf#74230 ODF export stroke and fill in graphic defaults Change-Id: I09c15c7d5c9eaabe81029506bc9091fac42af662 Reviewed-on: https://gerrit.libreoffice.org/17840 Reviewed-by: Michael Stahl <mst...@redhat.com> Tested-by: Michael Stahl <mst...@redhat.com> diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx index 8d48c7b..8bacc46 100644 --- a/sw/qa/extras/uiwriter/uiwriter.cxx +++ b/sw/qa/extras/uiwriter/uiwriter.cxx @@ -134,6 +134,7 @@ public: void testUnoParagraph(); void testTdf60967(); void testSearchWithTransliterate(); + void testTdf74230(); void testTdf74363(); void testTdf80663(); void testTdf57197(); @@ -205,6 +206,7 @@ public: CPPUNIT_TEST(testUnoParagraph); CPPUNIT_TEST(testTdf60967); CPPUNIT_TEST(testSearchWithTransliterate); + CPPUNIT_TEST(testTdf74230); CPPUNIT_TEST(testTdf74363); CPPUNIT_TEST(testTdf80663); CPPUNIT_TEST(testTdf57197); @@ -1632,6 +1634,26 @@ void SwUiWriterTest::testSearchWithTransliterate() CPPUNIT_ASSERT_EQUAL(1,(int)case2); } +void SwUiWriterTest::testTdf74230() +{ + createDoc(); + //exporting the empty document to ODT via TempFile + uno::Sequence<beans::PropertyValue> aDescriptor; + utl::TempFile aTempFile; + uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY); + xStorable->storeToURL(aTempFile.GetURL(), aDescriptor); + CPPUNIT_ASSERT(aTempFile.IsValid()); + //loading an XML DOM of the "styles.xml" of the TempFile + xmlDocPtr pXmlDoc = parseExportInternal(aTempFile.GetURL(),"styles.xml"); + //pXmlDoc should not be null + CPPUNIT_ASSERT(pXmlDoc); + //asserting XPath in loaded XML DOM + assertXPath(pXmlDoc, "//office:styles/style:default-style[@style:family='graphic']/style:graphic-properties[@svg:stroke-color='#3465a4']"); + assertXPath(pXmlDoc, "//office:styles/style:default-style[@style:family='graphic']/style:graphic-properties[@draw:fill-color='#729fcf']"); + //deleting the TempFile + aTempFile.EnableKillingFile(); +} + void SwUiWriterTest::testTdf74363() { SwDoc* pDoc = createDoc(); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits