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

sw RTF filter: add \leveljc1 testcase

lcov pointed out this had no coverage previously (unlike the 0 and the 2
case).

Change-Id: Iaa480015d1ddfe7c489a3cbbf079a38d20e6d45c
Reviewed-on: https://gerrit.libreoffice.org/33987Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
Tested-by: 's avatarJenkins <ci@libreoffice.org>
üst b5e3f8a5
{\rtf1\adeflang1025\ansi\ansicpg1252\uc1\adeff31507\deff0\stshfdbch31506\stshfloch31506\stshfhich31506\stshfbi31507\deflang1033\deflangfe1033\themelang1033\themelangfe0\themelangcs0
\noqfpromote
{\*\listtable
{\list\listtemplateid139628226\listhybrid
{\listlevel\levelnfc0\levelnfcn0\leveljc1\leveljcn1\levelfollow0\levelstartat1\levelspace360\levelindent0
{\leveltext
\leveltemplateid2049739134\'02\'00.;}
{\levelnumbers\'01;}
\rtlch\fcs1 \af0 \ltrch\fcs0 \fbias0\hres0\chhres0 \fi-360\li720\lin720 }
{\listname ;}
\listid1549801677}
}
{\*\listoverridetable
{\listoverride\listid1549801677\listoverridecount0\ls1}
}
{\listtext\pard\plain\ltrpar \s15 \rtlch\fcs1 \af31507\afs22 \ltrch\fcs0 \f31506\fs22\insrsid10952771 \hich\af31506\dbch\af31506\loch\f31506 1.\tab}
\pard\plain \ltrpar\s15\ql \fi-360\li720\ri0\sa200\sl276\slmult1
\widctlpar\wrapdefault\aspalpha\aspnum\faauto\ls1\adjustright\rin0\lin720\itap0\pararsid10952771\contextualspace \rtlch\fcs1 \af31507\afs22\alang1025 \ltrch\fcs0 \f31506\fs22\lang1033\langfe1033\cgrid\langnp1033\langfenp1033
{\rtlch\fcs1 \af31507
\ltrch\fcs0 \insrsid10952771 X
\par }
}
......@@ -29,6 +29,7 @@
#include <com/sun/star/view/XViewSettingsSupplier.hpp>
#include <com/sun/star/text/RubyAdjust.hpp>
#include <com/sun/star/text/XTextColumns.hpp>
#include <com/sun/star/text/HoriOrientation.hpp>
#include <vcl/svapp.hxx>
......@@ -1158,6 +1159,27 @@ DECLARE_RTFEXPORT_TEST(testTdf104085, "tdf104085.rtf")
CPPUNIT_FAIL("no BulletChar property");
}
DECLARE_RTFEXPORT_TEST(testLeveljcCenter, "leveljc-center.rtf")
{
// Tests that \leveljc1 is mapped to Adjust=Center for a numbering rule.
uno::Reference<text::XTextRange> xPara(getParagraph(1));
uno::Reference<beans::XPropertySet> properties(xPara, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xLevels(properties->getPropertyValue("NumberingRules"), uno::UNO_QUERY);
uno::Sequence<beans::PropertyValue> aProps;
xLevels->getByIndex(0) >>= aProps;
for (int i = 0; i < aProps.getLength(); ++i)
{
if (aProps[i].Name == "Adjust")
{
sal_Int16 nValue = 0;
CPPUNIT_ASSERT(aProps[i].Value >>= nValue);
CPPUNIT_ASSERT_EQUAL(text::HoriOrientation::CENTER, nValue);
return;
}
}
CPPUNIT_FAIL("no Adjust property");
}
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