]> git.pld-linux.org Git - packages/libreoffice.git/blame - zxing1.4.patch
- use system ucpp
[packages/libreoffice.git] / zxing1.4.patch
CommitLineData
9ff160c7
JP
1From 15e5d86cc55ad94ac946e04d5e25b84be5810970 Mon Sep 17 00:00:00 2001
2From: "Brett T. Warden" <brett.t.warden@intel.com>
3Date: Fri, 30 Dec 2022 08:43:25 +0100
4Subject: Remove dependency on BitArray.h from zxing-1.2.0
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9In zxing-1.4.0, numerous headers are no longer public. Rework the
10ConvertToSVGFormat method so it uses bitmatrix.get instead of
11bitmatrix.getRow, similar to the ToSVG method in zxing itself.
12
13See https://github.com/zxing-cpp/zxing-cpp/issues/361
14
15Change-Id: Ie25eb8f782e8799fbd57c24ef79bba92acf0f9ff
16Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144874
17Tested-by: René Engelhard <rene@debian.org>
18Reviewed-by: René Engelhard <rene@debian.org>
19Tested-by: Jenkins
20Reviewed-by: Caolán McNamara <caolanm@redhat.com>
21---
22 cui/source/dialogs/QrCodeGenDialog.cxx | 5 +----
23 1 file changed, 1 insertion(+), 4 deletions(-)
24
25(limited to 'cui/source/dialogs/QrCodeGenDialog.cxx')
26
27diff --git a/cui/source/dialogs/QrCodeGenDialog.cxx b/cui/source/dialogs/QrCodeGenDialog.cxx
28index f8cbac1d758d..817be7f21ede 100644
29--- a/cui/source/dialogs/QrCodeGenDialog.cxx
30+++ b/cui/source/dialogs/QrCodeGenDialog.cxx
31@@ -27,7 +27,6 @@
32 #endif
33
34 #include <BarcodeFormat.h>
35-#include <BitArray.h>
36 #include <BitMatrix.h>
37 #include <MultiFormatWriter.h>
38 #include <TextUtfEncoding.h>
39@@ -79,7 +78,6 @@ OString ConvertToSVGFormat(const ZXing::BitMatrix& bitmatrix)
40 OStringBuffer sb;
41 const int width = bitmatrix.width();
42 const int height = bitmatrix.height();
43- ZXing::BitArray row(width);
44 sb.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
45 "<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" viewBox=\"0 0 "
46 + OString::number(width) + " " + OString::number(height)
47@@ -87,10 +85,9 @@ OString ConvertToSVGFormat(const ZXing::BitMatrix& bitmatrix)
48 "<path d=\"");
49 for (int i = 0; i < height; ++i)
50 {
51- bitmatrix.getRow(i, row);
52 for (int j = 0; j < width; ++j)
53 {
54- if (row.get(j))
55+ if (bitmatrix.get(j, i))
56 {
57 sb.append("M" + OString::number(j) + "," + OString::number(i) + "h1v1h-1z");
58 }
59--
60cgit v1.2.1
61
This page took 0.075597 seconds and 4 git commands to generate.