summaryrefslogtreecommitdiff
path: root/cui/source/dialogs/QrCodeGenDialog.cxx
AgeCommit message (Collapse)AuthorFilesLines
2024-01-18-Werror,-Wunused-parameter (Emscripten)Stephan Bergmann1-0/+3
Change-Id: Ia2e9ab91def1454bd06044b0e38f2d0720b44033 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162246 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2023-12-23ZXing: no need for deprecated utf-8 conversions anymoreThorsten Behrens1-5/+4
With ZXing 2.0, the library directly supports utf8 std::string parameters: https://github.com/zxing-cpp/zxing-cpp/releases/tag/v2.0.0 Fixes the warning: cui/source/dialogs/QrCodeGenDialog.cxx:161:72: warning: 'FromUtf8' is deprecated [-Wdeprecated-declarations] 161 | ZXing::BitMatrix bitmatrix = writer.encode(ZXing::TextUtfEncoding::FromUtf8(QRText), 0, 0); | ^ /usr/include/ZXing/TextUtfEncoding.h:17:3: note: 'FromUtf8' has been explicitly marked deprecated here 17 | [[deprecated]] std::wstring FromUtf8(std::string_view utf8); | ^ Change-Id: Ic0a65d4455dabea1a7a4e23f558e4158a0c3f39f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161182 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2023-10-10Enable QR and barcode dialog for onlineDarshan-upadhyay11101-0/+27
- enable QR and barcode genration dialog for online - Change Qr code genration dialog to async Change-Id: Ia46b8e27a3002adcc893e5ef4c2545d7edcc3e41 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156642 Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> (cherry picked from commit 6ed38adb5578d0b52d11d8f2077e345f9a8c7ade) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157728 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-07-11zxing-cpp: upgrade to release 2.1.0Taichi Haradaguchi1-1/+10
- remove external/zxing/invalid_argument.patch.1 and external/zxing/no_sanitize_ignored.patch.0, no longer needed in 2.1.0. - If "Utf.h" can be included, use ZXing::FromUtf8() instaed of ZXing::TextUtfEncoding::FromUtf8(). This makes external/zxing/undeprecate-warning.patch.0 unnecessary. Change-Id: I06acebb623aa8b60c5d2e5f7f265998571d75a89 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154221 Tested-by: Jenkins Reviewed-by: Taichi Haradaguchi <20001722@ymail.ne.jp>
2023-07-05tdf#153328 ZXing::ToSVG() Conditional usageTRaXIn1-0/+10
Change-Id: I8874f596be808d5d255139654a19b25f71299179 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147677 Tested-by: Jenkins Tested-by: Hossein <hossein@libreoffice.org> Reviewed-by: Hossein <hossein@libreoffice.org>
2023-05-05loplugin:unnecessarygetstrStephan Bergmann1-1/+1
The plugin in its current form is probably not intending to find these cases. But it happened to do so on macOS with libc++, where the std::basic_string ctors taking a final defaulted Allocator argument are instead implemented by a pair of overloaded ctors, one taking no Allocator at all (see 671d1c6cd14b28b5960ad56086299bd69533dfd8 "Adapt loplugin:unnecessarygetstr to libc++"). But these changes here are useful regardless, so lets leave it at that. Change-Id: I2776671e2953182bdcad36432951a75f82412ebb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151410 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-12-30Remove dependency on BitArray.h from zxing-1.2.0Brett T. Warden1-4/+1
In zxing-1.4.0, numerous headers are no longer public. Rework the ConvertToSVGFormat method so it uses bitmatrix.get instead of bitmatrix.getRow, similar to the ToSVG method in zxing itself. See https://github.com/zxing-cpp/zxing-cpp/issues/361 Change-Id: Ie25eb8f782e8799fbd57c24ef79bba92acf0f9ff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144874 Tested-by: René Engelhard <rene@debian.org> Reviewed-by: René Engelhard <rene@debian.org> Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-12-09Related: tdf#146395 drop default textCaolán McNamara1-5/+1
Change-Id: Iaeedf11df5f1d5739ec247222cc4fc1f10abe1e3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143875 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-12-08Resolves: tdf#146395 allow newlines in QR CodesCaolán McNamara1-2/+8
Change-Id: Ib390d97866ab013770e4f1cbdfb529296d64c140 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143811 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-04-20loplugin:passstuffbyrefNoel Grandin1-1/+1
Change-Id: I336fd329b577b6fa141265d8bc7ce67784bd7306 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133210 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-03don't use SVXSTR for translation ids that are in cui.moCaolán McNamara1-1/+1
use that just for the ones in svx.mo. This just changes the programmer-level #define and keeps the translator-level message context the same to avoid triggering any retranslations. Change-Id: I3ca90618e27c4d7abbc77de1096e67bafe49e7ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125832 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-10-30Switch to a newer version of ZXing libraryhomeboy4451-2/+2
Change-Id: Ib2b919bb7545f05631aed2e6176a97aeb866ee84 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122772 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-10-29tdf#141193 Added support for bar codes in qrcode dialog box[API Change].homeboy4451-26/+42
Change-Id: I6b79ece1d5419ef92b76755d3bd921a64d6e38fe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113989 Tested-by: Jenkins Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2021-10-29Prepare for removal of non-const operator[] from Sequence in cuiMike Kaganski1-3/+3
Change-Id: Ib359c029099cf86ccdebefd014d4a9bd91d57eba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124356 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-05-31no-zxing: Unused GenerateQRCode functionJan-Marek Glogowski1-10/+4
... and while at it fix (new?) [loplugin:stringviewparam]. Change-Id: I4b991e58040df8082e141ba3c7a0d1968871d517 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116436 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-03-24QR Code Dialog: Change term 'border' to 'margin'homeboy4451-1/+1
This adds a margin around the qr code (white space), not a border. Change-Id: If3e74dfe19dd7f9c063eaa6439810d617a99cb45 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112831 Tested-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de> Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2021-03-21Fix GenerateQRCode when ENABLE_ZXING is not definedChristophe JAILLET1-1/+1
Since commit 562d7767f987, 'GenerateQRCode()' returns a OString, not a OUString. Fix the case where ENABLE_ZXING is not defined. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Change-Id: I29d9c559401b49caceb8a8941bbe9962b489e3f7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112830 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-03-21Avoid OUString-to-OString conversion: just generate OStringMike Kaganski1-52/+53
Change-Id: Ied47aa0ca42a73715678482424d7d593d18d25aa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112824 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-03-20tdf#139778 Switch to ZXing for generating QR codehomeboy4451-30/+68
Change-Id: Ief944266d5183bb862afe99ec6b0bdaca4956938 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112534 Tested-by: Jenkins Tested-by: René Engelhard <rene@debian.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-03-18Drop duplicate 'using namespace' directiveMike Kaganski1-1/+0
Change-Id: If235c37cf52cfbfd171a6d1784cf5940c162332a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112618 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-11-06tdf#42949 Fix new IWYU warnings in directories c*Gabor Kelemen1-1/+0
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Iac1e7802dbe1efa01c2befdd10406231788d4fc1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105315 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-10-21use tools::Long in comphelper..cuiNoel1-2/+2
Change-Id: I65167999c6049038f8f5d530a0c5cb0552ab0e06 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104609 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-09-23fix disable qrcodegen optionCaolán McNamara1-2/+2
Change-Id: Ic554f01125653022987c70d03c8c9d86fe3f547a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103271 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-09-21add an explicit --disable-qrcodegen configure optionCaolán McNamara1-3/+18
Change-Id: If8e965fa955aecdb9e7011bdddc690de9cad0c4d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103120 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-04-17loplugin:flatten in cuiNoel Grandin1-56/+56
Change-Id: I0ea0784ab8c4542747da1e15fa7c60c60bccb602 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92423 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-03-01Catch by referenceEike Rathke1-1/+1
error: catching polymorphic type ‘class qrcodegen::data_too_long’ by value [-Werror=catch-value=] Change-Id: I34cd429186b737f32ceec124849d48860788a9d6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89778 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2020-02-28tdf#130272 A warning is now shown and LO do not crash22shubh221-7/+28
Change-Id: Icd4ef637cb07c03c11aead53417bd48e47241203 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89415 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2020-01-06tdf#42949 Fix IWYU warnings in cui/Gabor Kelemen1-4/+0
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I41ae36eb535cc64f4c4fa73333dbc8aa728865b7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85791 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-12-06tdf#127305 display selected text in URL field QR Code Dialogshubham goyal1-0/+8
Change-Id: Ic0d36225cc2c509c706a4599d45b92c6b9fea40e Reviewed-on: https://gerrit.libreoffice.org/78879 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-08-30tdf#127233: QR-code generator, use UTF-8 encodingJulien Nabet1-1/+1
Thank you Mike Kaganski for reference here: https://bugs.documentfoundation.org/show_bug.cgi?id=127233#c4 Change-Id: I01bbc408df8bc87cf4e8be52143efb9fc3fa1e38 Reviewed-on: https://gerrit.libreoffice.org/78304 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-08-19Make QR code callable in Impress and DrawShubham Goyal1-5/+24
Change-Id: If11686189b0665f3918821269dd73d122e632194 Reviewed-on: https://gerrit.libreoffice.org/77438 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-08-08FIX: Error Correction in QR CodeShubham Goyal1-74/+60
Previously only Low Error Correction value was used to build the QR Code. This patch aims to fix this and make use of Error Correction what user selects. Is fix to the commit 2de42b53b7c23223c38e64a75eae248d8a0cd4ec Patch also involves some beautification. Change-Id: Ib809569fdd7c1c7c6305c27552419c3e5e8d51b9 Reviewed-on: https://gerrit.libreoffice.org/76958 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-08-06ofz#16191 fix build failureCaolán McNamara1-0/+5
Change-Id: Iaa4e14e102374951ba8ab99507367556ff5920fd Reviewed-on: https://gerrit.libreoffice.org/77017 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-08-05Make generated QR Code as a perfect squareShubham Goyal1-2/+2
Fix drawbacks of commit 2de42b53b7c23223c38e64a75eae248d8a0cd4ec Change-Id: I94503900250c2d8a10f5930c539bdc2f7da5cfd4 Reviewed-on: https://gerrit.libreoffice.org/76954 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-07-31tdf#42949 Fix IWYU warnings in cui/source/{c-f}*/*cxxGabor Kelemen1-1/+0
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ie5e070d13b771cf3e114c2454d49d77d95934160 Reviewed-on: https://gerrit.libreoffice.org/76506 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-07-25external qrcodegen looks under qrcodegenCaolán McNamara1-0/+4
Change-Id: I01f06c30a52f5e4cdb5b4b6304072aa0f3a63aa8 Reviewed-on: https://gerrit.libreoffice.org/76291 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-07-25QRCode Dialog Box featureShubham Goyal1-0/+288
The patch handles the created QR code as a Customized Shape (Graphic Object) Change-Id: I1cee6f0e7fac585de880a9ac34e3bc441a4b7390 Reviewed-on: https://gerrit.libreoffice.org/74167 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>