Bug 146395 - Input field for QR Code does not allow newlines
Summary: Input field for QR Code does not allow newlines
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.4.3.2 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Caolán McNamara
URL:
Whiteboard: target:7.4.4 target:7.5.0 target:7.6....
Keywords: bibisected, bisected, regression
: 128718 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-12-23 21:24 UTC by achim
Modified: 2022-12-09 20:36 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description achim 2021-12-23 21:24:01 UTC
The input field in "Insert->Object->QR and Barcode ..." does no longer allow multiple line. Only the first line from pasted text with newlines is accepted.

This applies to writer and calc.

Newlines where possible in version 6.4.3.
Comment 1 raal 2021-12-25 14:45:24 UTC
I can confirm with LO 7.4master
Comment 2 raal 2021-12-25 14:53:04 UTC
This seems to have begun at the below commit.
Adding Cc: to Caolán McNamara; Could you possibly take a look at this one?
Thanks
 a6ae8c042cdc21909c6786c120863c8cc4f74a07 is the first bad commit
commit a6ae8c042cdc21909c6786c120863c8cc4f74a07
Author: Jenkins Build User <tdf@pollux.tdf>
Date:   Sat Jan 16 00:34:24 2021 +0100

    source f89b94c280e8d986cdf08271f5cdc6b1dfe09575

https://gerrit.libreoffice.org/c/core/+/109310
 tdf#138848 add truncate-multiline to all GtkEntries and GtkSpinButtons
Comment 3 achim 2021-12-26 07:42:57 UTC
IMHO, if entry fields should not have/allow multiline, the the entry field in the QR Code dialog should be replace by an text field (sorry, not sure what the proper GTK names are).
Comment 4 Caolán McNamara 2021-12-27 15:11:26 UTC
all "vcl" edits only allow one line, so the gtk ones were changed to match. So I agree with achim it needs to be a different widget is multi lines are wanted.
Comment 5 Po-Yen Huang 2022-02-09 09:48:00 UTC
I think this bug is related to https://bugs.documentfoundation.org/show_bug.cgi?id=128718 ?
Comment 6 Caolán McNamara 2022-02-09 10:21:08 UTC
*** Bug 128718 has been marked as a duplicate of this bug. ***
Comment 7 Caolán McNamara 2022-02-09 10:21:51 UTC
I did prototype as a textview, but first cut looked a big ugly. I should try again
Comment 8 Christopher Köbel 2022-12-05 16:51:44 UTC
Just wanted to confirm that the problem of "only single-line QR codes" still persists in LO 7.4.3.2 on Win/x64 and give this bug a boost:

To shed some light on why newlines in QR codes are important to users:
When using LO to write invoices or allow for a quick donation through a SEPA direct bank transfer, it'd be awesome to be able to generate a corresponding EPC (European Payment Code; cf. https://en.wikipedia.org/wiki/EPC_QR_code ) QR code, which follows a fixed format that absolutely depends on the LF line feed (Alt+010) character to split data fields. Some banking apps will also read EPC codes using CR (Alt+013) or a combined CR/LF, but most will not.

So that's one use case where LO could be one step ahead before MSO because the guys from Richmond don't get this right either (I have been discussing this, in German, on my freelance translator blog https://www.defrent.de/2021/04/eqc-qr-codes-in-ms-word/, where several more-or-less successful workarounds have been proposed by readers).

Being able to piece a QR code together from Calc cells or Writer fields would further improve LO over and above the ability to manually enter a multi-line QR code, but that alone would be a real plus, given that feeding possibly sensitive and GDPR-relevant payment data should not be given to online QR image generators.

Cheers,
Christopher
Comment 9 Commit Notification 2022-12-08 12:20:09 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-7-4":

https://git.libreoffice.org/core/commit/11c2dae93e492442223922f621c5dafd30c99213

Resolves: tdf#146395 allow newlines in QR Codes

It will be available in 7.4.4.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 10 Commit Notification 2022-12-08 13:58:24 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/ebc7e13c0a79dbc5f21e78bcd9bb63a58c585f4a

Resolves: tdf#146395 allow newlines in QR Codes

It will be available in 7.5.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 11 Xisco Faulí 2022-12-09 11:50:33 UTC
Hi Caolán,
After you commit, the placeholder text "www.libreoffice.org" has become the default text in the text view, which changes the behaviour of the dialog. Users will have to delete it every time before adding their URL/Text.
IMHO, if it's not possible to have a placeholder-text in a text-view, I would prefer not to have it as default text.
Comment 12 Caolán McNamara 2022-12-09 12:40:11 UTC
well, it is preselected, so its no great hardship to type something to replace it, but I can just as easily remove it
Comment 13 Commit Notification 2022-12-09 14:48:54 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/6683010b1a856c3894cc0a7172ac14fda0b76aa8

Related: tdf#146395 drop default text

It will be available in 7.6.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 14 Commit Notification 2022-12-09 20:36:29 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-7-5":

https://git.libreoffice.org/core/commit/2344f5ac296a6a29d031c6fadc67fad0523ac0e7

Related: tdf#146395 drop default text

It will be available in 7.5.0.0.beta2.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.