summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorhomeboy445 <akshitsan13@gmail.com>2021-04-12 20:31:05 +0530
committerIlmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>2021-10-29 13:46:12 +0200
commitd37a44a9ebdafec1435f98194417a1d8cc8208b5 (patch)
treede021550906549b9ae78d95cef8329bc6afc7a17 /sw
parent31315fea28ad327f36c0e593156bf808c7af3467 (diff)
tdf#141193 Added support for bar codes in qrcode dialog box[API Change].
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>
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/odfexport/data/qrcode-properties.odtbin36407 -> 11634 bytes
-rw-r--r--sw/qa/extras/odfexport/odfexport.cxx14
-rw-r--r--sw/qa/uitest/writer_tests3/insertQrCodeGen.py12
3 files changed, 13 insertions, 13 deletions
diff --git a/sw/qa/extras/odfexport/data/qrcode-properties.odt b/sw/qa/extras/odfexport/data/qrcode-properties.odt
index 6aa3ed252b50..2de59b0414ee 100644
--- a/sw/qa/extras/odfexport/data/qrcode-properties.odt
+++ b/sw/qa/extras/odfexport/data/qrcode-properties.odt
Binary files differ
diff --git a/sw/qa/extras/odfexport/odfexport.cxx b/sw/qa/extras/odfexport/odfexport.cxx
index db4cc260eefd..d9499a7d944c 100644
--- a/sw/qa/extras/odfexport/odfexport.cxx
+++ b/sw/qa/extras/odfexport/odfexport.cxx
@@ -19,8 +19,8 @@
#include <com/sun/star/drawing/PointSequenceSequence.hpp>
#include <com/sun/star/drawing/GraphicExportFilter.hpp>
#include <com/sun/star/drawing/XGraphicExportFilter.hpp>
-#include <com/sun/star/drawing/QRCode.hpp>
-#include <com/sun/star/drawing/QRCodeErrorCorrection.hpp>
+#include <com/sun/star/drawing/BarCode.hpp>
+#include <com/sun/star/drawing/BarCodeErrorCorrection.hpp>
#include <com/sun/star/table/ShadowFormat.hpp>
#include <com/sun/star/table/XCellRange.hpp>
#include <com/sun/star/text/RelOrientation.hpp>
@@ -2866,14 +2866,14 @@ DECLARE_ODFEXPORT_TEST(testQrCodeGenProperties, "qrcode-properties.odt")
uno::Reference<drawing::XShape> xShape = getShape(1);
CPPUNIT_ASSERT(xShape.is());
- css::drawing::QRCode aQRCode = getProperty<css::drawing::QRCode>(xShape, "QRCodeProperties");
+ css::drawing::BarCode aBarCode = getProperty<css::drawing::BarCode>(xShape, "BarCodeProperties");
CPPUNIT_ASSERT_EQUAL(OUString("www.libreoffice.org"),
- aQRCode.Payload);
- CPPUNIT_ASSERT_EQUAL(css::drawing::QRCodeErrorCorrection::LOW,
- aQRCode.ErrorCorrection);
+ aBarCode.Payload);
+ CPPUNIT_ASSERT_EQUAL(css::drawing::BarCodeErrorCorrection::LOW,
+ aBarCode.ErrorCorrection);
CPPUNIT_ASSERT_EQUAL(sal_Int32(5),
- aQRCode.Border);
+ aBarCode.Border);
}
DECLARE_ODFEXPORT_TEST(testChapterNumberingNewLine, "chapter-number-new-line.odt")
diff --git a/sw/qa/uitest/writer_tests3/insertQrCodeGen.py b/sw/qa/uitest/writer_tests3/insertQrCodeGen.py
index caf7bf660861..761fd0f2d790 100644
--- a/sw/qa/uitest/writer_tests3/insertQrCodeGen.py
+++ b/sw/qa/uitest/writer_tests3/insertQrCodeGen.py
@@ -37,9 +37,9 @@ class insertQrCode(UITestCase):
xBorder.executeAction("DOWN", tuple())
# check the QR code in the document
- self.assertEqual(document.DrawPage.getByIndex(0).QRCodeProperties.Payload, "www.libreoffice.org")
- self.assertEqual(document.DrawPage.getByIndex(0).QRCodeProperties.ErrorCorrection, 1)
- self.assertEqual(document.DrawPage.getByIndex(0).QRCodeProperties.Border, 1)
+ self.assertEqual(document.DrawPage.getByIndex(0).BarCodeProperties.Payload, "www.libreoffice.org")
+ self.assertEqual(document.DrawPage.getByIndex(0).BarCodeProperties.ErrorCorrection, 1)
+ self.assertEqual(document.DrawPage.getByIndex(0).BarCodeProperties.Border, 1)
def test_insert_qr_code_gen2(self):
@@ -58,8 +58,8 @@ class insertQrCode(UITestCase):
xBorder.executeAction("DOWN", tuple())
#check the QR Code in the document
- self.assertEqual(document.DrawPage.getByIndex(0).QRCodeProperties.Payload, "www.libreoffice.org")
- self.assertEqual(document.DrawPage.getByIndex(0).QRCodeProperties.ErrorCorrection, 1)
- self.assertEqual(document.DrawPage.getByIndex(0).QRCodeProperties.Border, 1)
+ self.assertEqual(document.DrawPage.getByIndex(0).BarCodeProperties.Payload, "www.libreoffice.org")
+ self.assertEqual(document.DrawPage.getByIndex(0).BarCodeProperties.ErrorCorrection, 1)
+ self.assertEqual(document.DrawPage.getByIndex(0).BarCodeProperties.Border, 1)
# vim: set shiftwidth=4 softtabstop=4 expandtab: