Kaydet (Commit) 4144858f authored tarafından Miklos Vajna's avatar Miklos Vajna

sw: add testcase for RTF_LEVELFOLLOW import

I almost broke this during refactoring...

Change-Id: If38e73f3b7d66e97bbcbad87447b8aa611ff79d1
üst 1abdfeee
{\rtf1
{\*\listtable
{\list\listtemplateid1194210988\listhybrid
{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow1\levelstartat1\levelspace0\levelindent0
{\leveltext
\leveltemplateid-1922248890\'02\'00.;}
{\levelnumbers\'01;}
\rtlch\fcs1 \af0 \ltrch\fcs0 \fbias0\hres0\chhres0 \fi-360\li720\lin720 }
\listid451049142}
{\list\listtemplateid-229602660\listhybrid
{\listlevel\levelnfc0\levelnfcn0\leveljc0
\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0
{\leveltext\leveltemplateid67698703\'02\'00.;}
{\levelnumbers\'01;}
\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-360\li720\lin720 }
\listid1067075036}
{\list\listtemplateid-2074719740\listhybrid
{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow2\levelstartat1\levelspace0\levelindent0
{\leveltext\leveltemplateid-641807334\'02\'00.;}
{\levelnumbers\'01;}
\rtlch\fcs1 \af0 \ltrch\fcs0
\fbias0\hres0\chhres0 \fi-360\li720\lin720 }
\listid1455825451}
}
{\*\listoverridetable
{\listoverride\listid1067075036\listoverridecount0\ls1}
{\listoverride\listid451049142\listoverridecount0\ls2}
{\listoverride\listid1455825451\listoverridecount0\ls3
}
}
{\pard\plain Before first.\par}
{\pard\plain \ls1 This has tab suffix. \par }
{\pard\plain After first, before second.\par}
{\pard\plain \ls2 This has space suffix. \par }
{\pard\plain After second, before third.\par}
{\pard\plain \ls3 This has no suffix. \par }
{\pard\plain After third.\par}
}
......@@ -46,6 +46,7 @@
#include <vcl/svapp.hxx>
#include <unotools/ucbstreamhelper.hxx>
#include <unotools/streamwrap.hxx>
#include <comphelper/sequenceashashmap.hxx>
#include <bordertest.hxx>
......@@ -1405,6 +1406,18 @@ DECLARE_RTFIMPORT_TEST(testBackground, "background.rtf")
CPPUNIT_ASSERT_EQUAL(false, bool(getProperty<sal_Bool>(getShape(2), "Opaque")));
}
DECLARE_RTFIMPORT_TEST(testLevelfollow, "levelfollow.rtf")
{
uno::Reference<container::XIndexAccess> xNum1Levels = getProperty< uno::Reference<container::XIndexAccess> >(getStyles("NumberingStyles")->getByName("WWNum1"), "NumberingRules");
CPPUNIT_ASSERT_EQUAL(sal_Int16(SvxNumberFormat::LISTTAB), comphelper::SequenceAsHashMap(xNum1Levels->getByIndex(0))["LabelFollowedBy"].get<sal_Int16>()); // first level, tab
uno::Reference<container::XIndexAccess> xNum2Levels = getProperty< uno::Reference<container::XIndexAccess> >(getStyles("NumberingStyles")->getByName("WWNum2"), "NumberingRules");
CPPUNIT_ASSERT_EQUAL(sal_Int16(SvxNumberFormat::SPACE), comphelper::SequenceAsHashMap(xNum2Levels->getByIndex(0))["LabelFollowedBy"].get<sal_Int16>()); // first level, space
uno::Reference<container::XIndexAccess> xNum3Levels = getProperty< uno::Reference<container::XIndexAccess> >(getStyles("NumberingStyles")->getByName("WWNum3"), "NumberingRules");
CPPUNIT_ASSERT_EQUAL(sal_Int16(SvxNumberFormat::NOTHING), comphelper::SequenceAsHashMap(xNum3Levels->getByIndex(0))["LabelFollowedBy"].get<sal_Int16>()); // first level, nothing
}
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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