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 /include | |
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 'include')
-rw-r--r-- | include/editeng/unoprnms.hxx | 1 | ||||
-rw-r--r-- | include/svl/solar.hrc | 2 | ||||
-rw-r--r-- | include/svx/svdograf.hxx | 15 | ||||
-rw-r--r-- | include/svx/unoshprp.hxx | 7 |
4 files changed, 22 insertions, 3 deletions
diff --git a/include/editeng/unoprnms.hxx b/include/editeng/unoprnms.hxx index 67ccc1975329..9af8dcd25d1f 100644 --- a/include/editeng/unoprnms.hxx +++ b/include/editeng/unoprnms.hxx @@ -176,6 +176,7 @@ #define UNO_NAME_GRAPHOBJ_SIGNATURELINE_CAN_ADD_COMMENT "SignatureLineCanAddComment" #define UNO_NAME_GRAPHOBJ_SIGNATURELINE_UNSIGNED_IMAGE "SignatureLineUnsignedImage" #define UNO_NAME_GRAPHOBJ_SIGNATURELINE_IS_SIGNED "SignatureLineIsSigned" +#define UNO_NAME_GRAPHOBJ_QRCODE "QRCodeProperties" #define UNO_NAME_OLE2_METAFILE "MetaFile" #define UNO_NAME_OLE2_PERSISTNAME "PersistName" diff --git a/include/svl/solar.hrc b/include/svl/solar.hrc index b783e898964d..6b4cb07bbc33 100644 --- a/include/svl/solar.hrc +++ b/include/svl/solar.hrc @@ -23,7 +23,7 @@ // defines ------------------------------------------------------------------ #define OWN_ATTR_VALUE_START 3900 -#define OWN_ATTR_VALUE_END 4003 +#define OWN_ATTR_VALUE_END 4004 #define RID_LIB_START 10000 #define RID_LIB_END 19999 diff --git a/include/svx/svdograf.hxx b/include/svx/svdograf.hxx index 4b50d122b256..597f5c42e743 100644 --- a/include/svx/svdograf.hxx +++ b/include/svx/svdograf.hxx @@ -22,12 +22,15 @@ #include <com/sun/star/io/XInputStream.hpp> #include <com/sun/star/graphic/XGraphic.hpp> +#include <com/sun/star/drawing/QRCode.hpp> #include <com/sun/star/uno/Sequence.hxx> #include <vcl/graph.hxx> #include <svx/svdorect.hxx> #include <vcl/GraphicObject.hxx> #include <svx/svxdllapi.h> #include <o3tl/typed_flags_set.hxx> +#include <memory> +#include <cstddef> namespace sdr { @@ -112,6 +115,7 @@ private: bool mbSignatureLineIsSigned; css::uno::Reference<css::graphic::XGraphic> mpSignatureLineUnsignedGraphic; + std::unique_ptr<css::drawing::QRCode> mpQrCode; void ImpRegisterLink(); void ImpDeregisterLink(); void ImpSetLinkedGraphic( const Graphic& rGraphic ); @@ -282,6 +286,17 @@ public: }; bool isSignatureLineSigned() const { return mbSignatureLineIsSigned; }; void setSignatureLineIsSigned(bool bIsSigned) { mbSignatureLineIsSigned = bIsSigned; } + + // Qr Code + void setQrCode(css::drawing::QRCode& rQrCode) + { + mpQrCode = std::make_unique<css::drawing::QRCode>(rQrCode); + }; + + css::drawing::QRCode* getQrCode() const + { + return mpQrCode.get(); + }; }; #endif // INCLUDED_SVX_SVDOGRAF_HXX diff --git a/include/svx/unoshprp.hxx b/include/svx/unoshprp.hxx index a54b51ae7a52..0861844be16d 100644 --- a/include/svx/unoshprp.hxx +++ b/include/svx/unoshprp.hxx @@ -64,6 +64,7 @@ #include <com/sun/star/drawing/CameraGeometry.hpp> #include <com/sun/star/text/WritingMode.hpp> #include <com/sun/star/graphic/XGraphic.hpp> +#include <com/sun/star/drawing/QRCode.hpp> #include <editeng/unoprnms.hxx> #include <svx/svddef.hxx> @@ -190,7 +191,8 @@ #define OWN_ATTR_SIGNATURELINE_CAN_ADD_COMMENT (OWN_ATTR_VALUE_START+101) #define OWN_ATTR_SIGNATURELINE_UNSIGNED_IMAGE (OWN_ATTR_VALUE_START+102) #define OWN_ATTR_SIGNATURELINE_IS_SIGNED (OWN_ATTR_VALUE_START+103) -// ATTENTION: maximum is OWN_ATTR_VALUE_START+103 svx, see include/svl/solar.hrc +#define OWN_ATTR_QRCODE (OWN_ATTR_VALUE_START+104) +// ATTENTION: maximum is OWN_ATTR_VALUE_START+104 svx, see include/svl/solar.hrc // #FontWork# #define FONTWORK_PROPERTIES \ @@ -441,7 +443,8 @@ { OUString(UNO_NAME_GRAPHOBJ_SIGNATURELINE_SHOW_SIGN_DATE), OWN_ATTR_SIGNATURELINE_SHOW_SIGN_DATE, cppu::UnoType<bool>::get(), 0, 0}, \ { OUString(UNO_NAME_GRAPHOBJ_SIGNATURELINE_CAN_ADD_COMMENT), OWN_ATTR_SIGNATURELINE_CAN_ADD_COMMENT, cppu::UnoType<bool>::get(), 0, 0}, \ { OUString(UNO_NAME_GRAPHOBJ_SIGNATURELINE_UNSIGNED_IMAGE), OWN_ATTR_SIGNATURELINE_UNSIGNED_IMAGE, cppu::UnoType<css::graphic::XGraphic>::get(), 0, 0}, \ - { OUString(UNO_NAME_GRAPHOBJ_SIGNATURELINE_IS_SIGNED), OWN_ATTR_SIGNATURELINE_IS_SIGNED, cppu::UnoType<bool>::get(), 0, 0}, + { OUString(UNO_NAME_GRAPHOBJ_SIGNATURELINE_IS_SIGNED), OWN_ATTR_SIGNATURELINE_IS_SIGNED , cppu::UnoType<bool>::get(), 0, 0}, \ + { OUString(UNO_NAME_GRAPHOBJ_QRCODE), OWN_ATTR_QRCODE , cppu::UnoType<css::drawing::QRCode>::get(), 0, 0}, #define SPECIAL_3DSCENEOBJECT_PROPERTIES_DEFAULTS \ { OUString(UNO_NAME_3D_SCENE_AMBIENTCOLOR), SDRATTR_3DSCENE_AMBIENTCOLOR , ::cppu::UnoType<sal_Int32>::get(), 0, 0}, \ |