configure.ac | 17 +++++++++---- sw/qa/extras/layout/data/min-wtf.rtf | 42 +++++++++++++++++++++++++++++++++ sw/qa/extras/layout/layout3.cxx | 44 +++++++++++++++++++++++++++++++++++ 3 files changed, 98 insertions(+), 5 deletions(-)
New commits: commit e5747fb87f64576e737e81dcfc55794753850b62 Author: Michael Stahl <[email protected]> AuthorDate: Fri Oct 24 20:01:13 2025 +0200 Commit: Michael Stahl <[email protected]> CommitDate: Tue Oct 28 13:18:34 2025 +0100 sw: text formatting: add test for per-line paragraph properties like Word Test for commit 0849ddd0b1b3c384c5f3de8fe0bbb9df558fa786 Change-Id: Ia26286593b3e7f21799a86b1762ab30421941fad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192957 Reviewed-by: Michael Stahl <[email protected]> Tested-by: Jenkins (cherry picked from commit 116facc2909708ef32f90c61a4481d71b9138b6d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193033 Tested-by: allotropia jenkins <[email protected]> diff --git a/sw/qa/extras/layout/data/min-wtf.rtf b/sw/qa/extras/layout/data/min-wtf.rtf new file mode 100644 index 000000000000..1a38c504c369 --- /dev/null +++ b/sw/qa/extras/layout/data/min-wtf.rtf @@ -0,0 +1,42 @@ +{ tf1deflang1025nsinsicpg1252\uc1deff0\deff0\stshfdbch0\stshfloch31506\stshfhich31506\stshfbi31506\deflang2057\deflangfe1028 hemelang3079 hemelangfe0 hemelangcs0{onttbl{0bidi roman charset0prq2{\*\panose 02020603050405020304}Times New Roman{\*alt Arial};} +{1bidi swisscharset0prq2{\*\panose 020b0604020202020204}Arial{\*alt Arial};} +{dbminor31505bidi nilcharset136prq2{\*\panose 02010601000101010101}PMingLiU{\*alt Arial Unicode MS};} +{himinor31506bidi swisscharset0prq2{\*\panose 020f0502020204030204}Calibri;} +} +{\*\defchp 31506s22\lang3079\langfe1033\langnp3079\langfenp1033 }{\*\defpap \ql \li0 i0\sa200\sl276\slmult1 +\widctlpar\wrapdefaultspalphaspnumaautodjustright in0\lin0\itap0 } oqfpromote {\stylesheet{\ql \li0 i0\sa200\sl276\slmult1\widctlpar\wrapdefaultspalphaspnumaautodjustright in0\lin0\itap0 tlchcs1 f0fs22lang1025 \ltrchcs0 +1s23\lang3079\langfe1033+\s15\ql \li0 i0\widctlpar qc x4536 qr x9072\wrapdefaultspalphaspnumaautodjustright in0\lin0\itap0 tlchcs1 f0fs22lang1025 \ltrchcs0 1s23\lang3079\langfe1033+\sbasedon0 \snext15 \slink17 \sunhideused header;}{\*+\paperw11906\paperh16838\margl1417\margr1417\margt1417\margb1134\gutter0\ltrsect +\deftab708\widowctrltnbjenddoc\hyphhotz425 rackmoves0 rackformatting1\donotembedsysfont1 elyonvml0\donotembedlingdata0\grfdocevents0 alidatexml1\showplaceholdtext0\ignoremixedcontent0\saveinvalidxml0 +\showxmlerrors1 oxlattoyenxpshrtn oultrlspc\dntblnsbdb ospaceforul ormshade\horzdoc\dgmargin\dghspace180\dgvspace180\dghorigin1417\dgvorigin1417\dghshow1\dgvshow1 +\jexpandiewkind1iewscale100\pgbrdrhead\pgbrdrfoot\splytwnine tnlytwnine\htmautsp olnhtadjtbl\useltbalnlntblind\lytcalctblwd\lyttblrtgr\lnbrkrule obrkwrptbl\snaptogridincellllowfieldendsel\wrppunct +sianbrkrule sidroot6514785 ewtblstyruls ogrowautofit\usenormstyforlist oindnmbrtselnbrelev ocxsptable\indrlsweleven oafcnsttblfelev\utinl\hwelev\spltpgpar otcvasp otbrkcnstfrctbl otvatxbx\krnprsnet+{\*\wgrffmtfilter 2450} ofeaturethrottle1\ilfomacatclnup0 +\ltrpar \sectd \ltrsect\pgnrestart\linex0\headery708ootery708+ qc x4536 qr x9072\wrapdefaultspalphaspnumaautodjustright in0\lin0\itap0 tlchcs1 f0fs22lang1025 \ltrchcs0 1s23\lang3079\langfe1033+\par }}{\headerr \ltrpar \pard\plain \ltrpar\s15\qc \li0 i0\widctlpar qc x4536 qr x9072\wrapdefaultspalphaspnumaautodjustright in0\lin0\itap0 tlch cs1 f0fs22lang1025 \ltrchcs0 +1s23\lang3079\langfe1033+\par \line \line \line \line \line \line \line +\par }\pard\plain \ltrpar\ql \li0 i0\widctlpar\wrapdefaultaautodjustright in0\lin0\itap0 tlchcs1 f0fs22lang1025 \ltrchcs0 1 s23\lang3079\langfe1033+s16 \line \line \line \line \line }{ tlchcs1 bf0fs12 \ltrchcs0 s16 \line }{ tlchcs1 f0fs16 \ltrchcs0 s16 \line +\par \line +\par }{ tlchcs1 f1 \ltrchcs0 1s16 +\par }\pard \ltrpar\qr \li1418 i0\sa1600\sl480\slmult1\widctlpar\wrapdefault aautodjustright in0\lin1418\itap0 { tlchcs1 f1 \ltrchcs0 1 s16\lang2057\langfe1033\langnp2057 a\line n\line v ab \line d +}{ tlchcs1 f1 \ltrchcs0 1s16\lang2057\langfe1033\langnp2057 +\par }\pard \ltrpar\ql \li0 i0\sa200\sl276\slmult1\keepn\widctlpar x2835\wrapdefaultspalphaspnumaautodjustright in0\lin0\itap0 { tlchcs1 f1 \ltrchcs0 1s16\lang2057\langfe1033\langnp2057 a + ab c\line x ab y +\par }\pard \ltrpar\ql \li0 i0\sa200\sl276\slmult1\keepn\widctlpar\wrapdefaultspalphaspnum aautodjustright in0\lin0\itap0 { tlchcs1 f1 \ltrchcs0 1 s16\lang2057\langfe1033\langnp2057 +\par }\pard \ltrpar\ql \li0 i0\widctlpar\wrapdefaultaautodjustright in0\lin0\itap0 { tlchcs1 f1 \ltrchcs0 1s16\lang2057\langfe1033\langnp2057 +\par }\pard \ltrpar\ql \li0 i0\sa200\sl276\slmult1\widctlpar\wrapdefaultspalphaspnumaautodjustright in0\lin0\itap0 { tlchcs1 bf0fs12 \ltrchcs0 s16\lang2057\langfe1033\langnp2057 +\par }\pard\plain \ltrpar\s15\qc \li0 i0\widctlpar qc x4536 qr x9072\wrapdefaultspalphaspnumaautodjustright in0\lin0\itap0 tlchcs1 f0fs22lang1025 \ltrchcs0 1s23\lang3079\langfe1033+ tlchcs1 f0fs16 \ltrchcs0 s16\lang2057\langfe1033\langnp2057 +\par }\pard\plain \ltrpar\qc \li0 i0\widctlpar\wrapdefaultspalphaspnum aautodjustright in0\lin0\itap0 tlchcs1 f0fs22lang1025 \ltrchcs0 1 s23\lang3079\langfe1033+\ltrchcs0 [text] }{ tlchcs1 f0 \ltrchcs0 \lang2057\langfe1033\langnp2057 +\par }} +\pard\plain \ltrpar\ql \li0 i0\widctlpar\wrapdefaultaautodjustright in0\lin0\itap0 + tlchcs1 f0fs22lang1025 \ltrchcs0 1 s23\lang3079\langfe1033+\hichf0\dbchf31505\loch0 Xxxxxxxxxxxxxxxx xxx xxxx}{ tlchcs1 f0fs24 \ltrchcs0 s24\lang2057\langfe1028\lochf0\hichf0\dbchf31505\langnp2057\langfenp1028 +\par } +} diff --git a/sw/qa/extras/layout/layout3.cxx b/sw/qa/extras/layout/layout3.cxx index c300b9a69787..1f7bcf6c7f7f 100644 --- a/sw/qa/extras/layout/layout3.cxx +++ b/sw/qa/extras/layout/layout3.cxx @@ -739,6 +739,50 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, testTdf162725) assertXPath(pXmlDoc, "/root/page/body/txt[1]/SwParaPortion/SwLineLayout[1]/SwGluePortion"_ostr); } +CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, testHiddenParagraphMarkPerLineProperties) +{ + createSwDoc("min-wtf.rtf"); + + // ensure paragraphs are merged by hidden formatting + SwWrtShell* pWrtShell = getSwDocShell()->GetWrtShell(); + SwViewOption aViewOptions(*pWrtShell->GetViewOptions()); + aViewOptions.SetViewMetaChars(false); + pWrtShell->ApplyViewOptions(aViewOptions); + + xmlDocUniquePtr pXmlDoc = parseLayoutDump(); + + assertXPath(pXmlDoc, "/root/page[1]/header/txt", 3); + assertXPath(pXmlDoc, "/root/page[1]/header/txt[1]/SwParaPortion/SwLineLayout[1]", "height", + u"184"_ustr); + assertXPath(pXmlDoc, "/root/page[1]/header/txt[1]/SwParaPortion/SwLineLayout[2]", "height", + u"184"_ustr); + assertXPath(pXmlDoc, "/root/page[1]/header/txt[1]/SwParaPortion/SwLineLayout[3]", "height", + u"184"_ustr); + assertXPath(pXmlDoc, "/root/page[1]/header/txt[1]/SwParaPortion/SwLineLayout[4]", "height", + u"184"_ustr); + assertXPath(pXmlDoc, "/root/page[1]/header/txt[1]/SwParaPortion/SwLineLayout[5]", "height", + u"184"_ustr); + assertXPath(pXmlDoc, "/root/page[1]/header/txt[1]/SwParaPortion/SwLineLayout", 5); + // the problem was that this was 1656 due to using wrong line spacing for last line + assertXPath(pXmlDoc, "/root/page[1]/header/txt[1]/infos/bounds", "height", u"1499"_ustr); + assertXPath(pXmlDoc, "/root/page[1]/header/txt[1]/SwParaPortion/SwLineLayout[4]/SwFixPortion", + "type", u"PortionType::TabLeft"_ustr); + assertXPath(pXmlDoc, "/root/page[1]/header/txt[1]/SwParaPortion/SwLineLayout[4]/SwFixPortion", + "width", /*532?*/ u"530"_ustr); + assertXPath(pXmlDoc, "/root/page[1]/header/txt[1]/SwParaPortion/SwLineLayout[5]/SwFixPortion", + "type", u"PortionType::TabLeft"_ustr); + // the problem was that this was 626 (same tab position as previous line) + assertXPath(pXmlDoc, "/root/page[1]/header/txt[1]/SwParaPortion/SwLineLayout[5]/SwFixPortion", + "width", u"2755"_ustr); + assertXPath(pXmlDoc, "/root/page[1]/header/txt[2]/SwParaPortion/SwLineLayout", 0); + // this one was also wrong (1968) due to wrong spacing-below + assertXPath(pXmlDoc, "/root/page[1]/header/txt[2]/infos/bounds", "height", u"411"_ustr); + assertXPath(pXmlDoc, "/root/page[1]/header/txt[3]/SwParaPortion/SwLineLayout[1]", "height", + u"265"_ustr); + assertXPath(pXmlDoc, "/root/page[1]/header/txt[3]/SwParaPortion/SwLineLayout", 1); + assertXPath(pXmlDoc, "/root/page[1]/header/txt[3]/infos/bounds", "height", u"492"_ustr); +} + CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, testTdf161810) { createSwDoc("tdf161810.fodt"); commit 8050a77236c4c07b04880909706dd5d74b43475b Author: Michael Stahl <[email protected]> AuthorDate: Mon Aug 18 13:08:40 2025 +0200 Commit: Michael Stahl <[email protected]> CommitDate: Tue Oct 28 13:18:20 2025 +0100 rhbz#2354168 configure: workaround bogus "dbus-1" libs DBUS_LIBS contains -L/usr/lib64/pkgconfig/../../lib64 which eventually causes link failure: desktop/source/lib/init.cxx:6451: error: undefined reference to 'ublock_getCode_77' Reportedly realpath(1) is available even on macOS now so use it to resolve these paths. Change-Id: I754447ad23982918d6f8e80f839112db22b75205 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189864 Tested-by: Jenkins Reviewed-by: Michael Stahl <[email protected]> (cherry picked from commit 457872f8cac849b319ad4f88a94c8390aa9e3df7) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189879 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Stephan Bergmann <[email protected]> (cherry picked from commit db867ee5d6b6a239a7d822233ad022d18962ccd4) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193032 Tested-by: allotropia jenkins <[email protected]> diff --git a/configure.ac b/configure.ac index ba4511c734e7..e7dc82c25142 100644 --- a/configure.ac +++ b/configure.ac @@ -60,11 +60,18 @@ FilterLibs() else for f in $1; do case "$f" in - # let's start with Fedora's paths for now - -L/lib|-L/lib/|-L/lib64|-L/lib64/|-L/usr/lib|-L/usr/lib/|-L/usr/lib64|-L/usr/lib64/) - # ignore it: on UNIXoids it is searched by default anyway - # but if it's given explicitly then it may override other paths - # (on macOS it would be an error to use it instead of SDK) + -L*) + case `realpath "${f#-L}"` in + # let's start with Fedora's paths for now + /lib|/lib/|/lib64|/lib64/|/usr/lib|/usr/lib/|/usr/lib64|/usr/lib64/) + # ignore it: on UNIXoids it is searched by default anyway + # but if it's given explicitly then it may override other paths + # (on macOS it would be an error to use it instead of SDK) + ;; + *) + filteredlibs="$filteredlibs $f" + ;; + esac ;; *) filteredlibs="$filteredlibs $f"
