Bug 1716806 - Introduces a separator space between radio buttons/checkboxes and their labels/strings
This commit is contained in:
parent
3676ffde17
commit
170091013e
@ -1207,6 +1207,25 @@ class Caption extends XFAObject {
|
|||||||
return HTMLResult.EMPTY;
|
return HTMLResult.EMPTY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// For checkButton captions, add a non-breaking space at the beginning
|
||||||
|
// and replace all spaces with non-breaking spaces to prevent word wrapping
|
||||||
|
const parent = this[$getParent]();
|
||||||
|
if (
|
||||||
|
parent?.ui?.checkButton &&
|
||||||
|
typeof value === "object" &&
|
||||||
|
value.children
|
||||||
|
) {
|
||||||
|
for (const child of value.children) {
|
||||||
|
if (child.value && typeof child.value === "string") {
|
||||||
|
// Replace all regular spaces with non-breaking spaces
|
||||||
|
child.value = child.value.startsWith(" ")
|
||||||
|
? child.value.replaceAll(" ", "\u00A0")
|
||||||
|
: "\u00A0" + child.value.replaceAll(" ", "\u00A0");
|
||||||
|
child.value = child.value.replaceAll("/", "\u2044");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const savedReserve = this.reserve;
|
const savedReserve = this.reserve;
|
||||||
if (this.reserve <= 0) {
|
if (this.reserve <= 0) {
|
||||||
const { w, h } = this[$getExtra](availableSpace);
|
const { w, h } = this[$getExtra](availableSpace);
|
||||||
|
|||||||
1
test/pdfs/.gitignore
vendored
1
test/pdfs/.gitignore
vendored
@ -93,6 +93,7 @@
|
|||||||
!issue8372.pdf
|
!issue8372.pdf
|
||||||
!issue9713.pdf
|
!issue9713.pdf
|
||||||
!xfa_filled_imm1344e.pdf
|
!xfa_filled_imm1344e.pdf
|
||||||
|
!xfa_bug1716806.pdf
|
||||||
!issue8424.pdf
|
!issue8424.pdf
|
||||||
!issue8480.pdf
|
!issue8480.pdf
|
||||||
!bug1650302_reduced.pdf
|
!bug1650302_reduced.pdf
|
||||||
|
|||||||
BIN
test/pdfs/xfa_bug1716806.pdf
Normal file
BIN
test/pdfs/xfa_bug1716806.pdf
Normal file
Binary file not shown.
@ -2120,6 +2120,14 @@
|
|||||||
"enableXfa": true,
|
"enableXfa": true,
|
||||||
"type": "eq"
|
"type": "eq"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"id": "xfa_bug1716806",
|
||||||
|
"file": "pdfs/xfa_bug1716806.pdf",
|
||||||
|
"md5": "ed78b522c661e744f780ab9b6d09fd8d",
|
||||||
|
"rounds": 1,
|
||||||
|
"enableXfa": true,
|
||||||
|
"type": "eq"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"id": "xfa_bug1716809",
|
"id": "xfa_bug1716809",
|
||||||
"file": "pdfs/xfa_bug1716809.pdf",
|
"file": "pdfs/xfa_bug1716809.pdf",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user