diff options
Diffstat (limited to 'svx/source')
-rw-r--r-- | svx/source/svdraw/svdograf.cxx | 10 | ||||
-rw-r--r-- | svx/source/unodraw/unoshap2.cxx | 22 |
2 files changed, 32 insertions, 0 deletions
diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx index b99ab8de5251..c74de64e69a4 100644 --- a/svx/source/svdraw/svdograf.cxx +++ b/svx/source/svdraw/svdograf.cxx @@ -743,6 +743,16 @@ SdrGrafObj& SdrGrafObj::operator=( const SdrGrafObj& rObj ) mbIsSignatureLineCanAddComment = rObj.mbIsSignatureLineCanAddComment; mbSignatureLineIsSigned = false; mpSignatureLineUnsignedGraphic = rObj.mpSignatureLineUnsignedGraphic; + + if(rObj.mpQrCode) + { + mpQrCode = std::make_unique<css::drawing::QRCode>(*rObj.mpQrCode); + } + else + { + mpQrCode.reset(); + } + if (mbIsSignatureLine && rObj.mpSignatureLineUnsignedGraphic) mpGraphicObject->SetGraphic(rObj.mpSignatureLineUnsignedGraphic); else diff --git a/svx/source/unodraw/unoshap2.cxx b/svx/source/unodraw/unoshap2.cxx index 13e8205e353d..3589c088ac36 100644 --- a/svx/source/unodraw/unoshap2.cxx +++ b/svx/source/unodraw/unoshap2.cxx @@ -31,6 +31,7 @@ #include <com/sun/star/drawing/PointSequence.hpp> #include <com/sun/star/drawing/PolygonKind.hpp> #include <com/sun/star/graphic/XGraphic.hpp> +#include <com/sun/star/drawing/QRCode.hpp> #include <o3tl/any.hxx> #include <tools/urlobj.hxx> #include <vcl/svapp.hxx> @@ -1416,6 +1417,17 @@ bool SvxGraphicObject::setPropertyValueImpl( const OUString& rName, const SfxIte break; } + case OWN_ATTR_QRCODE: + { + css::drawing::QRCode aQrCode; + if (rValue >>= aQrCode) + { + static_cast<SdrGrafObj*>(GetSdrObject())->setQrCode(aQrCode); + bOk = true; + } + break; + } + default: return SvxShapeText::setPropertyValueImpl( rName, pProperty, rValue ); } @@ -1558,6 +1570,16 @@ bool SvxGraphicObject::getPropertyValueImpl( const OUString& rName, const SfxIte break; } + case OWN_ATTR_QRCODE: + { + css::drawing::QRCode* ptr = static_cast<SdrGrafObj*>(GetSdrObject())->getQrCode(); + if(ptr) + { + rValue <<= *ptr; + } + break; + } + default: return SvxShapeText::getPropertyValueImpl(rName, pProperty,rValue); } |