Bug 138856 - Allow for input to QR-Code Generator by reference to another object
Summary: Allow for input to QR-Code Generator by reference to another object
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
6.4.6.2 release
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 145358 (view as bug list)
Depends on:
Blocks: QR-code
  Show dependency treegraph
 
Reported: 2020-12-12 14:28 UTC by Michael
Modified: 2023-10-11 23:10 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael 2020-12-12 14:28:36 UTC
Description:
The built-in QR-Code Generator ultimately only allows for input within its own pop-up configuration box. (While it can be superimposed on existing text, it replaces this text and subsequently allows for edits only within its own UI.)

Please add functionality that will allow for referencing a spreadsheet cell or a textbox or a label or some other persistent text-laden entity.

A good start would be a reference to a spreadsheet cell. This would allow for a QR-Code to result from a formula calculation in the referenced cell.

In combination with allowing for multi-line input (see bug 128718) it would allow for automated generation of bank transfer QR-Codes in invoices.

Steps to Reproduce:
1. Menu -> Insert -> Object -> QR-Code
2. Pop-up UI for QR-Code Generator opens


Actual Results:
UI only allows for direct input in text field.

Expected Results:
If no object (potentially) containing text is selected before the insert:
Toggle (e.g. Radio buttons) for choice between direct input and reference initially set to direct input. When toggled, allow for selecting a cell/textbox or similar object that will supply the input.

If an appropriate object is selected before insert, the toggle should initially be set to reference and have the object linked (read-write) and its contents displayed (read-only).


Reproducible: Always


User Profile Reset: No



Additional Info:
The UI for referencing might be modeled from parts of the existing UI for Pivot tables, but limited to only one referenced object.
Comment 1 Phoebus 2021-05-12 10:04:11 UTC
I'm also relating to this - referring to the cell to create QR, would be really useful. 
What I'd need for my purpose would be some kind of formula so I could drag it and generate QR codes for a list of records (codes) (=QR_sth(CELL)).

Would something like that be possible?
Comment 2 denialdon9 2022-02-11 13:07:48 UTC Comment hidden (spam)
Comment 3 V Stuart Foote 2022-12-08 15:29:22 UTC
This is the generic case of bug 145358 which is limited to barcode generated from content or formula result of a Calc cell.

Here it is the more versatile ask for barcode source: "...a spreadsheet cell or a textbox or a label or some other persistent text-laden entity".

+1
Comment 4 Heiko Tietze 2022-12-09 05:23:04 UTC
Commented on bug 145358 that adding a formula might not work on round-trip operations and is not (yet) defined by OASIS. Nevertheless such a feature is desirable and I'd go with =barcode(reference, type = <>).
Comment 5 Heiko Tietze 2022-12-09 05:24:40 UTC
*** Bug 145358 has been marked as a duplicate of this bug. ***
Comment 6 Nicu Buculei 2023-07-06 10:31:17 UTC
I stumbled upon this while researching for a solution I need at my workplace.

The organization is doing a review for the whole inventory, from chairs and tables to computers and printers and every item will receive a sticker printed with its inventory number, in numeric format and as a barcode (preferably QR code, so it can hold more info). Thousands of items.

Normally this is done with some specialized label printers and their proprietary software. We have a couple of such old printers and no software, just drivers.

Data will be received probably as spreadsheets.

The first idea was to use some barcode fonts to generate Code 128 or Code 39 barcodes, import spreadsheet data with Mail Merge and generate the labels. There are two problems with this: Code 128 and Code 39 can't hold as much data as QR and generated with fonts they are not as reliable (testing with my phone, they are really bad).

A second approach was to use Zint (a cross platform, open source, code generator). Export spreadsheets to CSV, use a bash script and create codes from command line as PNG. Then do a Mail Merge to print the labels with data from the spreadsheet and images as external files. Unfortunately, LibreOffice can't use images in a Mail Merge (Microsoft Office can, but in a clunky and buggy way).

Then LibreOffice has this limited code generator functionality. It may be useful when generating 1-2 codes per document, but not for 1000+

Something like =barcode(reference, type = <>) would be perfect but only if a) in Calc the image would be contained within a cell, not floating or b) in Writer if it can load the values dynamically from a source (as in my scenario, data source for mail merge).

Hope this is useful as a description for an use case.
Comment 7 Óscar 2023-07-06 12:03:57 UTC
Another use case:

Recently the Spanish tax authorities have announced that starting in 2024 all invoices must include a QR code.  Its exact content is still to be defined, but it will probably include the invoice number, date, etc.

So having a dynamic way to generate a QR code from a formula would be really useful to support this use case.