summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVarun <varun.dhall@studentpartner.com>2015-08-18 20:08:50 +0530
committerMichael Stahl <mstahl@redhat.com>2015-08-18 15:31:50 +0000
commitc89207eaa4ea1b55be46ea083cce174a373035b2 (patch)
tree6247a99e4e810aba15f2467444649e90c23f307a
parent954943308dd7229593280c23b0c3c7efd875c10a (diff)
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 <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
-rw-r--r--sw/qa/extras/uiwriter/uiwriter.cxx22
1 files changed, 22 insertions, 0 deletions
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
index 8d48c7bad773..8bacc46cd735 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();