summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2023-01-19 19:53:12 +0100
committerXisco Fauli <xiscofauli@libreoffice.org>2023-01-24 11:47:23 +0000
commite80593e219dffd85ab16ebd2954cba8fa8c84637 (patch)
treead39ccc4e1cbc9b441c0518343348c5b038ab3ad /include
parent68c003154e7eb0dcf0473b41ce112283659a1cac (diff)
tdf#153047 sw: fix PDF export of content controls in placeholder mode
Importing an inline content control from DOCX used to be just plain text in Writer, so the PDF export of that was also just plain text. Now that content controls are actually supported, we used to not emit them as plain text in the PDF export, since 82d90529dc2b3cb8359dec78852cbd910a66d275 (sw content controls, rich text: add initial PDF export, 2022-09-12). Part of this was to write the string value of the content control as the /V (value) key of the form, when it's not in placeholder mode. This made sure that once the form is filled in, no overlap between the plain text and the filled in text happens. Try to support both use-cases at the same time by also mapping the value of the content control to /V, even if it's in placeholder mode. This keeps avoiding the unwanted overlap, but this way the placeholder text is no longer lost on PDF export. An alternative would have been to map the placeholder text to description when the alias/title is empty, but that would show up only as a mouse tooltip, so won't change the behavior when the PDF is printed. Change-Id: I9408b5abe36af28cd00845a74a3dfff13973b83a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145828 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com> (cherry picked from commit 14da39fcfffe8006a79971ac0b670e12d0d7a0ea) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146017 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'include')
-rw-r--r--include/vcl/filter/PDFiumLibrary.hxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/vcl/filter/PDFiumLibrary.hxx b/include/vcl/filter/PDFiumLibrary.hxx
index 347b64619045..9c278d281a1c 100644
--- a/include/vcl/filter/PDFiumLibrary.hxx
+++ b/include/vcl/filter/PDFiumLibrary.hxx
@@ -110,6 +110,7 @@ public:
virtual OUString getFormAdditionalActionJavaScript(PDFiumDocument* pDoc,
PDFAnnotAActionType eEvent)
= 0;
+ virtual OUString getFormFieldValue(PDFiumDocument* pDoc) = 0;
};
class PDFiumTextPage;