summaryrefslogtreecommitdiff
path: root/xmlsecurity/qa/unit/signing/signing.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-03-28 16:57:02 +0200
committerStephan Bergmann <sbergman@redhat.com>2018-03-28 21:17:39 +0200
commit0ff64e31b0c74b9b1e78a1d5ddd7be4302f33df3 (patch)
treebc7d8c269e229a92bb5fecc6b77aee7ea5871457 /xmlsecurity/qa/unit/signing/signing.cxx
parentb57e8b5e531408236af5e3be69b9190c646a6eab (diff)
Copy test doc to temp location before opening read/write
...otherwise fails if SRCDIR is a read-only tree Change-Id: I0b81be5ba055dac133e5ee638f21c3c5f4d5736b Reviewed-on: https://gerrit.libreoffice.org/52015 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'xmlsecurity/qa/unit/signing/signing.cxx')
-rw-r--r--xmlsecurity/qa/unit/signing/signing.cxx7
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;