Kaydet (Commit) b0f00885 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Operate on copies of test documents

...as the SwTextBlocks ctor internally calls SwDOCXReader::MakeEntries ->
BeginPutDoc which wants to open the document read-write.  That would fail if
SRCDIR is a read-only tree.

Change-Id: I433b80bcec53c8ca4282d1f45c941153a4064eb9
Reviewed-on: https://gerrit.libreoffice.org/52053Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
üst 606cf347
......@@ -522,7 +522,12 @@ SwDoc* SwUiWriterTest::createDoc(const char* pName)
std::unique_ptr<SwTextBlocks> SwUiWriterTest::readDOCXAutotext(const OUString& sFileName, bool bEmpty)
{
OUString rURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + sFileName;
utl::TempFile tmp;
tmp.EnableKillingFile();
OUString rURL = tmp.GetURL();
CPPUNIT_ASSERT_EQUAL(
osl::FileBase::E_None,
osl::File::copy(m_directories.getURLFromSrc(DATA_DIRECTORY) + sFileName, rURL));
SfxMedium aSrcMed(rURL, StreamMode::STD_READ);
SwDoc* pDoc = createDoc();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment