diff options
-rw-r--r-- | xmlsecurity/qa/unit/signing/signing.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/xmlsecurity/qa/unit/signing/signing.cxx b/xmlsecurity/qa/unit/signing/signing.cxx index b342adeeb80d..9d1f9240caef 100644 --- a/xmlsecurity/qa/unit/signing/signing.cxx +++ b/xmlsecurity/qa/unit/signing/signing.cxx @@ -331,7 +331,12 @@ void SigningTest::testOOXMLRemove() // Load the test document as a storage and read its signatures: purpose1 and purpose2. DocumentSignatureManager aManager(mxComponentContext, DocumentSignatureMode::Content); CPPUNIT_ASSERT(aManager.init()); - OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "multi.docx"; + utl::TempFile aTempFile; + aTempFile.EnableKillingFile(); + OUString aURL = aTempFile.GetURL(); + CPPUNIT_ASSERT_EQUAL( + osl::File::RC::E_None, + osl::File::copy(m_directories.getURLFromSrc(DATA_DIRECTORY) + "multi.docx", aURL)); uno::Reference <embed::XStorage> xStorage = comphelper::OStorageHelper::GetStorageOfFormatFromURL(ZIP_STORAGE_FORMAT_STRING, aURL, embed::ElementModes::READWRITE); CPPUNIT_ASSERT(xStorage.is()); aManager.mxStore = xStorage; |