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

tdf#104016 RTF import: deduplicate before text indent from numbering

We already deduplicated first line indentation since commit
3915bf2d (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/45844Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
Tested-by: 's avatarJenkins <ci@libreoffice.org>
üst 75e828ca
{\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}
}
......@@ -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();
......
......@@ -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
......
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