diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-12-05 09:17:43 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-12-05 13:51:22 +0100 |
commit | c9dee880d88305312094b311abdae155e452bf14 (patch) | |
tree | ffb696d6400bc451095cd9db40f607dd10154f70 | |
parent | 75e828cad5e652f111278b103b72b9a9a344b689 (diff) |
tdf#104016 RTF import: deduplicate before text indent from numbering
We already deduplicated first line indentation since commit
3915bf2dc877d5f1140798e24933db0f21386a4a (tdf#95376 DOCX import: fix
incorrectly indented tab stops, 2016-01-26), the same is necessary for
before text indent.
Change-Id: I11394881d116f76922c1a706dd14b6a7cdf3c89f
Reviewed-on: https://gerrit.libreoffice.org/45844
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
-rw-r--r-- | sw/qa/extras/rtfimport/data/tdf104016.rtf | 30 | ||||
-rw-r--r-- | sw/qa/extras/rtfimport/rtfimport.cxx | 9 | ||||
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper.cxx | 1 |
3 files changed, 40 insertions, 0 deletions
diff --git a/sw/qa/extras/rtfimport/data/tdf104016.rtf b/sw/qa/extras/rtfimport/data/tdf104016.rtf new file mode 100644 index 000000000000..4ae6e310572e --- /dev/null +++ b/sw/qa/extras/rtfimport/data/tdf104016.rtf @@ -0,0 +1,30 @@ +{\rtf1\ansi\ansicpg1252\deff0 +{\fonttbl +{\f0\fnil\fcharset0\fprq0\fttruetype Times New Roman;} +{\f1\fnil\fcharset0\fprq0\fttruetype Arial;} +{\f2\fnil\fcharset0\fprq0\fttruetype Symbol;} +} +{\*\listtable +{\list\listtemplateid1018\listsimple +{\listlevel\levelnfc23\levelstartat1\levelspace0\levelfollow0\fi-360\li720 +{\leveltext\'01\'b7 ;} +{\levelnumbers;} +\f2} +\listid1017} +} +{\*\listoverridetable +{\listoverride\listoverridecount0\listid1017\levelnfc23\levelstartat1\levelspace0\levelfollow0\fi-360\li720 +{\leveltext\'01\'b7 ;} +{\levelnumbers;} +\f2\ls1} +} +\kerning0\cf0\ftnbj\fet2\ftnstart1\ftnnar\aftnnar\ftnstart1\facingp\titlepg +\deftab720\viewkind1\paperw12240\paperh15840\margl1440\margr1440\widowctl +\sectd\sbknone\colsx360\marglsxn1800\margrsxn1800\pgncont\ltrsect +\pard\plain +{\ltrpar\ql\fi-360\li720\s21\f0\fs24\lang1033 +\ls1\ilvl0\itap0\tx720 +{\f0\fs24\lang1033 +\ltrch hello} +\par} +} diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx index b3bb4f4e0a5f..ce96812b138e 100644 --- a/sw/qa/extras/rtfimport/rtfimport.cxx +++ b/sw/qa/extras/rtfimport/rtfimport.cxx @@ -1362,6 +1362,15 @@ DECLARE_RTFIMPORT_TEST(testWatermark, "watermark.rtf") CPPUNIT_ASSERT_EQUAL(sal_Int32(aExpectedSize.Height()), aActualSize.Height); } +DECLARE_RTFIMPORT_TEST(testTdf104016, "tdf104016.rtf") +{ + uno::Reference<beans::XPropertyState> xParagraph(getParagraph(1), uno::UNO_QUERY); + // This was beans::PropertyState_DIRECT_VALUE, leading to lack of + // interitance from numbering. + CPPUNIT_ASSERT_EQUAL(beans::PropertyState_DEFAULT_VALUE, + xParagraph->getPropertyState("ParaLeftMargin")); +} + // tests should only be added to rtfIMPORT *if* they fail round-tripping in rtfEXPORT CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx index 3cddc0b946e2..39368c29d812 100644 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -1333,6 +1333,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, const PropertyMapPtr& rContext ) // 4) Direct paragraph formatting: that will came later. // So no situation where keeping indentation at this point would make sense -> erase. rContext->Erase(PROP_PARA_FIRST_LINE_INDENT); + rContext->Erase(PROP_PARA_LEFT_MARGIN); } } else |