diff options
author | homeboy445 <akshitsan13@gmail.com> | 2021-04-12 20:31:05 +0530 |
---|---|---|
committer | Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> | 2021-10-29 13:46:12 +0200 |
commit | d37a44a9ebdafec1435f98194417a1d8cc8208b5 (patch) | |
tree | de021550906549b9ae78d95cef8329bc6afc7a17 /offapi | |
parent | 31315fea28ad327f36c0e593156bf808c7af3467 (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 'offapi')
-rw-r--r-- | offapi/UnoApi_offapi.mk | 4 | ||||
-rw-r--r-- | offapi/com/sun/star/drawing/BarCode.idl (renamed from offapi/com/sun/star/drawing/QRCode.idl) | 26 | ||||
-rw-r--r-- | offapi/com/sun/star/drawing/BarCodeErrorCorrection.idl (renamed from offapi/com/sun/star/drawing/QRCodeErrorCorrection.idl) | 16 | ||||
-rw-r--r-- | offapi/com/sun/star/drawing/GraphicObjectShape.idl | 4 | ||||
-rw-r--r-- | offapi/type_reference/offapi.idl | 7 |
5 files changed, 32 insertions, 25 deletions
diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk index 7509d0ff5163..26b56bedd8e5 100644 --- a/offapi/UnoApi_offapi.mk +++ b/offapi/UnoApi_offapi.mk @@ -2269,6 +2269,8 @@ $(eval $(call gb_UnoApi_add_idlfiles,offapi,com/sun/star/document,\ $(eval $(call gb_UnoApi_add_idlfiles,offapi,com/sun/star/drawing,\ Alignment \ Arrangement \ + BarCode \ + BarCodeErrorCorrection \ BezierPoint \ BitmapMode \ BoundVolume \ @@ -2331,8 +2333,6 @@ $(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/QRCode.idl b/offapi/com/sun/star/drawing/BarCode.idl index 09144f0f40bc..ef26aa9458be 100644 --- a/offapi/com/sun/star/drawing/QRCode.idl +++ b/offapi/com/sun/star/drawing/BarCode.idl @@ -7,29 +7,35 @@ * 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__ +#ifndef __com_sun_star_drawing_BarCode_idl__ +#define __com_sun_star_drawing_BarCode_idl__ module com { module sun { module star { module drawing { -/// This struct defines the attributes of a QR Code -/// @since LibreOffice 6.4 +/// This struct defines the attributes of a Bar Code +/// @since LibreOffice 7.3 -published struct QRCode +published struct BarCode { - /** Text for which QR Code is made + /** Type of the Bar Code + that is to be generated. + Supported types - 0:"QR Code", 1:"Code 128" + */ + long Type; + + /** Text for which Bar Code is made */ string Payload; - /** Qr Code Error Correction Level - @see drawing/QRCodeErrorCorrection + /** Bar Code Error Correction Level + @see drawing/BarCodeErrorCorrection */ long ErrorCorrection; - /** Border surrounding the Qr Code + /** Border surrounding the Bar Code It is a non-negative value. - One Border unit is equal to one dot in the generated QR code. + One Border unit is equal to one dot in the generated Bar code. */ long Border; }; diff --git a/offapi/com/sun/star/drawing/QRCodeErrorCorrection.idl b/offapi/com/sun/star/drawing/BarCodeErrorCorrection.idl index b1d45e858571..9314bacb5b97 100644 --- a/offapi/com/sun/star/drawing/QRCodeErrorCorrection.idl +++ b/offapi/com/sun/star/drawing/BarCodeErrorCorrection.idl @@ -7,16 +7,16 @@ * 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__ +#ifndef __com_sun_star_drawing_BarCodeErrorCorrection_idl__ +#define __com_sun_star_drawing_BarCodeErrorCorrection_idl__ module com { module sun { module star { module drawing { /** These constants identify the type of Error Correction for - a QR Code. + a Bar Code. - <p>The Error Correction for a QR code is a measure that - helps a QR code to recover, if it is destroyed. + <p>The Error Correction for a Bar code is a measure that + helps a Bar 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. @@ -26,13 +26,13 @@ module com { module sun { module star { module drawing { More Info - <a href="https://en.wikipedia.org/wiki/QR_code#Error_correction">here</a> </p> - @see QRCode + @see BarCode @see GraphicObectShape - @since LibreOffice 6.4 + @since LibreOffice 7.3 */ -published constants QRCodeErrorCorrection +published constants BarCodeErrorCorrection { const long LOW = 1; diff --git a/offapi/com/sun/star/drawing/GraphicObjectShape.idl b/offapi/com/sun/star/drawing/GraphicObjectShape.idl index 3e415c1f466b..4a9272b517ae 100644 --- a/offapi/com/sun/star/drawing/GraphicObjectShape.idl +++ b/offapi/com/sun/star/drawing/GraphicObjectShape.idl @@ -32,7 +32,7 @@ #include <com/sun/star/drawing/ColorMode.idl> #include <com/sun/star/container/XIndexContainer.idl> -#include <com/sun/star/drawing/QRCode.idl> +#include <com/sun/star/drawing/BarCode.idl> module com { module sun { module star { module drawing { @@ -158,7 +158,7 @@ published service GraphicObjectShape /// Shape as a QR Code /// @since LibreOffice 6.4 - [optional, property] com::sun::star::drawing::QRCode QRCodeProperties; + [optional, property] com::sun::star::drawing::BarCode BarCodeProperties; }; diff --git a/offapi/type_reference/offapi.idl b/offapi/type_reference/offapi.idl index eac8de069d1e..6c4b9ddb1c68 100644 --- a/offapi/type_reference/offapi.idl +++ b/offapi/type_reference/offapi.idl @@ -5538,7 +5538,8 @@ module com { interface ::com::sun::star::document::XMimeTypeInfo; }; published service GraphicExportFilter: ::com::sun::star::drawing::XGraphicExportFilter; - published struct QRCode { + published struct BarCode { + long Type; string Payload; long ErrorCorrection; long Border; @@ -5571,7 +5572,7 @@ module com { [property, optional] boolean SignatureLineCanAddComment; [property, optional] ::com::sun::star::graphic::XGraphic SignatureLineUnsignedImage; [property, optional] boolean SignatureLineIsSigned; - [property, optional] ::com::sun::star::drawing::QRCode QRCodeProperties; + [property, optional] ::com::sun::star::drawing::BarCode BarCodeProperties; }; /** @deprecated */ published interface XShapeGroup { interface ::com::sun::star::drawing::XShape; @@ -5745,7 +5746,7 @@ module com { ::com::sun::star::drawing::DoubleSequenceSequence SequenceY; ::com::sun::star::drawing::DoubleSequenceSequence SequenceZ; }; - published constants QRCodeErrorCorrection { + published constants BarCodeErrorCorrection { const long HIGH = 4; const long LOW = 1; const long MEDIUM = 2; |