[Libreoffice-bugs] [Bug 153047] PDF Export: default text in content control is gone

2023-01-19 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=153047

Miklos Vajna  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Assignee|libreoffice-b...@lists.free |vmik...@collabora.com
   |desktop.org |
 Ever confirmed|0   |1

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 153047] PDF Export: default text in content control is gone

2023-01-18 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=153047

QA Administrators  changed:

   What|Removed |Added

 Status|NEEDINFO|UNCONFIRMED
 Ever confirmed|1   |0

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 153047] PDF Export: default text in content control is gone

2023-01-18 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=153047

--- Comment #8 from QA Administrators  ---
[Automated Action] NeedInfo-To-Unconfirmed

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 153047] PDF Export: default text in content control is gone

2023-01-18 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=153047

--- Comment #7 from Xisco Faulí  ---
(In reply to Miklos Vajna from comment #5)
> Hmm, here is an idea: what about we keep the current behavior, but in case
> title is empty, then we export the text of the content control as the
> default value of the PDF form widget instead of not exporting anything? I
> believe that won't upset anybody and you'll get a better PDF export for
> these documents. Would that work?

Yes, it sounds like a good solution :-)

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 153047] PDF Export: default text in content control is gone

2023-01-18 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=153047

--- Comment #6 from Miklos Vajna  ---
Created attachment 184757
  --> https://bugs.documentfoundation.org/attachment.cgi?id=184757=edit
Overlap if text of content control would be exported unconditionally and the
form is filled.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 153047] PDF Export: default text in content control is gone

2023-01-18 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=153047

--- Comment #5 from Miklos Vajna  ---
Here is a patch to do what you request:

> diff --git a/sw/source/core/text/itrform2.cxx 
> b/sw/source/core/text/itrform2.cxx
> index 9f075014fd9a..8756a712dc44 100644
> --- a/sw/source/core/text/itrform2.cxx
> +++ b/sw/source/core/text/itrform2.cxx
> @@ -1089,7 +1089,6 @@ void SwContentControlPortion::Paint(const 
> SwTextPaintInfo& rInf) const
>  
>  if (DescribePDFControl(rInf))
>  {
> -return;
>  }
>  
>  SwTextPortion::Paint(rInf);

With this, if I open the PDF in okular on Linux or acroread on Windows, and
type "asdf" into the footer's center field, I can overlapping text and it's
impossible to get rid of that, because the PDF reader can't know that's
placeholder text for the field when it's not yet filled in.

At least for me it looks like the attached overlap.png. (in Okular, click on
"show forms" to be able to fill in the form, then "hide forms" to see how it
would be rendered). So that's not going to work, I believe.

If you want to provide placeholder text in a content control, then you need to
go form -> content controls -> content control properties, fill in the "title"
field, and that'll be provided as the default value for the PDF form. And that
default value will disappear when you fill in the form.

Hmm, here is an idea: what about we keep the current behavior, but in case
title is empty, then we export the text of the content control as the default
value of the PDF form widget instead of not exporting anything? I believe that
won't upset anybody and you'll get a better PDF export for these documents.
Would that work?

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 153047] PDF Export: default text in content control is gone

2023-01-18 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=153047

--- Comment #4 from Xisco Faulí  ---
(In reply to Miklos Vajna from comment #2)
> I believe this is an intentional change. We used to export content controls
> as plain text, and now we export them as PDF form widgets if the "create pdf
> forms" option of the PDF export is enabled. That option happens to be on by
> default.
> 
> Is there something I can fix here without breaking the use-case where you
> can insert content controls to a Writer document, export it as PDF and you
> get a fillable form, similar to what also works with control shapes?
> 
> Should we disable "create pdf forms" by default?

no, no, I don't think it should be disable by default. My thinking was: if the
content controls have a default text ( like "[Type text]" in this case ),
should it be exported to PDF if the user doesn't writer anything to the control
or should be exported as empty ?

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 153047] PDF Export: default text in content control is gone

2023-01-18 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=153047

Miklos Vajna  changed:

   What|Removed |Added

   Keywords|regression  |implementationError

--- Comment #3 from Miklos Vajna  ---
Hm, if we change something here at all, then that would be a change in the new
content control feature, so it's rather an implementation error. Adjusting
keywords accordingly.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 153047] PDF Export: default text in content control is gone

2023-01-16 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=153047

Miklos Vajna  changed:

   What|Removed |Added

 Status|NEW |NEEDINFO

--- Comment #2 from Miklos Vajna  ---
I believe this is an intentional change. We used to export content controls as
plain text, and now we export them as PDF form widgets if the "create pdf
forms" option of the PDF export is enabled. That option happens to be on by
default.

Is there something I can fix here without breaking the use-case where you can
insert content controls to a Writer document, export it as PDF and you get a
fillable form, similar to what also works with control shapes?

Should we disable "create pdf forms" by default?

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 153047] PDF Export: default text in content control is gone

2023-01-16 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=153047

Xisco Faulí  changed:

   What|Removed |Added

 CC||vmik...@collabora.com,
   ||xiscofa...@libreoffice.org
 Status|UNCONFIRMED |NEW
 Ever confirmed|0   |1
   Keywords||bibisected, bisected,
   ||regression

--- Comment #1 from Xisco Faulí  ---
Regression introduced by:

author  Miklos Vajna 2022-09-12 09:30:38 +0200
committer   Miklos Vajna 2022-09-12 10:16:11
+0200
commit  82d90529dc2b3cb8359dec78852cbd910a66d275 (patch)
tree427c2458c4c039aaced2c38310881bb19891645c
parent  7458cb8d13b2893ccbfb648198319cc3a73d7e50 (diff)
sw content controls, rich text: add initial PDF export

Bisected with: bibisect-linux64-7.5

Adding Cc: to Miklos Vajna

-- 
You are receiving this mail because:
You are the assignee for the bug.