diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2021-05-31 02:01:56 +0200 |
---|---|---|
committer | Jan-Marek Glogowski <glogow@fbihome.de> | 2021-05-31 13:16:19 +0200 |
commit | af281d5bc2fb3f2c31f1718b711b32213a12219c (patch) | |
tree | db67ff77a5fd793fbd37e21827132523a54679e4 /cui | |
parent | e8bba8229080f873b89b39551e924d1c8609fc07 (diff) |
no-zxing: Unused GenerateQRCode function
... 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>
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/dialogs/QrCodeGenDialog.cxx | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/cui/source/dialogs/QrCodeGenDialog.cxx b/cui/source/dialogs/QrCodeGenDialog.cxx index 9e4d1df1d96d..9a42e4ddc057 100644 --- a/cui/source/dialogs/QrCodeGenDialog.cxx +++ b/cui/source/dialogs/QrCodeGenDialog.cxx @@ -98,11 +98,9 @@ OString ConvertToSVGFormat(const ZXing::BitMatrix& bitmatrix) sb.append("\"/>\n</svg>"); return sb.toString(); } -#endif -OString GenerateQRCode(const OUString& aQRText, tools::Long aQRECC, int aQRBorder) +OString GenerateQRCode(std::u16string_view aQRText, tools::Long aQRECC, int aQRBorder) { -#if ENABLE_ZXING // Associated ZXing error correction levels (0-8) to our constants arbitrarily. int bqrEcc = 1; @@ -137,14 +135,10 @@ OString GenerateQRCode(const OUString& aQRText, tools::Long aQRECC, int aQRBorde writer.setEncoding(ZXing::CharacterSet::UTF8); ZXing::BitMatrix bitmatrix = writer.encode(ZXing::TextUtfEncoding::FromUtf8(QRText), 0, 0); return ConvertToSVGFormat(bitmatrix); -#else - (void)aQRText; - (void)aQRECC; - (void)aQRBorder; - return OString(); -#endif -} } +#endif + +} // anonymous namespace QrCodeGenDialog::QrCodeGenDialog(weld::Widget* pParent, Reference<XModel> xModel, bool bEditExisting) |