diff options
author | Shubham Goyal <22shubh22@gmail.com> | 2019-07-03 12:15:08 +0530 |
---|---|---|
committer | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2019-07-25 07:15:10 +0200 |
commit | 2de42b53b7c23223c38e64a75eae248d8a0cd4ec (patch) | |
tree | dc4b2fc96a0569b7c0ebfdc80446181c842a9964 /offapi | |
parent | 5ccc8124a03cffca3a1848f754524a06a063cb51 (diff) |
QRCode Dialog Box feature
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>
Diffstat (limited to 'offapi')
-rw-r--r-- | offapi/UnoApi_offapi.mk | 2 | ||||
-rw-r--r-- | offapi/com/sun/star/drawing/GraphicObjectShape.idl | 5 | ||||
-rw-r--r-- | offapi/com/sun/star/drawing/QRCode.idl | 42 | ||||
-rw-r--r-- | offapi/com/sun/star/drawing/QRCodeErrorCorrection.idl | 50 |
4 files changed, 99 insertions, 0 deletions
diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk index c86e7d5a7800..59d7e16772c8 100644 --- a/offapi/UnoApi_offapi.mk +++ b/offapi/UnoApi_offapi.mk @@ -2323,6 +2323,8 @@ $(eval $(call gb_UnoApi_add_idlfiles,offapi,com/sun/star/drawing,\ PolygonKind \ Position3D \ ProjectionMode \ + QRCode \ + QRCodeErrorCorrection \ RectanglePoint \ ShadeMode \ ShadingPattern \ diff --git a/offapi/com/sun/star/drawing/GraphicObjectShape.idl b/offapi/com/sun/star/drawing/GraphicObjectShape.idl index f8ec288a5ef3..d246df67e125 100644 --- a/offapi/com/sun/star/drawing/GraphicObjectShape.idl +++ b/offapi/com/sun/star/drawing/GraphicObjectShape.idl @@ -32,6 +32,7 @@ #include <com/sun/star/drawing/ColorMode.idl> #include <com/sun/star/container/XIndexContainer.idl> +#incldue <com/sun/star/drawing/QRCode.idl> module com { module sun { module star { module drawing { @@ -154,6 +155,10 @@ published service GraphicObjectShape /// Whether the signature line is signed using a digital signature [optional, property] boolean SignatureLineIsSigned; + + /// Shape as a QR Code + /// @since LibreOffice 6.4 + [optional, property] com::sun::star::drawing::QRCode QRCodeProperties; }; diff --git a/offapi/com/sun/star/drawing/QRCode.idl b/offapi/com/sun/star/drawing/QRCode.idl new file mode 100644 index 000000000000..b6ce5afcc3e7 --- /dev/null +++ b/offapi/com/sun/star/drawing/QRCode.idl @@ -0,0 +1,42 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#ifndef __com_sun_star_drawing_QrCode_idl__ +#define __com_sun_star_drawing_QrCode_idl__ + + module com { module sun { module star { module drawing { + + +/// This struct defines the attributes of a QR Code +/// @since LibreOffice 6.4 + +published struct QRCode +{ + /** Text for which QR Code is made + */ + string Payload; + + /** Qr Code Error Correction Level + @see drawing/QRCodeErrorCorrection + */ + long ErrorCorrection; + + /** Border surrounding the Qr Code + It is a non-negative value. + One Border unit is equal to one dot in the generated QR code. + */ + long Border; +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
\ No newline at end of file diff --git a/offapi/com/sun/star/drawing/QRCodeErrorCorrection.idl b/offapi/com/sun/star/drawing/QRCodeErrorCorrection.idl new file mode 100644 index 000000000000..b1d45e858571 --- /dev/null +++ b/offapi/com/sun/star/drawing/QRCodeErrorCorrection.idl @@ -0,0 +1,50 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#ifndef __com_sun_star_drawing_QRCodeErrorCorrection_idl__ +#define __com_sun_star_drawing_QRCodeErrorCorrection_idl__ + +module com { module sun { module star { module drawing { + +/** These constants identify the type of Error Correction for + a QR Code. + + <p>The Error Correction for a QR code is a measure that + helps a QR code to recover, if it is destroyed. + + Level L (Low) 7% of codewords can be restored. + Level M (Medium) 15% of codewords can be restored. + Level Q (Quartile) 25% of codewords can be restored. + Level H (High) 30% of codewords can be restored. + + More Info - <a href="https://en.wikipedia.org/wiki/QR_code#Error_correction">here</a> + </p> + + @see QRCode + @see GraphicObectShape + + @since LibreOffice 6.4 +*/ + +published constants QRCodeErrorCorrection +{ + const long LOW = 1; + + const long MEDIUM = 2; + + const long QUARTILE = 3; + + const long HIGH = 4; +}; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ |