[Libreoffice-commits] core.git: sw/qa writerfilter/source
Miklos Vajna
vmiklos at collabora.co.uk
Tue Oct 10 17:43:33 UTC 2017
sw/qa/extras/rtfimport/data/tdf112211-2.rtf | 43 ++++++++++++++++++++++++++++
sw/qa/extras/rtfimport/rtfimport.cxx | 9 +++++
writerfilter/source/rtftok/rtfsprm.cxx | 6 ---
3 files changed, 52 insertions(+), 6 deletions(-)
New commits:
commit 295cf49b81b8c008ec0ea2c92f7cf729d5523d4e
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Tue Oct 10 07:58:26 2017 +0200
tdf#112211 RTF import: fix unwanted direct formatting for other indents
Commit 56a695fddb915bcba13b088b5b2b4e0841d4acbc (tdf#112211 RTF import:
fix unwanted direct formatting for left indents, 2017-09-26) fixed left
indents, and given that it was a regression fix, left the other indent
types untouched.
As it has been pointed out in the bug comment, the original bugdoc
actually needs the other indent types removed as well, so let's do that.
Change-Id: Ia4ea7e2214b7df27536f46b046f90bd703c107be
Reviewed-on: https://gerrit.libreoffice.org/43303
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
Tested-by: Jenkins <ci at libreoffice.org>
diff --git a/sw/qa/extras/rtfimport/data/tdf112211-2.rtf b/sw/qa/extras/rtfimport/data/tdf112211-2.rtf
new file mode 100644
index 000000000000..ed822e1f988b
--- /dev/null
+++ b/sw/qa/extras/rtfimport/data/tdf112211-2.rtf
@@ -0,0 +1,43 @@
+{\rtf1\adeflang1025\ansi\ansicpg1252\uc1\adeff31507\deff0\stshfdbch0\stshfloch0\stshfhich0\stshfbi0\deflang1033\deflangfe1033\themelang1033\themelangfe0\themelangcs1025
+{\fonttbl
+{\f0\fbidi \froman\fcharset0\fprq2 Times New Roman;}
+{\f3\fbidi \froman\fcharset2\fprq2 Symbol;}
+{\f39\fbidi \fswiss\fcharset0\fprq2 Verdana;}
+}
+\noqfpromote
+{\stylesheet
+{\ql \li0\ri0\sl240\slmult0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af31507\afs22\alang1025 \ltrch\fcs0 \f38\fs18\lang1033\langfe1033\cgrid\langnp1033\langfenp1033
+\snext0 \sqformat \spriority14 \styrsid11343869 Normal;}
+{\s59\ql \li720\ri0\sa200\sl276\slmult1
+\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin720\itap0\contextualspace \rtlch\fcs1 \af31507\afs22\alang1025 \ltrch\fcs0 \f39\fs22\lang1033\langfe1033\cgrid\langnp1033\langfenp1033
+\sbasedon0 \snext59 \sqformat \spriority34 \styrsid12276622 List Paragraph;}
+}
+{\*\listtable
+{\list\listtemplateid1644085804\listhybrid
+{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0
+\levelstartat1\levelspace0\levelindent0
+{\leveltext\leveltemplateid67698689\'01\u-3913 ?;}
+{\levelnumbers;}
+\f3\fbias0 \fi-360\li720\lin720 }
+{\listname ;}
+\listid2028170298}
+}
+{\*\listoverridetable
+{\listoverride\listid2028170298
+\listoverridecount0\ls24}
+}
+\paperw12240\paperh15840\margl1440\margr1440\margt1800\margb1440\gutter0\ltrsect
+\facingp\widowctrl\ftnbj\aenddoc\trackmoves0\trackformatting1\donotembedsysfont1\relyonvml1\donotembedlingdata0\grfdocevents0\validatexml1\showplaceholdtext0\ignoremixedcontent0\saveinvalidxml0\showxmlerrors1
+\noxlattoyen\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\formshade\horzdoc\dgmargin\dghspace187\dgvspace187\dghorigin1440\dgvorigin1800\dghshow1\dgvshow1
+\jexpand\viewkind1\viewscale100\pgbrdrhead\pgbrdrfoot\splytwnine\ftnlytwnine\htmautsp\nolnhtadjtbl\useltbaln\alntblind\lytcalctblwd\lyttblrtgr\lnbrkrule\nobrkwrptbl\snaptogridincell\allowfieldendsel\wrppunct
+\asianbrkrule\rsidroot15035986\newtblstyruls\nogrowautofit\usenormstyforlist\noindnmbrts\felnbrelev\nocxsptable\indrlsweleven\noafcnsttbl\afelev\utinl\hwelev\spltpgpar\notcvasp\notbrkcnstfrctbl\notvatxbx\krnprsnet\cachedcolbal \nouicompat \fet0
+\pard\plain AB{\b C}D{\b E}FGHIJKL\par
+\pard\plain \ltrpar\s59\ql \fi-360\li720\ri0\sa200\sl276\slmult1
+\widctlpar\wrapdefault\aspalpha\aspnum\faauto\ls24\adjustright\rin0\lin720\pararsid7821880\contextualspace \rtlch\fcs1 \af31507\afs22\alang1025 \ltrch\fcs0 \f39\fs22\lang1033\langfe1033\cgrid\langnp1033\langfenp1033
+{\rtlch\fcs1 \afs16
+\ltrch\fcs0 \f39\fs16\insrsid16134103\charrsid16134103 Profile 1 \endash }
+{\rtlch\fcs1 \afs16 \ltrch\fcs0 \f39\fs16\insrsid5270339 A1}
+{\rtlch\fcs1 \afs16 \ltrch\fcs0 \f39\fs16\insrsid16134103\charrsid16134103
+\par
+}
+}
diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx
index 91bf92c81881..4003ba3b4184 100644
--- a/sw/qa/extras/rtfimport/rtfimport.cxx
+++ b/sw/qa/extras/rtfimport/rtfimport.cxx
@@ -303,6 +303,15 @@ DECLARE_RTFIMPORT_TEST(testFdo52066, "fdo52066.rtf")
CPPUNIT_ASSERT_EQUAL(sal_Int32(convertTwipToMm100(19)), xShape->getSize().Height);
}
+DECLARE_RTFIMPORT_TEST(testTdf112211_2, "tdf112211-2.rtf")
+{
+ uno::Reference<beans::XPropertyState> xPropertyState(getParagraph(2), uno::UNO_QUERY);
+ beans::PropertyState ePropertyState = xPropertyState->getPropertyState("ParaLeftMargin");
+ // This was beans::PropertyState_DIRECT_VALUE -> direct formatting
+ // prevented inheritance from numbering definition.
+ CPPUNIT_ASSERT_EQUAL(beans::PropertyState_DEFAULT_VALUE, ePropertyState);
+}
+
DECLARE_RTFIMPORT_TEST(testFdo49892, "fdo49892.rtf")
{
uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY);
diff --git a/writerfilter/source/rtftok/rtfsprm.cxx b/writerfilter/source/rtftok/rtfsprm.cxx
index 99218bcd9f20..8ade6fe07f94 100644
--- a/writerfilter/source/rtftok/rtfsprm.cxx
+++ b/writerfilter/source/rtftok/rtfsprm.cxx
@@ -161,12 +161,6 @@ static bool isSPRMDeduplicateBlacklist(Id nId)
case NS_ooxml::LN_CT_TabStop_val:
case NS_ooxml::LN_CT_TabStop_leader:
case NS_ooxml::LN_CT_TabStop_pos:
- // Erasing these just because they equal to the style one is
- // problematic, as then the used value won't be from the style, but
- // possibly from the numbering.
- case NS_ooxml::LN_CT_Ind_right:
- case NS_ooxml::LN_CT_Ind_firstLine:
- case NS_ooxml::LN_CT_Ind_hanging:
// \htmautsp arrives after the style table, so only the non-style value is
// correct, keep these.
case NS_ooxml::LN_CT_Spacing_beforeAutospacing:
More information about the Libreoffice-commits
mailing list