434 Commits
Author SHA1 Message Date
Mike Kaganski 4f8889f928 vcl: anchor the object-stream test on /Type/ObjStm
testEncryptedTaggedUsesObjectStreams searched the whole exported file
for /ObjStm, which binary data can hold, and every later search starts
from that match. The writer emits /Type/ObjStm, with /Length and the
stream data after it in the same dictionary.

Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Change-Id: Ibb1417ee9bd399ea183883d2849f02a4e3d945c4
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13491
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit 8171259354f2e36fddcdb815d393d7d60c303e01)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211702
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-10-02 11:05:31 +02:00
Mike Kaganski 4998ea8631 sw: emit a Ruby's RB before its RT
ISO 32000-2 Table 369 makes the order normative: a Ruby shall contain
one RB followed by an RT, or by RP, RT and RP. A ruby's two sub-lines
paint in visual order, though, and each opened its structure element as
it painted, so an exported ruby held its RT before its RB. PAC 2026
reports that as two errors per ruby; veraPDF does not report it.

An element is ordered among its siblings where its type is set, not
where it is painted, so both kids are created and typed before either
sub-line paints, and each sub-line then enters the kid already created
for it.

Which sub-line carries the annotation follows OnTop, while bRubyTop only
reflects where a squared grid puts the annotation and is true everywhere
else. Keying the role off bRubyTop tagged the base of a ruby positioned
below outside a squared grid, or to the right, as the RT and its
annotation as the RB, so both the role and the element follow OnTop now.
A squared grid with the ruby text below was already right, bRubyTop and
OnTop agreeing there.

The kids are created only where BeginInlineStructureElements would enter
them: a ruby in the repeated headline row of a follow table would
otherwise leave an empty RB and RT on the table, once per following
page.

testLinkWithRuby asserted only that both kids are present, the order
being wrong when it was written; it compares them in order now.

Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Change-Id: I8e38a3544008f79939d7d0795c4808a1a72caad7
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13402
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 65c62bc31aff793465f31ab6172c118921fe9d51)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211690
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-10-01 22:41:28 +02:00
Mike Kaganski eec52071ef tdf#157028 vcl: use object streams in an encrypted file too
Object streams and a cross-reference stream shrink a tagged PDF, but
I1e27dc3a8f43aa8b6c75ae930615c8d4b4645627 ("tdf#157028 vcl: write the
structure tree into object streams") left an encrypted export out of
both, so a password kept the whole structure tree uncompressed. The
spreadsheet reported in tdf#166233, attachment 171182, exported tagged
at 2368642 bytes, and at 13465120 with a password. The protected export
is 2389620 bytes now, and what it has over the plain tagged one is what
encryption itself costs.

This writer encrypts a string as it builds the object. ISO 32000-2 7.5.7
forbids encrypting a string in an object stream separately: the stream
that carries it is encrypted instead. So the strings of a stream-bound
object go in plain now, and the object stream is encrypted as a whole,
with the cipher set up for the stream's own object number rather than
for the objects inside. The stream's /Length counts what the cipher
adds. Only the structure elements and the ID tree put strings in a
stream, so only those two builders ask getStringEncryptor for one, and
it returns nothing while the file uses object streams.

Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Change-Id: Ia6a063244baf456d7c7368a6bba7a8cbb96e31b0
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13370
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 59193295323917bd065ea3a235f7653ad7f9b04b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211655
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-10-01 15:43:44 +02:00
Mike Kaganski d00d192770 tdf#157028 vcl: write the structure tree into object streams
Turning Tagged PDF on added 2.4 MB to the reporter's document, 2.0 MB of that
its structure tree: 12562 elements, each its own top-level object,
uncompressed, and each costing a further 20 bytes in the cross-reference
table.

The elements go into /Type/ObjStm streams of 200 now, with the parent and ID
trees. The cross-reference has to become a /Type/XRef stream with them,
because a table cannot address an object inside another object. PDF 1.5
introduced both, so a PDF/A-1b file keeps the plain form. So does an encrypted
file, since a string in an object stream shall not be separately encrypted,
and this writer encrypts strings as it builds the object. So does a hybrid
file, because sdext reads the embedded original document out of a trailer.

The reporter's document exported 3157118 bytes tagged before the change and
1086230 after, against 769448 untagged either way. An 8300-row Writer table
exported 4017140 bytes tagged before and 500967 after, against 73183 untagged.

testTdf159066 and testTdf173162 grep the exported bytes for something the
structure tree carries, /Alt< and the /Namespaces array. They inflate the
object streams first now. testListLabelPDFExport counted its List element in
the token stream, and asks GetObjects() for it.

Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Change-Id: I1e27dc3a8f43aa8b6c75ae930615c8d4b4645627
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13209
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit ad4bb8ae080aba98080dfaabd688dfdb48cf7ade)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211556
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-09-30 13:25:11 +02:00
Miklos Vajna fe590de0fe pdfium: update to 8073
Patches:
- external/pdfium/extractpatterns-fill.patch.1 is now upstream
- external/pdfium/extractpatterns-stroke.patch.1 as well
- external/pdfium/fix-windows-build.patch.1 as well
- external/pdfium/system-icu.patch.1 as well
- external/pdfium/system-dragonbox.diff is a new dependency, patch the
  code to use our bundled dragonbox
- update external/pdfium/system-abseil.diff to apply again

Adapted tests:
- CppunitTest_vcl_pdfexport goes back to its previous expected values
  after pdfium.git commit 17cf94b52e01507108da6460ebca6b48995a698e
  (Revert "Fix mixed-direction line extraction", 2026-09-17)
- CppunitTest_vcl_pdfexport2 as well

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I09bf5fc9f54b697eed2e144c3f57c3b72f3bbc37
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13508
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
(cherry picked from commit 0272de3a9b98d0c3ef4479e0dc12abe8cc040447)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211551
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-09-30 08:42:24 +02:00
Mike Kaganski a0c08a780e vcl: let PDFDocument list the objects an object stream holds
GetElements() hands out the tokens the file itself carries, so a caller
hunting structure elements finds none of those a /Type/ObjStm holds - every
one of them, in a file from a producer that compresses its objects. They are
there already: Tokenize unpacks each object stream it passes and registers
what it finds, so only an accessor was missing.

The 64 places that scanned the token stream for an object ask GetObjects()
instead.

testTdf57423 and testStyleNamedStructureTypes compared the order as well. The
map is keyed by object number, which for a structure tree is document order,
where the token stream carried the emission order that writes a child before
its parent - the type sequence reads "Document Table TR TD" now instead of
ending "TR Table". Both hold the same 22 elements; testTdf57423 stopped
indexing its figures and compares one string per kind.

Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Change-Id: I3e46e600e0aed3802f5ee2f8c6dc25a50002763d
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13207
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 50bf4f7acb344520ce2055bddfaf844c23239a8e)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211450
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-09-29 12:32:49 +02:00
Mike Kaganski f0600a8d88 tdf#163272 sw: give a paragraph its own /Lang
Write a paragraph in a language other than the document's, then File -
Export As - Export as PDF with Tagged PDF on. The paragraph's element
said nothing about the language, and the Span holding its text said it
instead:

 /StructElem /S/Standard /K[6 0 R]
 /StructElem /S/Span /Lang (en-GB) /K[1 2 3 4 5 6 7 8]

A run of text was compared against the language of the document, so
every run of a paragraph that declares one of its own differed from it
and opened a Span. The comparison is against the paragraph now, and a
paragraph unlike the document names its language itself. A run unlike
its paragraph still opens a Span and names its own, which it did not
where it was the document's language the paragraph had departed from.
A Span that carries anything else - a strikeout, a script, a character
style - still stands, without the language it was repeating, and so
does a Link. A paragraph with something anchored in it says nothing,
as before: what hangs there is tagged underneath it and would take the
paragraph's language for its own.

testSpans reads four list items, three of them en-GB in a de-DE
document. It asserted the shape the old rule made - for one of them it
looked for a single Span and took the language off that, and for the
rest it counted the Spans that rule opened. It reads the language off
the paragraph now, asserts that the item at the document's own
language names none, and where an item holds a hyperlink and a
footnote it finds the two Links alone.

Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Change-Id: I4082891666598793f59d1bf62c33e883ebdebb8f
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13117
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit 0d2d9e656d87647f904f1a463ed9b879c2bfb10c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211375
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-09-23 19:56:06 +02:00
Mike Kaganski d663a07822 sw,vcl: name the heading a TOC item lists
Insert - Table of Contents and Index, then export with File - Export
as PDF, Universal Accessibility (PDF/UA) on and PDF version 2.0. The
file fails ISO 14289-2 clause 8.2.5.8 once per entry, which veraPDF
reports as:

 Each TOCI in the table of contents shall identify the target of the
 reference using the Ref entry, either directly on the TOCI structure
 element itself or on one of its child structure elements

An item named no target at all:

 <</Type/StructElem/NS 2 0 R/S/TOCI /P 8 0 R /Pg 3 0 R /K[10 0 R ]>>

It names the heading now, in the /Ref entry PDF 2.0 added:

 <</Type/StructElem/NS 2 0 R/S/TOCI /P 8 0 R /Pg 3 0 R /Ref[ 15 0 R ] /K[10 0 R ]>>

Object 15 is the /S/H1 the entry links to, found from the mark its
URL names. An item that links to a table, a frame or an object, or
that has no link at all, still names nothing.

The document of testTdf173162 linked its entries to
bookmark alone now, as Writer writes them, and the document passes
the profile, so the test asks for PDF/UA instead of plain tagging
and the harness validates it.

Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Change-Id: I76e73684d2ab09f187f56cab093d13980150d737
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/12750
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit ee49bf58e7d3eb3ff94677e9a51c73b76eb51a99)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211338
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-09-23 00:04:53 +02:00
Mike Kaganski 07ccc05cf7 sw,vcl: name a footnote FENote at PDF 2.0
Put a footnote in a document and export with File - Export as PDF,
Tagged PDF on and PDF version 2.0. The file fails ISO 14289-2 clause
8.2.5.14 once per footnote. veraPDF, on the PDF/UA-2 profile, reports:

 The Note standard structure type shall not be present in conforming
 documents unless role mapped to a structure element in the PDF 2.0
 namespace

The element carried the type PDF 2.0 replaced, in the 1.7 namespace
ISO 14289-2 8.2.4 accepts alongside the 2.0 one:

 <</Type/StructElem/NS 2 0 R/S/Note /ID (id29) /P 28 0 R /Pg 3 0 R ...>>

Writer asks for FENote now, so the element lands in the 2.0 namespace
and the check stops failing:

 <</Type/StructElem/NS 1 0 R/S/FENote /ID (id29) /P 28 0 R /Pg 3 0 R ...>>

Below PDF 2.0 the file still says Note, the only footnote type
ISO 32000-1 has.

Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Change-Id: I4674f4f902621ee8765121782799f42cc59c5e6e
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/12749
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit 42433cf89b23328991e7a64daea4f771b60f728a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211337
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-09-23 00:04:49 +02:00
Mike Kaganski 3e517fbfe9 vcl: give each style a structure name of its own
Write a paragraph in Writer's built-in Index paragraph style and
export with Tagged PDF switched on. The element comes out as
/S/Index, over a role map that reads

 /Index/P

so the standard Index type means a paragraph, document-wide. veraPDF,
on the PDF/UA-1 profile:

 Standard tags defined in ISO 32000-1:2008, 14.8.4, shall not be
 remapped

A style called Artifact went further. Its paragraph reached the
content stream beside the marker for content that is not part of the
structure at all, the two being one name:

 /Artifact BMC
 /Artifact<</MCID 10>>BDC

Writer names a structure element after the style that produced it,
and the role map records what that name means, one entry per name.
Styles collide there with the standard types, with each other, being
separate families for paragraphs and characters, and with the names
Writer asks for itself, Source Text writing Code literally.

A name a standard type has, or another alias asked for, is now passed
over for the first indexed name beside it that is free, so the Index
style writes /S/Index-1 over /Index-1/P. PDF 2.0 has standard names
1.7 lacks: a style called H7 gives way there, while a heading at
outline level 7, which Writer asks for by that same name, keeps it
and needs no entry at all. The synthetic Div containers ask for no
name now, and carry the Div tag as before.

The test document remapped four standard tags at PDF 1.7 and six at
2.0; now none at either.

Found while reproducing tdf#165454.

Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Change-Id: I63e9116e5db17bdb554b508a864e313a77f40bc2
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/12361
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit 54e0207ff6bcf937187a395912f1ed57b60d90e3)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211314
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-09-22 20:49:36 +02:00
Mike Kaganski f1e4a0f0ab tdf#168462 svx: mark the slide background as an artifact
A slide with a background, its own or its master's, exported to
tagged PDF with that background as untagged content. ISO 14289-1 7.1
leaves no third state, and veraPDF says so once per background:

 Content is neither marked as Artifact nor tagged as real content

Page decoration is wrapped as an artifact in
ViewObjectContact::getPrimitive2DSequence, which the background never
reached: the master page descriptor builds its own hierarchy and
emitted the fill straight into the visitor. It now takes the same
wrapper as the page decoration beside it - the machinery of commit
81ef846485 ("(related: tdf#135192) svx:
PDF/UA export: tag background as Artifact", 2022-12-01), whose author
hoped there that "anything that's not SdrObject can be tagged as
Artifact".

The wrapper has to lie to be heard: VclMetafileProcessor2D drops a
tag that is a NonStructElement, and drops a background tag that is
not an image, so page decoration goes out as a Division claiming to
be an image. That second refusal is also why a shape on a master
slide, unless it is a graphic, is untagged to this day. LATER: let the
processor emit an artifact for a plain background and stop dropping
one, and both go.

Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Change-Id: I9431c460cade3d432cb7abf76930e23f8106a7f1
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/12311
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit b11283cd97e1170688a75f4229fd43bd8298e276)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211166
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-09-18 22:42:53 +02:00
Mike Kaganski 32dec34df6 tdf#171022 sw,vcl: name the element a link points at
Exporting a document to PDF/UA-2 produced a file that fails
ISO 14289-2 clause 8.8, once per outline item and internal link.
veraPDF reports

 Destination in Outline item, OpenAction or Link annotation is not
 a structure destination

The destination named the page and an area on it, and that is all:
what was linked to could only be worked out by looking at what the
layout had put at that position.

A destination for a link or an outline item is now written as a GoTo
action carrying a structure destination beside the page one
(ISO 32000-2 12.3.2.3):

 /A<</Type/Action/S/GoTo/D[<page> 0 R/XYZ ...]/SD[<elem> 0 R/XYZ ...]>>

sw creates a destination before its target is tagged, so the node is
remembered while the cursor is on it, and matched against the tags in
the pass that already runs after the last page. Creating one and
remembering its node is a single call now, which every destination a
link or an outline item points at goes through: bibliography entries
and links in the text of a shape are named as well.

The cursor is not always on the target: a jump that selects a frame
or a drawing object, and one that finds nothing, move it nowhere, and
where it was left standing on the link, that link's own element must
not become the target. The pass over a shape's links can instead
start with the cursor on the target already, where a jump that did
reach it shows no move either, so there the mark names its own node.
Those keep writing /Dest, as do a target that was never tagged and
one whose element was never emitted.

The element carries its role and its content, not a name of its own:
a heading becomes /S/H1 with no /Alt or /T. veraPDF does not check
what a structure destination points at, so the test does.

Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Change-Id: Ic76d80d46f130d549ebaacf175393a3d6ec77998
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/12300
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit a6502c6e96d13425bcb4a3bf5731a998982d5957)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211150
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-09-18 19:07:01 +02:00
Mike Kaganski 6e785d7b0b tdf#163240 sw: subdivide a Link by Spans
The commit "tdf#163240 vcl,sw: keep one Link tag for a wrapped link"
made language, baseline shift and decoration come from the link's first
portion for the whole link, and noted subdividing by Spans as the fix:
those three are attributes of the Link tag, and there is now one tag per
hyperlink, so a change inside it had nowhere to go.

Open a Span in the Link instead. A span waits inside its link, so two
tags can be open at once, and an annotation goes to the link's own tag -
vcl takes it on a Link only, and a styled run crossing a line break
would otherwise leave that line's annotation without a StructParent.

Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Change-Id: I302d32f66fcb4e3b1eaf63b136bdcf96aaea17b7
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/11543
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit 8f52d63f897aaf710dfe4cd9771f39689471abfd)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211101
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-09-18 14:21:04 +02:00
Mike Kaganski 6e70cb2e00 tdf#163240 sw: track which tags to close, not how many
The commit "tdf#163240 vcl,sw: keep one Link tag for a wrapped link"
kept the tag across a line break. A ruby still split it, and a character
style on a ruby base pulled the following text into the Ruby element.

Tags were closed by a count, which callers decremented to leave one open
for the next portion; a count does not record which tag. Keep two stacks
instead: the tags this helper opened, and the tags left open for a
following portion. Close a deferred tag only while it is the current
element, so neither a ruby nor a fly closes a tag of another.

Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Change-Id: Icdf793f149076db2b5dfac2b7668d0c414467427
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/11542
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 1936ac2268b9e603c64a03eff6eb8b7ecb8b56de)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211090
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-09-18 11:29:55 +02:00
Mike Kaganski 79b06ca748 tdf#163240 vcl,sw: keep one Link tag for a wrapped link
Regression after commit a71da3b7a8
(tdf#156565 sw: PDF/UA export: split Link SE at line break,
2023-11-01), which closed the tag at each line break so that every
annotation had a tag to nest in.

A structure element could reference one annotation only, the
LinkAnnotation attribute being a value in a std::map; give it a vector
and emit an OBJR kid and a parent tree entry per annotation, so each
StructParent resolves to that tag. A page or column break still ends
the tag.

Language, baseline shift and decoration now come from the link's first
portion, at a line break as much as within a line - splitting the tag
at a break would only make the result depend on where the line ends.
LATER: subdivide the Link by Spans, which covers both.

testTdf157816Link and testTdf142806 expected a tag per annotation.

Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Change-Id: I493439a33b2cbc0eecf1af6b300859cd78ee87ba
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/11541
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit ade287e6a4edf7476e667f48082261deeddd96d5)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211077
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-09-18 08:45:00 +02:00
Andrea Gelmini f6a817c77c Fix typos
Change-Id: Ifeab1ab3a2635370b645c0c8aa379d6b9d0f8e63
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211076
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-09-17 21:46:55 +02:00
Mike Kaganski 71a7e22201 tdf#173162 vcl: put dropped types in the PDF 1.7 namespace
Exporting a document with a table of contents to PDF/UA-2 produced a
file that fails ISO 14289-2 clause 8.2.4, once for the TOC element
and once for each entry in it. veraPDF reports

 Non-standard structure type http://iso.org/pdf2/ssn:/TOC is not
 mapped to a standard type
 Non-standard structure type http://iso.org/pdf2/ssn:/TOCI is not
 mapped to a standard type

Commit d23c5560c1 (tdf#160196 add
support for PDF/UA-2 and NS for struct. elem., 2025-01-22) declared
one namespace, PDF 2.0, and pointed every element at it. ISO 32000-2
14.8.6 leaves TOC and TOCI out of that namespace, and also Art,
BlockQuote, Index, Quote, Note, Reference, BibEntry and Code. Writer
emits all but Art and Reference, so one footnote is enough to reach
this.

The bug asks for L and LI with Lbl and LBody instead, or for a
RoleMapNS entry to a standard type. Role mapping is the smaller of
the two and does clear 8.2.4 for the TOC, but the element is then
validated as an L, so veraPDF reports ISO 32005 Table 5 per entry

 <LI> contains <P>

Neither remedy reaches Note, Index, Quote, Code or BibEntry.

ISO 14289-2 8.2.4 offers a third way out: it accepts the PDF 1.7
namespace alongside the 2.0 one, and TOC and TOCI are standard types
there, so nothing needs remapping and the tree keeps its shape.
Declare both namespaces, list both on the structure tree root, and
point all ten types at the 1.7 one. The root's RoleMap is the
fallback for elements there, so RoleMapNS stays on the 2.0 namespace.
Every PDF 2.0 export now declares both, PDF/A-4 included.

Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Change-Id: Ibdf0f27afe2c7b5b5801dbe1b813afb6de95bb0f
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/12200
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit 92a2bfff6f47e055dd49d767a5013cbfcdafcf11)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211067
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-09-17 13:52:15 +02:00
Mike Kaganski fd583f101a tdf#166963 vcl: reparent the children whose kids a split moves
A document with a table of more than 8191 rows, exported to tagged
PDF, failed PAC with 1393 of

 Structure element refers to a different parent than the actual parent

The kid list is split into generated Div containers. But m_aChildren
and m_aKids aren't parallel: a non-structure element gets a child
entry and no kid, and marked content adds a kid with no child.
Advancing both by the same count moved the wrong children. Cut the
child list where the moved kids end instead.

addInternalStructureContainer also held a reference into m_aStructure
across an emplace_back on it, so a split that reallocated left it
dangling. It takes an index now.

The test needs a document past that threshold. It takes about two
minutes locally, most of it in the PDF parser it reads the result back
with. Disable the test if that costs CI too much.

Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Change-Id: I37cb4f3e187b8a836b26e7c3da802bd12147904e
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/12187
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 901e5afec874f0b16959038425365198dfbac7e7)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211066
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-09-17 13:51:51 +02:00
Mike Kaganski dfdee8ff8a tdf#173194 sw: export a derived Table Heading as TH
A table cell whose first paragraph uses a style inherited from Table
Heading was tagged TD, so a screen reader announces it as data rather
than as a header; only the built-in style itself became TH.

lcl_IsHeadlineCell compared the paragraph's own style name and stopped
there. Walk the DerivedFrom() chain, the way the HTML table writer
already does.

Scope stays Column on every TH, so a row header still claims its
column; that is a defect of its own.

Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Change-Id: I9ccbd1b3837d3edc5087162a143560e8412a846d
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/12168
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit 270d087cad2c8327775ce204371830c34eecc0d7)
(cherry picked from commit d86b837d439355e62afcdd6b771603c260bc5949)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211049
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-09-17 11:26:54 +02:00
Mike Kaganski 7c2c72d189 tdf#167121 sw: tag the link an index mark covers
A hyperlink whose text an alphabetical index entry covers exported a
link annotation with no tag around it, so PDF/UA checkers reject the
file:

 Link annotation is not nested inside a Link structure element

that is ISO 14289-1 7.18.5. The same happens under a reference mark or
an RDF metadata field.

Each of the three lays its run out as its own portion type, a
SwTextPortion whose only addition is a shading that never reaches an
export. BeginInlineStructureElements listed Text, Lay and Para, so the
run matched no case and got no element at all - not even the Span
carrying its language.

Handle the three with the other text portions.

Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Change-Id: Ie38193f64923cd6a0a3afa509691fb29a007f272
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/12104
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit 409e0cc615e191a0392ee080717bb84eb61e4724)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211027
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-09-16 15:56:48 +02:00
Xisco Fauli 60771de67f CppunitTest_vcl_pdfexport2: split in two
It already has 120 tests

Change-Id: Ib70821f7039273b2b5311c259d6e8a65f273cf96
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210995
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-09-16 08:56:58 +02:00
Noel Grandin 40062dd0b8 cool#16122 export to pdf produces bad PANTONE element
The name element in a PDF file needs escaping if it contains spaces, like the PANTONE element does.

Re-use the escaping logic in COSWriter, and while we are here, convert
the COSWriter function from 'const char*' to std::string_view.

Change-Id: I4f6fdb049e746688c393371e2fea30bbaf6da314
Signed-off-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/10095
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
(cherry picked from commit 765ae13aa2e7a954a1629314726207f551d83ff8)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210955
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-09-14 20:21:00 +02:00
Andrea Gelmini 57995205c5 Removed duplicated include
Change-Id: I9a64cb8ec93b5165c8ba80d71b0b46eb852ac321
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210950
Reviewed-by: Andrea Gelmini <andrea.gelmini@gelma.net>
Tested-by: Jenkins
2026-09-14 17:39:31 +02:00
Samuel Mehrbrodt 64b5464df4 cool#15668 sw: keep adjacent caption links clickable in a pdf
Exporting several cross-reference links placed right next to each
other, separated only by punctuation, kept only the last one
clickable. The export checks every link rectangle for the text it
covers, by hit-testing the middle of the rectangle. For a link only
one digit wide that point falls exactly where the hit test advances
to the next character, which belongs to the neighbouring link, so
the rectangle was dropped.

Ask which character contains that point, so a one-glyph link is
matched against its own position.

Signed-off-by: Samuel Mehrbrodt <samuel.mehrbrodt@collabora.com>
Change-Id: I722aa2c83af50e99b8c06e051ff0bff9b0f76e0a
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/10251
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 1284d1a3e3b93f02bd31068c9898743fa65e6e64)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210922
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-09-14 14:29:22 +02:00
Samuel Mehrbrodt 9fc9e5bc9e tdf#173381 PDF export: Make sure that link contents are always set
Use name, link text or the link itself - depending on what is available.

Change-Id: Iea6654e2aae22d39c031b2cb953c34a5a1ce42ba
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210458
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@collabora.com>
2026-09-07 08:07:57 +02:00
Xisco Fauli eb0c65a1a1 UnoApiTest: pass PDFium to parsePDFExport as parameter
so we can check if it's not a nullptr at test level

Change-Id: Icfe580b27f3ad4a28b328f0fac8cf93e05c50b54
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210484
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-09-04 15:32:19 +02:00
Miklos Vajna 4eb008acce pdfium: update to 7988
- fix build against our bundled ICU
- update external/pdfium/extractpatterns.patch to work after the
  upstream commit fc790866bf26d977b2ea3a0c3938bb52895309ea (Consolidate
  CFX_RenderDevice and remove CPDF_WindowsRenderDevice, 2026-06-29), which
  folded CFX_DefaultRenderDevice into CFX_RenderDevice.
- update CppunitTest_vcl_pdfexport2: mostly likely needed after the
  upstream commit 2f7a54a926a1b8e51aff9ac2aca5cccb29920aae (Partially
  fix RTL character and line reading order in CPDF_TextPage, 2026-07-24)
- CppunitTest_vcl_pdfexport: same

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I25612e6696a24588b9bf045e666047e6c2955d7c
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/8557
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
(cherry picked from commit a7149002917e82ef07250d2e964537118294993a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210417
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-09-03 15:51:52 +02:00
Andrea Gelmini 0974df2160 Fix typos
Change-Id: Icd5b8ad9f175c85ac1d8df644679fab945c0de0e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210373
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-09-02 15:33:22 +02:00
Manish Bera 6f61236fd9 Add drop cap paint tests
Change-Id: Ifc1647aa684a89558646cfb536a046ff9b37131b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209132
Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
Tested-by: Jenkins
2026-08-21 14:35:27 +02:00
Michael Stahl a3623692c3 vcl: fix PDFEncryptorR6 padding
RFC 8018 / PKCS #5 as referenced in ISO-32000-2:2020 "7.6.3.1 General"
always adds padding.

Signed-off-by: Michael Stahl <michael.stahl@collabora.com>
Change-Id: I2bd783a19a9aaf8276dc4e81cfa26239e1c11a0d
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/8626
Reviewed-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
(cherry picked from commit d998d34f568fabd2de918b761f30a1277942aeb4)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209278
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-08-19 11:31:20 +02:00
Michael Stahl 01de4c0213 vcl: PDFEncryptorR6: fix subtle off-by-one in computeHashR6
The end condition `E.back() > (nRound - 32)` is using the wrong value of
`nRound` and so the loop can end too early.

This has caused a few CI builds to fail after pushing the padding fix,
as the input to `computeHashR6` includes a random IV it happened rarely.

Fix it by counting the iterations of the loop that have been done.

Signed-off-by: Michael Stahl <michael.stahl@collabora.com>
Change-Id: I8bbdc85439789db3753942b1292ba48d39b76541
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/8625
Reviewed-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
(cherry picked from commit 082e5a49669e2d9058c2b3675c829a495b2044f3)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209277
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-08-19 00:20:39 +02:00
Christian Lohmaier 507604d8f7 pdfexport2.cxx: fix type mismatch on 32bit Windows vs 64bit size_t
vcl/qa/cppunit/pdfexport/pdfexport2.cxx(5438): error C2672: 'CppUnit::assertEquals': no matching overloaded function found
workdir/UnpackedTarball/cppunit/include\cppunit/TestAssert.h(161): note: could be 'void CppUnit::assertEquals(const T &,const T &,CppUnit::SourceLine,const std::string &)'
vcl/qa/cppunit/pdfexport/pdfexport2.cxx(5438): note: 'void CppUnit::assertEquals(const T &,const T &,CppUnit::SourceLine,const std::string &)': template parameter 'T' is ambiguous
vcl/qa/cppunit/pdfexport/pdfexport2.cxx(5438): note: could be 'sal_uInt64'
vcl/qa/cppunit/pdfexport/pdfexport2.cxx(5438): note: or       'size_t'
vcl/qa/cppunit/pdfexport/pdfexport2.cxx(5438): note: 'void CppUnit::assertEquals(const T &,const T &,CppUnit::SourceLine,const std::string &)': could not deduce template argument for 'const T &' from 'sal_uInt64'

the aCIDSet.GetSize is a sal_uInt64, but size_t is only 32bit on Windows x86

Change-Id: I9d1f6a99f8badbf1c191abf7ebe3235a6b24917c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209079
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Tested-by: Jenkins
2026-08-11 17:09:20 +02:00
Khaled Hosny 9061517ef3 vcl: Drop the now unused CFF charset parser
Change-Id: Idd4e33fa413b9a00391b9c1f57c29404bfa6a0aa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208914
Tested-by: Jenkins
Reviewed-by: Khaled Hosny <khaled@libreoffice.org>
2026-08-01 15:04:18 +02:00
Khaled Hosny be4a7b0793 tdf#171869: Embed fonts with glyf outlines as composite fonts too
Their subsets were embedded as simple TrueType fonts. Simple TrueType
fonts select glyphs through the cmap table of the subset font, and we
had to give the subset font a fake cmap table that mapped codes to glyph
ID sequentially. This was a gross hack.

Embedding them as CIDFontType2 instead lets the CMap and the CIDToGIDMap
do the mapping, as they now already for fonts with a CFF table. The cmap
table is not needed as all now.

PDFium grows the top of the glyph bounding box by a 64th for composite
fonts but not for simple ones, which makes many tests to now fail. We
now patch that out to keep both kinds of embedding measuring glyphs the
same.

Change-Id: I4d136b0e5d2c63afd56e25a81aec16364e570cca
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208839
Reviewed-by: Khaled Hosny <khaled@libreoffice.org>
Tested-by: Jenkins
2026-07-31 07:07:11 +02:00
Khaled Hosny f889fe0a21 tdf#171869: Write a CIDSet for composite font subsets in PDF/A-1
PDF/A-1 requires the font descriptor of a subsetted CIDFont to have a
CIDSet listing the CIDs of its font program, and fonts with a CFF table
are now embedded as CIDFont subsets.

PDF/A-2 and PDF/A-3 do not require one, and PDF 2.0 deprecates it.

Change-Id: I34fc883ec5b10b404b48b3b9a5dd816fabb28940
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208835
Reviewed-by: Khaled Hosny <khaled@libreoffice.org>
Tested-by: Jenkins
2026-07-31 07:07:02 +02:00
Khaled Hosny be1a60ef33 tdf#171869: Embed CFF fonts in PDF without converting to Type 1
Instead of converting CFF table to a Type 1 font and embedding that, we
now embed the CFF table directly without modification.

This allows us to get rid of the CFF parsing code with its security
issues.

The CFF table is embedded as FontFile3 (/Subtype/CIDFontType0C) stream
of a CIDFontType0.

This is a rework of previous attempt in:

    commit d9a6a3f7f0
    Author: Khaled Hosny <khaled@aliftype.com>
    Date:   Sun Apr 12 18:46:43 2026 +0200

        vcl: embed fonts with CFF table as OpenType fonts

That tried to embed them as full OpenType fonts, which was broken for
CID-keyed fonts and got reverted in:

commit 4c3c87e79d
Author: Khaled Hosny <khaled@aliftype.com>
Date:   Thu Apr 30 02:56:06 2026 +0300

    tdf#171869 vcl: restore Type1 PFB conversion for CFF fonts

Next version of harfbuzz-subset library will have an option to write an
identity charset (GID == CID) for CID-keyed fonts, so embedded as CFF
table will now work equally for both name-keyed and CID-keyed fonts.

As in interim solution (until we can require that version of HarfBuzz),
we now have a small module that parses only the CFF charset to get CID
mapping.

Change-Id: I57b0f722174613b91373c972e0c8eba3efeea5f4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208804
Tested-by: Jenkins
Reviewed-by: Khaled Hosny <khaled@libreoffice.org>
2026-07-31 07:06:52 +02:00
Caolán McNamara 778fd158b5 crashtesting: tag a nested table in a repeated header row only once
reproduce by exporting to tagged PDF/UA a document where an outer table
spans more than one page and its repeated header row carries a nested
table.

 #4  SwTaggedPDFHelper::BeginTag (...) at engine/sw/source/core/text/EnhancedPDFExportHelper.cxx:627
 #5  SwTaggedPDFHelper::BeginBlockStructureElements (...) at engine/sw/source/core/text/EnhancedPDFExportHelper.cxx:1827
 #6  SwTaggedPDFHelper::SwTaggedPDFHelper (...) at engine/sw/source/core/text/EnhancedPDFExportHelper.cxx:460
 #7  SwLayoutFrame::PaintSwFrame (...) at engine/sw/source/core/layout/paintfrm.cxx:3659
 #8  SwTabFrame::PaintSwFrame (...) at engine/sw/source/core/layout/paintfrm.cxx:4649

the header row is laid out again on each page, so the nested table gets
a master frame per page. the follow-headline check only looked at the
innermost enclosing table, so a nested table inside an outer table's
headline was not recognised as a repeat and was tagged once per page.

tagging the same frame a second time aborts on the assert that each
frame is tagged only once, so walk every enclosing table and treat the
frame as an artifact when any of them is a repeated follow headline.

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I173c229fc46b8fbf7575c6a19293f54431dbe0e9
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/5967
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
(cherry picked from commit 9c31ded970a549fac846ad4f45349c70fde114d4)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208731
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-07-28 14:36:56 +02:00
Khaled Hosny 0162dbc58c tdf#171737: Improve PDF text extraction a bit
If we decide /AxtualText tags are needed, then the ToUnicode map for the
given glyph is broken and there is no point in keeping it.

Previously we kept it for tools that don’t support /ActualText, but this
seem to actually make things worse for tools that support it. Tools that
don’t support /ActualText are broken and can’t be helped anyway, so we
now drop the ToUnicode mapping in this case.

Change-Id: Ie223dbb24c307398c70099ca2e58c56ec791ae8c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208547
Tested-by: Jenkins
Reviewed-by: Khaled Hosny <khaled@libreoffice.org>
2026-07-24 23:44:34 +02:00
Khaled Hosny 9d6fe8f519 vcl: make GenerateVariableFontPSName() consistent across platforms
Sort axes by fvar order, so the order in the variations list does not
matter. Also filter-out default axis values in
WinFontFace::GetVariations(), so that default instance returns no
variations like other platforms.

This makes text expectations for 3 tests match on Windows now.

Change-Id: I1dcd01a4620376ea6e27e573212f3d6347d454c6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208465
Reviewed-by: Khaled Hosny <khaled@libreoffice.org>
Tested-by: Jenkins
2026-07-23 09:29:42 +02:00
Khaled Hosny a89d18c5d0 vcl: Enable testTdf155161 on Windows
It was disabled on Windows from the start, but it passes now thanks to
the recent fixes to Windows font code.

Change-Id: Id6a824955ef70c42d83f4175105eb313d51aa70c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208470
Tested-by: Jenkins
Reviewed-by: Khaled Hosny <khaled@libreoffice.org>
2026-07-22 18:53:17 +02:00
Xisco Fauli bab072a4a1 Revert "vcl: Read font data with DirectWrite on Windows"
This reverts commit c223e23aaa.

This also reverts:

Revert "CppunitTest_sw_globalfilter: fix test on Windows"

This reverts commit ac64d1a9eb.

Revert "CppunitTest_sc_pdf_export: fix test on Windows"

This reverts commit 380c2e88a3.

Revert "CppunitTest_vcl_pdfexport: disable test on Windows"

This reverts commit bc1a3afa6e.

Revert "CppunitTest_vcl_pdfexport2: disable test on Windows"

This reverts commit a9b98f039c.

Revert "CppunitTest_sw_core_text: disable test on Windows"

This reverts commit 63584e7f9f.

Some tests in vcl/qa/cppunit/pdfexport/pdfexport.cxx
needed to be adapted

Change-Id: Ib7d8a0e7debdc4bb2241f8e73004fb10810e2db1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208235
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-07-19 02:06:35 +02:00
Xisco Fauli a9b98f039c CppunitTest_vcl_pdfexport2: disable test on Windows
gerrit_windows_wsl was configure to build with 'make build'
so this failure wasn't caught in time.
Now gerrit_windows_wsl builds with 'make build unitcheck slowcheck'
and it fails with
[_RUN_____] `anonymous namespace'::testTdf144222::TestBody
warn:vcl:5064:1724:vcl/win/window/salframe.cxx:1046: WinSalFrame::SetIcon(): Could not load large icon !
warn:vcl:5064:1724:vcl/win/window/salframe.cxx:1047: WinSalFrame::SetIcon(): Could not load small icon !
*** Exception 0xc0000005 occurred ***

	at _NLG_Return2, address 0x7FFE9FAD0357 in C:\WINDOWS\SYSTEM32\VCRUNTIME140D.dll
	at hb_memcpy in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\harfbuzz\src\hb-algs.hh: line: 1137:
	at hb_array_t<char const >::copy<hb_serialize_context_t,char const ,0> in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\harfbuzz\src\hb-array.hh: line: 346:
	at OT::glyf_impl::SubsetGlyph::serialize in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\harfbuzz\src\OT\glyf\SubsetGlyph.hh: line: 30:
	at OT::glyf::serialize<hb_array_t<OT::glyf_impl::SubsetGlyph const > > in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\harfbuzz\src\OT\glyf\glyf.hh: line: 58:
	at OT::glyf::subset in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\harfbuzz\src\OT\glyf\glyf.hh: line: 130:
	at _hb_subset_table_try<OT::glyf> in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\harfbuzz\src\hb-subset-table.hh: line: 46:
	at _hb_subset_table<OT::glyf const > in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\harfbuzz\src\hb-subset-table.hh: line: 168:
	at _hb_subset_table_other in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\harfbuzz\src\hb-subset-table-other.cc: line: 17:
	at _subset_table in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\harfbuzz\src\hb-subset.cc: line: 270:
	at hb_subset_plan_execute_or_fail in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\harfbuzz\src\hb-subset.cc: line: 433:
	at hb_subset_or_fail in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\harfbuzz\src\hb-subset.cc: line: 359:
	at vcl::font::PhysicalFontFace::CreateFontSubset in E:\jenkins\workspace\gerrit_windows_wsl\vcl\source\font\PhysicalFontFace.cxx: line: 573:
	at vcl::PDFWriterImpl::emitFonts in E:\jenkins\workspace\gerrit_windows_wsl\vcl\source\pdf\pdfwriter_impl.cxx: line: 2093:
	at vcl::PDFWriterImpl::emitResources in E:\jenkins\workspace\gerrit_windows_wsl\vcl\source\pdf\pdfwriter_impl.cxx: line: 2300:
	at vcl::PDFWriterImpl::emitCatalog in E:\jenkins\workspace\gerrit_windows_wsl\vcl\source\pdf\pdfwriter_impl.cxx: line: 4254:
	at vcl::PDFWriterImpl::emit in E:\jenkins\workspace\gerrit_windows_wsl\vcl\source\pdf\pdfwriter_impl.cxx: line: 5392:
	at vcl::pdf::PDFWriter::Emit in E:\jenkins\workspace\gerrit_windows_wsl\vcl\source\pdf\pdfwriter.cxx: line: 55:
	at PDFExport::Export in E:\jenkins\workspace\gerrit_windows_wsl\filter\source\pdf\pdfexport.cxx: line: 1198:
	at PDFFilter::implExport in E:\jenkins\workspace\gerrit_windows_wsl\filter\source\pdf\pdffilter.cxx: line: 183:
	at PDFFilter::filter in E:\jenkins\workspace\gerrit_windows_wsl\filter\source\pdf\pdffilter.cxx: line: 248:
	at SfxObjectShell::ExportTo in E:\jenkins\workspace\gerrit_windows_wsl\sfx2\source\doc\objstor.cxx: line: 2746:
	at SfxObjectShell::SaveTo_Impl in E:\jenkins\workspace\gerrit_windows_wsl\sfx2\source\doc\objstor.cxx: line: 1861:
	at SfxObjectShell::PreDoSaveAs_Impl in E:\jenkins\workspace\gerrit_windows_wsl\sfx2\source\doc\objstor.cxx: line: 3266:
	at SfxObjectShell::CommonSaveAs_Impl in E:\jenkins\workspace\gerrit_windows_wsl\sfx2\source\doc\objstor.cxx: line: 3054:
	at SfxObjectShell::APISaveAs_Impl in E:\jenkins\workspace\gerrit_windows_wsl\sfx2\source\doc\objserv.cxx: line: 330:
	at SfxBaseModel::impl_store in E:\jenkins\workspace\gerrit_windows_wsl\sfx2\source\doc\sfxbasemodel.cxx: line: 3247:
	at SfxBaseModel::storeToURL in E:\jenkins\workspace\gerrit_windows_wsl\sfx2\source\doc\sfxbasemodel.cxx: line: 1830:
	at UnoApiTest::save in E:\jenkins\workspace\gerrit_windows_wsl\test\source\unoapi_test.cxx: line: 376:
	at `anonymous namespace'::testTdf144222::TestBody in E:\jenkins\workspace\gerrit_windows_wsl\vcl\qa\cppunit\pdfexport\pdfexport2.cxx: line: 4584:
	at std::invoke<void (__cdecl `anonymous namespace'::testTdf144222::*&)(void),A0xfeb83449::testTdf144222 * &> in C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\type_traits: line: 1686:
	at std::_Invoker_ret<std::_Unforced>::_Call<void (__cdecl `anonymous namespace'::testTdf144222::*&)(void),A0xfeb83449::testTdf144222 * &> in C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\functional: line: 2117:
	at std::_Call_binder<std::_Unforced,0,void (__cdecl `anonymous namespace'::testTdf144222::*)(void),std::tuple<`anonymous namespace'::testTdf144222 *>,std::tuple<> > in C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\functional: line: 2127:
	at std::_Binder<std::_Unforced,void (__cdecl `anonymous namespace'::testTdf144222::*&)(void),A0xfeb83449::testTdf144222 * &>::operator()<> in C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\functional: line: 2181:
	at std::invoke<std::_Binder<std::_Unforced,void (__cdecl `anonymous namespace'::testTdf144222::*&)(void),A0xfeb83449::testTdf144222 * &> &> in C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\type_traits: line: 1670:
	at std::_Func_impl_no_alloc<std::_Binder<std::_Unforced,void (__cdecl `anonymous namespace'::testTdf144222::*&)(void),A0xfeb83449::testTdf144222 * &>,void>::_Do_call in C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\functional: line: 880:
	at std::_Func_class<void>::operator() in C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\functional: line: 926:
	at CppUnit::TestCaller<`anonymous namespace'::testTdf144222>::runTest in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\cppunit\include\cppunit\TestCaller.h: line: 175:
	at CppUnit::TestCaseMethodFunctor::operator() in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\cppunit\src\cppunit\TestCase.cpp: line: 33:
	at `anonymous namespace'::Protector::protect in E:\jenkins\workspace\gerrit_windows_wsl\test\source\vclbootstrapprotector.cxx: line: 37:
	at CppUnit::ProtectorChain::ProtectFunctor::operator() in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\cppunit\src\cppunit\ProtectorChain.cpp: line: 21:
	at `anonymous namespace'::Prot::protect in E:\jenkins\workspace\gerrit_windows_wsl\unotest\source\cpp\unobootstrapprotector\unobootstrapprotector.cxx: line: 79:
	at CppUnit::ProtectorChain::ProtectFunctor::operator() in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\cppunit\src\cppunit\ProtectorChain.cpp: line: 21:
	at `anonymous namespace'::Prot::protect in E:\jenkins\workspace\gerrit_windows_wsl\unotest\source\cpp\unoexceptionprotector\unoexceptionprotector.cxx: line: 181:
	at CppUnit::ProtectorChain::ProtectFunctor::operator() in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\cppunit\src\cppunit\ProtectorChain.cpp: line: 21:
	at CppUnit::DefaultProtector::protect in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\cppunit\src\cppunit\DefaultProtector.cpp: line: 15:
	at CppUnit::ProtectorChain::ProtectFunctor::operator() in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\cppunit\src\cppunit\ProtectorChain.cpp: line: 21:
	at CppUnit::ProtectorChain::protect in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\cppunit\src\cppunit\ProtectorChain.cpp: line: 86:
	at CppUnit::TestResult::protect in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\cppunit\src\cppunit\TestResult.cpp: line: 184:
	at CppUnit::TestCase::run in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\cppunit\src\cppunit\TestCase.cpp: line: 91:
	at CppUnit::TestComposite::doRunChildTests in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\cppunit\src\cppunit\TestComposite.cpp: line: 64:
	at CppUnit::TestComposite::run in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\cppunit\src\cppunit\TestComposite.cpp: line: 24:
	at CppUnit::TestComposite::doRunChildTests in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\cppunit\src\cppunit\TestComposite.cpp: line: 64:
	at CppUnit::TestComposite::run in E:\jwarn:svl.items:5064:1724:svl/source/items/style.cxx:55: SfxStyleSheetBase left 23; SfxStyleSheetBasePool left 1
warn:unotools.config:5064:1724:unotools/source/config/configmgr.cxx:147: ConfigManager not empty
enkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\cppunit\src\cppunit\TestComposite.cpp: line: 24:
	at CppUnit::TestRunner::WrappingSuite::run in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\cppunit\src\cppunit\TestRunner.cpp: line: 47:
	at CppUnit::TestResult::runTest in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\cppunit\src\cppunit\TestResult.cpp: line: 152:
	at CppUnit::TestRunner::run in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\cppunit\src\cppunit\TestRunner.cpp: line: 96:
	at `anonymous namespace'::ProtectedFixtureFunctor::run in E:\jenkins\workspace\gerrit_windows_wsl\sal\cppunittester\cppunittester.cxx: line: 328:
	at main2 in E:\jenkins\workspace\gerrit_windows_wsl\sal\cppunittester\cppunittester.cxx: line: 482:
	at sal_main in E:\jenkins\workspace\gerrit_windows_wsl\sal\cppunittester\cppunittester.cxx: line: 612:
	at main in E:\jenkins\workspace\gerrit_windows_wsl\sal\cppunittester\cppunittester.cxx: line: 602:
	at invoke_main in D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl: line: 79:
	at __scrt_common_main_seh in D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl: line: 288:
	at __scrt_common_main in D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl: line: 331:
	at mainCRTStartup in D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_main.cpp: line: 17:
	at BaseThreadInitThunk, address 0x7FFEB411E8D7 in C:\WINDOWS\System32\KERNEL32.DLL
	at RtlUserThreadStart, address 0x7FFEB5ACC53C in C:\WINDOWS\SYSTEM32\ntdll.dll

Change-Id: I5452bb65f62e632b7d4d473849830c1d0d45b6c4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208202
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-07-17 12:50:42 +02:00
Xisco Fauli bc1a3afa6e CppunitTest_vcl_pdfexport: disable test on Windows
gerrit_windows_wsl was configure to build with 'make build'
so this failure wasn't caught in time.
Now gerrit_windows_wsl builds with 'make build unitcheck slowcheck'
and it fails with
[_RUN_____] `anonymous namespace'::testTdf106702::TestBody
warn:sfx.doc:13248:244:sfx2/source/doc/doctemplates.cxx:480: init_Impl(): Could not create root
warn:vcl:13248:244:vcl/win/window/salframe.cxx:1046: WinSalFrame::SetIcon(): Could not load large icon !
warn:vcl:13248:244:vcl/win/window/salframe.cxx:1047: WinSalFrame::SetIcon(): Could not load small icon !
*** Exception 0xc0000005 occurred ***

	at _NLG_Return2, address 0x7FFE7D410357 in C:\WINDOWS\SYSTEM32\VCRUNTIME140D.dll
	at hb_memcpy in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\harfbuzz\src\hb-algs.hh: line: 1137:
	at hb_array_t<char const >::copy<hb_serialize_context_t,char const ,0> in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\harfbuzz\src\hb-array.hh: line: 346:
	at OT::glyf_impl::SubsetGlyph::serialize in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\harfbuzz\src\OT\glyf\SubsetGlyph.hh: line: 30:
	at OT::glyf::serialize<hb_array_t<OT::glyf_impl::SubsetGlyph const > > in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\harfbuzz\src\OT\glyf\glyf.hh: line: 58:
	at OT::glyf::subset in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\harfbuzz\src\OT\glyf\glyf.hh: line: 130:
	at _hb_subset_table_try<OT::glyf> in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\harfbuzz\src\hb-subset-table.hh: line: 46:
	at _hb_subset_table<OT::glyf const > in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\harfbuzz\src\hb-subset-table.hh: line: 168:
	at _hb_subset_table_other in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\harfbuzz\src\hb-subset-table-other.cc: line: 17:
	at _subset_table in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\harfbuzz\src\hb-subset.cc: line: 270:
	at hb_subset_plan_execute_or_fail in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\harfbuzz\src\hb-subset.cc: line: 433:
	at hb_subset_or_fail in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\harfbuzz\src\hb-subset.cc: line: 359:
	at vcl::font::PhysicalFontFace::CreateFontSubset in E:\jenkins\workspace\gerrit_windows_wsl\vcl\source\font\PhysicalFontFace.cxx: line: 573:
	at vcl::PDFWriterImpl::emitFonts in E:\jenkins\workspace\gerrit_windows_wsl\vcl\source\pdf\pdfwriter_impl.cxx: line: 2093:
	at vcl::PDFWriterImpl::emitResources in E:\jenkins\workspace\gerrit_windows_wsl\vcl\source\pdf\pdfwriter_impl.cxx: line: 2300:
	at vcl::PDFWriterImpl::emitCatalog in E:\jenkins\workspace\gerrit_windows_wsl\vcl\source\pdf\pdfwriter_impl.cxx: line: 4254:
	at vcl::PDFWriterImpl::emit in E:\jenkins\workspace\gerrit_windows_wsl\vcl\source\pdf\pdfwriter_impl.cxx: line: 5392:
	at vcl::pdf::PDFWriter::Emit in E:\jenkins\workspace\gerrit_windows_wsl\vcl\source\pdf\pdfwriter.cxx: line: 55:
	at PDFExport::Export in E:\jenkins\workspace\gerrit_windows_wsl\filter\source\pdf\pdfexport.cxx: line: 1198:
	at PDFFilter::implExport in E:\jenkins\workspace\gerrit_windows_wsl\filter\source\pdf\pdffilter.cxx: line: 183:
	at PDFFilter::filter in E:\jenkins\workspace\gerrit_windows_wsl\filter\source\pdf\pdffilter.cxx: line: 248:
	at SfxObjectShell::ExportTo in E:\jenkins\workspace\gerrit_windows_wsl\sfx2\source\doc\objstor.cxx: line: 2746:
	at SfxObjectShell::SaveTo_Impl in E:\jenkins\workspace\gerrit_windows_wsl\sfx2\source\doc\objstor.cxx: line: 1861:
	at SfxObjectShell::PreDoSaveAs_Impl in E:\jenkins\workspace\gerrit_windows_wsl\sfx2\source\doc\objstor.cxx: line: 3266:
	at SfxObjectShell::CommonSaveAs_Impl in E:\jenkins\workspace\gerrit_windows_wsl\sfx2\source\doc\objstor.cxx: line: 3054:
	at SfxObjectShell::APISaveAs_Impl in E:\jenkins\workspace\gerrit_windows_wsl\sfx2\source\doc\objserv.cxx: line: 330:
	at SfxBaseModel::impl_store in E:\jenkins\workspace\gerrit_windows_wsl\sfx2\source\doc\sfxbasemodel.cxx: line: 3247:
	at SfxBaseModel::storeToURL in E:\jenkins\workspace\gerrit_windows_wsl\sfx2\source\doc\sfxbasemodel.cxx: line: 1830:
	at UnoApiTest::save in E:\jenkins\workspace\gerrit_windows_wsl\test\source\unoapi_test.cxx: line: 376:
	at `anonymous namespace'::testTdf106702::TestBody in E:\jenkins\workspace\gerrit_windows_wsl\vcl\qa\cppunit\pdfexport\pdfexport.cxx: line: 2284:
	at std::invoke<void (__cdecl `anonymous namespace'::testTdf106702::*&)(void),A0xeeec7064::testTdf106702 * &> in C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\type_traits: line: 1686:
	at std::_Invoker_ret<std::_Unforced>::_Call<void (__cdecl `anonymous namespace'::testTdf106702::*&)(void),A0xeeec7064::testTdf106702 * &> in C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\functional: line: 2117:
	at std::_Call_binder<std::_Unforced,0,void (__cdecl `anonymous namespace'::testTdf106702::*)(void),std::tuple<`anonymous namespace'::testTdf106702 *>,std::tuple<> > in C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\functional: line: 2127:
	at std::_Binder<std::_Unforced,void (__cdecl `anonymous namespace'::testTdf106702::*&)(void),A0xeeec7064::testTdf106702 * &>::operator()<> in C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\functional: line: 2181:
	at std::invoke<std::_Binder<std::_Unforced,void (__cdecl `anonymous namespace'::testTdf106702::*&)(void),A0xeeec7064::testTdf106702 * &> &> in C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\type_traits: line: 1670:
	at std::_Func_impl_no_alloc<std::_Binder<std::_Unforced,void (__cdecl `anonymous namespace'::testTdf106702::*&)(void),A0xeeec7064::testTdf106702 * &>,void>::_Do_call in C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\functional: line: 880:
	at std::_Func_class<void>::operator() in C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\functional: line: 926:
	at CppUnit::TestCaller<`anonymous namespace'::testTdf106702>::runTest in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\cppunit\include\cppunit\TestCaller.h: line: 175:
	at CppUnit::TestCaseMethodFunctor::operator() in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\cppunit\src\cppunit\TestCase.cpp: line: 33:
	at `anonymous namespace'::Protector::protect in E:\jenkins\workspace\gerrit_windows_wsl\test\source\vclbootstrapprotector.cxx: line: 37:
	at CppUnit::ProtectorChain::ProtectFunctor::operator() in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\cppunit\src\cppunit\ProtectorChain.cpp: line: 21:
	at `anonymous namespace'::Prot::protect in E:\jenkins\workspace\gerrit_windows_wsl\unotest\source\cpp\unobootstrapprotector\unobootstrapprotector.cxx: line: 79:
	at CppUnit::ProtectorChain::ProtectFunctor::operator() in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\cppunit\src\cppunit\ProtectorChain.cpp: line: 21:
	at `anonymous namespace'::Prot::protect in E:\jenkins\workspace\gerrit_windows_wsl\unotest\source\cpp\unoexceptionprotector\unoexceptionprotector.cxx: line: 181:
	at CppUnit::ProtectorChain::ProtectFunctor::operator() in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\cppunit\src\cppunit\ProtectorChain.cpp: line: 21:
	at CppUnit::DefaultProtector::protect in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\cppunit\src\cppunit\DefaultProtector.cpp: line: 15:
	at CppUnit::ProtectorChain::ProtectFunctor::operator() in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\cppunit\src\cppunit\ProtectorChain.cpp: line: 21:
	at CppUnit::ProtectorChain::protect in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\cppunit\src\cppunit\ProtectorChain.cpp: line: 86:
	at CppUnit::TestResult::protect in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\cppunit\src\cppunit\TestResult.cpp: line: 184:
	at CppUnit::TestCase::run in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\cppunit\src\cppunit\TestCase.cpp: line: 91:
	at CppUnit::TestComposite::doRunChildTests in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\cppunit\src\cppunit\TestComposite.cpp: line: 64:
	at CppUnit::TestComposite::run in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\cppunit\src\cppunit\TestComposite.cpp: line: 24:
	at CppUnit::TestComposite::doRunChildTests in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\cppunit\src\cppunit\TestComposite.cpp: line: 64:
	at CppUnit::TestComposite::run in E:\jewarn:legacy.osl:13248:244:sw/source/core/layout/newfrm.cxx:315: Who didn't deregister?
warn:legacy.osl:13248:244:sw/source/core/layout/newfrm.cxx:315: Who didn't deregister?
warn:legacy.osl:13248:244:sw/source/core/layout/newfrm.cxx:315: Who didn't deregister?
warn:legacy.osl:13248:244:sw/source/core/layout/newfrm.cxx:315: Who didn't deregister?
warn:legacy.osl:13248:244:sw/source/core/layout/newfrm.cxx:315: Who didn't deregister?
warn:legacy.osl:13248:244:sw/source/core/layout/newfrm.cxx:315: Who didn't deregister?
warn:legacy.osl:13248:244:sw/source/core/layout/newfrm.cxx:315: Who didn't deregister?
warn:legacy.osl:13248:244:sw/source/core/layout/newfrm.cxx:315: Who didn't deregister?
warn:legacy.osl:13248:244:sw/source/core/layout/newfrm.cxx:315: Who didn't deregister?
warn:legacy.osl:13248:244:sw/source/core/layout/newfrm.cxx:315: Who didn't deregister?
warn:sal.osl:13248:244:sal/osl/all/debugbase.cxx:106: unexpected number of class SvxUnoTextRangeBase: 2; Expected: 0
warn:svl.items:13248:244:svl/source/items/style.cxx:55: SfxStyleSheetBase left 1; SfxStyleSheetBasePool left 2
warn:unotools.config:13248:244:unotools/source/config/configmgr.cxx:147: ConfigManager not empty
nkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\cppunit\src\cppunit\TestComposite.cpp: line: 24:
	at CppUnit::TestRunner::WrappingSuite::run in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\cppunit\src\cppunit\TestRunner.cpp: line: 47:
	at CppUnit::TestResult::runTest in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\cppunit\src\cppunit\TestResult.cpp: line: 152:
	at CppUnit::TestRunner::run in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\cppunit\src\cppunit\TestRunner.cpp: line: 96:
	at `anonymous namespace'::ProtectedFixtureFunctor::run in E:\jenkins\workspace\gerrit_windows_wsl\sal\cppunittester\cppunittester.cxx: line: 328:
	at main2 in E:\jenkins\workspace\gerrit_windows_wsl\sal\cppunittester\cppunittester.cxx: line: 482:
	at sal_main in E:\jenkins\workspace\gerrit_windows_wsl\sal\cppunittester\cppunittester.cxx: line: 612:
	at main in E:\jenkins\workspace\gerrit_windows_wsl\sal\cppunittester\cppunittester.cxx: line: 602:
	at invoke_main in D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl: line: 79:
	at __scrt_common_main_seh in D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl: line: 288:
	at __scrt_common_main in D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl: line: 331:
	at mainCRTStartup in D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_main.cpp: line: 17:
	at BaseThreadInitThunk, address 0x7FFE8F63E8D7 in C:\WINDOWS\System32\KERNEL32.DLL
	at RtlUserThreadStart, address 0x7FFE90A8C53C in C:\WINDOWS\SYSTEM32\ntdll.dll

Change-Id: Idac749da0d53abc3187943f73cb737c827e662d6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208201
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-07-17 12:50:28 +02:00
Justin Luth 83303053d7 tdf#172169 sw ms import: line portion IsUsedToCalcLineSpacingHeight
Most of this patch is just No-Functional-Change cleanup/renaming.
The only change is the new function IsUsedToCalcLineSpacingHeight.

This fixes (only for non-ODF formats and new documents)
a LO 7.1 regression from
commit d336e6c260
which caused intra-paragraph line-spacing calculations
to ignore the size of most non-plain-text content.

Specifically broken for both ODT and Microsoft formats
were things like fields, content controls, and FieldMarkCheckboxes.

But that 'regression' also had some 'good' results.
Things that it accidentally fixed (in terms of Microsoft interop)
were Tabstops, Hidden text, and Footnote/Endnote markers.

P.S. No attempt was made to 'fix' regressed ODT files.

SAFETY FACTOR: Very safe
It fixes MS formats - and doesn't affect previous ODT files.

make CppunitTest_sw_ooxmlexport25 \
    CPPUNIT_TEST_NAME=testTdf172169_intraLinespacing

The VCL test is hit because the .fodt has no config:config-item,
so it picks up the new default.
This is a reference field with 1.15 line spacing and 96pt font.
make CppunitTest_vcl_pdfexport CPPUNIT_TEST_NAME=testTdf142806

Change-Id: I24cb1af505550b47fae8e7b61b3345f0346da52d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205456
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
2026-06-27 01:30:42 +02:00
Jonathan Clark 943c5248c7 tdf#146572 sw: Fix extra spaces at the end of wrapped bidi portions
Regression due to the following commit:

 commit 93d7bdcb85
 Author: Bartosz Kosiorek <gang65@o2.pl>
 Date:   Mon May 2 14:59:26 2011 +0200

     fdo#33167, i#20878: Show spaces at the end of line

     The spaces weren't shown at the end of lines when viewing the document
     with the non-printing characters. This helps editing the spaces after a
     line in left aligned paragraphs.

This change effectively reverts what is still left of that commit in the
Writer code. It was likely useful at some point, but in testing it no
longer seems to have any user-facing effect other than causing tdf#146572.

As a side effect of this change, certain left-aligned LTR lines that
wrapped at spaces will now end with a hole portion. A number of tests
had to be updated to account for this extra portion.

Change-Id: Ia3cf2beae45f6dbe429ef9305de98b9ab99f59e0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206258
Tested-by: Jenkins
Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
2026-06-09 17:31:58 +02:00
Jonathan Clark 95fdc0b589 tdf#117941 vcl: Fix invisible RTL strikeout chars in PDF export
Strikeout characters are drawn over the struck-out text, always as LTR
strings positioned at the leftmost position of the text. Due to a
1-character typo, the PDF exporter was drawing the strikeout characters
as RTL rather than LTR, which made them extend to the left outside the
clipping area, rather than covering the struck-out text as intended.

Change-Id: If4ef3a745a76526c2dfb8af6133b2bf729e92fbf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205995
Tested-by: Jenkins
Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
2026-06-04 13:43:46 +02:00
Samuel Mehrbrodt c042c153bf tdf#172153 pdfexport: ToC title should not be inside of ToC
PDF/UA requires that a <TOC> must have only <TOCI> children,
so a heading is not allowed here.

Put the heading in front of the table of contents.
Also change it from a <caption> to a <h1> element.

Change-Id: Ie8fa42b503e76cda988747adad6d2724cf6bffbd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205467
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@collabora.com>
2026-05-22 06:11:41 +02:00
Jean-Michel Hautbois 63f2b6308d tdf#153935 vcl: PDF/UA export: emit /Scope and /Tabs on PDF 1.4
PDF/A-1 forces the PDF version to 1.4, which caused
PDFWriterImpl::setStructureAttribute() and PDFPage::emit() to skip
two entries that PDF/UA-1 nonetheless mandates:

* /Scope /Column on TH, gated to PDF 1.5+ in commit 28b06bb723
  ("tdf#149140 vcl: PDF/UA export: Scope attribute exists since
   PDF 1.5")
* /Tabs /S on pages with annotations, gated to PDF 1.5+ in commit
  fa3f04bdd4 ("tdf#148934 PDF/UA export: add Contents entry to
   Link annotations")

ISO 14289-1:2014, Clause 7.5 and Clause 7.18.3 require those entries
on a PDF/UA-1 file regardless of the PDF version. Relax both checks
so the entries are also emitted when UniversalAccessibilityCompliance
is requested. The resulting file is PDF/UA-1 conforming and best-
effort PDF/A-1 (the extra entries are tolerated by PDF/A-1 readers).

Add a test testTdf153935 derived from testTdf149140, asserting
/Scope /Column on TH and /Tabs /S on annotated pages when
SelectPdfVersion=1 and PDFUACompliance=true are combined.

Change-Id: Iab98946ab557cca4b578af87ea0b655445ec3cc4
Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@yoseli.org>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205155
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-05-14 09:56:18 +02:00
Jonathan Clark 03259a4b3f tdf#155557 sw: Fix underline width calculation for portions with kashida
Writer has a special code path for underlines that span font changes.
This special code path did not handle kashida justification, and would
draw underlines that were too short to connect to the following portion.

Change-Id: I31ff2c3a1cea0e7e4339a0533e568e421c20d52d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204604
Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
Tested-by: Jenkins
2026-04-30 15:56:36 +02:00
Jonathan Clark 7d4a9f683c tdf#168698 i18nutil: Adjust Syriac justification rules
This change makes two adjustments to the Syriac justification kashida
insertion position algorithm:

- Previously, the first pass scanned from end to midpoint exclusive.
  This has been updated so kashida positions at the midpoint are
  prioritized over kashida positions in the first half of the word.

- Fixes a bug that made midpoint calculation include vowel marks and
  other diacritics.

Change-Id: I615cde5cdb54e7afe5fccdf4d536ce7aef211395
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204141
Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
Tested-by: Jenkins
2026-04-23 04:33:30 +02:00