diff options
author | Brett T. Warden <brett.t.warden@intel.com> | 2022-12-30 08:43:25 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2022-12-30 22:33:33 +0000 |
commit | 7f5a8384824b8570547ac982e07b6fb912af6e93 (patch) | |
tree | 0b9b616a039c3159dc51d6400a55355a26172296 /cui | |
parent | 85f161ac76a07bcd1dd2080e4bda8f11a600262d (diff) |
Remove dependency on BitArray.h from zxing-1.2.0
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/+/144895
Tested-by: René Engelhard <rene@debian.org>
Reviewed-by: René Engelhard <rene@debian.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/dialogs/QrCodeGenDialog.cxx | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/cui/source/dialogs/QrCodeGenDialog.cxx b/cui/source/dialogs/QrCodeGenDialog.cxx index f8cbac1d758d..817be7f21ede 100644 --- a/cui/source/dialogs/QrCodeGenDialog.cxx +++ b/cui/source/dialogs/QrCodeGenDialog.cxx @@ -27,7 +27,6 @@ #endif #include <BarcodeFormat.h> -#include <BitArray.h> #include <BitMatrix.h> #include <MultiFormatWriter.h> #include <TextUtfEncoding.h> @@ -79,7 +78,6 @@ OString ConvertToSVGFormat(const ZXing::BitMatrix& bitmatrix) OStringBuffer sb; const int width = bitmatrix.width(); const int height = bitmatrix.height(); - ZXing::BitArray row(width); sb.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" "<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" viewBox=\"0 0 " + OString::number(width) + " " + OString::number(height) @@ -87,10 +85,9 @@ OString ConvertToSVGFormat(const ZXing::BitMatrix& bitmatrix) "<path d=\""); for (int i = 0; i < height; ++i) { - bitmatrix.getRow(i, row); for (int j = 0; j < width; ++j) { - if (row.get(j)) + if (bitmatrix.get(j, i)) { sb.append("M" + OString::number(j) + "," + OString::number(i) + "h1v1h-1z"); } |