diff options
author | Varun <varun.dhall@studentpartner.com> | 2015-07-08 03:15:24 +0530 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2015-07-08 20:15:54 +0000 |
commit | b6c570aff4c6dc7a469ed0e2c3dff8ce8f9934b8 (patch) | |
tree | f0b2933b3472422b5ba4101aa6ad074a524e69c1 /sw | |
parent | 97df2dee8ea4f33f4efb7467cfeec2d8954c006c (diff) |
Added Test for Defaults of Outline Numbering
Change-Id: Ie84087ec0d456a37c6af3e36075d840b802aebf6
Reviewed-on: https://gerrit.libreoffice.org/16837
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/uiwriter/uiwriter.cxx | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx index 1a0ad8c4f816..0bf5636a14a8 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(); |