sw/qa/extras/uiwriter/uiwriter.cxx | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+)
New commits: commit b6c570aff4c6dc7a469ed0e2c3dff8ce8f9934b8 Author: Varun <varun.dh...@studentpartner.com> Date: Wed Jul 8 03:15:24 2015 +0530 Added Test for Defaults of Outline Numbering Change-Id: Ie84087ec0d456a37c6af3e36075d840b802aebf6 Reviewed-on: https://gerrit.libreoffice.org/16837 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Michael Stahl <mst...@redhat.com> diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx index 1a0ad8c..0bf5636 100644 --- a/sw/qa/extras/uiwriter/uiwriter.cxx +++ b/sw/qa/extras/uiwriter/uiwriter.cxx @@ -103,6 +103,7 @@ public: void testTdf63214(); void testTdf90003(); void testTdf51741(); + void testDefaultsOfOutlineNumbering(); void testdelofTableRedlines(); void testTdf81995(); void testExportToPicture(); @@ -156,6 +157,7 @@ public: CPPUNIT_TEST(testTdf63214); CPPUNIT_TEST(testTdf90003); CPPUNIT_TEST(testTdf51741); + CPPUNIT_TEST(testDefaultsOfOutlineNumbering); CPPUNIT_TEST(testdelofTableRedlines); CPPUNIT_TEST(testTdf81995); CPPUNIT_TEST(testExportToPicture); @@ -994,6 +996,33 @@ void SwUiWriterTest::testTdf51741() CPPUNIT_ASSERT_EQUAL(sal_Int32(0), pMarkAccess->getAllMarksCount()); } +void SwUiWriterTest::testDefaultsOfOutlineNumbering() +{ + uno::Reference<text::XDefaultNumberingProvider> xDefNum(m_xSFactory->createInstance("com.sun.star.text.DefaultNumberingProvider"), uno::UNO_QUERY); + com::sun::star::lang::Locale alocale; + alocale.Language = "en"; + alocale.Country = "US"; + uno::Sequence<beans::PropertyValues> aPropVal(xDefNum->getDefaultContinuousNumberingLevels(alocale)); + CPPUNIT_ASSERT_EQUAL(sal_Int32(8), aPropVal.getLength()); + for(int i=0;i<aPropVal.getLength();i++) + { + CPPUNIT_ASSERT_EQUAL(sal_Int32(5), aPropVal[i].getLength()); + for(int j=0;j<aPropVal[i].getLength();j++) + { + uno::Any aAny = (aPropVal[i])[j].Value; + if((aPropVal[i])[j].Name == "Prefix" || (aPropVal[i])[j].Name == "Suffix" || (aPropVal[i])[j].Name == "Transliteration") + CPPUNIT_ASSERT_EQUAL(OUString("string"), aAny.getValueTypeName()); + else if((aPropVal[i])[j].Name == "NumberingType") + CPPUNIT_ASSERT_EQUAL(OUString("short"), aAny.getValueTypeName()); + else if((aPropVal[i])[j].Name == "NatNum") + CPPUNIT_ASSERT_EQUAL(OUString("short"), aAny.getValueTypeName()); + //It is expected to be long but right now its short !error! + else + CPPUNIT_FAIL("Property Name not matched"); + } + } +} + void SwUiWriterTest::testdelofTableRedlines() { SwDoc* pDoc = createDoc(); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits