xmlsecurity/qa/unit/signing/signing.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
New commits: commit 1c4f7139e9a20d495f1577792758cf742d34dc2e Author: Stephan Bergmann <stephan.bergm...@allotropia.de> AuthorDate: Tue Sep 24 10:46:09 2024 +0200 Commit: Stephan Bergmann <stephan.bergm...@allotropia.de> CommitDate: Tue Sep 24 15:38:30 2024 +0200 Let test operate on temp copy of source document The CppunitTest_xmlsecurity_signing CPPUNIT_TEST_NAME=testImplicitScriptSign::TestBody introduced in e5a0209d4b1e1f09191a442e04d626b21c49b9df "cool#9992 lok doc sign: allow sign of macros & the document itself in one step" failed on a read-only source tree with > An uncaught UNO exception > - com.sun.star.ucb.InteractiveAugmentedIOException: {Message: "an error occurred during file opening (18/28) at /home/libo/src/core/ucbhelper/source/provider/cancelcommandexecution.cxx:83", Context: @0x7ff5cb43cf90, Classification: com.sun.star.task.InteractionClassification 0, Code: com.sun.star.ucb.IOErrorCode 1, Arguments: [com.sun.star.beans.PropertyValue: {Name: "Uri", Handle: -1, Value: string: "file:///home/libo/src/core//xmlsecurity/qa/unit/signing/data//macro.odt", State: com.sun.star.beans.PropertyState 0}, com.sun.star.beans.PropertyValue: {Name: "ResourceName", Handle: -1, Value: string: "/home/libo/src/core//xmlsecurity/qa/unit/signing/data//macro.odt", State: com.sun.star.beans.PropertyState 0}]} Change-Id: I9198ca1eba03d55e745a0bbb344963139941496f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173852 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergm...@allotropia.de> diff --git a/xmlsecurity/qa/unit/signing/signing.cxx b/xmlsecurity/qa/unit/signing/signing.cxx index 2a3819768bcd..e8b4a2f9653c 100644 --- a/xmlsecurity/qa/unit/signing/signing.cxx +++ b/xmlsecurity/qa/unit/signing/signing.cxx @@ -1154,10 +1154,12 @@ CPPUNIT_TEST_FIXTURE(SigningTest, testSignatureLineODF) CPPUNIT_TEST_FIXTURE(SigningTest, testImplicitScriptSign) { // Given an ODT file with macros, and two signature managers to create macro + doc signatures: - OUString aFileURL = createFileURL(u"macro.odt"); + createTempCopy(u"macro.odt"); + OUString aFileURL = maTempFile.GetURL(); uno::Reference<embed::XStorage> xWriteableZipStor = comphelper::OStorageHelper::GetStorageOfFormatFromURL(ZIP_STORAGE_FORMAT_STRING, aFileURL, embed::ElementModes::READWRITE); + uno::Reference<embed::XStorage> xMetaInf = xWriteableZipStor->openStorageElement(u"META-INF"_ustr, embed::ElementModes::READWRITE); uno::Reference<io::XStream> xStream = xMetaInf->openStreamElement(