diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2021-02-10 21:05:29 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2021-02-11 09:08:08 +0100 |
commit | c76e6307b6cf33bda0cfa12647ed0342aecc1b29 (patch) | |
tree | e6358fd8e4133c8e3e308dd6336604416b1c7a8c /sfx2/source/doc | |
parent | bb491d89fcafbd83e4e432a7bf17591de27c16d2 (diff) |
tdf#140280 sfx2: fix crash on double-clicking a no-sign shape in read-only mode
Don't assume that all shapes provide an InteropGrabBag UNO property,
check for it.
Change-Id: I6347c54b0631c37154424babbfbd52f802af57d1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110726
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'sfx2/source/doc')
-rw-r--r-- | sfx2/source/doc/objserv.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx index 586c63e503ab..70d4ba462dd2 100644 --- a/sfx2/source/doc/objserv.cxx +++ b/sfx2/source/doc/objserv.cxx @@ -431,6 +431,11 @@ uno::Reference<security::XCertificate> SfxObjectShell::GetSignPDFCertificate() c return uno::Reference<security::XCertificate>(); } + if (!xShapeProps->getPropertySetInfo()->hasPropertyByName("InteropGrabBag")) + { + return uno::Reference<security::XCertificate>(); + } + comphelper::SequenceAsHashMap aMap(xShapeProps->getPropertyValue("InteropGrabBag")); auto it = aMap.find("SignatureCertificate"); if (it == aMap.end()) |