diff options
author | Michael Stahl <michael.stahl@allotropia.de> | 2022-08-09 15:49:35 +0200 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2022-08-10 11:13:54 +0200 |
commit | b6e177982cb6c325ca67b208b2fb8397c03ab359 (patch) | |
tree | 5d02544be729bf0cb3712e3e62db264d95f27a0e | |
parent | 581ba395222e04e43697484bef9181c877d1fd61 (diff) |
tdf#150269 sw: add unit test
This was fixed by commit 3afe4f66f7266ede9922ce0682db38c9369349b7
"sw clearing breaks: add RTF filter", which enabled sending run
properties for \line.
Change-Id: I7d8f8860bdbead0ec68ca5ad99bb28ddaa51f323
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138053
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
-rw-r--r-- | sw/qa/extras/rtfexport/data/hidden-linebreaks.rtf | 27 | ||||
-rw-r--r-- | sw/qa/extras/rtfexport/rtfexport4.cxx | 6 |
2 files changed, 33 insertions, 0 deletions
diff --git a/sw/qa/extras/rtfexport/data/hidden-linebreaks.rtf b/sw/qa/extras/rtfexport/data/hidden-linebreaks.rtf new file mode 100644 index 000000000000..ae49933e1574 --- /dev/null +++ b/sw/qa/extras/rtfexport/data/hidden-linebreaks.rtf @@ -0,0 +1,27 @@ +{\rtf1\adeflang1025\ansi\ansicpg1250\uc1\adeff31507\deff0\stshfdbch31506\stshfloch31506\stshfhich31506\stshfbi31507\deflang1038\deflangfe1038\themelang1038\themelangfe0\themelangcs0
+{\fonttbl{\f0\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f0\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}
+{\fhiminor\f31506\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0502020204030204}Calibri;}
+{\fbiminor\f31507\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}
+}
+{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;
+\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}
+{\*\defchp \f31506\fs22\lang1038\langfe1033\langfenp1033 }
+{\*\defpap \ql \li0\ri0\sa160\sl259\slmult1
+\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 }
+\noqfpromote
+{\stylesheet{\ql \li0\ri0\sa160\sl259\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af31507\afs22\alang1025
+\ltrch\fcs0 \f31506\fs22\lang1038\langfe1033\cgrid\langnp1038\langfenp1033 \snext0 \sqformat \spriority0 Normal;}{\*\cs10 \additive \ssemihidden \sunhideused \spriority1 Default Paragraph Font;}}
+{\info{\author G\'e1bor Kelemen2010}{\operator G\'e1bor Kelemen2010}
+{\creatim\yr2022\mo8\dy4\hr18}{\revtim\yr2022\mo8\dy4\hr18}{\version1}{\edmins0}{\nofpages1}{\nofwords76}{\nofchars527}{\nofcharsws602}{\vern107}}
+{\*\xmlnstbl {\xmlns1 http://schemas.microsoft.com/office/word/2003/wordml}}
+\paperw11906\paperh16838\margl1440\margr1440\margt1440\margb1440\gutter0\ltrsect
+\deftab708\widowctrl\ftnbj\aenddoc\hyphhotz425\trackmoves0\trackformatting1\donotembedsysfont1\relyonvml1\donotembedlingdata0\grfdocevents0\validatexml1\showplaceholdtext0\ignoremixedcontent0\saveinvalidxml0
+\showxmlerrors1\noxlattoyen\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\formshade\horzdoc\dgmargin\dghspace180\dgvspace180\dghorigin1440\dgvorigin1440\dghshow1\dgvshow1
+\jexpand\viewkind1\viewscale100\pgbrdrhead\pgbrdrfoot\splytwnine\ftnlytwnine\htmautsp\nolnhtadjtbl\useltbaln\alntblind\lytcalctblwd\lyttblrtgr\lnbrkrule\nobrkwrptbl\snaptogridincell\allowfieldendsel\wrppunct
+\asianbrkrule\newtblstyruls\nogrowautofit\usenormstyforlist\noindnmbrts\felnbrelev\nocxsptable\indrlsweleven\noafcnsttbl\afelev\utinl\hwelev\spltpgpar\notcvasp\notbrkcnstfrctbl\notvatxbx\krnprsnet\cachedcolbal \nouicompat \fet0
+{\*\wgrffmtfilter 2450}\nofeaturethrottle1\ilfomacatclnup0\ltrpar \sectd \ltrsect\linex0\headery708\footery708\colsx708\endnhere\sectlinegrid360\sectdefaultcl\sftnbj
+\pard\plain \ltrpar\ql \li0\ri0\sa160\sl259\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af31507\afs22\alang1025 \ltrch\fcs0
+\f31506\fs22\lang1038\langfe1033\cgrid\langnp1038\langfenp1033 {\rtlch\fcs1 \af31507 \ltrch\fcs0 \v\lang1024\langfe1024\noproof \line \line \line }{\rtlch\fcs1 \af31507 \ltrch\fcs0
+\lang1024\langfe1024\noproof Lorem ipsum dolor sit amet }
+\par
+}
diff --git a/sw/qa/extras/rtfexport/rtfexport4.cxx b/sw/qa/extras/rtfexport/rtfexport4.cxx index f730afd93c25..a8bf53f8b6b8 100644 --- a/sw/qa/extras/rtfexport/rtfexport4.cxx +++ b/sw/qa/extras/rtfexport/rtfexport4.cxx @@ -117,6 +117,12 @@ DECLARE_RTFEXPORT_TEST(test148518, "FORMDROPDOWN.rtf") CPPUNIT_ASSERT_EQUAL(sal_Int32(1), result); } +DECLARE_RTFEXPORT_TEST(test150269, "hidden-linebreaks.rtf") +{ + uno::Reference<text::XTextRange> xRun = getRun(getParagraph(1), 1, u"\n\n\n"); + CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(xRun, "CharHidden")); +} + DECLARE_RTFEXPORT_TEST(testAnchoredAtSamePosition, "anchor.fodt") { SwXTextDocument* const pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get()); |