Kaydet (Commit) c12c1b15 authored tarafından Varun's avatar Varun Kaydeden (comit) Michael Stahl

Added Test for tdf#81995 check outline numbering

Change-Id: I0a35a010d3edc8caea30e16813c937f1fa4d3ac8
Reviewed-on: https://gerrit.libreoffice.org/16797Reviewed-by: 's avatarMichael Stahl <mstahl@redhat.com>
Tested-by: 's avatarMichael Stahl <mstahl@redhat.com>
üst 36a77b74
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
#include <unocrsrhelper.hxx> #include <unocrsrhelper.hxx>
#include <unotbl.hxx> #include <unotbl.hxx>
#include <pagedesc.hxx> #include <pagedesc.hxx>
#include "com/sun/star/text/XDefaultNumberingProvider.hpp"
#include <svx/svdpage.hxx> #include <svx/svdpage.hxx>
#include <svx/svdview.hxx> #include <svx/svdview.hxx>
...@@ -98,6 +99,7 @@ public: ...@@ -98,6 +99,7 @@ public:
void testTdf90003(); void testTdf90003();
void testTdf51741(); void testTdf51741();
void testdelofTableRedlines(); void testdelofTableRedlines();
void testTdf81995();
void testExportToPicture(); void testExportToPicture();
void testTdf69282(); void testTdf69282();
void testTdf69282WithMirror(); void testTdf69282WithMirror();
...@@ -149,6 +151,7 @@ public: ...@@ -149,6 +151,7 @@ public:
CPPUNIT_TEST(testTdf90003); CPPUNIT_TEST(testTdf90003);
CPPUNIT_TEST(testTdf51741); CPPUNIT_TEST(testTdf51741);
CPPUNIT_TEST(testdelofTableRedlines); CPPUNIT_TEST(testdelofTableRedlines);
CPPUNIT_TEST(testTdf81995);
CPPUNIT_TEST(testExportToPicture); CPPUNIT_TEST(testExportToPicture);
CPPUNIT_TEST(testTdf69282); CPPUNIT_TEST(testTdf69282);
CPPUNIT_TEST(testTdf69282WithMirror); CPPUNIT_TEST(testTdf69282WithMirror);
...@@ -1003,6 +1006,39 @@ void SwUiWriterTest::testdelofTableRedlines() ...@@ -1003,6 +1006,39 @@ void SwUiWriterTest::testdelofTableRedlines()
CPPUNIT_ASSERT(redtbl.IsEmpty()); CPPUNIT_ASSERT(redtbl.IsEmpty());
} }
void SwUiWriterTest::testTdf81995()
{
uno::Reference<text::XDefaultNumberingProvider> xDefNum(m_xSFactory->createInstance("com.sun.star.text.DefaultNumberingProvider"), uno::UNO_QUERY);
com::sun::star::lang::Locale alocale;
alocale.Language = OUString("en");
alocale.Country = OUString("US");
uno::Sequence<uno::Reference<container::XIndexAccess>> aIndexAccess(xDefNum->getDefaultOutlineNumberings(alocale));
CPPUNIT_ASSERT_EQUAL(sal_Int32(8), aIndexAccess.getLength());
for(int i=0;i<aIndexAccess.getLength();i++)
{
CPPUNIT_ASSERT_EQUAL(sal_Int32(5), aIndexAccess[i]->getCount());
for(int j=0;j<aIndexAccess[i]->getCount();j++)
{
uno::Sequence<beans::PropertyValue> aProps;
aIndexAccess[i]->getByIndex(j) >>= aProps;
CPPUNIT_ASSERT_EQUAL(sal_Int32(12), aProps.getLength());
for(int k=0;k<aProps.getLength();k++)
{
const beans::PropertyValue& rProp = aProps[k];
uno::Any aAny = rProp.Value;
if(rProp.Name == "Prefix" || rProp.Name == "Suffix" || rProp.Name == "BulletChar" || rProp.Name == "BulletFontName" || rProp.Name == "Transliteration")
CPPUNIT_ASSERT_EQUAL(OUString("string"), aAny.getValueTypeName());
else if(rProp.Name == "NumberingType" || rProp.Name == "ParentNumbering" || rProp.Name == "Adjust")
CPPUNIT_ASSERT_EQUAL(OUString("short"), aAny.getValueTypeName());
else if(rProp.Name == "LeftMargin" || rProp.Name == "SymbolTextDistance" || rProp.Name == "FirstLineOffset" || rProp.Name == "NatNum")
CPPUNIT_ASSERT_EQUAL(OUString("long"), aAny.getValueTypeName());
else
CPPUNIT_FAIL("Property Name not matched");
}
}
}
}
void SwUiWriterTest::testExportToPicture() void SwUiWriterTest::testExportToPicture()
{ {
createDoc(); createDoc();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment